From: Demi Marie Obenour <demiobenour@gmail.com>
To: Spectrum OS Development <devel@spectrum-os.org>
Cc: Alyssa Ross <hi@alyssa.is>, Demi Marie Obenour <demiobenour@gmail.com>
Subject: [PATCH] tools/xdp-forwarder: Fix build
Date: Fri, 03 Oct 2025 13:14:45 -0400 [thread overview]
Message-ID: <20251003-fix-forwarder-build-v1-1-856b78ae5656@gmail.com> (raw)
Clang complains that it can't fine gnu-stubs32.h. Drop the ICMP parsing
code to avoid this error. No functional change as the code is not
actually used.
Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
---
tools/xdp-forwarder/parsing_helpers.h | 57 -----------------------------------
1 file changed, 57 deletions(-)
diff --git a/tools/xdp-forwarder/parsing_helpers.h b/tools/xdp-forwarder/parsing_helpers.h
index da099346008bd58485af8308feb4d3391ceef8f5..1ea822100fdb9a75c2d28d34d93e6bb2b5d3ae26 100644
--- a/tools/xdp-forwarder/parsing_helpers.h
+++ b/tools/xdp-forwarder/parsing_helpers.h
@@ -26,8 +26,6 @@
#include <linux/if_packet.h>
#include <linux/ip.h>
#include <linux/ipv6.h>
-#include <linux/icmp.h>
-#include <linux/icmpv6.h>
#include <linux/udp.h>
#include <linux/tcp.h>
@@ -46,16 +44,6 @@ struct vlan_hdr {
__be16 h_vlan_encapsulated_proto;
};
-/*
- * Struct icmphdr_common represents the common part of the icmphdr and icmp6hdr
- * structures.
- */
-struct icmphdr_common {
- __u8 type;
- __u8 code;
- __sum16 cksum;
-};
-
/* Allow users of header file to redefine VLAN max depth */
#ifndef VLAN_MAX_DEPTH
#define VLAN_MAX_DEPTH 2
@@ -175,51 +163,6 @@ static __always_inline int parse_iphdr(struct hdr_cursor *nh,
return iph->protocol;
}
-static __always_inline int parse_icmp6hdr(struct hdr_cursor *nh,
- void *data_end,
- struct icmp6hdr **icmp6hdr)
-{
- struct icmp6hdr *icmp6h = nh->pos;
-
- if (icmp6h + 1 > data_end)
- return -1;
-
- nh->pos = icmp6h + 1;
- *icmp6hdr = icmp6h;
-
- return icmp6h->icmp6_type;
-}
-
-static __always_inline int parse_icmphdr(struct hdr_cursor *nh,
- void *data_end,
- struct icmphdr **icmphdr)
-{
- struct icmphdr *icmph = nh->pos;
-
- if (icmph + 1 > data_end)
- return -1;
-
- nh->pos = icmph + 1;
- *icmphdr = icmph;
-
- return icmph->type;
-}
-
-static __always_inline int parse_icmphdr_common(struct hdr_cursor *nh,
- void *data_end,
- struct icmphdr_common **icmphdr)
-{
- struct icmphdr_common *h = nh->pos;
-
- if (h + 1 > data_end)
- return -1;
-
- nh->pos = h + 1;
- *icmphdr = h;
-
- return h->type;
-}
-
/*
* parse_udphdr: parse the udp header and return the length of the udp payload
*/
---
base-commit: c5d5786d3dc938af0b279c542d1e43bce381b4b9
change-id: 20251003-fix-forwarder-build-2889ea9aec91
--
Sincerely,
Demi Marie Obenour (she/her/hers)
next reply other threads:[~2025-10-03 17:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-03 17:14 Demi Marie Obenour [this message]
2025-10-04 15:47 ` [PATCH] tools/xdp-forwarder: Fix build Alyssa Ross
2025-10-05 3:36 ` Demi Marie Obenour
2025-10-06 7:30 ` [PATCH RFC DOESNOTBUILD v2] tools/xdp-forwarder: Do not include libc headers in eBPF programs Demi Marie Obenour
2025-10-06 7:45 ` Demi Marie Obenour
2025-10-08 17:22 ` [PATCH v3] " Demi Marie Obenour
2025-10-18 10:56 ` Alyssa Ross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251003-fix-forwarder-build-v1-1-856b78ae5656@gmail.com \
--to=demiobenour@gmail.com \
--cc=devel@spectrum-os.org \
--cc=hi@alyssa.is \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://spectrum-os.org/git/crosvm
https://spectrum-os.org/git/doc
https://spectrum-os.org/git/mktuntap
https://spectrum-os.org/git/nixpkgs
https://spectrum-os.org/git/spectrum
https://spectrum-os.org/git/ucspi-vsock
https://spectrum-os.org/git/www
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).