[PATCH v4 17/23] examples: include network headers
Stephen Hemminger
stephen at networkplumber.org
Thu Aug 6 07:09:11 CEST 2026
Don't depend on network protocol headers getting indirectly
included via rte_ethdev.h.
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
examples/l2fwd-macsec/main.c | 2 ++
examples/l3fwd-graph/main.c | 1 +
examples/l3fwd/l3fwd.h | 2 ++
3 files changed, 5 insertions(+)
diff --git a/examples/l2fwd-macsec/main.c b/examples/l2fwd-macsec/main.c
index 059f8a2170..e07769bd57 100644
--- a/examples/l2fwd-macsec/main.c
+++ b/examples/l2fwd-macsec/main.c
@@ -33,9 +33,11 @@
#include <rte_debug.h>
#include <rte_ether.h>
#include <rte_ethdev.h>
+#include <rte_flow.h>
#include <rte_mempool.h>
#include <rte_mbuf.h>
#include <rte_security.h>
+#include <rte_macsec.h>
#include <rte_string_fns.h>
static volatile bool force_quit;
diff --git a/examples/l3fwd-graph/main.c b/examples/l3fwd-graph/main.c
index 5f89286dce..79dee4d103 100644
--- a/examples/l3fwd-graph/main.c
+++ b/examples/l3fwd-graph/main.c
@@ -36,6 +36,7 @@
#include <rte_per_lcore.h>
#include <rte_string_fns.h>
#include <rte_vect.h>
+#include <rte_ip.h>
#include <cmdline_parse.h>
#include <cmdline_parse_etheraddr.h>
diff --git a/examples/l3fwd/l3fwd.h b/examples/l3fwd/l3fwd.h
index 349fc37c79..db7b746f59 100644
--- a/examples/l3fwd/l3fwd.h
+++ b/examples/l3fwd/l3fwd.h
@@ -8,6 +8,8 @@
#include <rte_ethdev.h>
#include <rte_vect.h>
#include <rte_acl.h>
+#include <rte_ip.h>
+
#define DO_RFC_1812_CHECKS
--
2.53.0
More information about the dev
mailing list