From: Ido Schimmel <idosch@idosch.org>
To: Jiri Pirko <jiri@resnulli.us>
Cc: netdev@vger.kernel.org, davem@davemloft.net, idosch@mellanox.com,
eladr@mellanox.com, yotamg@mellanox.com, nogahf@mellanox.com,
ogerlitz@mellanox.com, roopa@cumulusnetworks.com,
nikolay@cumulusnetworks.com, linville@tuxdriver.com,
andy@greyhouse.net, f.fainelli@gmail.com,
dsa@cumulusnetworks.com, jhs@mojatatu.com,
vivien.didelot@savoirfairelinux.com, andrew@lunn.ch,
ivecera@redhat.com, kaber@trash.net, john@phrozen.org
Subject: Re: [patch net-next 1/6] fib: introduce FIB notification infrastructure
Date: Thu, 22 Sep 2016 08:13:50 +0300 [thread overview]
Message-ID: <20160922051350.GA24119@splinter> (raw)
In-Reply-To: <1474458794-5512-2-git-send-email-jiri@resnulli.us>
On Wed, Sep 21, 2016 at 01:53:09PM +0200, Jiri Pirko wrote:
> From: Jiri Pirko <jiri@mellanox.com>
>
> This allows to pass information about added/deleted FIB entries/rules to
> whoever is interested. This is done in a very similar way as devinet
> notifies address additions/removals.
>
> Signed-off-by: Jiri Pirko <jiri@mellanox.com>
[...]
> #include <linux/slab.h>
> #include <linux/export.h>
> #include <linux/vmalloc.h>
> +#include <linux/notifier.h>
> #include <net/net_namespace.h>
> #include <net/ip.h>
> #include <net/protocol.h>
> @@ -84,6 +85,44 @@
> #include <trace/events/fib.h>
> #include "fib_lookup.h"
>
> +static BLOCKING_NOTIFIER_HEAD(fib_chain);
> +
> +int register_fib_notifier(struct notifier_block *nb)
> +{
> + return blocking_notifier_chain_register(&fib_chain, nb);
> +}
> +EXPORT_SYMBOL(register_fib_notifier);
If we remove and insert the switch driver, then the existing FIB entries
should be replayed when we register our notification block. Otherwise,
all of these entries will be missing from the switch's tables. I believe
it should be handled like register_netdevice_notifier(), where
"registration and up events are replayed".
next prev parent reply other threads:[~2016-09-22 5:13 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-21 11:53 [patch net-next 0/6] fib offload: switch to notifier Jiri Pirko
2016-09-21 11:53 ` [patch net-next 1/6] fib: introduce FIB notification infrastructure Jiri Pirko
2016-09-22 5:13 ` Ido Schimmel [this message]
2016-09-22 9:43 ` Jiri Pirko
2016-09-21 11:53 ` [patch net-next 2/6] fib: introduce FIB info offload flag helpers Jiri Pirko
2016-09-22 5:14 ` Ido Schimmel
2016-09-21 11:53 ` [patch net-next 3/6] mlxsw: spectrum_router: Use FIB notifications instead of switchdev calls Jiri Pirko
2016-09-22 6:51 ` Ido Schimmel
2016-09-22 9:47 ` Jiri Pirko
2016-09-22 14:58 ` David Ahern
2016-09-22 15:05 ` Jiri Pirko
2016-09-22 15:12 ` David Ahern
2016-09-21 11:53 ` [patch net-next 4/6] rocker: use " Jiri Pirko
2016-09-21 11:53 ` [patch net-next 5/6] switchdev: remove FIB offload infrastructure Jiri Pirko
2016-09-22 7:25 ` Ido Schimmel
2016-09-22 12:49 ` Jiri Pirko
2016-09-21 11:53 ` [patch net-next 6/6] doc: update switchdev L3 section Jiri Pirko
2016-09-22 7:31 ` Ido Schimmel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160922051350.GA24119@splinter \
--to=idosch@idosch.org \
--cc=andrew@lunn.ch \
--cc=andy@greyhouse.net \
--cc=davem@davemloft.net \
--cc=dsa@cumulusnetworks.com \
--cc=eladr@mellanox.com \
--cc=f.fainelli@gmail.com \
--cc=idosch@mellanox.com \
--cc=ivecera@redhat.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=john@phrozen.org \
--cc=kaber@trash.net \
--cc=linville@tuxdriver.com \
--cc=netdev@vger.kernel.org \
--cc=nikolay@cumulusnetworks.com \
--cc=nogahf@mellanox.com \
--cc=ogerlitz@mellanox.com \
--cc=roopa@cumulusnetworks.com \
--cc=vivien.didelot@savoirfairelinux.com \
--cc=yotamg@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).