Skip to content

CPS query multiple entries #32

@HolyShitMan

Description

@HolyShitMan

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions