sonic-mgmt icon indicating copy to clipboard operation
sonic-mgmt copied to clipboard

[ECMP hash] Tests for Vxlan and Nvgre packets using different packet fields

Open kperumalbfn opened this issue 1 year ago • 3 comments

Description of PR

Add ECMP test case to validate hash_keys for Vxlan and NVGRE packet types.

Summary: Fixes # (issue) https://github.com/sonic-net/sonic-mgmt/issues/8166

Type of change

  • [ ] Bug fix
  • [ ] Testbed and Framework(new/improvement)
  • [x] Test case(new/improvement)

Approach

What is the motivation for this PR?

To verify ECMP balancing based on different packet fields for Vxlan and Nvgre.

How did you verify/test it?

Validated the tests on Mellanox, Cisco and Broadcom SKUs.

Supported testbed topology if it's a new test case?

All

kperumalbfn avatar Oct 30 '24 22:10 kperumalbfn

The pre-commit check detected issues in the files touched by this pull request. The pre-commit check is a mandatory check, please fix detected issues.

Detailed pre-commit check results: trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

ansible/roles/test/files/ptftests/py3/hash_test.py:853:1: E302 expected 2 blank lines, found 1
ansible/roles/test/files/ptftests/py3/hash_test.py:875:39: E231 missing whitespace after ','
ansible/roles/test/files/ptftests/py3/hash_test.py:884:9: F841 local variable 'vlan_id' is assigned to but never used
ansible/roles/test/files/ptftests/py3/hash_test.py:885:9: F841 local variable 'ip_proto' is assigned to but never used
ansible/roles/test/files/ptftests/py3/hash_test.py:933:121: E501 line too long (140 > 120 characters)
ansible/roles/test/files/ptftests/py3/hash_test.py:995:9: F841 local variable 'vlan_id' is assigned to but never used
ansible/roles/test/files/ptftests/py3/hash_test.py:996:9: F841 local variable 'ip_proto' is assigned to but never used
ansible/roles/test/files/ptftests/py3/hash_test.py:998:39: E231 missing whitespace after ','
ansible/roles/test/files/ptftests/py3/hash_test.py:1000:9: F841 local variable 'inner_pkt_len' is assigned to but never used
ansible/roles/test/files/ptftests/py3/hash_test.py:1044:121: E501 line too long (142 > 120 characters)
ansible/roles/test/files/ptftests/py3/hash_test.py:1084:121: E501 line too long (125 > 120 characters)
...
[truncated extra lines, please run pre-commit locally to view full check results]

To run the pre-commit checks locally, you can follow below steps:

  1. Ensure that default python is python3. In sonic-mgmt docker container, default python is python2. You can run the check by activating the python3 virtual environment in sonic-mgmt docker container or outside of sonic-mgmt docker container.
  2. Ensure that the pre-commit package is installed:
sudo pip install pre-commit
  1. Go to repository root folder
  2. Install the pre-commit hooks:
pre-commit install
  1. Use pre-commit to check staged file:
pre-commit
  1. Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>

mssonicbld avatar Oct 30 '24 22:10 mssonicbld

The pre-commit check detected issues in the files touched by this pull request. The pre-commit check is a mandatory check, please fix detected issues.

Detailed pre-commit check results: trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

ansible/roles/test/files/ptftests/py3/hash_test.py:1078:121: E501 line too long (125 > 120 characters)
ansible/roles/test/files/ptftests/py3/hash_test.py:1119:121: E501 line too long (138 > 120 characters)
ansible/roles/test/files/ptftests/py3/hash_test.py:1138:1: E302 expected 2 blank lines, found 1
ansible/roles/test/files/ptftests/py3/hash_test.py:1216:9: F841 local variable 'vlan_id' is assigned to but never used
ansible/roles/test/files/ptftests/py3/hash_test.py:1217:9: F841 local variable 'ip_proto' is assigned to but never used
ansible/roles/test/files/ptftests/py3/hash_test.py:1240:31: E231 missing whitespace after ','
ansible/roles/test/files/ptftests/py3/hash_test.py:1395:92: E231 missing whitespace after ','
ansible/roles/test/files/ptftests/py3/hash_test.py:1395:107: E231 missing whitespace after ','
ansible/roles/test/files/ptftests/py3/hash_test.py:1395:121: E501 line too long (123 > 120 characters)
ansible/roles/test/files/ptftests/py3/hash_test.py:1436:121: E501 line too long (138 > 120 characters)
tests/fib/test_fib.py:461:22: E127 continuation line over-indented for visual indent
...
[truncated extra lines, please run pre-commit locally to view full check results]

To run the pre-commit checks locally, you can follow below steps:

  1. Ensure that default python is python3. In sonic-mgmt docker container, default python is python2. You can run the check by activating the python3 virtual environment in sonic-mgmt docker container or outside of sonic-mgmt docker container.
  2. Ensure that the pre-commit package is installed:
sudo pip install pre-commit
  1. Go to repository root folder
  2. Install the pre-commit hooks:
pre-commit install
  1. Use pre-commit to check staged file:
pre-commit
  1. Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>

mssonicbld avatar Oct 30 '24 22:10 mssonicbld

The pre-commit check detected issues in the files touched by this pull request. The pre-commit check is a mandatory check, please fix detected issues.

Detailed pre-commit check results: trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

ansible/roles/test/files/ptftests/py3/hash_test.py:1140:1: E302 expected 2 blank lines, found 1
ansible/roles/test/files/ptftests/py3/hash_test.py:1218:9: F841 local variable 'vlan_id' is assigned to but never used
ansible/roles/test/files/ptftests/py3/hash_test.py:1219:9: F841 local variable 'ip_proto' is assigned to but never used
tests/fib/test_fib.py:461:22: E127 continuation line over-indented for visual indent
tests/fib/test_fib.py:508:22: E127 continuation line over-indented for visual indent

flake8...............................................(no files to check)Skipped
check conditional mark sort..........................(no files to check)Skipped

