Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

netdevsim: fib: Do not warn if route was not found for several events

The next patch will add the ability to fail route offload controlled by
debugfs variable called "fail_route_offload".

If we vetoed the addition, we might get a delete or append notification
for a route we do not have. Therefore, do not warn if route was not found.

Signed-off-by: Amit Cohen <amcohen@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Amit Cohen and committed by
David S. Miller
484a4dfb 6fad361a

+3 -3
+3 -3
drivers/net/netdevsim/fib.c
··· 406 406 struct nsim_fib4_rt *fib4_rt; 407 407 408 408 fib4_rt = nsim_fib4_rt_lookup(&data->fib_rt_ht, fen_info); 409 - if (WARN_ON_ONCE(!fib4_rt)) 409 + if (!fib4_rt) 410 410 return; 411 411 412 412 rhashtable_remove_fast(&data->fib_rt_ht, &fib4_rt->common.ht_node, ··· 482 482 struct nsim_fib6_rt_nh *fib6_rt_nh; 483 483 484 484 fib6_rt_nh = nsim_fib6_rt_nh_find(fib6_rt, rt); 485 - if (WARN_ON_ONCE(!fib6_rt_nh)) 485 + if (!fib6_rt_nh) 486 486 return; 487 487 488 488 fib6_rt->nhs--; ··· 565 565 int i, err; 566 566 567 567 fib6_rt = nsim_fib6_rt_lookup(&data->fib_rt_ht, rt); 568 - if (WARN_ON_ONCE(!fib6_rt)) 568 + if (!fib6_rt) 569 569 return -EINVAL; 570 570 571 571 for (i = 0; i < fib6_event->nrt6; i++) {