tcp: avoid fr segments less than mss if possible
[vpp.git] / src / vnet / ip / ip_flow_hash.h
index 82e0efb..30dfcd7 100644 (file)
@@ -16,6 +16,8 @@
 #ifndef __IP_FLOW_HASH_H__
 #define __IP_FLOW_HASH_H__
 
+#include <vnet/ip/ip_types.h>
+
 /** Default: 5-tuple + flowlabel without the "reverse" bit */
 #define IP_FLOW_HASH_DEFAULT (0x9F)
 
   _ (proto, 4, IP_FLOW_HASH_PROTO)                                            \
   _ (reverse, 5, IP_FLOW_HASH_REVERSE_SRC_DST)                                \
   _ (symmetric, 6, IP_FLOW_HASH_SYMMETRIC)                                    \
-  _ (flowlabel, 7, IP_FLOW_HASH_FL)
+  _ (flowlabel, 7, IP_FLOW_HASH_FL)                                           \
+  _ (gtpv1teid, 8, IP_FLOW_HASH_GTPV1_TEID)
+
+typedef struct
+{
+  u8 ver_flags;
+  u8 type;
+  u16 length;
+  u32 teid;
+} __attribute__ ((packed)) gtpv1u_header_t;
+#define GTPV1_PORT_BE 0x6808
 
 /**
  * A flow hash configuration is a mask of the flow hash options
@@ -48,6 +60,13 @@ typedef enum flow_hash_config_t_
 #undef _
 } flow_hash_config_t;
 
+/* Router ID mixed into the flow hash to prevent network polarisation */
+extern u32 ip_flow_hash_router_id;
+
+int ip_flow_hash_set (ip_address_family_t af, u32 table_id,
+                     flow_hash_config_t flow_hash_config);
+void ip_flow_hash_router_id_set (u32 router_id);
+
 #endif /* __IP_TYPES_H__ */
 
 /*