summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_ip4.py13
-rw-r--r--test/test_ip6.py6
-rw-r--r--test/vpp_papi_provider.py2
3 files changed, 14 insertions, 7 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
diff --git a/test/test_ip6.py b/test/test_ip6.py
index 99c63873afb..5dd2bbcff64 100644
--- a/test/test_ip6.py
+++ b/test/test_ip6.py
@@ -2069,8 +2069,8 @@ class TestIP6LoadBalance(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,
- is_ipv6=1)
+ self.vapi.set_ip_flow_hash(vrf_id=0, src=1, dst=1, proto=1,
+ sport=0, dport=0, is_ipv6=1)
self.send_and_expect_load_balancing(self.pg0, src_ip_pkts,
[self.pg1, self.pg2])
@@ -2082,7 +2082,7 @@ class TestIP6LoadBalance(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,
- is_ipv6=1)
+ proto=1, is_ipv6=1)
#
# Recursive prefixes
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py
index c5e8ff0e068..81e25ecc621 100644
--- a/test/vpp_papi_provider.py
+++ b/test/vpp_papi_provider.py
@@ -82,8 +82,6 @@ defaultmapping = {
'l2_table_index': 4294967295, },
'pppoe_add_del_session': {'is_add': 1, },
'policer_add_del': {'is_add': 1, 'conform_action': {'type': 1}, },
- 'set_ip_flow_hash': {'src': 1, 'dst': 1, 'sport': 1, 'dport': 1,
- 'proto': 1, },
'set_ipfix_exporter': {'collector_port': 4739, },
'sr_policy_add': {'weight': 1, 'is_encap': 1, },
'sw_interface_add_del_address': {'is_add': 1, },