[ovs-dev] [PATCH v11] ofproto-dpif: APIs and CLI option to add/delete static fdb entry

Eelco Chaudron echaudro at redhat.com
Wed Jun 30 06:42:47 UTC 2021



On 29 Jun 2021, at 22:43, 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 ovs-appctl.
>
> 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> <vlan> <Mac>
>     ovs-appctl fdb/del br0 0 50:54:00:00:00:05
>
> Added two new APIs to provide convenient interface to add and delete static-macs.
> bool xlate_add_static_mac_entry(const struct ofproto_dpif *, ofp_port_t in_port,
>                                struct eth_addr dl_src, int vlan);
> bool xlate_delete_static_mac_entry(const struct ofproto_dpif *,
>                                   struct eth_addr dl_src, int vlan);
>
> 1. 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 MAC_ENTRY_AGE_STATIC_ENTRY. A
>    check for this value is made while deleting mac entry as part of regular aging process.
> 2. Another change to of mac-update logic, when a packet with same dl_src as that of a
>    static-mac entry arrives on any port, the logic will not modify the expires field.
> 3. While flushing fdb entries, made sure static ones are not evicted.
> 4. Updated "ovs-appctl fdb/stats-show br0" to display numberof static entries in switch
>
> Added following tests:
>   ofproto-dpif - static-mac add/del/flush
>   ofproto-dpif - static-mac mac moves
>
> 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
> Tested-by: Eelco Chaudron <echaudro at redhat.com>
> Acked-by: Eelco Chaudron <echaudro at redhat.com>
> ---

Small doc change, so did not testing, only a review.

Acked-by: Eelco Chaudron <echaudro at redhat.com>



More information about the dev mailing list