diff options
author | Guillaume Nault <gnault@redhat.com> | 2022-04-08 22:08:40 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-04-11 17:37:50 -0700 |
commit | 568a3f33b4273833f1b1e4a39d4a3410c4770c32 (patch) | |
tree | a4ccc9bd8c4a1c4c5c9d4b0c2cfbc3675837f452 /drivers/net/netdevsim | |
parent | 888ade8f90d7dbbdc8552ae9b23d311f9e61ab0e (diff) | |
download | linux-568a3f33b4273833f1b1e4a39d4a3410c4770c32.tar.gz linux-568a3f33b4273833f1b1e4a39d4a3410c4770c32.tar.bz2 linux-568a3f33b4273833f1b1e4a39d4a3410c4770c32.zip |
ipv4: Use dscp_t in struct fib_entry_notifier_info
Use the new dscp_t type to replace the tos field of struct
fib_entry_notifier_info. This ensures ECN bits are ignored and makes it
compatible with the dscp field of struct fib_rt_info.
This also allows sparse to flag potential incorrect uses of DSCP and
ECN bits.
Signed-off-by: Guillaume Nault <gnault@redhat.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/netdevsim')
-rw-r--r-- | drivers/net/netdevsim/fib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/netdevsim/fib.c b/drivers/net/netdevsim/fib.c index 31e73709aac5..fb9af26122ac 100644 --- a/drivers/net/netdevsim/fib.c +++ b/drivers/net/netdevsim/fib.c @@ -284,7 +284,7 @@ nsim_fib4_rt_create(struct nsim_fib_data *data, fib4_rt->fi = fen_info->fi; fib_info_hold(fib4_rt->fi); - fib4_rt->tos = fen_info->tos; + fib4_rt->tos = inet_dscp_to_dsfield(fen_info->dscp); fib4_rt->type = fen_info->type; return fib4_rt; @@ -323,7 +323,7 @@ nsim_fib4_rt_offload_failed_flag_set(struct net *net, fri.tb_id = fen_info->tb_id; fri.dst = cpu_to_be32(*p_dst); fri.dst_len = fen_info->dst_len; - fri.dscp = inet_dsfield_to_dscp(fen_info->tos); + fri.dscp = fen_info->dscp; fri.type = fen_info->type; fri.offload = false; fri.trap = false; |