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 A1A47A0C4B for ; Thu, 17 Jun 2021 16:18:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9C3AD410DE; Thu, 17 Jun 2021 16:18:21 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 81E5A410E2; Thu, 17 Jun 2021 16:18:19 +0200 (CEST) IronPort-SDR: WDJHkqUw96HCBjSDzMbj1Apa4QclLIy5K12kPmzmrmzgg7DMHpSn+o/mZYumnouYYZCwNwS8AU pAxvG+yPEosg== X-IronPort-AV: E=McAfee;i="6200,9189,10017"; a="267524852" X-IronPort-AV: E=Sophos;i="5.83,280,1616482800"; d="scan'208";a="267524852" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jun 2021 07:18:18 -0700 IronPort-SDR: +HPNn53k/nlCFibXx4zMWNPKQ7sXunO8nXk6UPP0kmn6CMJLwlOw25IybjR26HKZ3Yi/VIslIu 4f2h1y19Nr9w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,280,1616482800"; d="scan'208";a="452793348" Received: from silpixa00401122.ir.intel.com ([10.55.128.10]) by fmsmga008.fm.intel.com with ESMTP; 17 Jun 2021 07:18:17 -0700 From: Kevin Laatz To: dev@dpdk.org Cc: stable@dpdk.org, bruce.richardson@intel.com, Kevin Laatz Date: Thu, 17 Jun 2021 14:18:15 +0000 Message-Id: <20210617141815.93367-1-kevin.laatz@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH] raw/ioat: fix missing ring pointer reset X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" In the event of a device reconfigure, "hdls_avail" is not being reset. This can lead to miscalculations in rte_ioat_completed_ops(), causing the function to report an incorrect amount of completed operations. This patch fixes the issue by resetting "hdls_avail" during the device configure. Fixes: 74464005a2af ("raw/ioat: rework SW ring layout") Signed-off-by: Kevin Laatz --- drivers/raw/ioat/ioat_common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/raw/ioat/ioat_common.c b/drivers/raw/ioat/ioat_common.c index f4771745cc..60de41152a 100644 --- a/drivers/raw/ioat/ioat_common.c +++ b/drivers/raw/ioat/ioat_common.c @@ -174,6 +174,7 @@ idxd_dev_configure(const struct rte_rawdev *dev, } rte_idxd->hdls_read = rte_idxd->batch_start = 0; rte_idxd->batch_size = 0; + rte_idxd->hdls_avail = 0; return 0; } -- 2.25.1