#define KEY_IDX 0
#define BPF_MAP_ID_KEY 1
-struct vlan_hdr {
+struct rte_vlan_hdr {
__be16 proto;
__be16 tci;
};
for (j = 0; j < input_len; j++) {
#pragma unroll
for (i = 0; i < 32; i++) {
- if (input_tuple[j] & (1 << (31 - i))) {
+ if (input_tuple[j] & (1U << (31 - i))) {
hash ^= ((const __u32 *)def_rss_key)[j] << i |
(__u32)((uint64_t)
(((const __u32 *)def_rss_key)[j + 1])
/* Get correct proto for 802.1ad */
if (skb->vlan_present && skb->vlan_proto == htons(ETH_P_8021AD)) {
- if (data + ETH_ALEN * 2 + sizeof(struct vlan_hdr) +
+ if (data + ETH_ALEN * 2 + sizeof(struct rte_vlan_hdr) +
sizeof(proto) > data_end)
return TC_ACT_OK;
proto = *(__u16 *)(data + ETH_ALEN * 2 +
- sizeof(struct vlan_hdr));
- off += sizeof(struct vlan_hdr);
+ sizeof(struct rte_vlan_hdr));
+ off += sizeof(struct rte_vlan_hdr);
}
if (proto == htons(ETH_P_IP)) {