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 8B145A0A0E; Wed, 12 May 2021 16:50:22 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 726F7410FD; Wed, 12 May 2021 16:50:22 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id BAFEF410F8 for ; Wed, 12 May 2021 16:50:20 +0200 (CEST) IronPort-SDR: 3QRVaa+PvevTYjLUUjjH84ykRCfhsw1P4KJnuuBrIgoNJgwLC2kV3bwnZ4ByxOogGTb0Bq6hCt SypRSM58qIIA== X-IronPort-AV: E=McAfee;i="6200,9189,9982"; a="285225971" X-IronPort-AV: E=Sophos;i="5.82,293,1613462400"; d="scan'208";a="285225971" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2021 07:50:19 -0700 IronPort-SDR: w0Q9P4+lr+nDHQYZUrpws4Aml6FW0C/BzBsYwppNLgZN57xrcmN9NZ2BQBYZZOflGJc5MMbreS /lHraZ81iM+w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,293,1613462400"; d="scan'208";a="537796555" Received: from silpixa00401026.ir.intel.com ([10.243.23.108]) by fmsmga001.fm.intel.com with ESMTP; 12 May 2021 07:50:18 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: kevin.laatz@intel.com, Bruce Richardson , Jiayu Hu Date: Wed, 12 May 2021 14:50:00 +0000 Message-Id: <20210512145000.249215-2-bruce.richardson@intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210512145000.249215-1-bruce.richardson@intel.com> References: <20210512145000.249215-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 2/2] raw/ioat: remove special case for no status reporting 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" The special fast-path for returning completed descriptors without reporting status or user-handles returns the number of completed ring slots used, rather than the number of actual user-submitted jobs. This means that the counts returned are too high, as the batch descriptor slots would be included in the total. Therefore remove this special case, and use the normal status-processing path so that the returned count is correct in all cases. Fixes: 245efe544d8e ("raw/ioat: report status of completed jobs") Reported-by: Jiayu Hu Signed-off-by: Bruce Richardson --- drivers/raw/ioat/rte_idxd_rawdev_fns.h | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/raw/ioat/rte_idxd_rawdev_fns.h b/drivers/raw/ioat/rte_idxd_rawdev_fns.h index 6ed67d77e..6c5334cb3 100644 --- a/drivers/raw/ioat/rte_idxd_rawdev_fns.h +++ b/drivers/raw/ioat/rte_idxd_rawdev_fns.h @@ -343,14 +343,6 @@ __idxd_completed_ops(int dev_id, uint8_t max_ops, uint32_t *status, uint8_t *num idxd->batch_idx_read = 0; } - if (idxd->cfg.hdls_disable && status == NULL) { - n = (idxd->hdls_avail < idxd->hdls_read) ? - (idxd->hdls_avail + idxd->desc_ring_mask + 1 - idxd->hdls_read) : - (idxd->hdls_avail - idxd->hdls_read); - idxd->hdls_read = idxd->hdls_avail; - goto out; - } - n = 0; h_idx = idxd->hdls_read; while (h_idx != idxd->hdls_avail) { @@ -386,7 +378,6 @@ __idxd_completed_ops(int dev_id, uint8_t max_ops, uint32_t *status, uint8_t *num } idxd->hdls_read = h_idx; -out: idxd->xstats.completed += n; return n; } -- 2.30.2