[dpdk-stable] [PATCH] examples/vhost: fix ioat ring space in callbacks

Hu, Jiayu jiayu.hu at intel.com
Wed Mar 17 07:58:55 CET 2021


Reviewed-by: Jiayu Hu <jiayu.hu at intel.com>

> -----Original Message-----
> From: Jiang, Cheng1 <cheng1.jiang at intel.com>
> Sent: Wednesday, March 17, 2021 1:41 PM
> 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>; Yang, YvonneX
> <yvonnex.yang at intel.com>; Wang, Yinan <yinan.wang at intel.com>; Jiang,
> Cheng1 <cheng1.jiang at intel.com>; stable at dpdk.org
> Subject: [PATCH] examples/vhost: fix ioat ring space in callbacks
> 
> We use ioat ring space for determining if ioat callbacks can enqueue a
> packet to ioat device. But there is one slot can't be used in ioat
> ring due to the ioat driver design, so we need to reduce one slot in
> ioat ring to prevent ring size mismatch in ioat callbacks.
> 
> Fixes: 2aa47e94bfb2 ("examples/vhost: add ioat ring space count and check")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Cheng Jiang <Cheng1.jiang at intel.com>
> ---
>  examples/vhost/ioat.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/examples/vhost/ioat.c b/examples/vhost/ioat.c
> index 60b73be93..9cb5e0d50 100644
> --- a/examples/vhost/ioat.c
> +++ b/examples/vhost/ioat.c
> @@ -113,7 +113,7 @@ open_ioat(const char *value)
>  			goto out;
>  		}
>  		rte_rawdev_start(dev_id);
> -		cb_tracker[dev_id].ioat_space = IOAT_RING_SIZE;
> +		cb_tracker[dev_id].ioat_space = IOAT_RING_SIZE - 1;
>  		dma_info->nr++;
>  		i++;
>  	}
> --
> 2.29.2



More information about the stable mailing list