On Sun, 31 Dec 2017 07:34:29 +0000 Shachar Beiser <shacha...@mellanox.com> wrote:
> +/* IPv6 vtc_flow: IPv / TC / flow_label */ > +#define IPV6_HDR_FL_SHIFT (0) > +#define IPV6_HDR_TC_SHIFT (20) No parenthesis needed around simple numeric values. > +#define IPV6_HDR_FL_MASK ((1 << IPV6_HDR_TC_SHIFT) - 1) If you use ((1u << IPV6_HDR_TC_SHFIT - 1) then the mask will be unsigned which probably what you want. > +#define IPV6_HDR_TC_MASK (0xf << IPV6_HDR_TC_SHIFT)