[PATCH] examples/vhost: Fix retry logic on Rx

Ling, WeiX weix.ling at intel.com
Thu May 26 11:30:47 CEST 2022


> -----Original Message-----
> From: Wang, YuanX <yuanx.wang at intel.com>
> Sent: Thursday, May 19, 2022 12:25 AM
> To: maxime.coquelin at redhat.com; Xia, Chenbo <chenbo.xia at intel.com>
> Cc: dev at dpdk.org; Hu, Jiayu <jiayu.hu at intel.com>; He, Xingguang
> <xingguang.he at intel.com>; Ling, WeiX <weix.ling at intel.com>; Wang, YuanX
> <yuanx.wang at intel.com>; stable at 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: stable at dpdk.org
> 
> Signed-off-by: Yuan Wang <yuanx.wang at intel.com>
> ---

Tested-by: Wei Ling <weix.ling at intel.com>


More information about the stable mailing list