From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A9277A0613 for ; Fri, 27 Sep 2019 13:29:07 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7E37E1BECA; Fri, 27 Sep 2019 13:29:07 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 89BB01BEBD; Fri, 27 Sep 2019 13:29:03 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B96F830860C5; Fri, 27 Sep 2019 11:29:02 +0000 (UTC) Received: from dmarchan.remote.csb (ovpn-204-157.brq.redhat.com [10.40.204.157]) by smtp.corp.redhat.com (Postfix) with ESMTP id D87B0600C6; Fri, 27 Sep 2019 11:29:00 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: stable@dpdk.org, Rasesh Mody , Shahed Shaikh Date: Fri, 27 Sep 2019 13:28:49 +0200 Message-Id: <1569583729-19851-1-git-send-email-david.marchand@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Fri, 27 Sep 2019 11:29:02 +0000 (UTC) Subject: [dpdk-stable] [PATCH] net/qede: only access sw rx ring index for debug X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 --- 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