On 6/22/22 11:25, Yuan Wang wrote:
drain_eth_rx() uses rte_vhost_avail_entries() to calculate
the available entries to determine if a retry is required.
However, this function only works with split rings, and
calculating packed rings will return the wrong value and cause
unnecessary retries resulting in a significant performance penalty.

This patch fix that by using the difference between tx/rx burst
as the retry condition.

Fixes: be800696c26e ("examples/vhost: use burst enqueue and dequeue from lib")
Cc: sta...@dpdk.org

Signed-off-by: Yuan Wang <yuanx.w...@intel.com>
Tested-by: Wei Ling <weix.l...@intel.com>
---
V4: Fix fiexs tag.
V3: Fix mbuf index.
V2: Rebase to 22.07 rc1.
---
  examples/vhost/main.c | 28 +++++++++++-----------------
  1 file changed, 11 insertions(+), 17 deletions(-)


Applied to dpdk-next-virtio/main.

Thanks,
Maxime
                __ATOMIC_SEQ_CST);

Reply via email to