net/af_packet: fix build with old kernel headers
Subsystems (2)
PATCH 1/1 net/af_packet: fix build with old kernel headers
The PACKET_IGNORE_OUTGOING socket option is used unconditionally, but it was only added to the uapi headers in Linux 4.20. The build fails on distributions shipping older kernel headers, like RHEL 8 (kernel-headers-4.18.0-193.el8, gcc 8.5.0):
../drivers/net/af_packet/rte_eth_af_packet.c:
In function 'rte_pmd_init_internals':
../drivers/net/af_packet/rte_eth_af_packet.c:1057:41:
error: 'PACKET_IGNORE_OUTGOING' undeclared
(first use in this function); did you mean 'PACKET_OUTGOING'?
rc = setsockopt(qsockfd, SOL_PACKET, PACKET_IGNORE_OUTGOING,
^~~~~~~~~~~~~~~~~~~~~~ PACKET_OUTGOING
../drivers/net/af_packet/rte_eth_af_packet.c:1057:41:
note: each undeclared identifier is reported only once for each function it appears in
Define the constant when the headers lack it, as is already done for PACKET_FANOUT_FLAG_IGNORE_OUTGOING.
Kernels older than 4.20 also reject the option with ENOPROTOOPT, which makes the probe of a single-queue port fail when ignore_outgoing is enabled. In this case, fall back to filtering outgoing packets in the PMD, as already done for multi-queue ports on kernels without PACKET_FANOUT_FLAG_IGNORE_OUTGOING support.
DPDK documents Linux 5.4 as the minimum kernel, but the PMD already tolerates older kernels for multi-queue ports. Do the same here instead of failing the probe, for example on the 4.18 kernel of RHEL 8.
--- doc/guides/nics/af_packet.rst | 1 + drivers/net/af_packet/rte_eth_af_packet.c | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-)
doc/guides/nics/af_packet.rst +1 -0
@@ -45,6 +45,7 @@ of AF_PACKET for frame reception. When ``ignore_outgoing`` is set, ``PACKET_IGNORE_OUTGOING`` is set for single-queue ports, which moves the filtering from the PMD to the kernel. +This option requires Linux 4.20; on older kernels the PMD does the filtering. For multi-queue ports ``PACKET_FANOUT_FLAG_IGNORE_OUTGOING`` is set to achieve the same but this only works from Linux 6.2. For earlier Linux versions, the PMD does the filtering for multi-queue ports.
drivers/net/af_packet/rte_eth_af_packet.c +14 -2
@@ -32,6 +32,11 @@#include <unistd.h> #include <poll.h> +/* Added in Linux 4.20. Older kernels reject it with ENOPROTOOPT. */ +#ifndef PACKET_IGNORE_OUTGOING +#define PACKET_IGNORE_OUTGOING 23 +#endif +/* Added in Linux 6.2. Older kernels ignore it. */ #ifndef PACKET_FANOUT_FLAG_IGNORE_OUTGOING #define PACKET_FANOUT_FLAG_IGNORE_OUTGOING 0x4000
@@ -916,6 +921,7 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,int qsockfd =-1 ;unsigned int i, q, rdsize;int fanout_arg; +bool pmd_filter;for (k_idx =0 ; k_idx < kvlist->count; k_idx++) { pair = &kvlist->pairs[k_idx];
@@ -1053,10 +1059,16 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,#endif } + pmd_filter = ignore_outgoing !=0 && nb_queues >1 ;if (ignore_outgoing !=0 && nb_queues ==1 ) { rc =setsockopt (qsockfd,SOL_PACKET ,PACKET_IGNORE_OUTGOING , &ignore_outgoing,sizeof (ignore_outgoing)); -if (rc ==-1 ) { +if (rc ==-1 && errno ==ENOPROTOOPT ) { +PMD_LOG (INFO , +"%s: PACKET_IGNORE_OUTGOING not supported by kernel, filtering in PMD" , + name); + pmd_filter = true; + }else if (rc ==-1 ) { PMD_LOG_ERRNO(ERR, "%s: could not set PACKET_IGNORE_OUTGOING " "on AF_PACKET socket for %s",
@@ -1083,7 +1095,7 @@ rte_pmd_init_internals(struct rte_vdev_device *dev, rx_queue = &((*internals)->rx_queue[q]); rx_queue->framecount = req->tp_frame_nr; - rx_queue->ignore_outgoing = ignore_outgoing !=0 && nb_queues >1 ; + rx_queue->ignore_outgoing = pmd_filter; rx_queue->map = mmap(NULL, 2 * req->tp_block_size * req->tp_block_nr, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_LOCKED,
Signature · 1 line
2.27.0
06/11/2026 15:27, Bing Zhao:
Quoted 4 lines
The
PACKET_IGNORE_OUTGOINGsocket option is used unconditionally, but it was only added to the uapi headers in Linux 4.20. The build fails on distributions shipping older kernel headers, like RHEL 8 (kernel-headers-4.18.0-193.el8, gcc 8.5.0):
+Cc Kevin for RHEL compatibility discussion.
Quoted 5 lines · Bing Zhao
The
PACKET_IGNORE_OUTGOINGsocket option is used unconditionally, but it was only added to the uapi headers in Linux 4.20. The build fails on distributions shipping older kernel headers, like RHEL 8 (kernel-headers-4.18.0-193.el8, gcc 8.5.0):
...
doc/guides/nics/af_packet.rst
Quoted 16 lines
DPDK documents Linux 5.4 as the minimum kernel, but the PMD already tolerates older kernels for multi-queue ports. Do the same here instead of failing the probe, for example on the 4.18 kernel of RHEL 8.
Fixes 3db7aa7868b2 ("net/af_packet: use kernel to filter single-queue Rx")Signed-off-by Bing Zhao <[email protected]>---
doc/guides/nics/af_packet.rst | 1 +drivers/net/af_packet/rte_eth_af_packet.c| 16 ++++++++++++++--2 files changed, 15 insertions(+), 2 deletions(-)doc/guides/nics/af_packet.rst +0
-0
Thank you for the patch.
I do not think it is a literal fix since the feature to ignore outgoing packets in the AF_PACKET PMD was added new in DPDK 26.11 which requires Kernel >= 5.4 which you mentioned.
It is, of course, a valuable feature to older versions of DPDK and/or Linux. I added that feature in a patch series. The first patch of that series adds the feature in a way that does not require setsockopt(...PACKET_IGNORE_OUTGOING...), doing all the filtering in the PMD. It is in commit b44eeed1d7. It could be cherry picked to the stable versions, providing that feature in DPDK versions that still support the older kernel.
If RHEL 8 uses Linux 4.18, and there is a requirement somewhere that the current DPDK must be compatible with it, should DPDK's Linux kernel required be lowered to 4.18 maybe?
According to the docs, the following stable versions [1] are still support which I have annotated with the documented required Linux kernel versions [2]:
* 23.11, EOL December 2026, Linux >= 4.14
* 24.11, EOL December 2027, Linux >= 4.19
* 25.11, EOL December 2028, Linux >= 5.4
[1]: Stable Versions: https://core.dpdk.org/roadmap/
[2]: Requirements: https://doc.dpdk.org/guides-23.11/linux_gsg/sys_reqs.html https://doc.dpdk.org/guides-24.11/linux_gsg/sys_reqs.html https://doc.dpdk.org/guides-25.11/linux_gsg/sys_reqs.html
To me this looks like RHEL 8 is simply not compatible with DPDK 25.11 or newer if it is still using Linux 4.18. Lowering the required version to 4.18 would be odd considering 24.11 requires 4.19 and 25.11 5.4.
If DPDK needs to stay compatible with RHEL 8, would this compatibility be required in all parts of DPDK or only some? If only parts, which parts or areas? Maybe these parts and areas then need to be listed somewhere so that new patches can be developed accordingly.
Quoted 4 lines · Bing Zhao
The
PACKET_IGNORE_OUTGOINGsocket option is used unconditionally, but it was only added to the uapi headers in Linux 4.20. The build fails on distributions shipping older kernel headers, like RHEL 8 (kernel-headers-4.18.0-193.el8, gcc 8.5.0):
Quoted 2 lines · Frank Dressler
If RHEL 8 uses Linux 4.18, [...]
If DPDK needs to stay compatible with RHEL 8, [...]
Short version: RHEL itself does't seem to ship any DPDK that is too new for its kernel. The RHEL 8 compatibility requirement may instead come from NVIDIA's DOCA, which ships DPDK 26.03 on RHEL 8. If so, the question is whether upstream DPDK should support that combination, or whether it is better handled on the DOCA side. Details below.
Bing Zhao, is that the use case behind the patch?
Details:
I read too much into Bing Zhao's statement that the new code does not build with the RHEL 8 kernel. That statement is true.I incorrectly assumed RHEL itself ships a DPDK version that is too new for its kernel, which is not the case.
I went through the DPDK and kernel versions shipped in each RHEL release [1]. All of them ship a DPDK version whose documented minimum kernel is at or below the RHEL kernel:
RHEL | Provides || DPDK | Requires
--------+------------++------------+------------
RHEL 10 | Linux 6.12 || DPDK 25.11 | Linux 5.4
|| DPDK 24.11 | Linux 4.19
--------+------------++------------+------------
RHEL 9 | Linux 5.14 || DPDK 25.11 | Linux 5.4
|| DPDK 24.11 | Linux 4.19
|| DPDK 23.11 | Linux 4.14
|| DPDK 22.11 | Linux 4.14
|| DPDK 21.11 | Linux 4.4
--------+------------++------------+------------
RHEL 8 | Linux 4.18 || DPDK 23.11 | Linux 4.14
|| DPDK 21.11 | Linux 4.4
|| DPDK 20.11 | Linux 3.16
|| DPDK 19.11 | Linux 3.16
|| DPDK 18.11 | Linux 3.2I am not a RHEL user myself.Please correct me if I missed something.
Since Bing Zhao works for NVIDIA I thought of DOCA. DOCA-Host is provided for RHEL/Rocky 8, 9 and 10 [2], and the DOCA 3.5.0 RHEL 8 repository contains dpdk-community-26.03.0.5 [3]. DPDK 26.03 documents a minimum kernel of 5.4, while RHEL 8 ships 4.18. That's a mismatch.
So, unless I'm missing something, the RHEL 8 compatibility requirement comes from DOCA rather than from RHEL.
[1]: https://rpms.remirepo.net/rpmphp/zoom.php?rpm=dpdk
[2]: https://developer.nvidia.com/doca-downloads?deployment_platform=Host-Server&deployment_package=DOCA-Host&target_os=Linux&Architecture=x86_64&Profile=doca-all&Distribution=RHEL-Rocky&version=8&installer_type=rpm_local
[3]: https://linux.mellanox.com/public/repo/doca/3.5.0/rhel8/x86_64/Packages/
Quoted 17 lines · On Sat, 7 Nov 2026 11:11:54 +0000 Frank Dressler <[email protected]> wrote:
Quoted 4 lines · Bing Zhao
The
PACKET_IGNORE_OUTGOINGsocket option is used unconditionally, but it was only added to the uapi headers in Linux 4.20. The build fails on distributions shipping older kernel headers, like RHEL 8 (kernel-headers-4.18.0-193.el8, gcc 8.5.0):Quoted 2 lines · Frank Dressler
If RHEL 8 uses Linux 4.18, [...]
If DPDK needs to stay compatible with RHEL 8, [...]Short version: RHEL itself does't seem to ship any DPDK that is too new for its kernel. The RHEL 8 compatibility requirement may instead come from NVIDIA's DOCA, which ships DPDK 26.03 on RHEL 8. If so, the question is whether upstream DPDK should support that combination, or whether it is better handled on the DOCA side. Details below.
Quoted 7 lines
Bing Zhao, is that the use case behind the patch?
Details:
I read too much into Bing Zhao's statement that the new code does not build with the RHEL 8 kernel. That statement is true.I incorrectly assumed RHEL itself ships a DPDK version that is too new for its kernel, which is not the case.
The important parts that were missed here.
- flag should not be accepted if underlying kernel does not support it.
- failure should be at compile time not runtime.
Either remove this part:
drivers/net/af_packet/rte_eth_af_packet.c +0 -5
@@ -32,11 +32,6 @@#include <unistd.h> #include <poll.h> -/* Added in Linux 6.2. Older kernels ignore it. */ -#ifndef PACKET_FANOUT_FLAG_IGNORE_OUTGOING -#define PACKET_FANOUT_FLAG_IGNORE_OUTGOING 0x4000 -#endif -#define ETH_AF_PACKET_IFACE_ARG "iface"#define ETH_AF_PACKET_NUM_Q_ARG "qpairs"#define ETH_AF_PACKET_BLOCKSIZE_ARG "blocksz"
Or add a bunch of #ifdef like this.
drivers/net/af_packet/rte_eth_af_packet.c +13 -6
@@ -32,11 +32,6 @@#include <unistd.h> #include <poll.h> -/* Added in Linux 6.2. Older kernels ignore it. */ -#ifndef PACKET_FANOUT_FLAG_IGNORE_OUTGOING -#define PACKET_FANOUT_FLAG_IGNORE_OUTGOING 0x4000 -#endif -#define ETH_AF_PACKET_IFACE_ARG "iface"#define ETH_AF_PACKET_NUM_Q_ARG "qpairs"#define ETH_AF_PACKET_BLOCKSIZE_ARG "blocksz"
@@ -44,7 +39,10 @@#define ETH_AF_PACKET_FRAMECOUNT_ARG "framecnt"#define ETH_AF_PACKET_QDISC_BYPASS_ARG "qdisc_bypass"#define ETH_AF_PACKET_FANOUT_MODE_ARG "fanout_mode" -#define ETH_AF_PACKET_IGNORE_OUTGOING_ARG "ignore_outgoing" + +#ifdef PACKET_FANOUT_FLAG_IGNORE_OUTGOING +#define ETH_AF_PACKET_IGNORE_OUTGOING_ARG "ignore_outgoing" +#endif #define DFLT_FRAME_SIZE (1 << 11)#define DFLT_FRAME_COUNT (1 << 9)
@@ -110,7 +108,9 @@ static const char *valid_arguments[] = {ETH_AF_PACKET_FRAMECOUNT_ARG ,ETH_AF_PACKET_QDISC_BYPASS_ARG ,ETH_AF_PACKET_FANOUT_MODE_ARG , +#ifdef ETH_AF_PACKET_IGNORE_OUTGOING_ARGETH_AF_PACKET_IGNORE_OUTGOING_ARG , +#endif NULL };
@@ -1002,6 +1002,7 @@ rte_pmd_init_internals(struct rte_vdev_device *dev, goto error; } +#ifdef PACKET_FANOUT_FLAG_IGNORE_OUTGOING /* * Set the flag opportunistically if multiple queues are requested. * It takes effect from Linux 6.2. Older kernels ignore it and the
@@ -1009,6 +1010,7 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,*/ if (ignore_outgoing !=0 && nb_queues >1 ) fanout_arg |=PACKET_FANOUT_FLAG_IGNORE_OUTGOING <<16 ; +#endif for (q =0 ; q < nb_queues; q++) {/* Open an AF_PACKET socket for this queue... */
@@ -1053,6 +1055,7 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,#endif } +#ifdef PACKET_IGNORE_OUTGOING if (ignore_outgoing !=0 && nb_queues ==1 ) { rc =setsockopt (qsockfd,SOL_PACKET ,PACKET_IGNORE_OUTGOING , &ignore_outgoing,sizeof (ignore_outgoing));
@@ -1064,6 +1067,7 @@ rte_pmd_init_internals(struct rte_vdev_device *dev, goto error; } } +#endif rc =setsockopt (qsockfd,SOL_PACKET ,PACKET_RX_RING , req,sizeof (*req));if (rc ==-1 ) {
@@ -1314,11 +1318,14 @@ rte_eth_from_packet(struct rte_vdev_device *dev, fanout_mode = pair->value;continue ; } + +#ifdef ETH_AF_PACKET_IGNORE_OUTGOING_ARG if (strstr (pair->key,ETH_AF_PACKET_IGNORE_OUTGOING_ARG ) !=NULL ) {if (parse_uint (pair->key, pair->value, &ignore_outgoing,1 ) <0 )return -1 ;continue ; } +#endif }if (framesize > blocksize) {
Quoted 28 lines · Stephen Hemminger
Quoted 17 lines · On Sat, 7 Nov 2026 11:11:54 +0000 Frank Dressler <[email protected]> wrote:
Quoted 4 lines · Bing Zhao
The
PACKET_IGNORE_OUTGOINGsocket option is used unconditionally, but it was only added to the uapi headers in Linux 4.20. The build fails on distributions shipping older kernel headers, like RHEL 8 (kernel-headers-4.18.0-193.el8, gcc 8.5.0):Quoted 2 lines · Frank Dressler
If RHEL 8 uses Linux 4.18, [...]
If DPDK needs to stay compatible with RHEL 8, [...]Short version: RHEL itself does't seem to ship any DPDK that is too new for its kernel. The RHEL 8 compatibility requirement may instead come from NVIDIA's DOCA, which ships DPDK 26.03 on RHEL 8. If so, the question is whether upstream DPDK should support that combination, or whether it is better handled on the DOCA side. Details below.
Quoted 7 lines
Bing Zhao, is that the use case behind the patch?
Details:
I read too much into Bing Zhao's statement that the new code does not build with the RHEL 8 kernel. That statement is true.I incorrectly assumed RHEL itself ships a DPDK version that is too new for its kernel, which is not the case.
Quoted 6 lines
The important parts that were missed here.
- flag should not be accepted if underlying kernel does not support it.
- failure should be at compile time not runtime.Either remove this part:
...>
Quoted 2 lines
Or add a bunch of #ifdef like this.
But should these changes go into DPDK or NVIDIA's DOCA?
DPDK's current code requires no patch since the code works with the kernel versions required by DPDK, i.e. Linux >= v5.4.
NVIDIA's DOCA, however, ships current DPDK to RHEL 8 which comes with kernel v4.18 that is unsupported since DPDK v24.07. The latest release is DOCA 3.5.0 which ships DPDK v26.03 to RHEL 8 which is not supported by DPDK.
I think that NVIDIA should add a patch to DOCA's DPDK version or drop support for RHEL 8 instead of requiring DPDK to be compatible with Linux v4.18.
Because if DPDK was required to support all the distributions NVIDIA
ships DOCA for, developers would need to check what kernels all those distributions ship with to find the oldest one. DPDK's kernel requirement would then need to be changed from "Kernel version >= 5.4" to "Kernel version min(5.4, whatever NVIDIA needs) >=".
Quoted 9 lines · On Sun, 8 Nov 2026 18:51:35 +0000 Frank Dressler <[email protected]> wrote:
But should these changes go into DPDK or NVIDIA's DOCA?
DPDK's current code requires no patch since the code works with the kernel versions required by DPDK, i.e. Linux >= v5.4.
NVIDIA's DOCA, however, ships current DPDK to RHEL 8 which comes with kernel v4.18 that is unsupported since DPDK v24.07. The latest release is DOCA 3.5.0 which ships DPDK v26.03 to RHEL 8 which is not supported by DPDK.
If NVIDIA is shipping new DPDK with old distro, then it is there problem.
PATCH v2 1/1 net/af_packet: fix build with old kernel headers
In reply to Bing ZhaoThe PACKET_IGNORE_OUTGOING socket option is used unconditionally, but it was only added to the uapi headers in Linux 4.20. The build fails on distributions shipping older kernel headers, like RHEL 8 (kernel-headers 4.18.0):
rte_eth_af_packet.c:1057:41: error: 'PACKET_IGNORE_OUTGOING'
undeclared (first use in this function)
DPDK requires Linux 5.4, so the driver does not need to support older kernels. Check for the symbol at configure time and skip the driver when the headers lack it, instead of failing the whole build.
---
v2:
- Drop the fallback define and the runtime fallback to PMD filtering.
- Skip the driver in meson when linux/if_packet.h lacks the symbol, so the problem is reported at build time (Stephen).
doc/guides/nics/af_packet.rst | 2 ++ drivers/net/af_packet/meson.build | 8 ++++++++ 2 files changed, 10 insertions(+)
doc/guides/nics/af_packet.rst +2 -0
@@ -72,6 +72,8 @@ Prerequisites This is a Linux-specific PMD, thus the following prerequisites apply: * A Linux Kernel; +* Kernel headers defining ``PACKET_IGNORE_OUTGOING`` (Linux 4.20 or later), + otherwise the PMD is not built; * A Kernel bound interface to attach to (e.g. a tap interface). Set up an af_packet interface
drivers/net/af_packet/meson.build +8 -0
@@ -4,6 +4,14 @@ if not is_linux build = false reason = 'only supported on Linux' + subdir_done() endif + +if not cc.has_header_symbol('linux/if_packet.h', 'PACKET_IGNORE_OUTGOING') + build = false + reason = 'missing symbol "PACKET_IGNORE_OUTGOING" in "linux/if_packet.h"' + subdir_done() +endif + sources = files('rte_eth_af_packet.c') require_iova_in_mbuf = false
Signature · 1 line
2.34.1
Quoted 8 lines · On Mon, 9 Nov 2026 17:47:30 +0200 Bing Zhao <[email protected]> wrote:
The
PACKET_IGNORE_OUTGOINGsocket option is used unconditionally, but it was only added to the uapi headers in Linux 4.20. The build fails on distributions shipping older kernel headers, like RHEL 8 (kernel-headers 4.18.0):rte_eth_af_packet.c:1057:41: error: '
PACKET_IGNORE_OUTGOING'
undeclared (first use in this function)
Quoted 8 lines
DPDK requires Linux 5.4, so the driver does not need to support older kernels. Check for the symbol at configure time and skip the driver when the headers lack it, instead of failing the whole build.
Fixes 3db7aa7868b2 ("net/af_packet: use kernel to filter single-queue Rx")Signed-off-by Bing Zhao <[email protected]>---
No. DPDK should just fail build on older kernels.
Since current DPDK is not tested with those releases, anyone doing that is working outside the tested environment and has to fix it themselves.
09/11/2026 18:47, Stephen Hemminger:
Quoted 15 lines
Quoted 12 lines · On Mon, 9 Nov 2026 17:47:30 +0200 Bing Zhao <[email protected]> wrote:
The
PACKET_IGNORE_OUTGOINGsocket option is used unconditionally, but it was only added to the uapi headers in Linux 4.20. The build fails on distributions shipping older kernel headers, like RHEL 8 (kernel-headers 4.18.0):rte_eth_af_packet.c:1057:41: error: '
PACKET_IGNORE_OUTGOING'
undeclared (first use in this function)DPDK requires Linux 5.4, so the driver does not need to support older kernels. Check for the symbol at configure time and skip the driver when the headers lack it, instead of failing the whole build.
Quoted 8 lines
Quoted 4 lines
Fixes 3db7aa7868b2 ("net/af_packet: use kernel to filter single-queue Rx")Signed-off-by Bing Zhao <[email protected]>---
No. DPDK should just fail build on older kernels.
Since current DPDK is not tested with those releases, anyone doing that is working outside the tested environment and has to fix it themselves.
We used to support some old RHEL versions. Remind that the RHEL kernel is full of backports, it is not exactly the same as an really old kernel. I think this solution disabling a driver is acceptable.
Quoted 21 lines · Thomas Monjalon
09/11/2026 18:47, Stephen Hemminger:
Quoted 20 lines
Quoted 16 lines · On Mon, 9 Nov 2026 17:47:30 +0200 Bing Zhao <[email protected]> wrote:
The
PACKET_IGNORE_OUTGOINGsocket option is used unconditionally, but it was only added to the uapi headers in Linux 4.20. The build fails on distributions shipping older kernel headers, like RHEL 8 (kernel-headers 4.18.0):rte_eth_af_packet.c:1057:41: error: '
PACKET_IGNORE_OUTGOING'
undeclared (first use in this function)DPDK requires Linux 5.4, so the driver does not need to support older kernels. Check for the symbol at configure time and skip the driver when the headers lack it, instead of failing the whole build.
Fixes 3db7aa7868b2 ("net/af_packet: use kernel to filter single-queue Rx")Signed-off-by Bing Zhao <[email protected]>---
Quoted 8 lines
Quoted 3 lines
No. DPDK should just fail build on older kernels.
Since current DPDK is not tested with those releases, anyone doing that is working outside the tested environment and has to fix it themselves.We used to support some old RHEL versions. Remind that the RHEL kernel is full of backports, it is not exactly the same as an really old kernel. I think this solution disabling a driver is acceptable.
But does RHEL itself actually have a problem? I could not find an incompatible DPDK being shipped by them. DOCA ships unsupported DPDK.
If it is RHEL, Redhat could add -Ddisable_drivers=net/af_packet. If it is DOCA, NVIDIA could just add -Ddisable_drivers=net/af_packet. DOCA already only ships a limited set of PMDs in their bundled DPDK.
Or is this change more intended for third-parties cloning and building DPDK 26.11 on RHEL 8?
If RHEL 8 must be supported, the documented requirements would need to change then to say that features of Kernel 5.4 may be used but the code must still build without error on RHEL 8, or something like that.
10/11/2026 13:52, Frank Dressler:
Quoted 31 lines · Thomas Monjalon
Quoted 21 lines
09/11/2026 18:47, Stephen Hemminger:
Quoted 20 lines
Quoted 16 lines · On Mon, 9 Nov 2026 17:47:30 +0200 Bing Zhao <[email protected]> wrote:
The
PACKET_IGNORE_OUTGOINGsocket option is used unconditionally, but it was only added to the uapi headers in Linux 4.20. The build fails on distributions shipping older kernel headers, like RHEL 8 (kernel-headers 4.18.0):rte_eth_af_packet.c:1057:41: error: '
PACKET_IGNORE_OUTGOING'
undeclared (first use in this function)DPDK requires Linux 5.4, so the driver does not need to support older kernels. Check for the symbol at configure time and skip the driver when the headers lack it, instead of failing the whole build.
Fixes 3db7aa7868b2 ("net/af_packet: use kernel to filter single-queue Rx")Signed-off-by Bing Zhao <[email protected]>---
Quoted 8 lines
Quoted 3 lines
No. DPDK should just fail build on older kernels.
Since current DPDK is not tested with those releases, anyone doing that is working outside the tested environment and has to fix it themselves.We used to support some old RHEL versions. Remind that the RHEL kernel is full of backports, it is not exactly the same as an really old kernel. I think this solution disabling a driver is acceptable.
Quoted 6 lines
But does RHEL itself actually have a problem? I could not find an incompatible DPDK being shipped by them. DOCA ships unsupported DPDK.
If it is RHEL, Redhat could add
-Ddisable_drivers=net/af_packet. If it is DOCA, NVIDIA could just add-Ddisable_drivers=net/af_packet. DOCA already only ships a limited set of PMDs in their bundled DPDK.
I don't know why you insist on DOCA, it is not an upstream concern, and was not mentioned in this thread except by you.
Quoted 2 lines
Or is this change more intended for third-parties cloning and building DPDK 26.11 on RHEL 8?
Yes my concern is to allow building a new DPDK easily. But I am still waiting for a confirmation from our Red Hat friend that RHEL 8 is still a target.
Quoted 3 lines
If RHEL 8 must be supported, the documented requirements would need to change then to say that features of Kernel 5.4 may be used but the code must still build without error on RHEL 8, or something like that.
Yes that's something we had in the past.
This has been removed last year:
"Compatibility for recent distribution kernels will be kept, notably RHEL/CentOS 7."
Does it mean we don't care about RHEL 8 users?
If that's what we decide, I'm fine with it.
Quoted 35 lines · Thomas Monjalon
10/11/2026 13:52, Frank Dressler:
Quoted 34 lines · Thomas Monjalon
Quoted 21 lines
09/11/2026 18:47, Stephen Hemminger:
Quoted 20 lines
Quoted 16 lines · On Mon, 9 Nov 2026 17:47:30 +0200 Bing Zhao <[email protected]> wrote:
The
PACKET_IGNORE_OUTGOINGsocket option is used unconditionally, but it was only added to the uapi headers in Linux 4.20. The build fails on distributions shipping older kernel headers, like RHEL 8 (kernel-headers 4.18.0):rte_eth_af_packet.c:1057:41: error: '
PACKET_IGNORE_OUTGOING'
undeclared (first use in this function)DPDK requires Linux 5.4, so the driver does not need to support older kernels. Check for the symbol at configure time and skip the driver when the headers lack it, instead of failing the whole build.
Fixes 3db7aa7868b2 ("net/af_packet: use kernel to filter single-queue Rx")Signed-off-by Bing Zhao <[email protected]>---
Quoted 8 lines
Quoted 3 lines
No. DPDK should just fail build on older kernels.
Since current DPDK is not tested with those releases, anyone doing that is working outside the tested environment and has to fix it themselves.We used to support some old RHEL versions. Remind that the RHEL kernel is full of backports, it is not exactly the same as an really old kernel. I think this solution disabling a driver is acceptable.
But does RHEL itself actually have a problem? I could not find an incompatible DPDK being shipped by them. DOCA ships unsupported DPDK.
Quoted 7 lines
Quoted 3 lines
If it is RHEL, Redhat could add
-Ddisable_drivers=net/af_packet. If it is DOCA, NVIDIA could just add-Ddisable_drivers=net/af_packet. DOCA already only ships a limited set of PMDs in their bundled DPDK.I don't know why you insist on DOCA, it is not an upstream concern, and was not mentioned in this thread except by you.
I was just wondering about the use case behind the change, because I did not find it in RHEL since they all seemed to ship with supported DPDK versions. So I thought it could have been DOCA.
Quoted 10 lines
Quoted 4 lines
If RHEL 8 must be supported, the documented requirements would need to change then to say that features of Kernel 5.4 may be used but the code must still build without error on RHEL 8, or something like that.
Yes that's something we had in the past.
This has been removed last year:"Compatibility for recent distribution kernels will be kept, notably RHEL/CentOS 7."
Thank you, I did not know that.
Quoted 8 lines · On Mon, 9 Nov 2026 17:47:30 +0200 Bing Zhao <[email protected]> wrote:
The
PACKET_IGNORE_OUTGOINGsocket option is used unconditionally, but it was only added to the uapi headers in Linux 4.20. The build fails on distributions shipping older kernel headers, like RHEL 8 (kernel-headers 4.18.0):rte_eth_af_packet.c:1057:41: error: '
PACKET_IGNORE_OUTGOING'
undeclared (first use in this function)
Quoted 8 lines
DPDK requires Linux 5.4, so the driver does not need to support older kernels. Check for the symbol at configure time and skip the driver when the headers lack it, instead of failing the whole build.
Fixes 3db7aa7868b2 ("net/af_packet: use kernel to filter single-queue Rx")Signed-off-by Bing Zhao <[email protected]>---
I liked the v1 better, looks simplest