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