From: Ido Schimmel <idosch@idosch•org>
To: David Ahern <dsa@cumulusnetworks•com>
Cc: Jiri Pirko <jiri@resnulli•us>,
netdev@vger•kernel.org, davem@davemloft•net, idosch@mellanox•com,
mlxsw@mellanox•com, shm@cumulusnetworks•com,
kuznet@ms2•inr.ac.ru, jmorris@namei•org, yoshfuji@linux-ipv6•org,
kaber@trash•net, lorenzo@google•com, mateusz.bajorski@nokia•com
Subject: Re: [patch net-next 03/10] ipv4: fib_rules: Dump FIB rules when registering FIB notifier
Date: Mon, 13 Mar 2017 19:33:41 +0200 [thread overview]
Message-ID: <20170313173341.GA6577@splinter.mtl.com> (raw)
In-Reply-To: <fb57e851-4edf-5753-1036-2505314983ea@cumulusnetworks.com>
On Mon, Mar 13, 2017 at 08:52:45AM -0600, David Ahern wrote:
> On 3/13/17 1:38 AM, Jiri Pirko wrote:
> > From: Ido Schimmel <idosch@mellanox•com>
> >
> > In commit c3852ef7f2f8 ("ipv4: fib: Replay events when registering FIB
> > notifier") we dumped the FIB tables and replayed the events to the
> > passed notification block.
> >
> > However, we merely sent a RULE_ADD notification in case custom rules
> > were in use. As explained in previous patches, this approach won't work
> > anymore. Instead, we should notify the caller about all the FIB rules
> > and let it act accordingly.
> >
> > Upon registration to the FIB notification chain, replay a RULE_ADD
> > notification for each programmed FIB rule, custom or not. The integrity
> > of the dump is ensured by the mechanism introduced in the above
> > mentioned commit.
> >
> > Prevent regressions by making sure current listeners correctly sanitize
> > the notified rules.
> >
> > Signed-off-by: Ido Schimmel <idosch@mellanox•com>
> > Signed-off-by: Jiri Pirko <jiri@mellanox•com>
> > ---
> > drivers/net/ethernet/mellanox/mlxsw/Kconfig | 1 +
> > drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 11 ++++++++++-
> > drivers/net/ethernet/rocker/Kconfig | 2 +-
> > drivers/net/ethernet/rocker/rocker_main.c | 15 +++++++++++++--
> > net/ipv4/fib_rules.c | 19 ++++++++++++++++---
> > 5 files changed, 41 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/mellanox/mlxsw/Kconfig b/drivers/net/ethernet/mellanox/mlxsw/Kconfig
> > index ef23eae..a549a89 100644
> > --- a/drivers/net/ethernet/mellanox/mlxsw/Kconfig
> > +++ b/drivers/net/ethernet/mellanox/mlxsw/Kconfig
> > @@ -73,6 +73,7 @@ config MLXSW_SWITCHX2
> > config MLXSW_SPECTRUM
> > tristate "Mellanox Technologies Spectrum support"
> > depends on MLXSW_CORE && MLXSW_PCI && NET_SWITCHDEV && VLAN_8021Q
> > + depends on IP_MULTIPLE_TABLES
> > depends on PSAMPLE || PSAMPLE=n
> > select PARMAN
> > default m
>
> Why require multiple tables just b/c the h/w has the ability to support
> multiple tables?
No... I defined 'struct fib_rule_notifier_info' based on
CONFIG_IP_MULTIPLE_TABLES cause I thought it's needed for the embedded
'struct fib_rule', but now that I'm looking again I see that it's not
the case.
Will drop it. Thanks.
next prev parent reply other threads:[~2017-03-13 17:34 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-13 7:35 [patch net-next 00/10] mlxsw: Enable VRF offload Jiri Pirko
2017-03-13 7:38 ` [patch net-next 01/10] net: fib_rules: Add default rule indication Jiri Pirko
2017-03-13 7:38 ` [patch net-next 02/10] ipv4: fib_rules: Add notifier info to FIB rules notifications Jiri Pirko
2017-03-13 7:38 ` [patch net-next 03/10] ipv4: fib_rules: Dump FIB rules when registering FIB notifier Jiri Pirko
2017-03-13 14:52 ` David Ahern
2017-03-13 17:33 ` Ido Schimmel [this message]
2017-03-13 7:38 ` [patch net-next 04/10] net: Add netif_is_vrf_master helper Jiri Pirko
2017-03-13 14:39 ` David Ahern
2017-03-13 15:01 ` Ido Schimmel
2017-03-13 15:15 ` David Ahern
2017-03-13 15:58 ` Ido Schimmel
2017-03-13 7:38 ` [patch net-next 05/10] net: vrf: Set slave's private flag before linking Jiri Pirko
2017-03-13 15:19 ` David Ahern
2017-03-13 7:38 ` [patch net-next 06/10] mlxsw: spectrum_router: Associate RIFs with correct VR Jiri Pirko
2017-03-13 7:38 ` [patch net-next 07/10] mlxsw: spectrum_router: Don't destroy RIF if L3 slave Jiri Pirko
2017-03-13 7:38 ` [patch net-next 08/10] mlxsw: spectrum_router: Add support for VRFs Jiri Pirko
2017-03-13 7:38 ` [patch net-next 09/10] mlxsw: spectrum_router: Add support for VRFs on top of bridges Jiri Pirko
2017-03-13 7:38 ` [patch net-next 10/10] mlxsw: spectrum_router: Don't abort on l3mdev rules Jiri Pirko
2017-03-13 14:59 ` David Ahern
2017-03-13 15:22 ` Ido Schimmel
2017-03-13 15:37 ` David Ahern
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=20170313173341.GA6577@splinter.mtl.com \
--to=idosch@idosch$(echo .)org \
--cc=davem@davemloft$(echo .)net \
--cc=dsa@cumulusnetworks$(echo .)com \
--cc=idosch@mellanox$(echo .)com \
--cc=jiri@resnulli$(echo .)us \
--cc=jmorris@namei$(echo .)org \
--cc=kaber@trash$(echo .)net \
--cc=kuznet@ms2$(echo .)inr.ac.ru \
--cc=lorenzo@google$(echo .)com \
--cc=mateusz.bajorski@nokia$(echo .)com \
--cc=mlxsw@mellanox$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=shm@cumulusnetworks$(echo .)com \
--cc=yoshfuji@linux-ipv6$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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