summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDavid Marchand <david.marchand@redhat.com>2019-09-27 13:28:49 +0200
committerFerruh Yigit <ferruh.yigit@intel.com>2019-10-08 12:14:31 +0200
commitff3555d6849748f84056ba2f517dc50ac5718974 (patch)
tree3344e3a502547bc48359e7761aecb16f43a875af /drivers
parente404f39ca9aff7df0373584d58068d5e39872e0c (diff)
downloaddpdk-ff3555d6849748f84056ba2f517dc50ac5718974.zip
dpdk-ff3555d6849748f84056ba2f517dc50ac5718974.tar.gz
dpdk-ff3555d6849748f84056ba2f517dc50ac5718974.tar.xz
net/qede: limit Rx ring index read for debug
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/qede/qede_rxtx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
index dbb74fc..fffccf0 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;