patches and low-level development discussion
 help / color / mirror / code / Atom feed
* [PATCH] tools/xdp-forwarder: Fix build
@ 2025-10-03 17:14 Demi Marie Obenour
  2025-10-04 15:47 ` Alyssa Ross
  2025-10-06  7:30 ` [PATCH RFC DOESNOTBUILD v2] tools/xdp-forwarder: Do not include libc headers in eBPF programs Demi Marie Obenour
  0 siblings, 2 replies; 7+ messages in thread
From: Demi Marie Obenour @ 2025-10-03 17:14 UTC (permalink / raw)
  To: Spectrum OS Development; +Cc: Alyssa Ross, Demi Marie Obenour

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)


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-10-18 10:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-03 17:14 [PATCH] tools/xdp-forwarder: Fix build Demi Marie Obenour
2025-10-04 15:47 ` 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

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).