From: Cheng Jiang Date: Wed, 17 Mar 2021 05:40:54 +0000 (+0000) Subject: examples/vhost: fix ioat ring space in callbacks X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=895f409c4aa872abefc73a5d280af3b2262207bb;p=dpdk.git 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@dpdk.org Signed-off-by: Cheng Jiang Reviewed-by: Jiayu Hu Reviewed-by: Maxime Coquelin --- diff --git a/examples/vhost/ioat.c b/examples/vhost/ioat.c index efdd3f6f76..2a2c2d7202 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++; }