aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/ip_flow_hash.h
diff options
context:
space:
mode:
authorNeale Ranns <neale@graphiant.com>2021-01-22 16:12:38 +0000
committerOle Tr�an <otroan@employees.org>2021-01-28 09:47:56 +0000
commit3d5f08a825a978cd6853989a5df8c9b9811e7fb8 (patch)
treec12651cb21792551accced579d7949e3e1ae4a56 /src/vnet/ip/ip_flow_hash.h
parent86c7ff6a4c014b65af0d309173e89c2fe8377614 (diff)
ip: Router ID included in flow hash
Type: feature A device/router needs to have a unique ID which is included in the flow has so that flows are not polarised through the network, i.e. each deice in the network chooses the same nth link for the same flow. Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I963e03674adbb085902b4084fdc4886b88f5734c
Diffstat (limited to 'src/vnet/ip/ip_flow_hash.h')
-rw-r--r--src/vnet/ip/ip_flow_hash.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vnet/ip/ip_flow_hash.h b/src/vnet/ip/ip_flow_hash.h
index 82e0efb0d08..bd37ef7307b 100644
--- a/src/vnet/ip/ip_flow_hash.h
+++ b/src/vnet/ip/ip_flow_hash.h
@@ -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)
@@ -48,6 +50,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__ */
/*