Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPS query multiple entries #32

Open
HolyShitMan opened this issue Jun 12, 2019 · 1 comment
Open

CPS query multiple entries #32

HolyShitMan opened this issue Jun 12, 2019 · 1 comment
Assignees
Labels

Comments

@HolyShitMan
Copy link

I 'd like to use CPS to get the full FDB of a switch. By now it is only possible to query one specific entry, by specifying mac and vlan. This is probably due to the fact, SAI only supports:

struct {
    create_fdb_entry;
    remove_fdb_entry;
    set_fdb_entry_attribute;
    get_fdb_entry_attribute;
    flush_fdb_entries;
} sai_fdb_api_t;

However there is a comment in src/mac/nas_mac_api.cpp, which might suggest more is planned.

/* For now you can only do a single entry get based on the key of the entry */

My local hack is, to cache the entries and read them, if no mac and/or vlan are supplied. Could this be a viable solution to bring upstream or does somebody has a better idea, how to solve this issue.

By now my solution consists of a static map and really doesn't integrate into the workflow of nas_mac_api and nas_mac_cps. Therefore, flushing is not supported yet. Nevertheless, before integrating it deeper into opx-nas-l2, I wanted to ask for your opinion.

Simon

@atanu-mandal
Copy link
Contributor

Hi Simon,

We had FDB cache maintained in opx-nas-l2 earlier but faced performance hit (so removed the whole code base of caching) . This is something the application should maintain as required instead of base NOS (which OPX is) . Also as you correctly pointed out that the SAI only has support to retrieve one specific FDB entry. Hope that helps a bit.

Thanks,
-Atanu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants