patches for DPDK stable branches
 help / color / Atom feed
* [dpdk-stable] [PATCH] ring: fix error vlaue of tail in the peek API for ST mode
@ 2020-06-28  6:23 Feifei Wang
  2020-06-28 13:05 ` Ananyev, Konstantin
  0 siblings, 1 reply; 3+ messages in thread
From: Feifei Wang @ 2020-06-28  6:23 UTC (permalink / raw)
  To: Honnappa Nagarahalli, Konstantin Ananyev; +Cc: dev, nd, Feifei Wang, stable

The value of *tail should be the prod->tail not prod->head. After
modification, it can record 'tail' so head/tail can be updated
accordingly.

Fixes: 664ff4b1729b ("ring: introduce peek style API")
Cc: stable@dpdk.org

Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 lib/librte_ring/rte_ring_peek_c11_mem.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_ring/rte_ring_peek_c11_mem.h b/lib/librte_ring/rte_ring_peek_c11_mem.h
index 99321f124..283c7e70b 100644
--- a/lib/librte_ring/rte_ring_peek_c11_mem.h
+++ b/lib/librte_ring/rte_ring_peek_c11_mem.h
@@ -40,7 +40,7 @@ __rte_ring_st_get_tail(struct rte_ring_headtail *ht, uint32_t *tail,
 	RTE_ASSERT(n >= num);
 	num = (n >= num) ? num : 0;
 
-	*tail = h;
+	*tail = t;
 	return num;
 }
 
-- 
2.17.1


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

* Re: [dpdk-stable] [PATCH] ring: fix error vlaue of tail in the peek API for ST mode
  2020-06-28  6:23 [dpdk-stable] [PATCH] ring: fix error vlaue of tail in the peek API for ST mode Feifei Wang
@ 2020-06-28 13:05 ` Ananyev, Konstantin
  2020-07-01  8:44   ` [dpdk-stable] [dpdk-dev] " David Marchand
  0 siblings, 1 reply; 3+ messages in thread
From: Ananyev, Konstantin @ 2020-06-28 13:05 UTC (permalink / raw)
  To: Feifei Wang, Honnappa Nagarahalli; +Cc: dev, nd, stable



> -----Original Message-----
> From: Feifei Wang <feifei.wang2@arm.com>
> Sent: Sunday, June 28, 2020 7:24 AM
> To: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>; Ananyev, Konstantin <konstantin.ananyev@intel.com>
> Cc: dev@dpdk.org; nd@arm.com; Feifei Wang <feifei.wang2@arm.com>; stable@dpdk.org
> Subject: [PATCH] ring: fix error vlaue of tail in the peek API for ST mode
> 
> The value of *tail should be the prod->tail not prod->head. After
> modification, it can record 'tail' so head/tail can be updated
> accordingly.
> 
> Fixes: 664ff4b1729b ("ring: introduce peek style API")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
> ---
>  lib/librte_ring/rte_ring_peek_c11_mem.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/librte_ring/rte_ring_peek_c11_mem.h b/lib/librte_ring/rte_ring_peek_c11_mem.h
> index 99321f124..283c7e70b 100644
> --- a/lib/librte_ring/rte_ring_peek_c11_mem.h
> +++ b/lib/librte_ring/rte_ring_peek_c11_mem.h
> @@ -40,7 +40,7 @@ __rte_ring_st_get_tail(struct rte_ring_headtail *ht, uint32_t *tail,
>  	RTE_ASSERT(n >= num);
>  	num = (n >= num) ? num : 0;
> 
> -	*tail = h;
> +	*tail = t;
>  	return num;
>  }
> 
> --

Thanks for the fix.
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

> 2.17.1


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

* Re: [dpdk-stable] [dpdk-dev] [PATCH] ring: fix error vlaue of tail in the peek API for ST mode
  2020-06-28 13:05 ` Ananyev, Konstantin
@ 2020-07-01  8:44   ` " David Marchand
  0 siblings, 0 replies; 3+ messages in thread
From: David Marchand @ 2020-07-01  8:44 UTC (permalink / raw)
  To: Feifei Wang; +Cc: Honnappa Nagarahalli, dev, nd, stable, Ananyev, Konstantin

On Sun, Jun 28, 2020 at 3:05 PM Ananyev, Konstantin
<konstantin.ananyev@intel.com> wrote:
> > -----Original Message-----
> > From: Feifei Wang <feifei.wang2@arm.com>
> > Sent: Sunday, June 28, 2020 7:24 AM
> > To: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>; Ananyev, Konstantin <konstantin.ananyev@intel.com>
> > Cc: dev@dpdk.org; nd@arm.com; Feifei Wang <feifei.wang2@arm.com>; stable@dpdk.org
> > Subject: [PATCH] ring: fix error vlaue of tail in the peek API for ST mode
> >
> > The value of *tail should be the prod->tail not prod->head. After
> > modification, it can record 'tail' so head/tail can be updated
> > accordingly.
> >
> > Fixes: 664ff4b1729b ("ring: introduce peek style API")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
> > Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

Applied, thanks.


-- 
David Marchand


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

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-28  6:23 [dpdk-stable] [PATCH] ring: fix error vlaue of tail in the peek API for ST mode Feifei Wang
2020-06-28 13:05 ` Ananyev, Konstantin
2020-07-01  8:44   ` [dpdk-stable] [dpdk-dev] " David Marchand

patches for DPDK stable branches

Archives are clonable:
	git clone --mirror http://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/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


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