DPDK usage discussions
 help / color / mirror / Atom feed
* Facing an issue with eth RX/TX call backs
@ 2022-10-17  4:42 Sridhar Pothuganti
  2022-10-17 15:01 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: Sridhar Pothuganti @ 2022-10-17  4:42 UTC (permalink / raw)
  To: users

[-- Attachment #1: Type: text/plain, Size: 813 bytes --]

Hello All,

I am trying to use the "dpdk-pdump" application to capture the packets. The pdump library is registering the RX/TX callbacks, but the callback pointer is getting NULL in the RX/TX function during packet transmission.

The callbacks are set using the function "rte_eth_add_tx_callback" and the code is using GCC atomic built-in "__atomic_store_n" with memory order "__ATOMIC_RELEASE".

In the "rte_eth_tx_burst" the same pointer is being read using "__atomic_load_n" with memory order "__ATOMIC_RELAXED".

I have gone through the code, and the "pre_tx_burst_cbs" is not being cleared no where else except "rte_eth_remove_tx_callback". But this function is not being called till the termination of pdump application.

Can someone please point me to where am I missing?

Regards,
Sridhar


[-- Attachment #2: Type: text/html, Size: 2910 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Facing an issue with eth RX/TX call backs
  2022-10-17  4:42 Facing an issue with eth RX/TX call backs Sridhar Pothuganti
@ 2022-10-17 15:01 ` Stephen Hemminger
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2022-10-17 15:01 UTC (permalink / raw)
  To: Sridhar Pothuganti; +Cc: users

On Mon, 17 Oct 2022 04:42:54 +0000
Sridhar Pothuganti <sridhar.pothuganti@nxp.com> wrote:

> Hello All,
> 
> I am trying to use the "dpdk-pdump" application to capture the packets. The pdump library is registering the RX/TX callbacks, but the callback pointer is getting NULL in the RX/TX function during packet transmission.
> 
> The callbacks are set using the function "rte_eth_add_tx_callback" and the code is using GCC atomic built-in "__atomic_store_n" with memory order "__ATOMIC_RELEASE".
> 
> In the "rte_eth_tx_burst" the same pointer is being read using "__atomic_load_n" with memory order "__ATOMIC_RELAXED".
> 
> I have gone through the code, and the "pre_tx_burst_cbs" is not being cleared no where else except "rte_eth_remove_tx_callback". But this function is not being called till the termination of pdump application.
> 
> Can someone please point me to where am I missing?
> 
> Regards,
> Sridhar
> 

Are you using primary/secondary process model for pdump?

Can you run your application under gdb?
If so, check the callback after pdump sets it up.
Then add memory watchpoint to see where it gets cleared.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-17 15:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-17  4:42 Facing an issue with eth RX/TX call backs Sridhar Pothuganti
2022-10-17 15:01 ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).