[ovs-dev] [PATCH v2] ofproto-dpif: APIs and CLI option to add/delete static fdb entry
Ben Pfaff
blp at ovn.org
Mon May 10 18:57:32 UTC 2021
On Sat, May 08, 2021 at 06:18:41PM -0400, Vasu Dasari wrote:
> Currently there is an option to add/flush/show ARP/ND neighbor. This covers L3
> side. For L2 side, there is only fdb show command. This patch gives an option
> to add/del an fdb entry via CLI.
>
> CLI command looks like:
>
> To add:
> ovs-appctl fdb/add <bridge> <port> <vlan> <Mac>
> ovs-appctl fdb/add br0 p1 0 50:54:00:00:00:05
>
> To del:
> ovs-appctl fdb/del <bridge> <port> <vlan> <Mac>
> ovs-appctl fdb/del br0 p1 0 50:54:00:00:00:05
>
> Static entry should not age. To indicate that entry being programmed is a static entry,
> 'expires' field in 'struct mac_entry' will be set to a INT_MAX. A check for this value
> is made while deleting mac entry as part of regular aging process. Another check as part
> of mac-update process, when a packet with same source mac as this entry arrives on the
> configured port will not modify the expires field
>
> Added two new APIs to provide convinient interfacde to add and delete static-macs
> void xlate_add_static_mac_entry(const struct ofproto_dpif *, ofp_port_t in_port,
> struct eth_addr dl_src, int vlan);
> void xlate_delete_static_mac_entry(const struct ofproto_dpif *,
> struct eth_addr dl_src, int vlan);
>
> Signed-off-by: Vasu Dasari <vdasari at gmail.com>
> Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2019-June/048894.html
> Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=1597752
Needs documentation.
I would expect a static entry to be one that couldn't be changed by
receiving a packet that causes MAC learning, but I don't see anything
that protects from that in here.
More information about the dev
mailing list