> -----Original Message----- > From: Wang, YuanX <yuanx.w...@intel.com> > Sent: Thursday, May 19, 2022 12:25 AM > To: maxime.coque...@redhat.com; Xia, Chenbo <chenbo....@intel.com> > Cc: dev@dpdk.org; Hu, Jiayu <jiayu...@intel.com>; He, Xingguang > <xingguang...@intel.com>; Ling, WeiX <weix.l...@intel.com>; Wang, YuanX > <yuanx.w...@intel.com>; sta...@dpdk.org > Subject: [PATCH] examples/vhost: Fix retry logic on Rx > > 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 uses the difference between tx burst and rx burst as a retry > condition, and introduces enqueue_pkts() to reduce code duplication. > > Fixes: 4ecf22e356 ("vhost: export device id as the interface to applications") > Cc: sta...@dpdk.org > > Signed-off-by: Yuan Wang <yuanx.w...@intel.com> > ---
Tested-by: Wei Ling <weix.l...@intel.com>