patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] raw/ioat: fix missing ring pointer reset
@ 2021-06-17 14:18 Kevin Laatz
  2021-06-17 14:21 ` Bruce Richardson
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Laatz @ 2021-06-17 14:18 UTC (permalink / raw)
  To: dev; +Cc: stable, bruce.richardson, Kevin Laatz

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 <kevin.laatz@intel.com>
---
 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-stable] [PATCH] raw/ioat: fix missing ring pointer reset
  2021-06-17 14:18 [dpdk-stable] [PATCH] raw/ioat: fix missing ring pointer reset Kevin Laatz
@ 2021-06-17 14:21 ` Bruce Richardson
  2021-06-22 21:12   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Bruce Richardson @ 2021-06-17 14:21 UTC (permalink / raw)
  To: Kevin Laatz; +Cc: dev, stable

On Thu, Jun 17, 2021 at 02:18:15PM +0000, Kevin Laatz wrote:
> 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 <kevin.laatz@intel.com>
> ---
To catch more of these reconfigure issues, we should look to add an
appropriate unit test.

Acked-by: Bruce Richardson <bruce.richardson@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-stable] [PATCH] raw/ioat: fix missing ring pointer reset
  2021-06-17 14:21 ` Bruce Richardson
@ 2021-06-22 21:12   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2021-06-22 21:12 UTC (permalink / raw)
  To: Kevin Laatz; +Cc: dev, stable, Bruce Richardson

17/06/2021 16:21, Bruce Richardson:
> On Thu, Jun 17, 2021 at 02:18:15PM +0000, Kevin Laatz wrote:
> > 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 <kevin.laatz@intel.com>
> > ---
> To catch more of these reconfigure issues, we should look to add an
> appropriate unit test.
> 
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>

Cc: stable@dpdk.org

Applied, thanks



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-22 21:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-17 14:18 [dpdk-stable] [PATCH] raw/ioat: fix missing ring pointer reset Kevin Laatz
2021-06-17 14:21 ` Bruce Richardson
2021-06-22 21:12   ` Thomas Monjalon

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git