- if (eth->h_proto == BE16(ETH_P_8021Q)) {
- if ((void*)(size_t)ctx->data + sizeof(struct ethhdr_vlan) > data_end)
+ if (likely(eth->h_proto == BE16(ETH_P_8021Q))) {
+ if (unlikely((void*)(size_t)ctx->data + sizeof(struct ethhdr_vlan) > data_end))
const struct ip6hdr *ip6 = NULL;
const void *l4hdr = NULL;
if (eth_proto == BE16(ETH_P_IP)) {
const struct ip6hdr *ip6 = NULL;
const void *l4hdr = NULL;
if (eth_proto == BE16(ETH_P_IP)) {
l4hdr = pktdata + ip->ihl * 4;
#else
if (ip->ihl != 5) return XDP_DROP;
l4hdr = pktdata + 5*4;
#endif
if (ip->protocol == IP_PROTO_TCP) {
l4hdr = pktdata + ip->ihl * 4;
#else
if (ip->ihl != 5) return XDP_DROP;
l4hdr = pktdata + 5*4;
#endif
if (ip->protocol == IP_PROTO_TCP) {