Skip to content

RFC net: bridge: FDB management

John Fastabend kvm netdev 1 version In review

Get series with b4
b4 am 20120309223621.2514.82321.stgit@jf-dev1-dcblab

Versions newest first

  1. v1 RFC Latest4 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4net: add generic PF_BRIDGE:RTM_ FDB hooksinclude/linux/neighbour.h include/linux/netdevice.h include/linux/rtnetlink.h +5 more+217 -1120 replies
2/4net: addr_list: add exclusive dev_uc_addinclude/linux/netdevice.h net/core/dev_addr_lists.c+20 -00 replies
3/4net: add fdb generic dump routinenet/core/rtnetlink.c+56 -00 replies
4/4ixgbe: enable FDB netdevice opsdrivers/net/ethernet/intel/ixgbe/ixgbe_main.c+59 -02 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH v1 0/4] net: bridge: FDB management

This series is a follow up to the previous thread here:

http://lists.openwall.net/netdev/2012/02/29/31

There are some significant changes in this series. First I add two NTF_XXX bits to signal if the PF_BRIDGE netlink command should be parsed by the embedded bridge or the SW bridge. The insight here is the SW bridge is always the master device (NTF_MASTER) and the embedded bridge is the lower device (NTF_LOWERDEV). Without either flag set the command is parsed by the SW bridge to support existing tooling.

To make this work correctly I added three new ndo ops

ndo_fdb_add
ndo_fdb_del
ndo_fdb_dump

to add, delete, and dump FDB entries. These operations can be used by drivers to program embedded nics or by software bridges. We have at least three SW bridge now net/bridge, openvswitch, and macvlan. And three variants of embedded bridges SR-IOV devices, multi-function devices and Distributed Switch Architecture (DSA).

I think at least in this case adding netdevice ops is the cleanest way to implement this. I thought about notifier hooks and other methods but for now at least this seems to be the simplest.

I'm going to drop this into my testbed and let it run for a few days. But I think (hope?) this series is close to being ready for a non-RFC submission. I'll probably audit the patches once more as well.

Thanks to Stephen, Ben, and Jamal for bearing with me and the feedback on the last round of patches.

As always any comments/feedback is appreciated!

---

John Fastabend (4):
ixgbe: enable FDB netdevice ops
net: add fdb generic dump routine
net: addr_list: add exclusive dev_uc_add
net: add generic PF_BRIDGE:RTM_XXX FDB hooks

 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |   59 ++++++++
 include/linux/neighbour.h                     |    3 
 include/linux/netdevice.h                     |   27 +++
 include/linux/rtnetlink.h                     |    4 +
 net/bridge/br_device.c                        |    3 
 net/bridge/br_fdb.c                           |  128 ++++------------
 net/bridge/br_netlink.c                       |   12 --
 net/bridge/br_private.h                       |   15 ++
 net/core/dev_addr_lists.c                     |   19 ++
 net/core/rtnetlink.c                          |  194 +++++++++++++++++++++++++
 10 files changed, 352 insertions(+), 112 deletions(-)
Signature · 1 line
Signature