From 648dbff47974f91f1b4aac2321ed2c991eae03ef Mon Sep 17 00:00:00 2001 From: Christian Deacon Date: Thu, 13 Jun 2024 19:30:16 -0400 Subject: [PATCH] Use unlikely() again. --- src/xdpfw_kern.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xdpfw_kern.c b/src/xdpfw_kern.c index a44e1aa..66859a8 100644 --- a/src/xdpfw_kern.c +++ b/src/xdpfw_kern.c @@ -86,7 +86,7 @@ int xdp_prog_main(struct xdp_md *ctx) struct ethhdr *eth = data; // Check if the ethernet header is valid. - if (eth + 1 > (struct ethhdr *)data_end) + if (unlikely(eth + 1 > (struct ethhdr *)data_end)) { return XDP_DROP; }