On Tue, 15 Mar 2022 15:28:55 -0400 fwefew 4t4tg <7532ya...@gmail.com> wrote:
> On DPDK head commit (917229) I have a simple program creating two TXQs each > sending 15000 IPV4 UDP packets. > > As far as I can see there are no errors anymore. I have looked. I burst TX > them in blocks of 15; rte_eth_tx_burst always returns 15. > > The lcores are launched with rte_eal_mp_remote_launch, and main() blocks > until rte_eal_mp_wait_lcore() returns. > > However, at any time after rte_eal_mp_wait_lcore returns showing the number > of out packets as per rte_eth_stats_get or xstats per rte_eth_xstats_get I > see two things: > > - the reported number of queued packets per TXQ is always 15000 > - the number of out packets or "good packets" is close to 15000*2 but never > 30000 > > It appears like the TXQs still have work in-queue even after the lcore's > thread returns and rte_eal_mp_wait_lcore returns. I've tried to > rte_eth_tx_done_cleanup and/or rte_eth_dev_tx_queue_stop before I get the > stats. That doesn't seem to help. > > The TXQ config is default except for checksum offloads: > > 000000.336378246 DEBUG reinvent_dpdk_initaws.cpp:1341 TXQ conf: > {"tx_thresh": { "pthresh": 0, "hthresh": 0, "wthresh": 0 }, "tx_rs_thresh": > 0, "tx_free_thresh": 0, "tx_deferred_start": 0, "tx_offloads": 00008006, } > > Is this expected behavior? I've look through code; I haven't seen clear > signs of a TXQ oriented lcore flushed or waiting for the output queue to be > actually written onto the wire before exiting. > No part of lcore_wait is related directly to TxQ. The TxQ runs asynchronously. If you have to check if packet was sent, the you would need to use rte_eth_tx_descriptor_status(). But not all hardware supports this API; AWS ENA does not.