[PATCH v4] examples/vhost: fix retry logic on eth rx path

Ling, WeiX weix.ling at intel.com
Thu Jun 23 09:20:35 CEST 2022


> -----Original Message-----
> From: Wang, YuanX <yuanx.wang at intel.com>
> Sent: Wednesday, June 22, 2022 5:26 PM
> To: maxime.coquelin at redhat.com; Xia, Chenbo <chenbo.xia at intel.com>;
> dev at dpdk.org
> Cc: Hu, Jiayu <jiayu.hu at intel.com>; He, Xingguang
> <xingguang.he at intel.com>; Jiang, Cheng1 <cheng1.jiang at intel.com>; Wang,
> YuanX <yuanx.wang at intel.com>; stable at dpdk.org; Ling, WeiX
> <weix.ling at intel.com>
> Subject: [PATCH v4] examples/vhost: fix retry logic on eth rx path
> 
> 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: stable at dpdk.org
> 
> Signed-off-by: Yuan Wang <yuanx.wang at intel.com>
> Tested-by: Wei Ling <weix.ling at intel.com>
> ---
> V4: Fix fiexs tag.
> V3: Fix mbuf index.
> V2: Rebase to 22.07 rc1.
> ---

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


More information about the stable mailing list