diff --git a/orchagent/aclorch.cpp b/orchagent/aclorch.cpp index c7cfe200a140..4f42ca415d7f 100644 --- a/orchagent/aclorch.cpp +++ b/orchagent/aclorch.cpp @@ -2436,7 +2436,8 @@ void AclOrch::init(vector& connectors, PortsOrch *portOrch, Mirr platform == BFN_PLATFORM_SUBSTRING || platform == MRVL_PLATFORM_SUBSTRING || platform == INVM_PLATFORM_SUBSTRING || - platform == NPS_PLATFORM_SUBSTRING) + platform == NPS_PLATFORM_SUBSTRING || + platform == VS_PLATFORM_SUBSTRING) { m_mirrorTableCapabilities = { @@ -2459,19 +2460,17 @@ void AclOrch::init(vector& connectors, PortsOrch *portOrch, Mirr SWSS_LOG_NOTICE(" ACL_TABLE_MIRRORV6: %s", m_mirrorTableCapabilities[ACL_TABLE_MIRRORV6] ? "yes" : "no"); - // In Broadcom platform, V4 and V6 rules are stored in the same table - if (platform == BRCM_PLATFORM_SUBSTRING || - platform == NPS_PLATFORM_SUBSTRING || - platform == BFN_PLATFORM_SUBSTRING || - platform == INVM_PLATFORM_SUBSTRING) { - m_isCombinedMirrorV6Table = true; - } - // In Mellanox platform, V4 and V6 rules are stored in different tables if (platform == MLNX_PLATFORM_SUBSTRING || - platform == MRVL_PLATFORM_SUBSTRING) { + platform == MRVL_PLATFORM_SUBSTRING) + { m_isCombinedMirrorV6Table = false; } + else + { + m_isCombinedMirrorV6Table = true; + } + // Store the capabilities in state database // TODO: Move this part of the code into syncd diff --git a/tests/README.md b/tests/README.md index 837ae1f93ee0..33c9c3479a51 100644 --- a/tests/README.md +++ b/tests/README.md @@ -103,10 +103,10 @@ For those developing new features for SWSS or the DVS framework, you might find sudo pytest --dvsname=vs --forcedvs ``` -5. Additionally, if you need to simulate a specific hardware platform (e.g. Broadcom or Mellanox), you can add this environment variable when starting the DVS container. Note that this is not a precise 1-to-1 model, and dataplane behavior is not simulated by the DVS. +5. Additionally, if you need to simulate a specific hardware platform (e.g. Broadcom or Mellanox), you can add this environment variable for hardware SKU when starting the DVS container. Note that this is not a precise 1-to-1 model, and dataplane behavior is not simulated by the DVS. ``` - -e "fake_platform=mellanox" + -e "HWSKU=Mellanox-SN2700" ``` ## Other useful test parameters diff --git a/tests/test_evpn_fdb.py b/tests/test_evpn_fdb.py index f65e1d1e85fb..31d75535c7e7 100644 --- a/tests/test_evpn_fdb.py +++ b/tests/test_evpn_fdb.py @@ -2,8 +2,6 @@ import time from evpn_tunnel import VxlanTunnel,VxlanEvpnHelper -DVS_ENV = ["fake_platform=broadcom"] - def get_vxlan_p2p_tunnel_bp(db, remote_ip): tnl_id = None bp = None diff --git a/tests/test_evpn_fdb_p2mp.py b/tests/test_evpn_fdb_p2mp.py index f8147351b370..7929bc862f6f 100644 --- a/tests/test_evpn_fdb_p2mp.py +++ b/tests/test_evpn_fdb_p2mp.py @@ -2,7 +2,7 @@ import time from evpn_tunnel import VxlanTunnel,VxlanEvpnHelper -DVS_ENV = ["fake_platform=mellanox"] +DVS_ENV = ["HWSKU=Mellanox-SN2700"] def get_vxlan_p2mp_tunnel_bp(db, src_ip): tnl_id = None diff --git a/tests/test_evpn_l3_vxlan.py b/tests/test_evpn_l3_vxlan.py index 64cc85ba8ab9..7bcabacb6d49 100644 --- a/tests/test_evpn_l3_vxlan.py +++ b/tests/test_evpn_l3_vxlan.py @@ -5,8 +5,6 @@ from evpn_tunnel import VxlanTunnel,VxlanEvpnHelper import time -DVS_ENV = ["fake_platform=broadcom"] - class TestL3Vxlan(object): def get_vxlan_obj(self): diff --git a/tests/test_evpn_l3_vxlan_p2mp.py b/tests/test_evpn_l3_vxlan_p2mp.py index c4cbb7e03111..c704cb3788fe 100644 --- a/tests/test_evpn_l3_vxlan_p2mp.py +++ b/tests/test_evpn_l3_vxlan_p2mp.py @@ -2,7 +2,7 @@ from evpn_tunnel import VxlanTunnel,VxlanEvpnHelper import time -DVS_ENV = ["fake_platform=mellanox"] +DVS_ENV = ["HWSKU=Mellanox-SN2700"] class TestL3VxlanP2MP(object): diff --git a/tests/test_evpn_tunnel.py b/tests/test_evpn_tunnel.py index d910dd9dedaf..b58944f7ced7 100644 --- a/tests/test_evpn_tunnel.py +++ b/tests/test_evpn_tunnel.py @@ -4,8 +4,6 @@ from pprint import pprint from evpn_tunnel import VxlanTunnel -DVS_ENV = ["fake_platform=broadcom"] - class TestVxlanOrch(object): def get_vxlan_obj(self): diff --git a/tests/test_evpn_tunnel_p2mp.py b/tests/test_evpn_tunnel_p2mp.py index e9463be94ae5..1783980b7399 100644 --- a/tests/test_evpn_tunnel_p2mp.py +++ b/tests/test_evpn_tunnel_p2mp.py @@ -1,6 +1,6 @@ from evpn_tunnel import VxlanTunnel -DVS_ENV = ["fake_platform=mellanox"] +DVS_ENV = ["HWSKU=Mellanox-SN2700"] class TestVxlanOrchP2MP(object): diff --git a/tests/test_mirror_ipv6_combined.py b/tests/test_mirror_ipv6_combined.py index 3eb5f7ab5101..cafa5eaf4719 100644 --- a/tests/test_mirror_ipv6_combined.py +++ b/tests/test_mirror_ipv6_combined.py @@ -3,9 +3,6 @@ from swsscommon import swsscommon -DVS_ENV = ["fake_platform=broadcom"] - - class TestMirror(object): def setup_db(self, dvs): self.pdb = swsscommon.DBConnector(0, dvs.redis_sock, 0) diff --git a/tests/test_mirror_ipv6_separate.py b/tests/test_mirror_ipv6_separate.py index 8d96633325b7..6711c345c5d0 100644 --- a/tests/test_mirror_ipv6_separate.py +++ b/tests/test_mirror_ipv6_separate.py @@ -3,7 +3,7 @@ from swsscommon import swsscommon -DVS_ENV = ["fake_platform=mellanox"] +DVS_ENV = ["HWSKU=Mellanox-SN2700"] class TestMirror(object):