[PATCH 21.11] examples/vhost: fix retry logic on Rx path
Luca Boccassi
luca.boccassi at gmail.com
Fri Jul 8 12:55:02 CEST 2022
On Sat, 2022-07-09 at 01:14 +0800, Yuan Wang wrote:
> [ upstream commit 1907ce4baec392a750fbeba5e946920b2f00ae73 ]
>
> 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")
>
> Signed-off-by: Yuan Wang <yuanx.wang at intel.com>
> Reviewed-by: Chenbo Xia <chenbo.xia at intel.com>
> ---
> examples/vhost/main.c | 79 ++++++++++++++++++-------------------------
> 1 file changed, 33 insertions(+), 46 deletions(-)
Thanks, applied.
--
Kind regards,
Luca Boccassi
More information about the stable
mailing list