Thread (8 messages) flat view 8 messages, 3 authors, 2015-01-18

Re: [patch net-next 2/2] net: replace br_fdb_external_learn_* calls with switchdev notifier events

From: Jiri Pirko <jiri@resnulli.us>
Date: 2015-01-17 08:31:14

Fri, Jan 16, 2015 at 08:32:34PM CET, sfeldma@gmail.com wrote:
On Thu, Jan 15, 2015 at 2:49 PM, Jiri Pirko [off-list ref] wrote:
quoted
This patch benefits from newly introduced switchdev notifier and uses it
to propagate fdb learn events from rocker driver to bridge. That avoids
direct function calls and possible use by other listeners (ovs).

Suggested-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Scott Feldman <redacted>
quoted
 drivers/net/ethernet/rocker/rocker.c | 10 +++++--
 include/linux/if_bridge.h            | 18 -------------
 include/net/switchdev.h              | 11 ++++++++
 net/bridge/br.c                      | 52 +++++++++++++++++++++++++++++++++++-
 net/bridge/br_fdb.c                  | 38 +++-----------------------
 net/bridge/br_private.h              |  4 +++
 6 files changed, 78 insertions(+), 55 deletions(-)
diff --git a/drivers/net/ethernet/rocker/rocker.c b/drivers/net/ethernet/rocker/rocker.c
index cad8cf9..964d719 100644
--- a/drivers/net/ethernet/rocker/rocker.c
+++ b/drivers/net/ethernet/rocker/rocker.c
@@ -3026,11 +3026,17 @@ static void rocker_port_fdb_learn_work(struct work_struct *work)
                container_of(work, struct rocker_fdb_learn_work, work);
        bool removing = (lw->flags & ROCKER_OP_FLAG_REMOVE);
        bool learned = (lw->flags & ROCKER_OP_FLAG_LEARNED);
+       struct netdev_switch_notifier_fdb_info info;
+
+       info.addr = lw->addr;
+       info.vid = lw->vid;
If you respin patch, use initializer to zero out other members, just
to future proof it.
There are no other members :)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help