patches for DPDK stable branches
 help / color / Atom feed
* [dpdk-stable] [PATCH] net/qede: only access sw rx ring index for debug
@ 2019-09-27 11:28 David Marchand
  2019-10-03 14:39 ` [dpdk-stable] [dpdk-dev] " Jerin Jacob
  0 siblings, 1 reply; 4+ messages in thread
From: David Marchand @ 2019-09-27 11:28 UTC (permalink / raw)
  To: dev; +Cc: stable, Rasesh Mody, Shahed Shaikh

Caught by clang, this idx value is only used for a debug message when
the mbufs allocation fails.
No need to use idx as a temporary storage.

Fixes: 8f2312474529 ("net/qede: fix performance bottleneck in Rx path")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/qede/qede_rxtx.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
index c38cbb9..1fbeba2 100644
--- a/drivers/net/qede/qede_rxtx.c
+++ b/drivers/net/qede/qede_rxtx.c
@@ -46,8 +46,6 @@ static inline int qede_alloc_rx_bulk_mbufs(struct qede_rx_queue *rxq, int count)
 	int i, ret = 0;
 	uint16_t idx;
 
-	idx = rxq->sw_rx_prod & NUM_RX_BDS(rxq);
-
 	if (count > QEDE_MAX_BULK_ALLOC_COUNT)
 		count = QEDE_MAX_BULK_ALLOC_COUNT;
 
@@ -56,7 +54,9 @@ static inline int qede_alloc_rx_bulk_mbufs(struct qede_rx_queue *rxq, int count)
 		PMD_RX_LOG(ERR, rxq,
 			   "Failed to allocate %d rx buffers "
 			    "sw_rx_prod %u sw_rx_cons %u mp entries %u free %u",
-			    count, idx, rxq->sw_rx_cons & NUM_RX_BDS(rxq),
+			    count,
+			    rxq->sw_rx_prod & NUM_RX_BDS(rxq),
+			    rxq->sw_rx_cons & NUM_RX_BDS(rxq),
 			    rte_mempool_avail_count(rxq->mb_pool),
 			    rte_mempool_in_use_count(rxq->mb_pool));
 		return -ENOMEM;
-- 
1.8.3.1


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

* Re: [dpdk-stable] [dpdk-dev] [PATCH] net/qede: only access sw rx ring index for debug
  2019-09-27 11:28 [dpdk-stable] [PATCH] net/qede: only access sw rx ring index for debug David Marchand
@ 2019-10-03 14:39 ` " Jerin Jacob
  2019-10-03 18:30   ` Rasesh Mody
  0 siblings, 1 reply; 4+ messages in thread
From: Jerin Jacob @ 2019-10-03 14:39 UTC (permalink / raw)
  To: David Marchand; +Cc: dpdk-dev, stable, Rasesh Mody, Shahed Shaikh

On Fri, Sep 27, 2019 at 4:59 PM David Marchand
<david.marchand@redhat.com> wrote:
>
> Caught by clang, this idx value is only used for a debug message when
> the mbufs allocation fails.
> No need to use idx as a temporary storage.
>
> Fixes: 8f2312474529 ("net/qede: fix performance bottleneck in Rx path")
> Cc: stable@dpdk.org

Rasesh, Shahed,

Please review this patch.

>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
>  drivers/net/qede/qede_rxtx.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
> index c38cbb9..1fbeba2 100644
> --- a/drivers/net/qede/qede_rxtx.c
> +++ b/drivers/net/qede/qede_rxtx.c
> @@ -46,8 +46,6 @@ static inline int qede_alloc_rx_bulk_mbufs(struct qede_rx_queue *rxq, int count)
>         int i, ret = 0;
>         uint16_t idx;
>
> -       idx = rxq->sw_rx_prod & NUM_RX_BDS(rxq);
> -
>         if (count > QEDE_MAX_BULK_ALLOC_COUNT)
>                 count = QEDE_MAX_BULK_ALLOC_COUNT;
>
> @@ -56,7 +54,9 @@ static inline int qede_alloc_rx_bulk_mbufs(struct qede_rx_queue *rxq, int count)
>                 PMD_RX_LOG(ERR, rxq,
>                            "Failed to allocate %d rx buffers "
>                             "sw_rx_prod %u sw_rx_cons %u mp entries %u free %u",
> -                           count, idx, rxq->sw_rx_cons & NUM_RX_BDS(rxq),
> +                           count,
> +                           rxq->sw_rx_prod & NUM_RX_BDS(rxq),
> +                           rxq->sw_rx_cons & NUM_RX_BDS(rxq),
>                             rte_mempool_avail_count(rxq->mb_pool),
>                             rte_mempool_in_use_count(rxq->mb_pool));
>                 return -ENOMEM;
> --
> 1.8.3.1
>

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

* Re: [dpdk-stable] [dpdk-dev] [PATCH] net/qede: only access sw rx ring index for debug
  2019-10-03 14:39 ` [dpdk-stable] [dpdk-dev] " Jerin Jacob
