<div dir="ltr"><div>hi,</div><div><br></div><div>did certain modifications as per your suggestions. still the same problem. not able to capture any packets....!!!</div><div>I replaced 4096 with 512. rte_pktmbuf_pool_create is giving an error. for the time being i've left it as 4K only.</div><div>I feel it should not be a problem.<br></div><div><br></div><div>PFA for the revised code.<br></div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><br></div><div>Output is as follows : <br></div><div><br></div><div>==============================================================================================</div><div>EAL: Detected CPU lcores: 40<br>EAL: Detected NUMA nodes: 1<br>EAL: Detected shared linkage of DPDK<br>EAL: Multi-process socket /var/run/dpdk/rte/mp_socket<br>EAL: Selected IOVA mode 'VA'<br>EAL: VFIO support initialized<br>EAL: Using IOMMU type 1 (Type 1)<br>ice_dev_init(): Failed to read device serial number<br><br>ice_load_pkg_type(): Active package is: 1.3.39.0, ICE OS Default Package (double VLAN mode)<br>main 53 port id: 0 num_of_pkts_per_queue: 4096<br>ice_set_rx_function(): Using AVX2 Vector Rx (port 0).<br>Received Interrupt Signal SIGINT (2). Exiting...<br>main 98 time : 4 total pkts rcvd: 0 bandwidth: 0<br></div><div>==============================================================================================<br></div><div dir="ltr"><br>Thanks & Regards<br>--<br>Lokesh Chakka.</div></div></div></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 8, 2024 at 5:53 AM Stephen Hemminger <<a href="mailto:stephen@networkplumber.org">stephen@networkplumber.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, 8 Oct 2024 03:40:52 +0530<br>
Lokesh Chakka <<a href="mailto:lvenkatakumarchakka@gmail.com" target="_blank">lvenkatakumarchakka@gmail.com</a>> wrote:<br>
<br>
> please find the full fledged code as attachment.<br>
> <br>
> <br>
> Thanks & Regards<br>
> --<br>
> Lokesh Chakka.<br>
> <br>
> <br>
> On Mon, Oct 7, 2024 at 9:32 PM Pathak, Pravin <<a href="mailto:pravin.pathak@intel.com" target="_blank">pravin.pathak@intel.com</a>><br>
> wrote:<br>
> <br>
> > I hope accidentally num_of_pkts_per_queue is not zero.<br>
> ><br>
> > Pravin<br>
> ><br>
> ><br>
> ><br>
> > *From:* Lokesh Chakka <<a href="mailto:lvenkatakumarchakka@gmail.com" target="_blank">lvenkatakumarchakka@gmail.com</a>><br>
> > *Sent:* Monday, October 7, 2024 11:36 AM<br>
> > *To:* Bing Zhao <<a href="mailto:bingz@nvidia.com" target="_blank">bingz@nvidia.com</a>><br>
> > *Cc:* users <<a href="mailto:users@dpdk.org" target="_blank">users@dpdk.org</a>><br>
> > *Subject:* Re: unable to capture packets<br>
> ><br>
> ><br>
> ><br>
> > I've tried TX. It's working fine.<br>
> ><br>
> > I'm sure problem is only with my code.<br>
> ><br>
> ><br>
> ><br>
> > On Mon, 7 Oct, 2024, 20:52 Bing Zhao, <<a href="mailto:bingz@nvidia.com" target="_blank">bingz@nvidia.com</a>> wrote:<br>
> ><br>
> > Which NIC are you using?<br>
> ><br>
> > Have you tried dpdk-testpmd or l2fwd on your setup to check if the packet<br>
> > can be sent and received correctly?<br>
> ><br>
> ><br>
> ><br>
> > BR. Bing<br>
> ><br>
> ><br>
> ><br>
> > *From:* Lokesh Chakka <<a href="mailto:lvenkatakumarchakka@gmail.com" target="_blank">lvenkatakumarchakka@gmail.com</a>><br>
> > *Sent:* Monday, October 7, 2024 9:52 PM<br>
> > *To:* users <<a href="mailto:users@dpdk.org" target="_blank">users@dpdk.org</a>><br>
> > *Subject:* unable to capture packets<br>
> ><br>
> ><br>
> ><br>
> > *External email: Use caution opening links or attachments*<br>
> ><br>
> ><br>
> ><br>
> > hello,<br>
> ><br>
> ><br>
> ><br>
> > I'm trying to capture packets using the following piece of code :<br>
> ><br>
> ><br>
> ><br>
> > ==========================================================<br>
> ><br>
> > struct rte_eth_rxconf rxq_conf = dev_info.default_rxconf;<br>
> > rxq_conf.offloads = port_conf.rxmode.offloads;<br>
> > rte_eth_rx_queue_setup( 0, 0, num_of_pkts_per_queue, (unsigned int)sock,<br>
> > &rxq_conf, mem_pool );<br>
> > rte_eth_dev_start( 0 );<br>
> > while( 1 )<br>
> > {<br>
> > num_of_pkts_rcvd = rte_eth_rx_burst( 0, 0, mbuf, num_of_pkts_per_queue );<br>
> > fprintf( stderr, "num_of_pkts_rcvd: %u\n", num_of_pkts_rcvd );<br>
> > }<br>
> ><br>
> > ==========================================================<br>
> ><br>
> > It's always printing num_of_pkts_rcvd as 0.<br>
> ><br>
> ><br>
> ><br>
> > Can someone help me understand what the issue is ....<br>
> ><br>
> ><br>
> > Thanks & Regards<br>
> > --<br>
> > Lokesh Chakka.<br>
> ><br>
> > <br>
<br>
<br>
Save yourself some pain, and make sure to initialize all structures like:<br>
struct rte_eth_rxconf rxq_conf = { };<br>
<br>
A rx queue depth of 4K is excessive; all the packets in mempool will be<br>
tied up in the device. If you want to keep a pool size of 4K, try dropping<br>
the rx descriptors to something much smaller like 128<br>
<br>
After you receive a burst of packet you need to return them to the pool by freeing them.<br>
</blockquote></div>