To run the pre-commit checks locally, you can follow below steps:

  1. Ensure that default python is python3. In sonic-mgmt docker container, default python is python2. You can run the check by activating the python3 virtual environment in sonic-mgmt docker container or outside of sonic-mgmt docker container.
  2. Ensure that the pre-commit package is installed:
sudo pip install pre-commit
  1. Go to repository root folder
  2. Install the pre-commit hooks:
pre-commit install
  1. Use pre-commit to check staged file:
pre-commit
  1. Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>

mssonicbld avatar Oct 30 '24 23:10 mssonicbld

The pre-commit check detected issues in the files touched by this pull request. The pre-commit check is a mandatory check, please fix detected issues.

Detailed pre-commit check results: trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...............................................................Passed
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Passed
flake8...............................................(no files to check)Skipped
check conditional mark sort..............................................Failed
- hook id: check-conditional-mark-sort
- exit code: 1

The entries in tests/common/plugins/conditional_mark/tests_mark_conditions.yaml tests/common/plugins/conditional_mark/tests_mark_conditions_acl.yaml tests/common/plugins/conditional_mark/tests_mark_conditions_drop_packets.yaml tests/common/plugins/conditional_mark/tests_mark_conditions_platform_tests.yaml tests/common/plugins/conditional_mark/tests_mark_conditions_skip_traffic_test.yaml are not sorted in alphabetic order, please adjust the order before commit
===========================================================================
File: tests/common/plugins/conditional_mark/tests_mark_conditions.yaml
===========================================================================
Conditional marks before sort: ['acl/custom_acl_table/test_custom_acl_table.py', 'acl/null_route/test_null_route_helper.py', 'acl/test_acl.py', 'acl/test_acl_outer_vlan.py', 'arp/test_arp_dualtor.py::test_proxy_arp_for_standby_neighbor', 'arp/test_neighbor_mac_noptf.py', 'arp/test_unknown_mac.py', 'arp/test_wr_arp.py', 'bfd/test_bfd.py', 'bfd/test_bfd.py::test_bfd_basic', 'bfd/test_bfd.py::test_bfd_echo_mode', 'bfd/test_bfd.py::test_bfd_scale', 'bfd/test_bfd_static_route.py', 'bfd/test_bfd_traffic.py', 'bgp/test_bgp_allow_list.py', 'bgp/test_bgp_bbr.py', 'bgp/test_bgp_gr_helper.py', 'bgp/test_bgp_multipath_relax.py', 'bgp/test_bgp_queue.py', 'bgp/test_bgp_slb.py', 'bgp/test_bgp_slb.py::test_bgp_slb_neighbor_persistence_across_advanced_reboot', 'bgp/test_bgp_speaker.py', 'bgp/test_bgp_suppress_fib.py', 'bgp/test_bgpmon.py', 'bgp/test_traffic_shift.py::test_load_minigraph_with_traffic_shift_away', 'cacl/test_cacl_application.py::test_cacl_application_dualtor', 'cacl/test_cacl_application.py::test_cacl_application_nondualtor', 'cacl/test_cacl_application.py::test_multiasic_cacl_application', 'configlet/test_add_rack.py', 'container_hardening/test_container_hardening.py::test_container_privileged', 'copp/test_copp.py', 'copp/test_copp.py::TestCOPP::test_add_new_trap', 'copp/test_copp.py::TestCOPP::test_remove_trap', 'copp/test_copp.py::TestCOPP::test_trap_config_save_after_reboot', 'crm/test_crm.py::test_crm_fdb_entry', 'decap/test_decap.py::test_decap[ttl=pipe, dscp=pipe, vxlan=disable]', 'decap/test_decap.py::test_decap[ttl=pipe, dscp=pipe, vxlan=set_unset]', 'decap/test_decap.py::test_decap[ttl=pipe, dscp=uniform, vxlan=disable]', 'decap/test_decap.py::test_decap[ttl=pipe, dscp=uniform, vxlan=set_unset]', 'decap/test_decap.py::test_decap[ttl=uniform, dscp=pipe, vxlan=disable]', 'decap/test_decap.py::test_decap[ttl=uniform, dscp=pipe, vxlan=set_unset]', 'decap/test_decap.py::test_decap[ttl=uniform, dscp=uniform, vxlan=disable]', 'decap/test_decap.py::test_decap[ttl=uniform, dscp=uniform, vxlan=set_unset]', 'decap/test_subnet_decap.py::test_vlan_subnet_decap', 'dhcp_relay/test_dhcp_relay.py', 'dhcp_relay/test_dhcp_relay.py::test_dhcp_relay_after_link_flap', 'dhcp_relay/test_dhcp_relay.py::test_dhcp_relay_random_sport', 'dhcp_relay/test_dhcp_relay.py::test_dhcp_relay_start_with_uplinks_down', 'dhcp_relay/test_dhcp_relay.py::test_dhcp_relay_unicast_mac', 'dhcp_relay/test_dhcp_relay_stress.py::test_dhcp_relay_stress', 'dhcp_relay/test_dhcp_relay_stress.py::test_dhcp_relay_stress[discover]', 'dhcp_relay/test_dhcp_relay_stress.py::test_dhcp_relay_stress[request]', 'dhcp_relay/test_dhcpv6_relay.py', 'dhcp_relay/test_dhcpv6_relay.py::TestDhcpv6RelayWithMultipleVlan', 'drop_packets', 'dualtor/test_ipinip.py::test_encap_with_mirror_session', 'dualtor/test_orch_stress.py', 'dualtor/test_orchagent_active_tor_downstream.py', 'dualtor/test_orchagent_active_tor_downstream.py::test_downstream_ecmp_nexthops', 'dualtor/test_orchagent_mac_move.py', 'dualtor/test_orchagent_standby_tor_downstream.py::test_downstream_standby_mux_toggle_active', 'dualtor/test_orchagent_standby_tor_downstream.py::test_standby_tor_downstream', 'dualtor/test_orchagent_standby_tor_downstream.py::test_standby_tor_downstream_bgp_recovered', 'dualtor/test_orchagent_standby_tor_downstream.py::test_standby_tor_downstream_loopback_route_readded', 'dualtor/test_orchagent_standby_tor_downstream.py::test_standby_tor_downstream_t1_link_recovered', 'dualtor/test_orchagent_standby_tor_downstream.py::test_standby_tor_remove_neighbor_downstream_standby', 'dualtor/test_standby_tor_upstream_mux_toggle.py', 'dualtor/test_switchover_failure.py', 'dualtor/test_tor_ecn.py::test_dscp_to_queue_during_encap_on_standby', 'dualtor/test_tor_ecn.py::test_ecn_during_encap_on_standby', 'dualtor/test_tunnel_memory_leak.py::test_tunnel_memory_leak', 'dualtor_io', 'dualtor_io/test_link_failure.py::test_active_link_admin_down_config_reload_link_up_downstream_standby[active-active]', 'dualtor_io/test_link_failure.py::test_active_link_down_downstream_active', 'dualtor_io/test_link_failure.py::test_active_link_down_downstream_active_soc', 'dualtor_io/test_link_failure.py::test_active_link_down_downstream_standby', 'dualtor_io/test_link_failure.py::test_active_link_down_upstream', 'dualtor_io/test_link_failure.py::test_active_link_down_upstream_soc', 'dualtor_io/test_link_failure.py::test_standby_link_down_downstream_active', 'dualtor_io/test_link_failure.py::test_standby_link_down_downstream_standby', 'dualtor_io/test_link_failure.py::test_standby_link_down_upstream', 'dualtor_mgmt/test_dualtor_bgp_update_delay.py', 'dualtor_mgmt/test_server_failure.py::test_server_reboot', 'dut_console', 'ecmp/inner_hashing/test_inner_hashing.py', 'ecmp/inner_hashing/test_inner_hashing_lag.py', 'ecmp/inner_hashing/test_wr_inner_hashing.py', 'ecmp/inner_hashing/test_wr_inner_hashing_lag.py', 'ecmp/test_ecmp_sai_value.py', 'ecmp/test_fgnhg.py', 'everflow/test_everflow_per_interface.py', 'everflow/test_everflow_per_interface.py::test_everflow_per_interface[ipv6-default]', 'everflow/test_everflow_per_interface.py::test_everflow_per_interface[ipv6-m0_l3_scenario]', 'everflow/test_everflow_per_interface.py::test_everflow_per_interface[ipv6-m0_vlan_scenario]', 'everflow/test_everflow_testbed.py::EverflowIPv4Tests::test_everflow_dscp_with_policer', 'everflow/test_everflow_testbed.py::TestEverflowV4EgressAclEgressMirror', 'everflow/test_everflow_testbed.py::TestEverflowV4EgressAclEgressMirror::test_everflow_dscp_with_policer', 'everflow/test_everflow_testbed.py::TestEverflowV4IngressAclIngressMirror::test_everflow_dscp_with_policer', 'fdb/test_fdb_mac_expire.py', 'fib/test_fib.py::test_ipinip_hash', 'fib/test_fib.py::test_vxlan_hash', 'fib/test_fib.py::test_nvgre_hash', 'generic_config_updater', 'generic_config_updater/test_dhcp_relay.py', 'generic_config_updater/test_dynamic_acl.py', 'generic_config_updater/test_ecn_config_update.py::test_ecn_config_updates', 'generic_config_updater/test_eth_interface.py::test_replace_fec', 'generic_config_updater/test_eth_interface.py::test_toggle_pfc_asym', 'generic_config_updater/test_eth_interface.py::test_update_speed', 'generic_config_updater/test_incremental_qos.py', 'generic_config_updater/test_incremental_qos.py::test_incremental_qos_config_updates', 'generic_config_updater/test_mmu_dynamic_threshold_config_update.py::test_dynamic_th_config_updates', 'generic_config_updater/test_pfcwd_status.py', 'generic_config_updater/test_pg_headroom_update.py', 'hash/test_generic_hash.py::test_algorithm_config', 'hash/test_generic_hash.py::test_backend_error_messages', 'hash/test_generic_hash.py::test_ecmp_and_lag_hash', 'hash/test_generic_hash.py::test_ecmp_and_lag_hash[CRC-INNER_IP_PROTOCOL', 'hash/test_generic_hash.py::test_ecmp_hash', 'hash/test_generic_hash.py::test_ecmp_hash[CRC-INNER_IP_PROTOCOL', 'hash/test_generic_hash.py::test_hash_capability', 'hash/test_generic_hash.py::test_lag_hash', 'hash/test_generic_hash.py::test_lag_hash[CRC-INNER_IP_PROTOCOL', 'hash/test_generic_hash.py::test_lag_member_flap', 'hash/test_generic_hash.py::test_lag_member_flap[CRC-INNER_IP_PROTOCOL', 'hash/test_generic_hash.py::test_lag_member_remove_add', 'hash/test_generic_hash.py::test_lag_member_remove_add[CRC-INNER_IP_PROTOCOL', 'hash/test_generic_hash.py::test_nexthop_flap', 'hash/test_generic_hash.py::test_nexthop_flap[CRC-INNER_IP_PROTOCOL', 'hash/test_generic_hash.py::test_reboot', 'hash/test_generic_hash.py::test_reboot[CRC-INNER_IP_PROTOCOL', 'http/test_http_copy.py', 'iface_loopback_action/test_iface_loopback_action.py', 'iface_namingmode/test_iface_namingmode.py::TestConfigInterface', 'iface_namingmode/test_iface_namingmode.py::TestShowPriorityGroup', 'iface_namingmode/test_iface_namingmode.py::TestShowQueue', 'iface_namingmode/test_iface_namingmode.py::TestShowQueue::test_show_queue_persistent_watermark', 'iface_namingmode/test_iface_namingmode.py::TestShowQueue::test_show_queue_watermark', 'ip/test_ip_packet.py', 'ip/test_ip_packet.py::TestIPPacket::test_forward_ip_packet_with_0xffff_chksum_drop', 'ip/test_ip_packet.py::TestIPPacket::test_forward_ip_packet_with_0xffff_chksum_tolerant', 'ip/test_mgmt_ipv6_only.py', 'ipfwd/test_dip_sip.py', 'ipfwd/test_dir_bcast.py', 'ipfwd/test_mtu.py', 'link_flap/test_cont_link_flap.py', 'lldp/test_lldp.py::test_lldp', 'lldp/test_lldp.py::test_lldp_neighbor', 'macsec/test_dataplane.py::TestDataPlane::test_server_to_neighbor', 'macsec/test_interop_protocol.py::TestInteropProtocol::test_bgp', 'macsec/test_macsec.py', 'mpls/test_mpls.py', 'mvrf', 'nat', 'override_config_table/test_override_config_table.py', 'pc/test_lag_2.py::test_lag_db_status_with_po_update', 'pc/test_lag_member.py', 'pc/test_po_cleanup.py', 'pc/test_po_update.py::test_po_update', 'pc/test_po_update.py::test_po_update_io_no_loss', 'pc/test_po_voq.py', 'pfc/test_unknown_mac.py', 'pfc_asym/test_pfc_asym.py', 'pfc_asym/test_pfc_asym.py::test_pfc_asym_off_rx_pause_frames', 'pfcwd', 'pfcwd/test_pfc_config.py::TestPfcConfig::test_forward_action_cfg', 'pfcwd/test_pfcwd_all_port_storm.py', 'pfcwd/test_pfcwd_function.py::TestPfcwdFunc::test_pfcwd_no_traffic', 'pfcwd/test_pfcwd_warm_reboot.py', 'process_monitoring/test_critical_process_monitoring.py::test_orchagent_heartbeat', 'qos', 'qos/test_buffer.py', 'qos/test_buffer.py::test_buffer_model_test', 'qos/test_buffer_traditional.py', 'qos/test_pfc_pause.py::test_pfc_pause_lossless', 'qos/test_qos_dscp_mapping.py::TestQoSSaiDSCPQueueMapping_IPIP_Base::test_dscp_to_queue_mapping_pipe_mode', 'qos/test_qos_masic.py', 'qos/test_qos_sai.py', 'qos/test_qos_sai.py::TestQosSai', 'qos/test_qos_sai.py::TestQosSai::testIPIPQosSaiDscpToPgMapping', 'qos/test_qos_sai.py::TestQosSai::testPfcStormWithSharedHeadroomOccupancy', 'qos/test_qos_sai.py::TestQosSai::testQosSaiBufferPoolWatermark', 'qos/test_qos_sai.py::TestQosSai::testQosSaiDot1pPgMapping', 'qos/test_qos_sai.py::TestQosSai::testQosSaiDot1pQueueMapping', 'qos/test_qos_sai.py::TestQosSai::testQosSaiDscpQueueMapping', 'qos/test_qos_sai.py::TestQosSai::testQosSaiDscpToPgMapping', 'qos/test_qos_sai.py::TestQosSai::testQosSaiDwrrWeightChange', 'qos/test_qos_sai.py::TestQosSai::testQosSaiFullMeshTrafficSanity', 'qos/test_qos_sai.py::TestQosSai::testQosSaiHeadroomPoolSize', 'qos/test_qos_sai.py::TestQosSai::testQosSaiHeadroomPoolWatermark', 'qos/test_qos_sai.py::TestQosSai::testQosSaiLosslessVoq', 'qos/test_qos_sai.py::TestQosSai::testQosSaiLossyQueueVoq', 'qos/test_qos_sai.py::TestQosSai::testQosSaiLossyQueueVoqMultiSrc', 'qos/test_qos_sai.py::TestQosSai::testQosSaiPGDrop', 'qos/test_qos_sai.py::TestQosSai::testQosSaiPgHeadroomWatermark', 'qos/test_qos_sai.py::TestQosSai::testQosSaiPgSharedWatermark[None-wm_pg_shared_lossy]', 'qos/test_qos_sai.py::TestQosSai::testQosSaiQWatermarkAllPorts', 'qos/test_qos_sai.py::TestQosSai::testQosSaiSharedReservationSize', 'qos/test_tunnel_qos_remap.py::test_pfc_watermark_extra_lossless_active', 'qos/test_tunnel_qos_remap.py::test_pfc_watermark_extra_lossless_standby', 'radv/test_radv_ipv6_ra.py::test_solicited_router_advertisement_with_m_flag', 'radv/test_radv_ipv6_ra.py::test_unsolicited_router_advertisement_with_m_flag', 'reset_factory/test_reset_factory.py', 'restapi/test_restapi.py', 'restapi/test_restapi.py::test_create_vrf', 'restapi/test_restapi_vxlan_ecmp.py', 'route/test_default_route.py', 'route/test_route_flap.py', 'route/test_route_perf.py', 'route/test_static_route.py', 'route/test_static_route.py::test_static_route_ecmp_ipv6', 'show_techsupport/test_auto_techsupport.py', 'show_techsupport/test_auto_techsupport.py::TestAutoTechSupport::test_max_limit[core]', 'show_techsupport/test_auto_techsupport.py::TestAutoTechSupport::test_sai_sdk_dump', 'snappi_tests/ecn/test_red_accuracy_with_snappi', 'snappi_tests/multidut/pfc/test_multidut_global_pause_with_snappi.py', 'snmp/test_snmp_default_route.py::test_snmp_default_route', 'snmp/test_snmp_link_local.py', 'snmp/test_snmp_loopback.py::test_snmp_loopback', 'snmp/test_snmp_pfc_counters.py', 'snmp/test_snmp_queue.py', 'snmp/test_snmp_queue_counters.py', 'span', 'span/test_port_mirroring.py', 'ssh/test_ssh_default_password', 'ssh/test_ssh_stress.py::test_ssh_stress', 'sub_port_interfaces', 'sub_port_interfaces/test_show_subinterface.py::test_subinterface_status[port]', 'sub_port_interfaces/test_show_subinterface.py::test_subinterface_status[port_in_lag]', 'sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_routing_between_sub_ports_unaffected_by_sub_ports_removal[port_in_lag', 'sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_tunneling_between_sub_ports', 'sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_untagged_packet_not_routed[port_in_lag] ', 'sub_port_interfaces/test_sub_port_l2_forwarding.py::test_sub_port_l2_forwarding[port_in_lag]', 'syslog/test_syslog.py', 'syslog/test_syslog_source_ip.py', 'syslog/test_syslog_source_ip.py::TestSSIP::test_syslog_config_work_after_reboot', 'syslog/test_syslog_source_ip.py::TestSSIP::test_syslog_protocol_filter_severity', 'system_health/test_system_health.py::test_service_checker_with_process_exit', 'tacacs/test_authorization.py::test_authorization_tacacs_and_local', 'telemetry/test_events.py', 'telemetry/test_telemetry.py', 'telemetry/test_telemetry.py::test_telemetry_queue_buffer_cnt', 'test_pktgen.py', 'test_vs_chassis_setup.py', 'vlan/test_vlan.py::test_vlan_tc7_tagged_qinq_switch_on_outer_tag', 'vlan/test_vlan_ping.py', 'voq', 'voq/test_fabric_cli_and_db.py', 'voq/test_fabric_reach.py', 'voq/test_voq_fabric_isolation.py', 'voq/test_voq_fabric_status_all.py', 'vrf/test_vrf.py::TestVrfAclRedirect', 'vrf/test_vrf_attr.py::TestVrfAttrSrcMac::test_vrf1_neigh_with_default_router_mac', 'vxlan/test_vnet_route_leak.py', 'vxlan/test_vnet_vxlan.py', 'vxlan/test_vxlan_bfd_tsa.py', 'vxlan/test_vxlan_bfd_tsa.py::Test_VxLAN_BFD_TSA::test_tsa_case4', 'vxlan/test_vxlan_bfd_tsa.py::Test_VxLAN_BFD_TSA::test_tsa_case5', 'vxlan/test_vxlan_bfd_tsa.py::Test_VxLAN_BFD_TSA::test_tsa_case6', 'vxlan/test_vxlan_crm.py', 'vxlan/test_vxlan_crm.py::Test_VxLAN_Crm::test_crm_128_group_members[v4_in_v6]', 'vxlan/test_vxlan_crm.py::Test_VxLAN_Crm::test_crm_128_group_members[v6_in_v6]', 'vxlan/test_vxlan_crm.py::Test_VxLAN_Crm::test_crm_16k_routes[v4_in_v6]', 'vxlan/test_vxlan_crm.py::Test_VxLAN_Crm::test_crm_16k_routes[v6_in_v6]', 'vxlan/test_vxlan_crm.py::Test_VxLAN_Crm::test_crm_512_nexthop_groups[v4_in_v6]', 'vxlan/test_vxlan_crm.py::Test_VxLAN_Crm::test_crm_512_nexthop_groups[v6_in_v6]', 'vxlan/test_vxlan_decap.py', 'vxlan/test_vxlan_ecmp.py', 'vxlan/test_vxlan_ecmp_switchover.py', 'wan/lacp/test_wan_lag_min_link.py::test_lag_min_link']
Conditional marks after sort: ['acl/custom_acl_table/test_custom_acl_table.py', 'acl/null_route/test_null_route_helper.py', 'acl/test_acl.py', 'acl/test_acl_outer_vlan.py', 'arp/test_arp_dualtor.py::test_proxy_arp_for_standby_neighbor', 'arp/test_neighbor_mac_noptf.py', 'arp/test_unknown_mac.py', 'arp/test_wr_arp.py', 'bfd/test_bfd.py', 'bfd/test_bfd.py::test_bfd_basic', 'bfd/test_bfd.py::test_bfd_echo_mode', 'bfd/test_bfd.py::test_bfd_scale', 'bfd/test_bfd_static_route.py', 'bfd/test_bfd_traffic.py', 'bgp/test_bgp_allow_list.py', 'bgp/test_bgp_bbr.py', 'bgp/test_bgp_gr_helper.py', 'bgp/test_bgp_multipath_relax.py', 'bgp/test_bgp_queue.py', 'bgp/test_bgp_slb.py', 'bgp/test_bgp_slb.py::test_bgp_slb_neighbor_persistence_across_advanced_reboot', 'bgp/test_bgp_speaker.py', 'bgp/test_bgp_suppress_fib.py', 'bgp/test_bgpmon.py', 'bgp/test_traffic_shift.py::test_load_minigraph_with_traffic_shift_away', 'cacl/test_cacl_application.py::test_cacl_application_dualtor', 'cacl/test_cacl_application.py::test_cacl_application_nondualtor', 'cacl/test_cacl_application.py::test_multiasic_cacl_application', 'configlet/test_add_rack.py', 'container_hardening/test_container_hardening.py::test_container_privileged', 'copp/test_copp.py', 'copp/test_copp.py::TestCOPP::test_add_new_trap', 'copp/test_copp.py::TestCOPP::test_remove_trap', 'copp/test_copp.py::TestCOPP::test_trap_config_save_after_reboot', 'crm/test_crm.py::test_crm_fdb_entry', 'decap/test_decap.py::test_decap[ttl=pipe, dscp=pipe, vxlan=disable]', 'decap/test_decap.py::test_decap[ttl=pipe, dscp=pipe, vxlan=set_unset]', 'decap/test_decap.py::test_decap[ttl=pipe, dscp=uniform, vxlan=disable]', 'decap/test_decap.py::test_decap[ttl=pipe, dscp=uniform, vxlan=set_unset]', 'decap/test_decap.py::test_decap[ttl=uniform, dscp=pipe, vxlan=disable]', 'decap/test_decap.py::test_decap[ttl=uniform, dscp=pipe, vxlan=set_unset]', 'decap/test_decap.py::test_decap[ttl=uniform, dscp=uniform, vxlan=disable]', 'decap/test_decap.py::test_decap[ttl=uniform, dscp=uniform, vxlan=set_unset]', 'decap/test_subnet_decap.py::test_vlan_subnet_decap', 'dhcp_relay/test_dhcp_relay.py', 'dhcp_relay/test_dhcp_relay.py::test_dhcp_relay_after_link_flap', 'dhcp_relay/test_dhcp_relay.py::test_dhcp_relay_random_sport', 'dhcp_relay/test_dhcp_relay.py::test_dhcp_relay_start_with_uplinks_down', 'dhcp_relay/test_dhcp_relay.py::test_dhcp_relay_unicast_mac', 'dhcp_relay/test_dhcp_relay_stress.py::test_dhcp_relay_stress', 'dhcp_relay/test_dhcp_relay_stress.py::test_dhcp_relay_stress[discover]', 'dhcp_relay/test_dhcp_relay_stress.py::test_dhcp_relay_stress[request]', 'dhcp_relay/test_dhcpv6_relay.py', 'dhcp_relay/test_dhcpv6_relay.py::TestDhcpv6RelayWithMultipleVlan', 'drop_packets', 'dualtor/test_ipinip.py::test_encap_with_mirror_session', 'dualtor/test_orch_stress.py', 'dualtor/test_orchagent_active_tor_downstream.py', 'dualtor/test_orchagent_active_tor_downstream.py::test_downstream_ecmp_nexthops', 'dualtor/test_orchagent_mac_move.py', 'dualtor/test_orchagent_standby_tor_downstream.py::test_downstream_standby_mux_toggle_active', 'dualtor/test_orchagent_standby_tor_downstream.py::test_standby_tor_downstream', 'dualtor/test_orchagent_standby_tor_downstream.py::test_standby_tor_downstream_bgp_recovered', 'dualtor/test_orchagent_standby_tor_downstream.py::test_standby_tor_downstream_loopback_route_readded', 'dualtor/test_orchagent_standby_tor_downstream.py::test_standby_tor_downstream_t1_link_recovered', 'dualtor/test_orchagent_standby_tor_downstream.py::test_standby_tor_remove_neighbor_downstream_standby', 'dualtor/test_standby_tor_upstream_mux_toggle.py', 'dualtor/test_switchover_failure.py', 'dualtor/test_tor_ecn.py::test_dscp_to_queue_during_encap_on_standby', 'dualtor/test_tor_ecn.py::test_ecn_during_encap_on_standby', 'dualtor/test_tunnel_memory_leak.py::test_tunnel_memory_leak', 'dualtor_io', 'dualtor_io/test_link_failure.py::test_active_link_admin_down_config_reload_link_up_downstream_standby[active-active]', 'dualtor_io/test_link_failure.py::test_active_link_down_downstream_active', 'dualtor_io/test_link_failure.py::test_active_link_down_downstream_active_soc', 'dualtor_io/test_link_failure.py::test_active_link_down_downstream_standby', 'dualtor_io/test_link_failure.py::test_active_link_down_upstream', 'dualtor_io/test_link_failure.py::test_active_link_down_upstream_soc', 'dualtor_io/test_link_failure.py::test_standby_link_down_downstream_active', 'dualtor_io/test_link_failure.py::test_standby_link_down_downstream_standby', 'dualtor_io/test_link_failure.py::test_standby_link_down_upstream', 'dualtor_mgmt/test_dualtor_bgp_update_delay.py', 'dualtor_mgmt/test_server_failure.py::test_server_reboot', 'dut_console', 'ecmp/inner_hashing/test_inner_hashing.py', 'ecmp/inner_hashing/test_inner_hashing_lag.py', 'ecmp/inner_hashing/test_wr_inner_hashing.py', 'ecmp/inner_hashing/test_wr_inner_hashing_lag.py', 'ecmp/test_ecmp_sai_value.py', 'ecmp/test_fgnhg.py', 'everflow/test_everflow_per_interface.py', 'everflow/test_everflow_per_interface.py::test_everflow_per_interface[ipv6-default]', 'everflow/test_everflow_per_interface.py::test_everflow_per_interface[ipv6-m0_l3_scenario]', 'everflow/test_everflow_per_interface.py::test_everflow_per_interface[ipv6-m0_vlan_scenario]', 'everflow/test_everflow_testbed.py::EverflowIPv4Tests::test_everflow_dscp_with_policer', 'everflow/test_everflow_testbed.py::TestEverflowV4EgressAclEgressMirror', 'everflow/test_everflow_testbed.py::TestEverflowV4EgressAclEgressMirror::test_everflow_dscp_with_policer', 'everflow/test_everflow_testbed.py::TestEverflowV4IngressAclIngressMirror::test_everflow_dscp_with_policer', 'fdb/test_fdb_mac_expire.py', 'fib/test_fib.py::test_ipinip_hash', 'fib/test_fib.py::test_nvgre_hash', 'fib/test_fib.py::test_vxlan_hash', 'generic_config_updater', 'generic_config_updater/test_dhcp_relay.py', 'generic_config_updater/test_dynamic_acl.py', 'generic_config_updater/test_ecn_config_update.py::test_ecn_config_updates', 'generic_config_updater/test_eth_interface.py::test_replace_fec', 'generic_config_updater/test_eth_interface.py::test_toggle_pfc_asym', 'generic_config_updater/test_eth_interface.py::test_update_speed', 'generic_config_updater/test_incremental_qos.py', 'generic_config_updater/test_incremental_qos.py::test_incremental_qos_config_updates', 'generic_config_updater/test_mmu_dynamic_threshold_config_update.py::test_dynamic_th_config_updates', 'generic_config_updater/test_pfcwd_status.py', 'generic_config_updater/test_pg_headroom_update.py', 'hash/test_generic_hash.py::test_algorithm_config', 'hash/test_generic_hash.py::test_backend_error_messages', 'hash/test_generic_hash.py::test_ecmp_and_lag_hash', 'hash/test_generic_hash.py::test_ecmp_and_lag_hash[CRC-INNER_IP_PROTOCOL', 'hash/test_generic_hash.py::test_ecmp_hash', 'hash/test_generic_hash.py::test_ecmp_hash[CRC-INNER_IP_PROTOCOL', 'hash/test_generic_hash.py::test_hash_capability', 'hash/test_generic_hash.py::test_lag_hash', 'hash/test_generic_hash.py::test_lag_hash[CRC-INNER_IP_PROTOCOL', 'hash/test_generic_hash.py::test_lag_member_flap', 'hash/test_generic_hash.py::test_lag_member_flap[CRC-INNER_IP_PROTOCOL', 'hash/test_generic_hash.py::test_lag_member_remove_add', 'hash/test_generic_hash.py::test_lag_member_remove_add[CRC-INNER_IP_PROTOCOL', 'hash/test_generic_hash.py::test_nexthop_flap', 'hash/test_generic_hash.py::test_nexthop_flap[CRC-INNER_IP_PROTOCOL', 'hash/test_generic_hash.py::test_reboot', 'hash/test_generic_hash.py::test_reboot[CRC-INNER_IP_PROTOCOL', 'http/test_http_copy.py', 'iface_loopback_action/test_iface_loopback_action.py', 'iface_namingmode/test_iface_namingmode.py::TestConfigInterface', 'iface_namingmode/test_iface_namingmode.py::TestShowPriorityGroup', 'iface_namingmode/test_iface_namingmode.py::TestShowQueue', 'iface_namingmode/test_iface_namingmode.py::TestShowQueue::test_show_queue_persistent_watermark', 'iface_namingmode/test_iface_namingmode.py::TestShowQueue::test_show_queue_watermark', 'ip/test_ip_packet.py', 'ip/test_ip_packet.py::TestIPPacket::test_forward_ip_packet_with_0xffff_chksum_drop', 'ip/test_ip_packet.py::TestIPPacket::test_forward_ip_packet_with_0xffff_chksum_tolerant', 'ip/test_mgmt_ipv6_only.py', 'ipfwd/test_dip_sip.py', 'ipfwd/test_dir_bcast.py', 'ipfwd/test_mtu.py', 'link_flap/test_cont_link_flap.py', 'lldp/test_lldp.py::test_lldp', 'lldp/test_lldp.py::test_lldp_neighbor', 'macsec/test_dataplane.py::TestDataPlane::test_server_to_neighbor', 'macsec/test_interop_protocol.py::TestInteropProtocol::test_bgp', 'macsec/test_macsec.py', 'mpls/test_mpls.py', 'mvrf', 'nat', 'override_config_table/test_override_config_table.py', 'pc/test_lag_2.py::test_lag_db_status_with_po_update', 'pc/test_lag_member.py', 'pc/test_po_cleanup.py', 'pc/test_po_update.py::test_po_update', 'pc/test_po_update.py::test_po_update_io_no_loss', 'pc/test_po_voq.py', 'pfc/test_unknown_mac.py', 'pfc_asym/test_pfc_asym.py', 'pfc_asym/test_pfc_asym.py::test_pfc_asym_off_rx_pause_frames', 'pfcwd', 'pfcwd/test_pfc_config.py::TestPfcConfig::test_forward_action_cfg', 'pfcwd/test_pfcwd_all_port_storm.py', 'pfcwd/test_pfcwd_function.py::TestPfcwdFunc::test_pfcwd_no_traffic', 'pfcwd/test_pfcwd_warm_reboot.py', 'process_monitoring/test_critical_process_monitoring.py::test_orchagent_heartbeat', 'qos', 'qos/test_buffer.py', 'qos/test_buffer.py::test_buffer_model_test', 'qos/test_buffer_traditional.py', 'qos/test_pfc_pause.py::test_pfc_pause_lossless', 'qos/test_qos_dscp_mapping.py::TestQoSSaiDSCPQueueMapping_IPIP_Base::test_dscp_to_queue_mapping_pipe_mode', 'qos/test_qos_masic.py', 'qos/test_qos_sai.py', 'qos/test_qos_sai.py::TestQosSai', 'qos/test_qos_sai.py::TestQosSai::testIPIPQosSaiDscpToPgMapping', 'qos/test_qos_sai.py::TestQosSai::testPfcStormWithSharedHeadroomOccupancy', 'qos/test_qos_sai.py::TestQosSai::testQosSaiBufferPoolWatermark', 'qos/test_qos_sai.py::TestQosSai::testQosSaiDot1pPgMapping', 'qos/test_qos_sai.py::TestQosSai::testQosSaiDot1pQueueMapping', 'qos/test_qos_sai.py::TestQosSai::testQosSaiDscpQueueMapping', 'qos/test_qos_sai.py::TestQosSai::testQosSaiDscpToPgMapping', 'qos/test_qos_sai.py::TestQosSai::testQosSaiDwrrWeightChange', 'qos/test_qos_sai.py::TestQosSai::testQosSaiFullMeshTrafficSanity', 'qos/test_qos_sai.py::TestQosSai::testQosSaiHeadroomPoolSize', 'qos/test_qos_sai.py::TestQosSai::testQosSaiHeadroomPoolWatermark', 'qos/test_qos_sai.py::TestQosSai::testQosSaiLosslessVoq', 'qos/test_qos_sai.py::TestQosSai::testQosSaiLossyQueueVoq', 'qos/test_qos_sai.py::TestQosSai::testQosSaiLossyQueueVoqMultiSrc', 'qos/test_qos_sai.py::TestQosSai::testQosSaiPGDrop', 'qos/test_qos_sai.py::TestQosSai::testQosSaiPgHeadroomWatermark', 'qos/test_qos_sai.py::TestQosSai::testQosSaiPgSharedWatermark[None-wm_pg_shared_lossy]', 'qos/test_qos_sai.py::TestQosSai::testQosSaiQWatermarkAllPorts', 'qos/test_qos_sai.py::TestQosSai::testQosSaiSharedReservationSize', 'qos/test_tunnel_qos_remap.py::test_pfc_watermark_extra_lossless_active', 'qos/test_tunnel_qos_remap.py::test_pfc_watermark_extra_lossless_standby', 'radv/test_radv_ipv6_ra.py::test_solicited_router_advertisement_with_m_flag', 'radv/test_radv_ipv6_ra.py::test_unsolicited_router_advertisement_with_m_flag', 'reset_factory/test_reset_factory.py', 'restapi/test_restapi.py', 'restapi/test_restapi.py::test_create_vrf', 'restapi/test_restapi_vxlan_ecmp.py', 'route/test_default_route.py', 'route/test_route_flap.py', 'route/test_route_perf.py', 'route/test_static_route.py', 'route/test_static_route.py::test_static_route_ecmp_ipv6', 'show_techsupport/test_auto_techsupport.py', 'show_techsupport/test_auto_techsupport.py::TestAutoTechSupport::test_max_limit[core]', 'show_techsupport/test_auto_techsupport.py::TestAutoTechSupport::test_sai_sdk_dump', 'snappi_tests/ecn/test_red_accuracy_with_snappi', 'snappi_tests/multidut/pfc/test_multidut_global_pause_with_snappi.py', 'snmp/test_snmp_default_route.py::test_snmp_default_route', 'snmp/test_snmp_link_local.py', 'snmp/test_snmp_loopback.py::test_snmp_loopback', 'snmp/test_snmp_pfc_counters.py', 'snmp/test_snmp_queue.py', 'snmp/test_snmp_queue_counters.py', 'span', 'span/test_port_mirroring.py', 'ssh/test_ssh_default_password', 'ssh/test_ssh_stress.py::test_ssh_stress', 'sub_port_interfaces', 'sub_port_interfaces/test_show_subinterface.py::test_subinterface_status[port]', 'sub_port_interfaces/test_show_subinterface.py::test_subinterface_status[port_in_lag]', 'sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_routing_between_sub_ports_unaffected_by_sub_ports_removal[port_in_lag', 'sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_tunneling_between_sub_ports', 'sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_untagged_packet_not_routed[port_in_lag] ', 'sub_port_interfaces/test_sub_port_l2_forwarding.py::test_sub_port_l2_forwarding[port_in_lag]', 'syslog/test_syslog.py', 'syslog/test_syslog_source_ip.py', 'syslog/test_syslog_source_ip.py::TestSSIP::test_syslog_config_work_after_reboot', 'syslog/test_syslog_source_ip.py::TestSSIP::test_syslog_protocol_filter_severity', 'system_health/test_system_health.py::test_service_checker_with_process_exit', 'tacacs/test_authorization.py::test_authorization_tacacs_and_local', 'telemetry/test_events.py', 'telemetry/test_telemetry.py', 'telemetry/test_telemetry.py::test_telemetry_queue_buffer_cnt', 'test_pktgen.py', 'test_vs_chassis_setup.py', 'vlan/test_vlan.py::test_vlan_tc7_tagged_qinq_switch_on_outer_tag', 'vlan/test_vlan_ping.py', 'voq', 'voq/test_fabric_cli_and_db.py', 'voq/test_fabric_reach.py', 'voq/test_voq_fabric_isolation.py', 'voq/test_voq_fabric_status_all.py', 'vrf/test_vrf.py::TestVrfAclRedirect', 'vrf/test_vrf_attr.py::TestVrfAttrSrcMac::test_vrf1_neigh_with_default_router_mac', 'vxlan/test_vnet_route_leak.py', 'vxlan/test_vnet_vxlan.py', 'vxlan/test_vxlan_bfd_tsa.py', 'vxlan/test_vxlan_bfd_tsa.py::Test_VxLAN_BFD_TSA::test_tsa_case4', 'vxlan/test_vxlan_bfd_tsa.py::Test_VxLAN_BFD_TSA::test_tsa_case5', 'vxlan/test_vxlan_bfd_tsa.py::Test_VxLAN_BFD_TSA::test_tsa_case6', 'vxlan/test_vxlan_crm.py', 'vxlan/test_vxlan_crm.py::Test_VxLAN_Crm::test_crm_128_group_members[v4_in_v6]', 'vxlan/test_vxlan_crm.py::Test_VxLAN_Crm::test_crm_128_group_members[v6_in_v6]', 'vxlan/test_vxlan_crm.py::Test_VxLAN_Crm::test_crm_16k_routes[v4_in_v6]', 'vxlan/test_vxlan_crm.py::Test_VxLAN_Crm::test_crm_16k_routes[v6_in_v6]', 'vxlan/test_vxlan_crm.py::Test_VxLAN_Crm::test_crm_512_nexthop_groups[v4_in_v6]', 'vxlan/test_vxlan_crm.py::Test_VxLAN_Crm::test_crm_512_nexthop_groups[v6_in_v6]', 'vxlan/test_vxlan_decap.py', 'vxlan/test_vxlan_ecmp.py', 'vxlan/test_vxlan_ecmp_switchover.py', 'wan/lacp/test_wan_lag_min_link.py::test_lag_min_link']
===========================================================================
Mismatch item, before sort: fib/test_fib.py::test_vxlan_hash, after sort: fib/test_fib.py::test_nvgre_hash
===========================================================================

To run the pre-commit checks locally, you can follow below steps:

  1. Ensure that default python is python3. In sonic-mgmt docker container, default python is python2. You can run the check by activating the python3 virtual environment in sonic-mgmt docker container or outside of sonic-mgmt docker container.
  2. Ensure that the pre-commit package is installed:
sudo pip install pre-commit
  1. Go to repository root folder
  2. Install the pre-commit hooks:
pre-commit install
  1. Use pre-commit to check staged file:
pre-commit
  1. Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>

mssonicbld avatar Nov 05 '24 19:11 mssonicbld

@kperumalbfn We are seeing consistent failures of test_nvgre_hash on Arista platforms with Broadcom chips. Could please let us know which specific broadcom SKU you have tested on if it is supported by the community builds?

byu343 avatar Jan 20 '25 18:01 byu343

test_nvgre_hash test cases are also continuously failing on Marvell-Prestera platform. Could you please share test steps and expected behavior for test_nvgre_hash test cases

rajneeshaec avatar Feb 05 '25 16:02 rajneeshaec