DPDK patches and discussions
 help / color / mirror / Atom feed
* dpdk: Inquiry about vring cleanup during packets transmission
@ 2023-05-27  7:08 wangzengyuan
  2023-05-30  9:48 ` Maxime Coquelin
  0 siblings, 1 reply; 2+ messages in thread
From: wangzengyuan @ 2023-05-27  7:08 UTC (permalink / raw)
  To: dev; +Cc: maxime.coquelin, chenbo.xia, zhangxu (BA), luyicai, wangyunjian

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

Hi,
         I am writing to inquire about the vring cleanup process during packets transmission.
In the virtio_xmit_pkts function, there is the following code:
         nb_used = virtqueue_nused(vq);

         if (likely(nb_used > vq->vq_nentries - vq->vq_free_thresh))
                   virtio_xmit_cleanup(vq, nb_used);
In other words, cleaning is performed when the number of items used in the vring exceeds (vq->vq_nentries - vq->vq_free_thresh). In the case of an vring size of 4096, at least (4096-32) items need to be cleaned at once, which will take a considerable amount of time.
I'm curious why not clean up fewer items each time to avoid taking up too much CPU time in one transmission. Because during the debugging process, I found that cleaning up thousands of items at once takes up a considerable amount of time.
As I am not familiar with this process, I would appreciate it if you could provide me with some information on what its purpose is.

Best regards,

Zengyuan Wang

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

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

end of thread, other threads:[~2023-05-30 15:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-27  7:08 dpdk: Inquiry about vring cleanup during packets transmission wangzengyuan
2023-05-30  9:48 ` Maxime Coquelin

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).