@ 2019-10-03 18:30   ` Rasesh Mody
  0 siblings, 0 replies; 4+ messages in thread
From: Rasesh Mody @ 2019-10-03 18:30 UTC (permalink / raw)
  To: Jerin Jacob, David Marchand; +Cc: dpdk-dev, stable, Shahed Shaikh

>From: dev <dev-bounces@dpdk.org> On Behalf Of Jerin Jacob
>Sent: Thursday, October 03, 2019 7:40 AM
>
>On Fri, Sep 27, 2019 at 4:59 PM David Marchand
><david.marchand@redhat.com> wrote:
>>
>> Caught by clang, this idx value is only used for a debug message when
>> the mbufs allocation fails.
>> No need to use idx as a temporary storage.
>>
>> Fixes: 8f2312474529 ("net/qede: fix performance bottleneck in Rx
>> path")
>> Cc: stable@dpdk.org
>
>Rasesh, Shahed,
>
>Please review this patch.

Acked.

Thanks!
-Rasesh
>
>>
>> Signed-off-by: David Marchand <david.marchand@redhat.com>
>> ---
>>  drivers/net/qede/qede_rxtx.c | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/net/qede/qede_rxtx.c
>> b/drivers/net/qede/qede_rxtx.c index c38cbb9..1fbeba2 100644
>> --- a/drivers/net/qede/qede_rxtx.c
>> +++ b/drivers/net/qede/qede_rxtx.c
>> @@ -46,8 +46,6 @@ static inline int qede_alloc_rx_bulk_mbufs(struct
>qede_rx_queue *rxq, int count)
>>         int i, ret = 0;
>>         uint16_t idx;
>>
>> -       idx = rxq->sw_rx_prod & NUM_RX_BDS(rxq);
>> -
>>         if (count > QEDE_MAX_BULK_ALLOC_COUNT)
>>                 count = QEDE_MAX_BULK_ALLOC_COUNT;
>>
>> @@ -56,7 +54,9 @@ static inline int qede_alloc_rx_bulk_mbufs(struct
>qede_rx_queue *rxq, int count)
>>                 PMD_RX_LOG(ERR, rxq,
>>                            "Failed to allocate %d rx buffers "
>>                             "sw_rx_prod %u sw_rx_cons %u mp entries %u free %u",
>> -                           count, idx, rxq->sw_rx_cons & NUM_RX_BDS(rxq),
>> +                           count,
>> +                           rxq->sw_rx_prod & NUM_RX_BDS(rxq),
>> +                           rxq->sw_rx_cons & NUM_RX_BDS(rxq),
>>                             rte_mempool_avail_count(rxq->mb_pool),
>>                             rte_mempool_in_use_count(rxq->mb_pool));
>>                 return -ENOMEM;
>> --
>> 1.8.3.1
>>

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

* Re: [dpdk-stable] [dpdk-dev] [PATCH] net/qede: only access sw rx ring index for debug
  2019-10-03 18:29 [dpdk-stable] " Rasesh Mody
@ 2019-10-04  8:49 ` " Jerin Jacob
  0 siblings, 0 replies; 4+ messages in thread
From: Jerin Jacob @ 2019-10-04  8:49 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: David Marchand, dev, stable, Shahed Shaikh, Ferruh Yigit

On Thu, Oct 3, 2019 at 11:59 PM Rasesh Mody <rmody@marvell.com> wrote:
>
> >From: David Marchand <david.marchand@redhat.com>
> >Sent: Friday, September 27, 2019 4:29 AM
> >
> >----------------------------------------------------------------------
> >Caught by clang, this idx value is only used for a debug message when the
> >mbufs allocation fails.
> >No need to use idx as a temporary storage.
> >
> >Fixes: 8f2312474529 ("net/qede: fix performance bottleneck in Rx path")
> >Cc: stable@dpdk.org
> >
> >Signed-off-by: David Marchand <david.marchand@redhat.com>
> >---
>
> Acked-by: Rasesh Mody <rmody@marvell.com>

Changed the subject to "net/qede: only access SW Rx ring index for
debug" to fix check-git-log.sh warning.

Applied to dpdk-next-net-mrvl/master. Thanks

> > drivers/net/qede/qede_rxtx.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> >diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
> >index c38cbb9..1fbeba2 100644
> >--- a/drivers/net/qede/qede_rxtx.c
> >+++ b/drivers/net/qede/qede_rxtx.c
> >@@ -46,8 +46,6 @@ static inline int qede_alloc_rx_bulk_mbufs(struct
> >qede_rx_queue *rxq, int count)
> >       int i, ret = 0;
> >       uint16_t idx;
> >
> >-      idx = rxq->sw_rx_prod & NUM_RX_BDS(rxq);
> >-
> >       if (count > QEDE_MAX_BULK_ALLOC_COUNT)
> >               count = QEDE_MAX_BULK_ALLOC_COUNT;
> >
> >@@ -56,7 +54,9 @@ static inline int qede_alloc_rx_bulk_mbufs(struct
> >qede_rx_queue *rxq, int count)
> >               PMD_RX_LOG(ERR, rxq,
> >                          "Failed to allocate %d rx buffers "
> >                           "sw_rx_prod %u sw_rx_cons %u mp entries %u free
> >%u",
> >-                          count, idx, rxq->sw_rx_cons & NUM_RX_BDS(rxq),
> >+                          count,
> >+                          rxq->sw_rx_prod & NUM_RX_BDS(rxq),
> >+                          rxq->sw_rx_cons & NUM_RX_BDS(rxq),
> >                           rte_mempool_avail_count(rxq->mb_pool),
> >                           rte_mempool_in_use_count(rxq->mb_pool));
> >               return -ENOMEM;
> >--
> >1.8.3.1
>

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

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-27 11:28 [dpdk-stable] [PATCH] net/qede: only access sw rx ring index for debug David Marchand
2019-10-03 14:39 ` [dpdk-stable] [dpdk-dev] " Jerin Jacob
2019-10-03 18:30   ` Rasesh Mody
2019-10-03 18:29 [dpdk-stable] " Rasesh Mody
2019-10-04  8:49 ` [dpdk-stable] [dpdk-dev] " Jerin Jacob

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