diff options
author | Guillaume Nault <gnault@redhat.com> | 2022-04-08 22:08:37 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-04-11 17:37:50 -0700 |
commit | 888ade8f90d7dbbdc8552ae9b23d311f9e61ab0e (patch) | |
tree | 065939c45123a3b40eb4b2d74beb945c1accb67c /drivers/net/ethernet/marvell/prestera/prestera_router.c | |
parent | net: ethernet: ti: cpsw: drop CPSW_HEADROOM define (diff) | |
download | linux-dev-888ade8f90d7dbbdc8552ae9b23d311f9e61ab0e.tar.xz linux-dev-888ade8f90d7dbbdc8552ae9b23d311f9e61ab0e.zip |
ipv4: Use dscp_t in struct fib_rt_info
Use the new dscp_t type to replace the tos field of struct fib_rt_info.
This ensures ECN bits are ignored and makes it compatible with the
fa_dscp field of struct fib_alias.
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 '')
-rw-r--r-- | drivers/net/ethernet/marvell/prestera/prestera_router.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/marvell/prestera/prestera_router.c b/drivers/net/ethernet/marvell/prestera/prestera_router.c index 6c5618cf4f08..99d60c9ae54d 100644 --- a/drivers/net/ethernet/marvell/prestera/prestera_router.c +++ b/drivers/net/ethernet/marvell/prestera/prestera_router.c @@ -4,6 +4,7 @@ #include <linux/kernel.h> #include <linux/types.h> #include <linux/inetdevice.h> +#include <net/inet_dscp.h> #include <net/switchdev.h> #include <linux/rhashtable.h> @@ -132,7 +133,7 @@ __prestera_k_arb_fib_lpm_offload_set(struct prestera_switch *sw, fri.tb_id = fc->key.kern_tb_id; fri.dst = fc->key.addr.u.ipv4; fri.dst_len = fc->key.prefix_len; - fri.tos = fc->kern_tos; + fri.dscp = inet_dsfield_to_dscp(fc->kern_tos); fri.type = fc->kern_type; /* flags begin */ fri.offload = offload; |