Use the new dscp_t type to replace the tos field of struct
nsim_fib4_rt. This ensures ECN bits are ignored and makes it compatible
with the dscp fields of struct fib_entry_notifier_info and 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>
 struct nsim_fib4_rt {
        struct nsim_fib_rt common;
        struct fib_info *fi;
-       u8 tos;
+       dscp_t dscp;
        u8 type;
 };
 
 
        fib4_rt->fi = fen_info->fi;
        fib_info_hold(fib4_rt->fi);
-       fib4_rt->tos = inet_dscp_to_dsfield(fen_info->dscp);
+       fib4_rt->dscp = fen_info->dscp;
        fib4_rt->type = fen_info->type;
 
        return fib4_rt;
        fri.tb_id = fib4_rt->common.key.tb_id;
        fri.dst = cpu_to_be32(*p_dst);
        fri.dst_len = dst_len;
-       fri.dscp = inet_dsfield_to_dscp(fib4_rt->tos);
+       fri.dscp = fib4_rt->dscp;
        fri.type = fib4_rt->type;
        fri.offload = false;
        fri.trap = trap;