<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Aptos;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:12.0pt;
font-family:"Aptos",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Aptos",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="en-IL" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span class="EmailStyle18">Understood. Thanks.</span><span lang="en-IL" style="mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="en-IL" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">Maayan Kashani<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span lang="en-IL" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Stephen Hemminger <stephen@networkplumber.org>
<br>
<b>Sent:</b> Wednesday, 8 July 2026 10:11<br>
<b>To:</b> Maayan Kashani <mkashani@nvidia.com><br>
<b>Cc:</b> Bruce Richardson <bruce.richardson@intel.com>; dev <dev@dpdk.org>; Raslan Darawsheh <rasland@nvidia.com>; stable <stable@dpdk.org>; David Marchand <david.marchand@redhat.com><br>
<b>Subject:</b> Re: [PATCH] build: fix libpcap detection with unusable header<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<table class="MsoNormalTable" border="1" cellpadding="0" style="background:#FFEB9C">
<tbody>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><b><span style="font-size:7.5pt;font-family:"Verdana",sans-serif;color:black">External email: Use caution opening links or attachments</span></b><span style="font-size:7.5pt;font-family:"Verdana",sans-serif;color:black">
</span><o:p></o:p></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Not sure. Working around busted packages in DPDK is a bad idea.<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Wed, Jul 8, 2026, 08:38 Maayan Kashani <<a href="mailto:mkashani@nvidia.com">mkashani@nvidia.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">Hi, Bruce, <br>
we encountered DPDK build issue on Tencent 4.6.<br>
It is not expected; the package/image appears corrupted. <br>
RPM verification confirms the headers differ from the packaged contents. <br>
The DPDK change is still valid because optional dependency detection should <br>
test for usable declarations, not just file existence and library presence.”<br>
<br>
Regards,<br>
Maayan Kashani<br>
<br>
> -----Original Message-----<br>
> From: Bruce Richardson <<a href="mailto:bruce.richardson@intel.com" target="_blank">bruce.richardson@intel.com</a>><br>
> Sent: Tuesday, 7 July 2026 17:16<br>
> To: Maayan Kashani <<a href="mailto:mkashani@nvidia.com" target="_blank">mkashani@nvidia.com</a>><br>
> Cc: <a href="mailto:dev@dpdk.org" target="_blank">dev@dpdk.org</a>; Raslan Darawsheh <<a href="mailto:rasland@nvidia.com" target="_blank">rasland@nvidia.com</a>>;<br>
> <a href="mailto:stable@dpdk.org" target="_blank">stable@dpdk.org</a>; David Marchand <<a href="mailto:david.marchand@redhat.com" target="_blank">david.marchand@redhat.com</a>>; Stephen<br>
> Hemminger <<a href="mailto:stephen@networkplumber.org" target="_blank">stephen@networkplumber.org</a>><br>
> Subject: Re: [PATCH] build: fix libpcap detection with unusable header<br>
> <br>
> External email: Use caution opening links or attachments<br>
> <br>
> <br>
> On Tue, Jul 07, 2026 at 04:30:28PM +0300, Maayan Kashani wrote:<br>
> > The libpcap detection only checked that the library was present, that<br>
> > <pcap.h> could be included, and that a trivial program links. None of<br>
> > these fail when a distribution ships a libpcap-devel package whose<br>
> > <pcap.h> is empty (present but declaring nothing) while libpcap.so is<br>
> > installed: has_header() passes on an empty file and the link test does<br>
> > not reference any pcap symbol. RTE_HAS_LIBPCAP was then set and the<br>
> > pcap-dependent code (bpf_convert.c, port source/sink, dumpcap) failed<br>
> > to build with errors such as:<br>
> ><br>
> <br>
> Why would a distribution ship a devel package with an empty header file for<br>
> pcap.h? Is that expected behaviour in some scenario that I'm unaware of,<br>
> because it seems strange to me?<br>
> <br>
> /Bruce<br>
> <br>
> > bpf_convert.c: error: invalid use of undefined type<br>
> > 'const struct bpf_insn'<br>
> ><br>
> > Require an actual pcap declaration (pcap_create) to be visible in the<br>
> > header before enabling libpcap support, so a broken or empty header<br>
> > disables the optional pcap features instead of breaking the build.<br>
> ><br>
> > Fixes: d6024c0a6757 ("build: cleanup libpcap dependent components")<br>
> > Cc: <a href="mailto:stable@dpdk.org" target="_blank">stable@dpdk.org</a><br>
> ><br>
> > Signed-off-by: Maayan Kashani <<a href="mailto:mkashani@nvidia.com" target="_blank">mkashani@nvidia.com</a>><br>
> > ---<br>
> > config/meson.build | 5 ++++-<br>
> > 1 file changed, 4 insertions(+), 1 deletion(-)<br>
> ><br>
> > diff --git a/config/meson.build b/config/meson.build index<br>
> > d7f5e55c18f..4bfb8535781 100644<br>
> > --- a/config/meson.build<br>
> > +++ b/config/meson.build<br>
> > @@ -290,7 +290,10 @@ if not pcap_dep.found()<br>
> > # pcap got a pkg-config file only in 1.9.0<br>
> > pcap_dep = cc.find_library(pcap_lib, required: false) endif -if<br>
> > (pcap_dep.found() and cc.has_header('pcap.h', dependencies: pcap_dep)<br>
> > +# has_header() passes even when pcap.h is empty; require a real<br>
> declaration.<br>
> > +if (pcap_dep.found()<br>
> > + and cc.has_header_symbol('pcap.h', 'pcap_create', dependencies:<br>
> pcap_dep,<br>
> > + args: '-D_GNU_SOURCE')<br>
> > and cc.links(min_c_code, dependencies: pcap_dep))<br>
> > dpdk_conf.set('RTE_HAS_LIBPCAP', 1)<br>
> > dpdk_extra_ldflags += '-l@0@'.format(pcap_lib)<br>
> > --<br>
> > 2.21.0<br>
> ><o:p></o:p></p>
</blockquote>
</div>
</div>
</div>
</div>
</body>
</html>