unable to capture packets
Lokesh Chakka
lvenkatakumarchakka at gmail.com
Tue Oct 8 00:10:52 CEST 2024
please find the full fledged code as attachment.
Thanks & Regards
--
Lokesh Chakka.
On Mon, Oct 7, 2024 at 9:32 PM Pathak, Pravin <pravin.pathak at intel.com>
wrote:
> I hope accidentally num_of_pkts_per_queue is not zero.
>
> Pravin
>
>
>
> *From:* Lokesh Chakka <lvenkatakumarchakka at gmail.com>
> *Sent:* Monday, October 7, 2024 11:36 AM
> *To:* Bing Zhao <bingz at nvidia.com>
> *Cc:* users <users at dpdk.org>
> *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, <bingz at nvidia.com> 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 <lvenkatakumarchakka at gmail.com>
> *Sent:* Monday, October 7, 2024 9:52 PM
> *To:* users <users at dpdk.org>
> *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.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/users/attachments/20241008/4f98a257/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pmd.c
Type: text/x-csrc
Size: 4481 bytes
Desc: not available
URL: <http://mails.dpdk.org/archives/users/attachments/20241008/4f98a257/attachment-0001.c>
More information about the users
mailing list