From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4DBBEA00C2; Wed, 17 Mar 2021 06:57:55 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CB6BD406A3; Wed, 17 Mar 2021 06:57:54 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 69AA740689; Wed, 17 Mar 2021 06:57:53 +0100 (CET) IronPort-SDR: jouKKMl86XGhMcxyqLNKrEjTmkOApxARugkbVVv72GCS9pTMt8byxtegibdMH4bNzm22lZlkzT AZLpAW4aNBPg== X-IronPort-AV: E=McAfee;i="6000,8403,9925"; a="189443356" X-IronPort-AV: E=Sophos;i="5.81,254,1610438400"; d="scan'208";a="189443356" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Mar 2021 22:57:51 -0700 IronPort-SDR: mGDH4zP51lwvCXQphAja3+OG+LzuqsjDankC2DCnYIMDEqz7u93HGU5RU/ulYH2AjirG8rfuOG i/9JtFPpCNog== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,254,1610438400"; d="scan'208";a="602106370" Received: from dpdk_jiangcheng.sh.intel.com ([10.67.119.112]) by fmsmga006.fm.intel.com with ESMTP; 16 Mar 2021 22:57:49 -0700 From: Cheng Jiang To: maxime.coquelin@redhat.com, chenbo.xia@intel.com Cc: dev@dpdk.org, jiayu.hu@intel.com, yvonnex.yang@intel.com, yinan.wang@intel.com, Cheng Jiang , stable@dpdk.org Date: Wed, 17 Mar 2021 05:40:54 +0000 Message-Id: <20210317054054.34616-1-Cheng1.jiang@intel.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] examples/vhost: fix ioat ring space in callbacks X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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