Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into dash (sonic-net#2663
Browse files Browse the repository at this point in the history
)

*Merge remote-tracking branch 'upstream/master' into dash (sonic-net#2663)
* Modify coppmgr mergeConfig to support preserving copp tables through reboot. (sonic-net#2548)
* Avoid aborting orchagent when setting TUNNEL attributes (sonic-net#2591)
* Handle Mac address 'none' (sonic-net#2593)
* Increase diff coverage to 80% (sonic-net#2599)
* Add missing parameter to on_switch_shutdown_request method. (sonic-net#2567)
* Add ZMQ based ProducerStateTable and CustomerStateTable.
* Revert "[voq][chassis]Add show fabric counters port/queue commands (sonic-net#2522)" (sonic-net#2611)
* Added new attributes for Vnet and Vxlan ecmp configurations. (sonic-net#2584)
* added support for monitoring, primary and adv_prefix and overlay_dmac.
* [routesync] Fix for stale dynamic neighbor (sonic-net#2553)
* [MuxOrch] Enabling neighbor when adding in active state (sonic-net#2601)
* Changed the BFD default detect multiplier to 10x (sonic-net#2614)
* Remove TODO comments that are no longer relevant (sonic-net#2622)
* Fix issue #13341 ARP entry can be out of sync between kernel and APPL_DB if multiple updates are received from RTNL (sonic-net#2619)
* [refactor]Refactoring sai handle status (sonic-net#2621)
* Vxlan tunnel endpoint custom monitoring APPL DB table. (sonic-net#2589)
* added support for monitoring, primary and adv_prefix. changed filter_mac to overlay_dmac
* Data Structures and code to write APP_DB VNET_MONITOR table entries for custom monitoring of Vxlan tunnel endpoints.
* [bfdorch] add local discriminator to state DB (sonic-net#2629)
* [acl] Add new ACL key BTH_OPCODE and AETH_SYNDROME  (sonic-net#2617)
* [voq][chassis] Remove created ports from the default vlan. (sonic-net#2607)
* [EVPN]Handling race condition when remote VNI arrives before tunnel map entry (sonic-net#2642)
*Added check in remote VNI add to ensure vxlan tunnel map is created before adding the remote end point.
* [test_mux] add sleep in test_NH (sonic-net#2648)
* [autoneg]Fixing adv interface types to be set when AN is disabled (sonic-net#2638)
* [hash]: Add UT infra. (sonic-net#2660)
*Added UT infra for Generic Hash feature
*Aligned PBH tests with Generic Hash UT infra
* [sai_failure_dump]Invoking dump during SAI failure (sonic-net#2644)
* [ResponsePublisher] add pipeline support  (sonic-net#2511)
* [dash] Fix compilation issue caused by missing include.
  • Loading branch information
oleksandrivantsiv authored and theasianpianist committed Jul 25, 2023
1 parent 40a23b9 commit 55a0766
Show file tree
Hide file tree
Showing 6 changed files with 110 additions and 3 deletions.
1 change: 1 addition & 0 deletions orchagent/dash/dashorch.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "macaddress.h"
#include "timer.h"
#include "dashorch.h"
#include "saihelper.h"

struct ApplianceEntry
{
Expand Down
1 change: 1 addition & 0 deletions orchagent/dash/dashvnetorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "saiextensions.h"
#include "swssnet.h"
#include "tokenize.h"
#include "dashorch.h"

using namespace std;
using namespace swss;
Expand Down
5 changes: 3 additions & 2 deletions orchagent/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -716,8 +716,9 @@ int main(int argc, char **argv)
if (gMySwitchType == "voq")
{
orchDaemon->setFabricEnabled(true);
orchDaemon->setFabricPortStatEnabled(true);
orchDaemon->setFabricQueueStatEnabled(true);
// SAI doesn't fully support counters for non fabric asics
orchDaemon->setFabricPortStatEnabled(false);
orchDaemon->setFabricQueueStatEnabled(false);
}
}
else
Expand Down
1 change: 0 additions & 1 deletion tests/mock_tests/test_failure_handling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ namespace saifailure_test
_hook_sai_switch_api();
_sai_syncd_notifications_count = (uint32_t*)mmap(NULL, sizeof(int), PROT_READ | PROT_WRITE,
MAP_SHARED | MAP_ANONYMOUS, -1, 0);

_sai_syncd_notification_event = (int32_t*)mmap(NULL, sizeof(int), PROT_READ | PROT_WRITE,
MAP_SHARED | MAP_ANONYMOUS, -1, 0);
*_sai_syncd_notifications_count = 0;
Expand Down
74 changes: 74 additions & 0 deletions tests/test_mux.py
Original file line number Diff line number Diff line change
Expand Up @@ -897,6 +897,80 @@ def create_and_test_NH_routes(self, appdb, asicdb, dvs, dvs_route, mac):
self.del_neighbor(dvs, neigh_ip)
self.del_neighbor(dvs, neigh_ipv6)

def create_and_test_NH_routes(self, appdb, asicdb, dvs, dvs_route, mac):
'''
Tests case where neighbor is removed in standby and added in active with route
'''
nh_route = "2.2.2.0/24"
nh_route_ipv6 = "2023::/64"
neigh_ip = self.SERV1_IPV4
neigh_ipv6 = self.SERV1_IPV6
apdb = dvs.get_app_db()

# Setup
self.set_mux_state(appdb, "Ethernet0", "active")
self.add_neighbor(dvs, neigh_ip, mac)
self.add_neighbor(dvs, neigh_ipv6, mac)
dvs.runcmd(
"vtysh -c \"configure terminal\" -c \"ip route " + nh_route +
" " + neigh_ip + "\""
)
dvs.runcmd(
"vtysh -c \"configure terminal\" -c \"ipv6 route " + nh_route_ipv6 +
" " + neigh_ipv6 + "\""
)
apdb.wait_for_entry("ROUTE_TABLE", nh_route)
apdb.wait_for_entry("ROUTE_TABLE", nh_route_ipv6)

rtkeys = dvs_route.check_asicdb_route_entries([nh_route])
rtkeys_ipv6 = dvs_route.check_asicdb_route_entries([nh_route_ipv6])
self.check_nexthop_in_asic_db(asicdb, rtkeys[0])
self.check_nexthop_in_asic_db(asicdb, rtkeys_ipv6[0])

# Set state to standby and delete neighbor
self.set_mux_state(appdb, "Ethernet0", "standby")
self.check_nexthop_in_asic_db(asicdb, rtkeys[0], True)
self.check_nexthop_in_asic_db(asicdb, rtkeys_ipv6[0], True)

self.del_neighbor(dvs, neigh_ip)
self.del_neighbor(dvs, neigh_ipv6)
apdb.wait_for_deleted_entry(self.APP_NEIGH_TABLE, neigh_ip)
apdb.wait_for_deleted_entry(self.APP_NEIGH_TABLE, neigh_ipv6)
asicdb.wait_for_deleted_entry(self.ASIC_NEIGH_TABLE, neigh_ip)
asicdb.wait_for_deleted_entry(self.ASIC_NEIGH_TABLE, neigh_ip)

self.check_nexthop_in_asic_db(asicdb, rtkeys[0], True)
self.check_nexthop_in_asic_db(asicdb, rtkeys_ipv6[0], True)

# Set state to active, learn neighbor again
self.set_mux_state(appdb, "Ethernet0", "active")

self.add_neighbor(dvs, neigh_ip, mac)
self.add_neighbor(dvs, neigh_ipv6, mac)
self.check_neigh_in_asic_db(asicdb, neigh_ip)
self.check_neigh_in_asic_db(asicdb, neigh_ipv6)

self.check_nexthop_in_asic_db(asicdb, rtkeys[0])
self.check_nexthop_in_asic_db(asicdb, rtkeys_ipv6[0])
dvs.runcmd(
"ip neigh flush " + neigh_ip
)
dvs.runcmd(
"ip neigh flush " + neigh_ipv6
)

# Cleanup
dvs.runcmd(
"vtysh -c \"configure terminal\" -c \"no ip route " + nh_route +
" " + neigh_ip + "\""
)
dvs.runcmd(
"vtysh -c \"configure terminal\" -c \"no ipv6 route " + nh_route_ipv6 +
" " + neigh_ipv6 + "\""
)
self.del_neighbor(dvs, neigh_ip)
self.del_neighbor(dvs, neigh_ipv6)

def get_expected_sai_qualifiers(self, portlist, dvs_acl):
expected_sai_qualifiers = {
"SAI_ACL_ENTRY_ATTR_PRIORITY": self.ACL_PRIORITY,
Expand Down
31 changes: 31 additions & 0 deletions tests/test_vnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -3428,6 +3428,37 @@ def test_vnet_orch_24(self, dvs, testlog):
# delete vxlan tunnel
delete_vxlan_tunnel(dvs, tunnel_name)

'''
Test 18 - Test for vxlan custom monitoring config.
'''
def test_vnet_orch_18(self, dvs, testlog):
vnet_obj = self.get_vnet_obj()

tunnel_name = 'tunnel_18'

vnet_obj.fetch_exist_entries(dvs)

create_vxlan_tunnel(dvs, tunnel_name, '9.9.9.9')
create_vnet_entry(dvs, 'Vnet18', tunnel_name, '10009', "", overlay_dmac="22:33:33:44:44:66")

vnet_obj.check_vnet_entry(dvs, 'Vnet18')
vnet_obj.check_vxlan_tunnel_entry(dvs, tunnel_name, 'Vnet18', '10009')

vnet_obj.check_vxlan_tunnel(dvs, tunnel_name, '9.9.9.9')

vnet_obj.fetch_exist_entries(dvs)
create_vnet_routes(dvs, "100.100.1.1/32", 'Vnet18', '9.0.0.1,9.0.0.2,9.0.0.3', ep_monitor='9.1.0.1,9.1.0.2,9.1.0.3',primary ='9.0.0.1',monitoring='custom', adv_prefix='100.100.1.1/27')

vnet_obj.check_custom_monitor_app_db(dvs, "100.100.1.1/32", "9.1.0.1", "vxlan", "22:33:33:44:44:66")
vnet_obj.check_custom_monitor_app_db(dvs, "100.100.1.1/32", "9.1.0.2", "vxlan", "22:33:33:44:44:66")
vnet_obj.check_custom_monitor_app_db(dvs, "100.100.1.1/32", "9.1.0.3", "vxlan", "22:33:33:44:44:66")

delete_vnet_routes(dvs, "100.100.1.1/32", 'Vnet18')

vnet_obj.check_custom_monitor_deleted(dvs, "100.100.1.1/32", "9.1.0.1")
vnet_obj.check_custom_monitor_deleted(dvs, "100.100.1.1/32", "9.1.0.2")
vnet_obj.check_custom_monitor_deleted(dvs, "100.100.1.1/32", "9.1.0.3")

# Add Dummy always-pass test at end as workaroud
# for issue when Flaky fail on final test it invokes module tear-down before retrying
def test_nonflaky_dummy():
Expand Down

0 comments on commit 55a0766

Please sign in to comment.