Tell the compiler to use unsigned constants for left shift ops,
otherwise building with gcc >= 6.0 fails due to multiple warnings like:
warning: left shift of negative value [-Wshift-negative-value]
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
return -1;
}
- netmask = (~0) << (32 - depth);
+ netmask = (~0U) << (32 - depth);
host = ip & netmask;
bcast = host | (~netmask);
{
struct rte_eth_stats stats;
struct ether_addr *mac_addr;
- uint32_t netmask = (~0) << (32 - p->depth);
+ uint32_t netmask = (~0U) << (32 - p->depth);
uint32_t host = p->ip & netmask;
uint32_t bcast = host | (~netmask);
return -1;
if (src_ip_depth)
- src_ip_netmask = (~0) << (32 - src_ip_depth);
+ src_ip_netmask = (~0U) << (32 - src_ip_depth);
if (dst_ip_depth)
- dst_ip_netmask = ((~0) << (32 - dst_ip_depth));
+ dst_ip_netmask = ((~0U) << (32 - dst_ip_depth));
key->key.ipv4_5tuple.src_ip &= src_ip_netmask;
key->key.ipv4_5tuple.dst_ip &= dst_ip_netmask;
if ((depth == 0) || (depth > 32))
return -1;
- netmask = (~0) << (32 - depth);
+ netmask = (~0U) << (32 - depth);
key->key.ipv4.ip &= netmask;
/* data */
if ((depth == 0) || (depth > 32))
return -1;
- netmask = (~0) << (32 - depth);
+ netmask = (~0U) << (32 - depth);
key->key.ipv4.ip &= netmask;
}
break;