[PATCH] net/af_packet: fix build with old kernel headers

Frank Dressler frank at dressler.pro
Sun Nov 8 19:51:35 CET 2026


On 11/8/26 16:22, Stephen Hemminger wrote:
> On Sat, 7 Nov 2026 11:11:54 +0000
> Frank Dressler <frank at dressler.pro> wrote:
> 
>> On 11/6/26 14:27, Bing Zhao wrote:
>>
>>   > 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):
>>
>> On 11/6/26 16:06, Frank Dressler wrote:
>>   > 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.
> 
> 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:
>
...>
> 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) >=".


More information about the dev mailing list