From 3fb322b8e55e29191ec4d65f2f96e2d310d3a416 Mon Sep 17 00:00:00 2001 From: Guohan Lu Date: Thu, 1 Feb 2018 10:01:07 -0800 Subject: [PATCH] change vlan_id to bv_id for fdb flush notifications --- syncd/syncd_notifications.cpp | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/syncd/syncd_notifications.cpp b/syncd/syncd_notifications.cpp index d28f40249..4b3fc9606 100644 --- a/syncd/syncd_notifications.cpp +++ b/syncd/syncd_notifications.cpp @@ -104,7 +104,7 @@ void redisPutFdbEntryToAsicView( if (fdb->event_type == SAI_FDB_EVENT_FLUSHED) { - sai_vlan_id_t vlan_id = fdb->fdb_entry.vlan_id; + sai_object_id_t bv_id = fdb->fdb_entry.bv_id; sai_object_id_t port_oid = 0; bool port_oid_found = false; @@ -123,18 +123,16 @@ void redisPutFdbEntryToAsicView( return; } - if (!port_oid && !vlan_id) + if (!port_oid && !bv_id) { /* we got a flush all fdb event here */ /* example of a flush all fdb event */ /* [{ "fdb_entry":"{ - \"bridge_id\":\"oid:0x0\", - \"bridge_type\":\"SAI_FDB_ENTRY_BRIDGE_TYPE_1Q\", + \"bv_id\":\"oid:0x0\", \"mac\":\"00:00:00:00:00:00\", - \"switch_id\":\"oid:0x21000000000000\", - \"vlan\":\"0\"}", + \"switch_id\":\"oid:0x21000000000000\"}", "fdb_event":"SAI_FDB_EVENT_FLUSHED", "list":[ {"id":"SAI_FDB_ENTRY_ATTR_BRIDGE_PORT_ID","value":"oid:0x0"}, @@ -164,7 +162,7 @@ void redisPutFdbEntryToAsicView( } } } - else if( port_oid && !vlan_id ) + else if (port_oid && !bv_id) { /* we got a flush port fdb event here */ /* not supported yet, this is a place holder */ @@ -172,11 +170,9 @@ void redisPutFdbEntryToAsicView( /* [{ "fdb_entry":"{ - \"bridge_id\":\"oid:0x0\", - \"bridge_type\":\"SAI_FDB_ENTRY_BRIDGE_TYPE_1Q\", + \"bv_id\":\"oid:0x0\", \"mac\":\"00:00:00:00:00:00\", - \"switch_id\":\"oid:0x21000000000000\", - \"vlan\":\"0\"}", + \"switch_id\":\"oid:0x21000000000000\"}", "fdb_event":"SAI_FDB_EVENT_FLUSHED", "list":[ {"id":"SAI_FDB_ENTRY_ATTR_BRIDGE_PORT_ID","value":"oid:0x3a0000000009cf"}, @@ -185,9 +181,9 @@ void redisPutFdbEntryToAsicView( ] }] */ - SWSS_LOG_ERROR("received a flush port fdb event, port_oid = %lu, vlan_id = %hd, unsupported", port_oid, vlan_id); + SWSS_LOG_ERROR("received a flush port fdb event, port_oid = 0x%lx, bv_id = 0x%lx, unsupported", port_oid, bv_id); } - else if(!port_oid && vlan_id) + else if (!port_oid && bv_id) { /* we got a flush vlan fdb event here */ /* not supported yet, this is a place holder */ @@ -195,11 +191,9 @@ void redisPutFdbEntryToAsicView( /* [{ "fdb_entry":"{ - \"bridge_id\":\"oid:0x0\", - \"bridge_type\":\"SAI_FDB_ENTRY_BRIDGE_TYPE_1Q\", + \"bridge_id\":\"oid:0x23000000000000\", \"mac\":\"00:00:00:00:00:00\", - \"switch_id\":\"oid:0x21000000000000\", - \"vlan\":\"1000\"}", + \"switch_id\":\"oid:0x21000000000000\"}", "fdb_event":"SAI_FDB_EVENT_FLUSHED", "list":[ {"id":"SAI_FDB_ENTRY_ATTR_BRIDGE_PORT_ID","value":"oid:0x0"}, @@ -208,12 +202,12 @@ void redisPutFdbEntryToAsicView( ] }] */ - SWSS_LOG_ERROR("received a flush vlan fdb event, port_oid = %lu, vlan_id = %hd, unsupported", port_oid, vlan_id); + SWSS_LOG_ERROR("received a flush vlan fdb event, port_oid = 0x%lx, bv_id = 0x%lx, unsupported", port_oid, bv_id); } else { - SWSS_LOG_ERROR("received a flush fdb event, port_oid = %lu, vlan_id = %hd, unsupported", port_oid, vlan_id); + SWSS_LOG_ERROR("received a flush fdb event, port_oid = 0x%lx, bv_id = 0x%lx, unsupported", port_oid, bv_id); } return;