From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8E15CA0C43; Tue, 16 Nov 2021 05:58:55 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3A51540141; Tue, 16 Nov 2021 05:58:55 +0100 (CET) Received: from mail-yb1-f182.google.com (mail-yb1-f182.google.com [209.85.219.182]) by mails.dpdk.org (Postfix) with ESMTP id BFA1A40040 for ; Tue, 16 Nov 2021 05:58:53 +0100 (CET) Received: by mail-yb1-f182.google.com with SMTP id 131so53768169ybc.7 for ; Mon, 15 Nov 2021 20:58:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=OrH38tVRjYV7zHDxiq2iwum83aLmbl85LvVTa2RXOAw=; b=RzsI3CCmw0mR3amP83btuQb9qXjJk2lywpv8s4QBHdFQyqBpC53cO25ScmhnUcbjPE MTlmwuo4Wx+LwvgKjrQTAPFpPWqBPQceSccN88SdvL9kcqOfZmKqspNCdJduH89VRgH7 i7WWDVWYV1BV+k1yvCi9Ae2NFQMSG8JSNcKXc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OrH38tVRjYV7zHDxiq2iwum83aLmbl85LvVTa2RXOAw=; b=b9FABHhUBZpkNmnRhIxtbLdn0VqJ+bZhrnYQMuKIsodsHHMLdxjC/gqd1hnS3sUyyY IB3zKMNbquFGMX1mYX54kWfsRUjLnt4dfwiHk26tqrJUd7Du8ArIQ8D4A/C02ypY8bf6 cRtD2a81bTZMPRRqtrzUo2M5ZvSXIGVRRS5HBSLy2OWQHMVK2qYd+XKkS5Lv8oEnX6Pu 58jvs7kAWjlPhn9dGsr4Nva8ZLRUzyV85jORpkp1X9g1OCWET/eRzIl0jzdI7E2wFuCq hjmavu/Invw/ZX5aGN5ywbJTaegT6R091fiDNbicIO4q9UdgXSfg393i3kYsOxw1jrGN PTTQ== X-Gm-Message-State: AOAM533sCITzGH2dkExv3bobd/v148FrDb/xWoVQ905ZrY4RyjoeQ/la jHfTPMAab5Z+KPO8SBwtRI14DyZ92TX8zE0M9m0DRg== X-Google-Smtp-Source: ABdhPJziMmWFw/jfY6HReuywZctyeRJILmAaVS8WWq9sjqwY2VuwSXrpF0KwCc6q+6BG2WCCk4wnV43oKdLw6yfAzOM= X-Received: by 2002:a25:76c1:: with SMTP id r184mr5072780ybc.307.1637038733003; Mon, 15 Nov 2021 20:58:53 -0800 (PST) MIME-Version: 1.0 References: <20211112140111.922171-1-conor.walsh@intel.com> <20211112140111.922171-6-conor.walsh@intel.com> In-Reply-To: From: Somnath Kotur Date: Tue, 16 Nov 2021 10:28:41 +0530 Message-ID: Subject: Re: [PATCH 5/7] drivers/net: fix unused but set variables To: David Marchand Cc: Ajit Khaparde , "Yigit, Ferruh" , "Liang, LongfengX" , dev , "Mcnamara, John" , Stephen Hemminger , Conor Walsh Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Mon, Nov 15, 2021 at 2:58 PM David Marchand wrote: > > Hello Ajit, Somnath, > > On Fri, Nov 12, 2021 at 3:02 PM Conor Walsh wrote: > > > > This patch fixes unused but set variables in the following net drivers: > > - bnxt > > - hinic > > - liquidio > > - nfp > > - octeontx > > - qede > > - txgbe > > - vmxnet3 > > > > This patch also fixes an unused function warning for vmxnet3_unmap_pkt > > from within vmxnet3 > > > > Bugzilla ID: 881 > > > > Fixes: b87abb2e55cb ("net/bnxt: support marking packet") > > Fixes: 88badb3aef94 ("net/bnxt: add helper functions for blob/regfile ops") > > Fixes: a4957d87e05a ("net/hinic/base: add mgmt module") > > Fixes: 5ee7640f95a0 ("net/liquidio: add API to flush IQ") > > Fixes: 19af5a38f7b6 ("net/nfp: move CPP bridge to separate file") > > Fixes: 9eb5cb3b11cc ("net/octeontx: fix access to indirect buffers") > > Fixes: 86a2265e59d7 ("qede: add SRIOV support") > > Fixes: b7311360fb67 ("net/txgbe: support VF interrupt") > > Fixes: c3ecdbb376da ("vmxnet3: support TSO") > > > > Signed-off-by: Conor Walsh > > Reported-by: Liang Longfeng > > --- > > drivers/net/bnxt/bnxt_rxr.c | 22 ---------------------- > > drivers/net/bnxt/tf_ulp/ulp_utils.c | 3 --- > > drivers/net/hinic/base/hinic_pmd_mgmt.c | 6 ------ > > drivers/net/liquidio/lio_rxtx.c | 2 -- > > drivers/net/nfp/nfp_cpp_bridge.c | 6 ++---- > > drivers/net/octeontx/octeontx_rxtx.h | 3 +-- > > drivers/net/qede/base/ecore_vf.c | 5 +---- > > drivers/net/txgbe/txgbe_ethdev_vf.c | 2 ++ > > drivers/net/vmxnet3/vmxnet3_rxtx.c | 8 ++++++++ > > 9 files changed, 14 insertions(+), 43 deletions(-) > > > > diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c > > index 8bc8ddc353..157297bc64 100644 > > --- a/drivers/net/bnxt/bnxt_rxr.c > > +++ b/drivers/net/bnxt/bnxt_rxr.c > > @@ -823,9 +823,6 @@ void bnxt_set_mark_in_mbuf(struct bnxt *bp, > > struct rte_mbuf *mbuf) > > { > > uint32_t cfa_code = 0; > > - uint8_t meta_fmt = 0; > > - uint16_t flags2 = 0; > > - uint32_t meta = 0; > > > > cfa_code = rte_le_to_cpu_16(rxcmp1->cfa_code); > > if (!cfa_code) > > @@ -834,25 +831,6 @@ void bnxt_set_mark_in_mbuf(struct bnxt *bp, > > if (cfa_code && !bp->mark_table[cfa_code].valid) > > return; > > > > - flags2 = rte_le_to_cpu_16(rxcmp1->flags2); > > - meta = rte_le_to_cpu_32(rxcmp1->metadata); > > - if (meta) { > > - meta >>= BNXT_RX_META_CFA_CODE_SHIFT; > > - > > - /* The flags field holds extra bits of info from [6:4] > > - * which indicate if the flow is in TCAM or EM or EEM > > - */ > > - meta_fmt = (flags2 & BNXT_CFA_META_FMT_MASK) >> > > - BNXT_CFA_META_FMT_SHFT; > > - > > - /* meta_fmt == 4 => 'b100 => 'b10x => EM. > > - * meta_fmt == 5 => 'b101 => 'b10x => EM + VLAN > > - * meta_fmt == 6 => 'b110 => 'b11x => EEM > > - * meta_fmt == 7 => 'b111 => 'b11x => EEM + VLAN. > > - */ > > - meta_fmt >>= BNXT_CFA_META_FMT_EM_EEM_SHFT; > > - } > > - > > mbuf->hash.fdir.hi = bp->mark_table[cfa_code].mark_id; > > mbuf->ol_flags |= RTE_MBUF_F_RX_FDIR | RTE_MBUF_F_RX_FDIR_ID; > > } > > diff --git a/drivers/net/bnxt/tf_ulp/ulp_utils.c b/drivers/net/bnxt/tf_ulp/ulp_utils.c > > index df3afaa6fd..c60d81d14a 100644 > > --- a/drivers/net/bnxt/tf_ulp/ulp_utils.c > > +++ b/drivers/net/bnxt/tf_ulp/ulp_utils.c > > @@ -200,7 +200,6 @@ ulp_bs_push_msb(uint8_t *bs, uint16_t pos, uint8_t len, uint8_t *val) > > { > > int i; > > int cnt = (len + 7) / 8; > > - int tlen = len; > > > > /* Handle any remainder bits */ > > int tmp = len % 8; > > @@ -211,12 +210,10 @@ ulp_bs_push_msb(uint8_t *bs, uint16_t pos, uint8_t len, uint8_t *val) > > ulp_bs_put_msb(bs, pos, tmp, val[0]); > > > > pos += tmp; > > - tlen -= tmp; > > > > for (i = 1; i < cnt; i++) { > > ulp_bs_put_msb(bs, pos, 8, val[i]); > > pos += 8; > > - tlen -= 8; > > } > > > > return len; > > Review please. Acked-by: Somnath Kotur > > > -- > David Marchand >