netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch net-next v2 00/11] ipv4: fib: Allow modules to dump FIB tables
@ 2016-11-23 14:34 Jiri Pirko
  2016-11-23 14:34 ` [patch net-next v2 01/11] ipv4: fib: Export free_fib_info() Jiri Pirko
                   ` (10 more replies)
  0 siblings, 11 replies; 24+ messages in thread
From: Jiri Pirko @ 2016-11-23 14:34 UTC (permalink / raw)
  To: netdev
  Cc: davem, idosch, eladr, yotamg, nogahf, arkadis, ogerlitz, roopa,
	dsa, nikolay, andy, vivien.didelot, andrew, f.fainelli,
	alexander.h.duyck, hannes, kaber

From: Jiri Pirko <jiri@mellanox.com>

Ido says:

In kernel 4.9 the switchdev-specific FIB offload mechanism was replaced
by a new FIB notification chain to which modules could register in order
to be notified about the addition and deletion of FIB entries. The
motivation for this change was that switchdev drivers need to be able to
reflect the entire FIB table and not only FIBs configured on top of the
port netdevs themselves. This is useful in case of in-band management.

The fundamental problem with this approach is that upon registration
listeners lose all the information previously sent in the chain and
thus have an incomplete view of the FIB tables, which can result in
packet loss. This patchset fixes that by introducing a new API to dump
the FIB tables.

The entire dump process is done under RCU and thus the FIB notification
chain is converted to be atomic. The listeners are modified accordingly.
This is done in the first seven patches.

The eighth patch adds a change sequence counter to ensure the integrity
of the FIB dump, which is finally introduced in the following patch. The
last two patches modify current listeners of the FIB notification chain
to invoke the dump during their init.

---
v1->v2:
- Add a sequence counter to ensure the integrity of the FIB dump
  (David S. Miller, Hannes Frederic Sowa).
- Protect notifications from re-ordering in listeners by using an
  ordered workqueue (Hannes Frederic Sowa).
- Introduce fib_info_hold() (Jiri Pirko).
- Relieve rocker from the need to invoke the FIB dump by registering
  to the FIB notification chain prior to ports creation.
 
Ido Schimmel (11):
  ipv4: fib: Export free_fib_info()
  ipv4: fib: Add fib_info_hold() helper
  mlxsw: core: Create an ordered workqueue for FIB offload
  mlxsw: spectrum_router: Implement FIB offload in deferred work
  rocker: Create an ordered workqueue for FIB offload
  rocker: Implement FIB offload in deferred work
  ipv4: fib: Convert FIB notification chain to be atomic
  ipv4: fib: Allow for consistent FIB dumping
  ipv4: fib: Add an API to request a FIB dump
  mlxsw: spectrum_router: Request a dump of FIB tables during init
  rocker: Register FIB notifier before creating ports

 drivers/net/ethernet/mellanox/mlxsw/core.c         |  22 ++++
 drivers/net/ethernet/mellanox/mlxsw/core.h         |   2 +
 .../net/ethernet/mellanox/mlxsw/spectrum_router.c  |  88 ++++++++++++--
 drivers/net/ethernet/rocker/rocker.h               |   1 +
 drivers/net/ethernet/rocker/rocker_main.c          |  78 +++++++++++--
 drivers/net/ethernet/rocker/rocker_ofdpa.c         |   1 +
 include/net/ip_fib.h                               |   6 +
 include/net/netns/ipv4.h                           |   2 +
 net/ipv4/fib_frontend.c                            |   2 +
 net/ipv4/fib_semantics.c                           |   1 +
 net/ipv4/fib_trie.c                                | 126 ++++++++++++++++++++-
 11 files changed, 303 insertions(+), 26 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2016-11-24 12:34 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-23 14:34 [patch net-next v2 00/11] ipv4: fib: Allow modules to dump FIB tables Jiri Pirko
2016-11-23 14:34 ` [patch net-next v2 01/11] ipv4: fib: Export free_fib_info() Jiri Pirko
2016-11-23 14:34 ` [patch net-next v2 02/11] ipv4: fib: Add fib_info_hold() helper Jiri Pirko
2016-11-23 14:34 ` [patch net-next v2 03/11] mlxsw: core: Create an ordered workqueue for FIB offload Jiri Pirko
2016-11-23 14:34 ` [patch net-next v2 04/11] mlxsw: spectrum_router: Implement FIB offload in deferred work Jiri Pirko
2016-11-23 14:34 ` [patch net-next v2 05/11] rocker: Create an ordered workqueue for FIB offload Jiri Pirko
2016-11-23 14:34 ` [patch net-next v2 06/11] rocker: Implement FIB offload in deferred work Jiri Pirko
2016-11-23 14:34 ` [patch net-next v2 07/11] ipv4: fib: Convert FIB notification chain to be atomic Jiri Pirko
2016-11-23 14:34 ` [patch net-next v2 08/11] ipv4: fib: Allow for consistent FIB dumping Jiri Pirko
2016-11-23 14:34 ` [patch net-next v2 09/11] ipv4: fib: Add an API to request a FIB dump Jiri Pirko
2016-11-23 17:47   ` Hannes Frederic Sowa
2016-11-23 19:53     ` Ido Schimmel
2016-11-23 23:04       ` Hannes Frederic Sowa
2016-11-24  8:47         ` Ido Schimmel
2016-11-24 12:34           ` Hannes Frederic Sowa
2016-11-23 14:48 ` [patch net-next v2 10/11] mlxsw: spectrum_router: Request a dump of FIB tables during init Jiri Pirko
2016-11-23 16:00   ` Hannes Frederic Sowa
2016-11-23 16:04     ` Jiri Pirko
2016-11-23 16:59       ` Hannes Frederic Sowa
2016-11-23 17:04         ` Jiri Pirko
2016-11-23 17:08           ` Hannes Frederic Sowa
2016-11-23 19:22             ` Ido Schimmel
2016-11-23 19:45               ` Jiri Pirko
2016-11-23 14:48 ` [patch net-next v2 11/11] rocker: Register FIB notifier before creating ports Jiri Pirko

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).