66import ptf .testutils as testutils
77import pytest
88from constants import LOCAL_PTF_INTF , LOCAL_DUT_INTF , REMOTE_DUT_INTF , REMOTE_PTF_RECV_INTF , \
9- REMOTE_PTF_SEND_INTF , VXLAN_UDP_BASE_SRC_PORT
9+ REMOTE_PTF_SEND_INTF
1010from gnmi_utils import apply_messages
1111from packets import outbound_pl_packets , inbound_pl_packets
12- from tests .common import config_reload
1312from tests .common .plugins .allure_wrapper import allure_step_wrapper as allure
1413from tests .common .helpers .assertions import pytest_assert
1514from tests .common .utilities import wait_until
@@ -51,7 +50,7 @@ def setup_npu_routes(duthost, dash_pl_config, skip_config, skip_cleanup, dpu_ind
5150
5251
5352@pytest .fixture (autouse = True , scope = "module" )
54- def common_setup_teardown (localhost , duthost , ptfhost , dpu_index , dpuhosts , skip_config , set_vxlan_udp_sport_range ):
53+ def common_setup_teardown (localhost , duthost , ptfhost , dpu_index , dpuhosts , skip_config ):
5554 if skip_config :
5655 return
5756 dpuhost = dpuhosts [dpu_index ]
@@ -68,7 +67,7 @@ def common_setup_teardown(localhost, duthost, ptfhost, dpu_index, dpuhosts, skip
6867 apply_messages (localhost , duthost , ptfhost , base_config_messages , dpuhost .dpu_index )
6968
7069 route_and_mapping_messages = {
71- ** pl .PE1_VNET_MAPPING_CONFIG ,
70+ ** pl .PE_VNET_MAPPING_CONFIG ,
7271 ** pl .PE_SUBNET_ROUTE_CONFIG ,
7372 ** pl .VM_SUBNET_ROUTE_CONFIG
7473 }
@@ -95,9 +94,6 @@ def common_setup_teardown(localhost, duthost, ptfhost, dpu_index, dpuhosts, skip
9594 apply_messages (localhost , duthost , ptfhost , route_and_mapping_messages , dpuhost .dpu_index , False )
9695 apply_messages (localhost , duthost , ptfhost , base_config_messages , dpuhost .dpu_index , False )
9796
98- if str (VXLAN_UDP_BASE_SRC_PORT ) in dpuhost .shell ("redis-cli -n 0 hget SWITCH_TABLE:switch vxlan_sport" )['stdout' ]:
99- config_reload (dpuhost , safe_reload = True )
100-
10197
10298@pytest .fixture (scope = "function" , params = ["vxlan" , "gre" ])
10399def outer_encap (request ):
@@ -239,7 +235,8 @@ def test_inbound_pkt_eni_counter(
239235 packet_number = 1
240236
241237 vm_to_dpu_pkt , _ = outbound_pl_packets (dash_pl_config , outer_encap , inner_packet_type = inner_packet_type )
242- pe_to_dpu_pkt , exp_dpu_to_vm_pkt = inbound_pl_packets (dash_pl_config , inner_packet_type = inner_packet_type )
238+ pe_to_dpu_pkt , exp_dpu_to_vm_pkt = inbound_pl_packets (
239+ dash_pl_config , inner_packet_type = inner_packet_type , vxlan_udp_src_port_mask = 16 )
243240
244241 with allure .step ("send outbound and inbound packet and verify the relevant eni counter" ):
245242 eni_counter_check_point_dict = {"SAI_ENI_STAT_FLOW_CREATED" : 1 ,
0 commit comments