summaryrefslogtreecommitdiffstats
path: root/drivers/net/netdevsim/fib.c
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@mellanox.com>2019-12-14 16:53:15 +0100
committerDavid S. Miller <davem@davemloft.net>2019-12-17 01:14:43 +0100
commit446f739104f4da6207230363848ec2c89dfd858d (patch)
tree7ff99a48baecd4e51909fd427386ebaf63606187 /drivers/net/netdevsim/fib.c
parentmlxsw: spectrum_router: Start using new IPv4 route notifications (diff)
downloadlinux-446f739104f4da6207230363848ec2c89dfd858d.tar.xz
linux-446f739104f4da6207230363848ec2c89dfd858d.zip
ipv4: Remove old route notifications and convert listeners
Unlike mlxsw, the other listeners to the FIB notification chain do not require any special modifications as they never considered multiple identical routes. This patch removes the old route notifications and converts all the listeners to use the new replace / delete notifications. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Reviewed-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/netdevsim/fib.c')
-rw-r--r--drivers/net/netdevsim/fib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/netdevsim/fib.c b/drivers/net/netdevsim/fib.c
index 13540dee7364..4e02a4231fcb 100644
--- a/drivers/net/netdevsim/fib.c
+++ b/drivers/net/netdevsim/fib.c
@@ -177,10 +177,10 @@ static int nsim_fib_event_nb(struct notifier_block *nb, unsigned long event,
event == FIB_EVENT_RULE_ADD);
break;
+ case FIB_EVENT_ENTRY_REPLACE: /* fall through */
case FIB_EVENT_ENTRY_ADD: /* fall through */
case FIB_EVENT_ENTRY_DEL:
- err = nsim_fib_event(data, info,
- event == FIB_EVENT_ENTRY_ADD);
+ err = nsim_fib_event(data, info, event != FIB_EVENT_ENTRY_DEL);
break;
}