DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: kevin.laatz@intel.com,
	Bruce Richardson <bruce.richardson@intel.com>,
	Jiayu Hu <jiayu.hu@intel.com>
Subject: [dpdk-dev] [PATCH 2/2] raw/ioat: remove special case for no status reporting
Date: Wed, 12 May 2021 14:50:00 +0000	[thread overview]
Message-ID: <20210512145000.249215-2-bruce.richardson@intel.com> (raw)
In-Reply-To: <20210512145000.249215-1-bruce.richardson@intel.com>

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 <jiayu.hu@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 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


  reply	other threads:[~2021-05-12 14:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-12 14:49 [dpdk-dev] [PATCH 1/2] raw/ioat: fix ring space checks Bruce Richardson
2021-05-12 14:50 ` Bruce Richardson [this message]
2021-05-12 16:11   ` [dpdk-dev] [PATCH 2/2] raw/ioat: remove special case for no status reporting Laatz, Kevin
2021-05-12 18:49     ` Thomas Monjalon
2021-05-12 16:11 ` [dpdk-dev] [PATCH 1/2] raw/ioat: fix ring space checks Laatz, Kevin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210512145000.249215-2-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=jiayu.hu@intel.com \
    --cc=kevin.laatz@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).