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 EC446A2F18 for ; Thu, 3 Oct 2019 16:39:56 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C44E31C123; Thu, 3 Oct 2019 16:39:56 +0200 (CEST) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by dpdk.org (Postfix) with ESMTP id A71CB1C113; Thu, 3 Oct 2019 16:39:55 +0200 (CEST) Received: by mail-io1-f66.google.com with SMTP id b19so6117953iob.4; Thu, 03 Oct 2019 07:39:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6ZgcasALYjC/hroiXNhgeec+U+KvL5QPefqI7yKFB8U=; b=YUFDSwcQpspAOxOJXA2f8tBpIBzsKJNaiOBtv7s9OE63jNJsMeS+LLSgqIkm4hnIR0 hxoO8tL4+B/DI59PHDwC/uZTk4AOA6bWAOKvUP1/pGV9C6bSW4RWT7gPQkzFCoO/bG/1 J1EWCqpewDZ+vUiQTxQDh0v0JHAD6Fmac332QK6jE9oELme6IS1pospXA8+FaOFGw5qu Cd6qhEWG8i/mVfBs2vjGFl5Iwk8qJLSssNiRFjHEcjQlz3ydyUSMSvlEYBHKQot8B+13 xkck1mEYhb2RoAo1TuMD3BbIeuW6AIHjF9cy9vP66QUcllzoHBqzjJPXjbwZR0s0ESOt UK9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6ZgcasALYjC/hroiXNhgeec+U+KvL5QPefqI7yKFB8U=; b=jCJHQTCv6OWerol5eq3sGdz0aBBq5gmvPRaqvf8OaLL7iMI4ZCBimOf8POpj/U/ALY OUbHEkK4yMJsByd/9fMGB/Z5pWjV2obx8FwtkM0h2QXwol1cAxoKxLRMkzYtrf0hXYim GJtcHS1FKby0Drf7MeYYYufkxXOY0hHFfJ2I8WPxY2uHxEwN+fxs6TwmfMokhq749GBH 6XR5LZ4x7WedtqKDNwa8T9+qsTNtLEZgjpFaeAbxonyDbVgoo+enCyzflV7oyuIqr/s+ 4N9Md46YvIwpsU6nFIrxDa5U1i9WOmdlzvJD3gjq74LtGvICOkJXKfIxsd+EPJn/4NH+ tMgg== X-Gm-Message-State: APjAAAXZjd+axas3t3+Nq7vn+c9X6L+gAMAR1af0XWgkh5J0+05YRAiK yj3Rq0ZGfEQNmX3i6ieMxKLLoqoTpouYG/Tcpto= X-Google-Smtp-Source: APXvYqwAfl4Ti/XYR+WfzqYIU8vlFGsS5wwz0XuIHRDlvt/iAkqM0gF/AtNPH4zPgrR8ABNmoSuiTIA+hta9nlh2o3M= X-Received: by 2002:a02:9009:: with SMTP id w9mr9579068jaf.112.1570113594892; Thu, 03 Oct 2019 07:39:54 -0700 (PDT) MIME-Version: 1.0 References: <1569583729-19851-1-git-send-email-david.marchand@redhat.com> In-Reply-To: <1569583729-19851-1-git-send-email-david.marchand@redhat.com> From: Jerin Jacob Date: Thu, 3 Oct 2019 20:09:43 +0530 Message-ID: To: David Marchand Cc: dpdk-dev , stable@dpdk.org, Rasesh Mody , Shahed Shaikh Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] net/qede: only access sw rx ring index for debug X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, Sep 27, 2019 at 4:59 PM David Marchand 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 > --- > 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 >