Skip to content

Commit

Permalink
netdevsim: fib: Do not warn if route was not found for several events
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Amit Cohen authored and David S. Miller committed Feb 9, 2021
1 parent 6fad361 commit 484a4df
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/netdevsim/fib.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ static void nsim_fib4_rt_remove(struct nsim_fib_data *data,
struct nsim_fib4_rt *fib4_rt;

fib4_rt = nsim_fib4_rt_lookup(&data->fib_rt_ht, fen_info);
if (WARN_ON_ONCE(!fib4_rt))
if (!fib4_rt)
return;

rhashtable_remove_fast(&data->fib_rt_ht, &fib4_rt->common.ht_node,
Expand Down Expand Up @@ -482,7 +482,7 @@ static void nsim_fib6_rt_nh_del(struct nsim_fib6_rt *fib6_rt,
struct nsim_fib6_rt_nh *fib6_rt_nh;

fib6_rt_nh = nsim_fib6_rt_nh_find(fib6_rt, rt);
if (WARN_ON_ONCE(!fib6_rt_nh))
if (!fib6_rt_nh)
return;

fib6_rt->nhs--;
Expand Down Expand Up @@ -565,7 +565,7 @@ static int nsim_fib6_rt_append(struct nsim_fib_data *data,
int i, err;

fib6_rt = nsim_fib6_rt_lookup(&data->fib_rt_ht, rt);
if (WARN_ON_ONCE(!fib6_rt))
if (!fib6_rt)
return -EINVAL;

for (i = 0; i < fib6_event->nrt6; i++) {
Expand Down

0 comments on commit 484a4df

Please sign in to comment.