linux_dsm_epyc7002/drivers/net/ethernet
Ido Schimmel c3852ef7f2 ipv4: fib: Replay events when registering FIB notifier
Commit b90eb75494 ("fib: introduce FIB notification infrastructure")
introduced a new notification chain to notify listeners (f.e., switchdev
drivers) about addition and deletion of routes.

However, upon registration to the chain the FIB tables can already be
populated, which means potential listeners will have an incomplete view
of the tables.

Solve that by dumping the FIB tables and replaying the events to the
passed notification block. The dump itself is done using RCU in order
not to starve consumers that need RTNL to make progress.

The integrity of the dump is ensured by reading the FIB change sequence
counter before and after the dump under RTNL. This allows us to avoid
the problematic situation in which the dumping process sends a ENTRY_ADD
notification following ENTRY_DEL generated by another process holding
RTNL.

Callers of the registration function may pass a callback that is
executed in case the dump was inconsistent with current FIB tables.

The number of retries until a consistent dump is achieved is set to a
fixed number to prevent callers from looping for long periods of time.
In case current limit proves to be problematic in the future, it can be
easily converted to be configurable using a sysctl.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-03 19:29:35 -05:00
..
3com
8390
adaptec
adi
aeroflex
agere
allwinner
alteon
altera Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-12-03 12:29:53 -05:00
amazon
amd Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-12-03 12:29:53 -05:00
apm drivers: net: xgene: ethtool: Add get/set_pauseparam 2016-12-03 15:46:50 -05:00
apple
arc net: arc_emac: add dependencies on associated arches and compile test 2016-11-29 18:57:36 -05:00
atheros
aurora Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-12-03 12:29:53 -05:00
broadcom bnx2x: use reset to set network header 2016-12-03 15:49:16 -05:00
brocade net: brocade: bna: use new api ethtool_{get|set}_link_ksettings 2016-11-30 10:29:02 -05:00
cadence Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-12-03 12:29:53 -05:00
calxeda
cavium net: thunderx: Fix transmit queue timeout issue 2016-12-02 13:32:59 -05:00
chelsio Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-12-03 12:29:53 -05:00
cirrus
cisco
davicom
dec
dlink
emulex Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-11-22 13:27:16 -05:00
ezchip
faraday
freescale Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-12-03 12:29:53 -05:00
fujitsu
hisilicon
hp
i825xx
ibm ehea: Remove unnecessary memset of stats in netdev private data 2016-11-30 14:26:26 -05:00
intel Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue 2016-12-03 19:10:48 -05:00
marvell Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-12-03 12:29:53 -05:00
mediatek Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-12-03 12:29:53 -05:00
mellanox ipv4: fib: Replay events when registering FIB notifier 2016-12-03 19:29:35 -05:00
micrel
microchip
moxa
myricom
natsemi
neterion
netronome bpf, xdp: drop rcu_read_lock from bpf_prog_run_xdp and move to caller 2016-12-02 11:06:24 -05:00
nuvoton
nvidia
nxp
oki-semi
packetengines
pasemi
qlogic qede: use reset to set network header 2016-12-03 15:49:16 -05:00
qualcomm Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-12-03 12:29:53 -05:00
rdc
realtek
renesas Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-12-03 12:29:53 -05:00
rocker ipv4: fib: Replay events when registering FIB notifier 2016-12-03 19:29:35 -05:00
samsung
seeq
sfc sfc: remove EFX_BUG_ON_PARANOID, use EFX_WARN_ON_[ONCE_]PARANOID instead 2016-12-03 16:11:00 -05:00
sgi
silan
sis
smsc
stmicro net: stmmac: unify mdio functions 2016-12-03 15:23:51 -05:00
sun Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-11-22 13:27:16 -05:00
synopsys Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-12-03 12:29:53 -05:00
tehuti
ti net: ethernet: ti: davinci_cpdma: add missing EXPORTs 2016-12-03 15:27:38 -05:00
tile
toshiba
tundra
via
wiznet
xilinx
xircom
xscale
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c
jme.c
jme.h
Kconfig sfc: separate out SFC4000 ("Falcon") support into new sfc-falcon driver 2016-11-30 10:16:58 -05:00
korina.c
lantiq_etop.c
Makefile sfc: separate out SFC4000 ("Falcon") support into new sfc-falcon driver 2016-11-30 10:16:58 -05:00
netx-eth.c