aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_ip4.py
diff options
context:
space:
mode:
authorAhmed Abdelsalam <ahabdels@cisco.com>2020-11-20 18:56:09 +0000
committerOle Tr�an <otroan@employees.org>2021-01-21 10:59:46 +0000
commitf2984bbb013acb0d6872e8fbb2f9d57d3e4f49b9 (patch)
tree2b53a21de615e7f6fabcf96e2b15e7070adc1736 /test/test_ip4.py
parent03fabbd22215d306fb66c51f952480631d67c9dc (diff)
ip: use IPv6 flowlabel in flow hash computation
extends ip6_compute_flow_hash() to include IPv6 flowlabel in flowhash computation Type: improvement Signed-off-by: Ahmed Abdelsalam <ahabdels@cisco.com> Signed-off-by: Neale Ranns <neale.ranns@cisco.com> Change-Id: Id1aaa20c9dac729c22b714eea1cdd6e9e4d1f75e
Diffstat (limited to 'test/test_ip4.py')
-rw-r--r--test/test_ip4.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/test/test_ip4.py b/test/test_ip4.py
index b93241b652d..a428db339f4 100644
--- a/test/test_ip4.py
+++ b/test/test_ip4.py
@@ -1138,6 +1138,9 @@ class TestIPLoadBalance(VppTestCase):
def test_ip_load_balance(self):
""" IP Load-Balancing """
+ fhc = VppEnum.vl_api_ip_flow_hash_config_t
+ af = VppEnum.vl_api_address_family_t
+
#
# An array of packets that differ only in the destination port
#
@@ -1206,7 +1209,12 @@ class TestIPLoadBalance(VppTestCase):
# - now only the stream with differing source address will
# load-balance
#
- self.vapi.set_ip_flow_hash(vrf_id=0, src=1, dst=1, sport=0, dport=0)
+ self.vapi.set_ip_flow_hash_v2(
+ af=af.ADDRESS_IP4,
+ table_id=0,
+ flow_hash_config=(fhc.IP_API_FLOW_HASH_SRC_IP |
+ fhc.IP_API_FLOW_HASH_DST_IP |
+ fhc.IP_API_FLOW_HASH_PROTO))
self.send_and_expect_load_balancing(self.pg0, src_ip_pkts,
[self.pg1, self.pg2])
@@ -1218,7 +1226,8 @@ class TestIPLoadBalance(VppTestCase):
#
# change the flow hash config back to defaults
#
- self.vapi.set_ip_flow_hash(vrf_id=0, src=1, dst=1, sport=1, dport=1)
+ self.vapi.set_ip_flow_hash(vrf_id=0, src=1, dst=1,
+ proto=1, sport=1, dport=1)
#
# Recursive prefixes