SAI icon indicating copy to clipboard operation
SAI copied to clipboard

Question: Expected usage of sai_fdb_event_notification_fn

Open mdivyamohan opened this issue 3 years ago • 2 comments

Hello,

When static FDB entries are added by user (using Adapter Host, eg: SONiC), is the SAI adapter expected to invoke the fdb event notification function? Or is event notification to be used only for dynamically learned fdb entries?

I'll try to summarize the use case here -

1. User (add static fdb entry) --> Adapter Host
2. Adapter Host (sai_create_fdb_entry_fn) --> ASIC vendor's SAI Adapter
3. SAI Adapter (add static fdb entry) --> ASIC

Now, after step 3 depending on vendor, ASIC might or might not generate a notification for static fdb entry addition. I am dealing with ASIC that does generate notification.

What is the intended design? Is it -

Option-1:

4. ASIC (notification) --> SAI Adapter
5. SAI Adapter (sai_fdb_event_notification_fn, with data containing fdb entry with event=SAI_FDB_EVENT_LEARNED, type=SAI_FDB_ENTRY_TYPE_STATIC) --> Adapter Host
6. Adapter Host is expected to handle this event notification

Or, Option-2:

4. ASIC (notification) --> SAI Adapter
5. SAI Adapter (Ignore ASIC notifications for static fdb entries. Inform Adapter Host only for dynamically learned fdb entries)

mdivyamohan avatar Dec 07 '21 03:12 mdivyamohan

It seems redundant to send notification when user creates explicitly static entries, compared to dynamic entries when they can be created/remove at any time by device learning, hence notification is required. This approach seems logical to me, and so far platforms that im aware like mlnx or brcm, follow the same (correct me if i'm wrong here) (although i don't remember if sonic is creating any static entries, or just deal with dynamic ones)

kcudnik avatar Dec 07 '21 10:12 kcudnik

What is the result of your discussion?

inspurSDN avatar Oct 09 '23 09:10 inspurSDN