Lines Matching refs:is_ethernet
108 static inline __always_inline int do_forward6(struct __sk_buff* skb, const bool is_ethernet,
114 if (is_ethernet && (skb->pkt_type != PACKET_HOST)) return TC_ACT_OK;
116 const int l2_header_size = is_ethernet ? sizeof(struct ethhdr) : 0;
126 struct ethhdr* eth = is_ethernet ? data : NULL; // used iff is_ethernet
127 struct ipv6hdr* ip6 = is_ethernet ? (void*)(eth + 1) : data;
133 if (is_ethernet && (eth->h_proto != htons(ETH_P_IPV6))) return TC_ACT_OK;
179 if (is_ethernet) __builtin_memcpy(downstream ? kd.dstMac : ku.dstMac, eth->h_dest, ETH_ALEN);
227 if (!is_ethernet) {
355 static inline __always_inline int do_forward4(struct __sk_buff* skb, const bool is_ethernet, in do_forward4() argument
358 if (is_ethernet && (skb->pkt_type != PACKET_HOST)) return TC_ACT_OK; in do_forward4()
363 const int l2_header_size = is_ethernet ? sizeof(struct ethhdr) : 0; in do_forward4()
373 struct ethhdr* eth = is_ethernet ? data : NULL; // used iff is_ethernet in do_forward4()
374 struct iphdr* ip = is_ethernet ? (void*)(eth + 1) : data; in do_forward4()
380 if (is_ethernet && (eth->h_proto != htons(ETH_P_IP))) return TC_ACT_OK; in do_forward4()
492 if (is_ethernet) __builtin_memcpy(k.dstMac, eth->h_dest, ETH_ALEN); in do_forward4()
540 if (!is_ethernet) { in do_forward4()
779 static inline __always_inline int do_xdp_forward6(struct xdp_md *ctx, const bool is_ethernet, in do_xdp_forward6() argument
784 static inline __always_inline int do_xdp_forward4(struct xdp_md *ctx, const bool is_ethernet, in do_xdp_forward4() argument