From patchwork Fri Nov 12 14:01:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Conor Walsh X-Patchwork-Id: 104242 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A6C13A034F; Fri, 12 Nov 2021 15:01:38 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 95B50410EA; Fri, 12 Nov 2021 15:01:38 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 3D03740692 for ; Fri, 12 Nov 2021 15:01:37 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10165"; a="319339528" X-IronPort-AV: E=Sophos;i="5.87,229,1631602800"; d="scan'208";a="319339528" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Nov 2021 06:01:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,229,1631602800"; d="scan'208";a="493013357" Received: from silpixa00401160.ir.intel.com ([10.55.129.96]) by orsmga007.jf.intel.com with ESMTP; 12 Nov 2021 06:01:26 -0800 From: Conor Walsh To: ferruh.yigit@intel.com, david.marchand@redhat.com, longfengx.liang@intel.com, dev@dpdk.org Cc: david.hunt@intel.com, yipeng1.wang@intel.com, sameh.gobriel@intel.com, bruce.richardson@intel.com, vladimir.medvedkin@intel.com, hemant.agrawal@nxp.com, sachin.saxena@oss.nxp.com, fiona.trahe@intel.com, john.griffin@intel.com, deepak.k.jain@intel.com, harry.van.haaren@intel.com, ajit.khaparde@broadcom.com, somnath.kotur@broadcom.com, xuanziyang2@huawei.com, cloud.wangxiaoyun@huawei.com, zhouguoyang@huawei.com, sthotton@marvell.com, srinivasan@marvell.com, heinrich.kuhn@corigine.com, hkalra@marvell.com, rmody@marvell.com, dsinghrawat@marvell.com, jiawenwu@trustnetic.com, yongwang@vmware.com, john.mcnamara@intel.com, shreyansh.jain@nxp.com, santosh.shukla@caviumnetworks.com, gakhil@marvell.com, roy.fan.zhang@intel.com, arkadiuszx.kusztal@intel.com, michael.baucom@broadcom.com, venkatkumar.duvvuru@broadcom.com, lance.richardson@broadcom.com, kishore.padmanabha@broadcom.com, jerin.jacob@caviumnetworks.com, derek.chickles@caviumnetworks.com, ssrinivasan@caviumnetworks.com, mjatharakonda@oneconvergence.com, simon.horman@corigine.com, david.george@sophos.com, sony.chacko@qlogic.com, harish.patil@qlogic.com, stephen@networkplumber.org, tomaszx.kulasek@intel.com, ian.betts@intel.com, liang.j.ma@intel.com, lei.a.yao@intel.com, Conor Walsh Subject: [PATCH 1/7] app/test: fix unused but set variables Date: Fri, 12 Nov 2021 14:01:05 +0000 Message-Id: <20211112140111.922171-2-conor.walsh@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211112140111.922171-1-conor.walsh@intel.com> References: <20211112140111.922171-1-conor.walsh@intel.com> MIME-Version: 1.0 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 This patch fixes unused but set variables within the following test apps: - test distributor perf - test thash perf Bugzilla ID: 881 Fixes: c0de0eb82e40 ("distributor: switch over to new API") Fixes: 239fffe0402e ("test/thash: add performance tests for Toeplitz hash") Signed-off-by: Conor Walsh Reported-by: Liang Longfeng Acked-by: Vladimir Medvedkin --- app/test/test_distributor_perf.c | 3 --- app/test/test_thash_perf.c | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/test/test_distributor_perf.c b/app/test/test_distributor_perf.c index fdbeae6d2f..92e330f194 100644 --- a/app/test/test_distributor_perf.c +++ b/app/test/test_distributor_perf.c @@ -108,7 +108,6 @@ static int handle_work(void *arg) { struct rte_distributor *d = arg; - unsigned int count = 0; unsigned int num = 0; int i; unsigned int id = __atomic_fetch_add(&worker_idx, 1, __ATOMIC_RELAXED); @@ -120,11 +119,9 @@ handle_work(void *arg) num = rte_distributor_get_pkt(d, id, buf, buf, num); while (!quit) { worker_stats[id].handled_packets += num; - count += num; num = rte_distributor_get_pkt(d, id, buf, buf, num); } worker_stats[id].handled_packets += num; - count += num; rte_distributor_return_pkt(d, id, buf, num); return 0; } diff --git a/app/test/test_thash_perf.c b/app/test/test_thash_perf.c index 7aa9360120..c95785d8bb 100644 --- a/app/test/test_thash_perf.c +++ b/app/test/test_thash_perf.c @@ -61,6 +61,8 @@ run_rss_calc(uint32_t *tuples[BATCH_SZ], enum test_rss_type type, int len, } end_tsc = rte_rdtsc_precise(); + RTE_SET_USED(hash); + return end_tsc - start_tsc; } From patchwork Fri Nov 12 14:01:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Conor Walsh X-Patchwork-Id: 104244 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D397EA034F; Fri, 12 Nov 2021 15:02:02 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8761F41149; Fri, 12 Nov 2021 15:02:00 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 87D9C41148 for ; Fri, 12 Nov 2021 15:01:59 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10165"; a="233378674" X-IronPort-AV: E=Sophos;i="5.87,229,1631602800"; d="scan'208";a="233378674" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Nov 2021 06:01:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,229,1631602800"; d="scan'208";a="493013391" Received: from silpixa00401160.ir.intel.com ([10.55.129.96]) by orsmga007.jf.intel.com with ESMTP; 12 Nov 2021 06:01:35 -0800 From: Conor Walsh To: ferruh.yigit@intel.com, david.marchand@redhat.com, longfengx.liang@intel.com, dev@dpdk.org Cc: david.hunt@intel.com, yipeng1.wang@intel.com, sameh.gobriel@intel.com, bruce.richardson@intel.com, vladimir.medvedkin@intel.com, hemant.agrawal@nxp.com, sachin.saxena@oss.nxp.com, fiona.trahe@intel.com, john.griffin@intel.com, deepak.k.jain@intel.com, harry.van.haaren@intel.com, ajit.khaparde@broadcom.com, somnath.kotur@broadcom.com, xuanziyang2@huawei.com, cloud.wangxiaoyun@huawei.com, zhouguoyang@huawei.com, sthotton@marvell.com, srinivasan@marvell.com, heinrich.kuhn@corigine.com, hkalra@marvell.com, rmody@marvell.com, dsinghrawat@marvell.com, jiawenwu@trustnetic.com, yongwang@vmware.com, john.mcnamara@intel.com, shreyansh.jain@nxp.com, santosh.shukla@caviumnetworks.com, gakhil@marvell.com, roy.fan.zhang@intel.com, arkadiuszx.kusztal@intel.com, michael.baucom@broadcom.com, venkatkumar.duvvuru@broadcom.com, lance.richardson@broadcom.com, kishore.padmanabha@broadcom.com, jerin.jacob@caviumnetworks.com, derek.chickles@caviumnetworks.com, ssrinivasan@caviumnetworks.com, mjatharakonda@oneconvergence.com, simon.horman@corigine.com, david.george@sophos.com, sony.chacko@qlogic.com, harish.patil@qlogic.com, stephen@networkplumber.org, tomaszx.kulasek@intel.com, ian.betts@intel.com, liang.j.ma@intel.com, lei.a.yao@intel.com, Conor Walsh Subject: [PATCH 2/7] drivers/bus/fslmc: fix unused but set variables Date: Fri, 12 Nov 2021 14:01:06 +0000 Message-Id: <20211112140111.922171-3-conor.walsh@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211112140111.922171-1-conor.walsh@intel.com> References: <20211112140111.922171-1-conor.walsh@intel.com> MIME-Version: 1.0 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 This patch removes the device_count variable from the rte_fslmc_scan function within the fslmc bus driver as it is an unused but set variable. Bugzilla ID: 881 Fixes: 828d51d8fc3e ("bus/fslmc: refactor scan and probe functions") Signed-off-by: Conor Walsh Reported-by: Liang Longfeng --- drivers/bus/fslmc/fslmc_bus.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c index ac3cb4aa5a..a0ef24cdc8 100644 --- a/drivers/bus/fslmc/fslmc_bus.c +++ b/drivers/bus/fslmc/fslmc_bus.c @@ -315,7 +315,6 @@ static int rte_fslmc_scan(void) { int ret; - int device_count = 0; char fslmc_dirpath[PATH_MAX]; DIR *dir; struct dirent *entry; @@ -349,7 +348,6 @@ rte_fslmc_scan(void) /* Error in parsing directory - exit gracefully */ goto scan_fail_cleanup; } - device_count += 1; } closedir(dir); From patchwork Fri Nov 12 14:01:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Conor Walsh X-Patchwork-Id: 104243 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A7159A034F; Fri, 12 Nov 2021 15:01:57 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9739841140; Fri, 12 Nov 2021 15:01:57 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 34482410EF for ; Fri, 12 Nov 2021 15:01:56 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10165"; a="231858272" X-IronPort-AV: E=Sophos;i="5.87,229,1631602800"; d="scan'208";a="231858272" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Nov 2021 06:01:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,229,1631602800"; d="scan'208";a="493013424" Received: from silpixa00401160.ir.intel.com ([10.55.129.96]) by orsmga007.jf.intel.com with ESMTP; 12 Nov 2021 06:01:45 -0800 From: Conor Walsh To: ferruh.yigit@intel.com, david.marchand@redhat.com, longfengx.liang@intel.com, dev@dpdk.org Cc: david.hunt@intel.com, yipeng1.wang@intel.com, sameh.gobriel@intel.com, bruce.richardson@intel.com, vladimir.medvedkin@intel.com, hemant.agrawal@nxp.com, sachin.saxena@oss.nxp.com, fiona.trahe@intel.com, john.griffin@intel.com, deepak.k.jain@intel.com, harry.van.haaren@intel.com, ajit.khaparde@broadcom.com, somnath.kotur@broadcom.com, xuanziyang2@huawei.com, cloud.wangxiaoyun@huawei.com, zhouguoyang@huawei.com, sthotton@marvell.com, srinivasan@marvell.com, heinrich.kuhn@corigine.com, hkalra@marvell.com, rmody@marvell.com, dsinghrawat@marvell.com, jiawenwu@trustnetic.com, yongwang@vmware.com, john.mcnamara@intel.com, shreyansh.jain@nxp.com, santosh.shukla@caviumnetworks.com, gakhil@marvell.com, roy.fan.zhang@intel.com, arkadiuszx.kusztal@intel.com, michael.baucom@broadcom.com, venkatkumar.duvvuru@broadcom.com, lance.richardson@broadcom.com, kishore.padmanabha@broadcom.com, jerin.jacob@caviumnetworks.com, derek.chickles@caviumnetworks.com, ssrinivasan@caviumnetworks.com, mjatharakonda@oneconvergence.com, simon.horman@corigine.com, david.george@sophos.com, sony.chacko@qlogic.com, harish.patil@qlogic.com, stephen@networkplumber.org, tomaszx.kulasek@intel.com, ian.betts@intel.com, liang.j.ma@intel.com, lei.a.yao@intel.com, Conor Walsh Subject: [PATCH 3/7] drivers/common/qat: fix unused but set variables Date: Fri, 12 Nov 2021 14:01:07 +0000 Message-Id: <20211112140111.922171-4-conor.walsh@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211112140111.922171-1-conor.walsh@intel.com> References: <20211112140111.922171-1-conor.walsh@intel.com> MIME-Version: 1.0 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 This patch removes the us variable from the qat_pf2vf_exch_msg function within the PF to VF section of the QAT driver as it is an unused but set variable. Bugzilla ID: 881 Fixes: b17d16fb47b4 ("common/qat: add PF to VF communication") Signed-off-by: Conor Walsh Reported-by: Liang Longfeng --- drivers/common/qat/qat_pf2vf.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/common/qat/qat_pf2vf.c b/drivers/common/qat/qat_pf2vf.c index 6327311199..4e9ffc72fc 100644 --- a/drivers/common/qat/qat_pf2vf.c +++ b/drivers/common/qat/qat_pf2vf.c @@ -54,14 +54,12 @@ int qat_pf2vf_exch_msg(struct qat_pci_device *qat_dev, msg |= ADF_PFVF_INT | ADF_PFVF_MSGORIGIN_SYSTEM; ADF_CSR_WR(pmisc_bar_addr, vf_csr_off, msg); - int us = 0; /* * Wait for confirmation from remote that it received * the message */ do { rte_delay_us_sleep(5); - us += 5; val = ADF_CSR_RD(pmisc_bar_addr, vf_csr_off); } while ((val & ADF_PFVF_INT) && (++count < ADF_IOV_MSG_ACK_MAX_RETRY)); From patchwork Fri Nov 12 14:01:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Conor Walsh X-Patchwork-Id: 104245 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AE79FA034F; Fri, 12 Nov 2021 15:02:09 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 87AC24114A; Fri, 12 Nov 2021 15:02:07 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 47F7941141 for ; Fri, 12 Nov 2021 15:02:06 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10165"; a="319339664" X-IronPort-AV: E=Sophos;i="5.87,229,1631602800"; d="scan'208";a="319339664" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Nov 2021 06:02:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,229,1631602800"; d="scan'208";a="493013472" Received: from silpixa00401160.ir.intel.com ([10.55.129.96]) by orsmga007.jf.intel.com with ESMTP; 12 Nov 2021 06:01:54 -0800 From: Conor Walsh To: ferruh.yigit@intel.com, david.marchand@redhat.com, longfengx.liang@intel.com, dev@dpdk.org Cc: david.hunt@intel.com, yipeng1.wang@intel.com, sameh.gobriel@intel.com, bruce.richardson@intel.com, vladimir.medvedkin@intel.com, hemant.agrawal@nxp.com, sachin.saxena@oss.nxp.com, fiona.trahe@intel.com, john.griffin@intel.com, deepak.k.jain@intel.com, harry.van.haaren@intel.com, ajit.khaparde@broadcom.com, somnath.kotur@broadcom.com, xuanziyang2@huawei.com, cloud.wangxiaoyun@huawei.com, zhouguoyang@huawei.com, sthotton@marvell.com, srinivasan@marvell.com, heinrich.kuhn@corigine.com, hkalra@marvell.com, rmody@marvell.com, dsinghrawat@marvell.com, jiawenwu@trustnetic.com, yongwang@vmware.com, john.mcnamara@intel.com, shreyansh.jain@nxp.com, santosh.shukla@caviumnetworks.com, gakhil@marvell.com, roy.fan.zhang@intel.com, arkadiuszx.kusztal@intel.com, michael.baucom@broadcom.com, venkatkumar.duvvuru@broadcom.com, lance.richardson@broadcom.com, kishore.padmanabha@broadcom.com, jerin.jacob@caviumnetworks.com, derek.chickles@caviumnetworks.com, ssrinivasan@caviumnetworks.com, mjatharakonda@oneconvergence.com, simon.horman@corigine.com, david.george@sophos.com, sony.chacko@qlogic.com, harish.patil@qlogic.com, stephen@networkplumber.org, tomaszx.kulasek@intel.com, ian.betts@intel.com, liang.j.ma@intel.com, lei.a.yao@intel.com, Conor Walsh Subject: [PATCH 4/7] drivers/event/sw: fix unused but set variables Date: Fri, 12 Nov 2021 14:01:08 +0000 Message-Id: <20211112140111.922171-5-conor.walsh@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211112140111.922171-1-conor.walsh@intel.com> References: <20211112140111.922171-1-conor.walsh@intel.com> MIME-Version: 1.0 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 This patch removes the inflights variable from the sw_dump function within the software section of the event driver as it is an unused but set variable. Bugzilla ID: 881 Fixes: c66baa68e453 ("event/sw: add dump function for easier debugging") Signed-off-by: Conor Walsh Reported-by: Liang Longfeng --- drivers/event/sw/sw_evdev.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c index 070a4802e9..fa72ceb949 100644 --- a/drivers/event/sw/sw_evdev.c +++ b/drivers/event/sw/sw_evdev.c @@ -711,7 +711,6 @@ sw_dump(struct rte_eventdev *dev, FILE *f) continue; } int affinities_per_port[SW_PORTS_MAX] = {0}; - uint32_t inflights = 0; fprintf(f, " Queue %d (%s)\n", i, q_type_strings[qid->type]); fprintf(f, "\trx %"PRIu64"\tdrop %"PRIu64"\ttx %"PRIu64"\n", @@ -732,7 +731,6 @@ sw_dump(struct rte_eventdev *dev, FILE *f) for (flow = 0; flow < RTE_DIM(qid->fids); flow++) if (qid->fids[flow].cq != -1) { affinities_per_port[qid->fids[flow].cq]++; - inflights += qid->fids[flow].pcount; } uint32_t port; From patchwork Fri Nov 12 14:01:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Conor Walsh X-Patchwork-Id: 104248 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 38D00A034F; Fri, 12 Nov 2021 15:02:43 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5B75541141; Fri, 12 Nov 2021 15:02:42 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 594444115A for ; Fri, 12 Nov 2021 15:02:40 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10165"; a="230595685" X-IronPort-AV: E=Sophos;i="5.87,229,1631602800"; d="scan'208";a="230595685" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Nov 2021 06:02:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,229,1631602800"; d="scan'208";a="493013506" Received: from silpixa00401160.ir.intel.com ([10.55.129.96]) by orsmga007.jf.intel.com with ESMTP; 12 Nov 2021 06:02:04 -0800 From: Conor Walsh To: ferruh.yigit@intel.com, david.marchand@redhat.com, longfengx.liang@intel.com, dev@dpdk.org Cc: david.hunt@intel.com, yipeng1.wang@intel.com, sameh.gobriel@intel.com, bruce.richardson@intel.com, vladimir.medvedkin@intel.com, hemant.agrawal@nxp.com, sachin.saxena@oss.nxp.com, fiona.trahe@intel.com, john.griffin@intel.com, deepak.k.jain@intel.com, harry.van.haaren@intel.com, ajit.khaparde@broadcom.com, somnath.kotur@broadcom.com, xuanziyang2@huawei.com, cloud.wangxiaoyun@huawei.com, zhouguoyang@huawei.com, sthotton@marvell.com, srinivasan@marvell.com, heinrich.kuhn@corigine.com, hkalra@marvell.com, rmody@marvell.com, dsinghrawat@marvell.com, jiawenwu@trustnetic.com, yongwang@vmware.com, john.mcnamara@intel.com, shreyansh.jain@nxp.com, santosh.shukla@caviumnetworks.com, gakhil@marvell.com, roy.fan.zhang@intel.com, arkadiuszx.kusztal@intel.com, michael.baucom@broadcom.com, venkatkumar.duvvuru@broadcom.com, lance.richardson@broadcom.com, kishore.padmanabha@broadcom.com, jerin.jacob@caviumnetworks.com, derek.chickles@caviumnetworks.com, ssrinivasan@caviumnetworks.com, mjatharakonda@oneconvergence.com, simon.horman@corigine.com, david.george@sophos.com, sony.chacko@qlogic.com, harish.patil@qlogic.com, stephen@networkplumber.org, tomaszx.kulasek@intel.com, ian.betts@intel.com, liang.j.ma@intel.com, lei.a.yao@intel.com, Conor Walsh Subject: [PATCH 5/7] drivers/net: fix unused but set variables Date: Fri, 12 Nov 2021 14:01:09 +0000 Message-Id: <20211112140111.922171-6-conor.walsh@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211112140111.922171-1-conor.walsh@intel.com> References: <20211112140111.922171-1-conor.walsh@intel.com> MIME-Version: 1.0 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 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 Acked-by: Somnath Kotur Acked-by: Ajit Khaparde --- 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; diff --git a/drivers/net/hinic/base/hinic_pmd_mgmt.c b/drivers/net/hinic/base/hinic_pmd_mgmt.c index 9b399502de..6ecca407a1 100644 --- a/drivers/net/hinic/base/hinic_pmd_mgmt.c +++ b/drivers/net/hinic/base/hinic_pmd_mgmt.c @@ -133,16 +133,12 @@ static void prepare_header(struct hinic_msg_pf_to_mgmt *pf_to_mgmt, static void prepare_mgmt_cmd(u8 *mgmt_cmd, u64 *header, void *msg, int msg_len) { - u32 cmd_buf_max = MAX_PF_MGMT_BUF_SIZE; - memset(mgmt_cmd, 0, MGMT_MSG_RSVD_FOR_DEV); mgmt_cmd += MGMT_MSG_RSVD_FOR_DEV; - cmd_buf_max -= MGMT_MSG_RSVD_FOR_DEV; memcpy(mgmt_cmd, header, sizeof(*header)); mgmt_cmd += sizeof(*header); - cmd_buf_max -= sizeof(*header); memcpy(mgmt_cmd, msg, msg_len); } @@ -615,7 +611,6 @@ static int recv_mgmt_msg_handler(struct hinic_msg_pf_to_mgmt *pf_to_mgmt, void *msg_body = header + sizeof(msg_header); u8 *dest_msg; u8 seq_id, seq_len; - u32 msg_buf_max = MAX_PF_MGMT_BUF_SIZE; u8 front_id; u16 msg_id; @@ -635,7 +630,6 @@ static int recv_mgmt_msg_handler(struct hinic_msg_pf_to_mgmt *pf_to_mgmt, } dest_msg = (u8 *)recv_msg->msg + seq_id * HINIC_MSG_SEG_LEN; - msg_buf_max -= seq_id * HINIC_MSG_SEG_LEN; memcpy(dest_msg, msg_body, seq_len); if (!HINIC_MSG_HEADER_GET(msg_header, LAST)) diff --git a/drivers/net/liquidio/lio_rxtx.c b/drivers/net/liquidio/lio_rxtx.c index ef127f26c4..e09798ddd7 100644 --- a/drivers/net/liquidio/lio_rxtx.c +++ b/drivers/net/liquidio/lio_rxtx.c @@ -1050,7 +1050,6 @@ lio_update_read_index(struct lio_instr_queue *iq) int lio_flush_iq(struct lio_device *lio_dev, struct lio_instr_queue *iq) { - uint32_t tot_inst_processed = 0; uint32_t inst_processed = 0; int tx_done = 1; @@ -1073,7 +1072,6 @@ lio_flush_iq(struct lio_device *lio_dev, struct lio_instr_queue *iq) iq->stats.instr_processed += inst_processed; } - tot_inst_processed += inst_processed; inst_processed = 0; } while (1); diff --git a/drivers/net/nfp/nfp_cpp_bridge.c b/drivers/net/nfp/nfp_cpp_bridge.c index 74a0eacb3f..0922ea9cf9 100644 --- a/drivers/net/nfp/nfp_cpp_bridge.c +++ b/drivers/net/nfp/nfp_cpp_bridge.c @@ -58,7 +58,7 @@ nfp_cpp_bridge_serve_write(int sockfd, struct nfp_cpp *cpp) off_t offset, nfp_offset; uint32_t cpp_id, pos, len; uint32_t tmpbuf[16]; - size_t count, curlen, totlen = 0; + size_t count, curlen; int err = 0; PMD_CPP_LOG(DEBUG, "%s: offset size %zu, count_size: %zu\n", __func__, @@ -135,7 +135,6 @@ nfp_cpp_bridge_serve_write(int sockfd, struct nfp_cpp *cpp) } nfp_offset += pos; - totlen += pos; nfp_cpp_area_release(area); nfp_cpp_area_free(area); @@ -160,7 +159,7 @@ nfp_cpp_bridge_serve_read(int sockfd, struct nfp_cpp *cpp) off_t offset, nfp_offset; uint32_t cpp_id, pos, len; uint32_t tmpbuf[16]; - size_t count, curlen, totlen = 0; + size_t count, curlen; int err = 0; PMD_CPP_LOG(DEBUG, "%s: offset size %zu, count_size: %zu\n", __func__, @@ -236,7 +235,6 @@ nfp_cpp_bridge_serve_read(int sockfd, struct nfp_cpp *cpp) } nfp_offset += pos; - totlen += pos; nfp_cpp_area_release(area); nfp_cpp_area_free(area); diff --git a/drivers/net/octeontx/octeontx_rxtx.h b/drivers/net/octeontx/octeontx_rxtx.h index 56f11d3dd5..b63a5edfb3 100644 --- a/drivers/net/octeontx/octeontx_rxtx.h +++ b/drivers/net/octeontx/octeontx_rxtx.h @@ -365,7 +365,7 @@ __octeontx_xmit_mseg_prepare(struct rte_mbuf *tx_pkt, uint64_t *cmd_buf, const uint16_t flag) { uint16_t nb_segs, nb_desc = 0; - uint16_t gaura_id, len = 0; + uint16_t gaura_id; struct rte_mbuf *m_next = NULL, *m_tofree; rte_iova_t iova; uint16_t data_len; @@ -425,7 +425,6 @@ __octeontx_xmit_mseg_prepare(struct rte_mbuf *tx_pkt, uint64_t *cmd_buf, cmd_buf[nb_desc++] = iova; nb_segs--; - len += data_len; tx_pkt = m_next; } while (nb_segs); diff --git a/drivers/net/qede/base/ecore_vf.c b/drivers/net/qede/base/ecore_vf.c index db03bc494f..a36ae47c2b 100644 --- a/drivers/net/qede/base/ecore_vf.c +++ b/drivers/net/qede/base/ecore_vf.c @@ -73,7 +73,7 @@ static void ecore_vf_pf_req_end(struct ecore_hwfn *p_hwfn, #endif static enum _ecore_status_t ecore_send_msg2pf(struct ecore_hwfn *p_hwfn, - u8 *done, u32 resp_size) + u8 *done, __rte_unused u32 resp_size) { union vfpf_tlvs *p_req = p_hwfn->vf_iov_info->vf2pf_request; struct ustorm_trigger_vf_zone trigger; @@ -86,9 +86,6 @@ ecore_send_msg2pf(struct ecore_hwfn *p_hwfn, /* output tlvs list */ ecore_dp_tlv_list(p_hwfn, p_req); - /* need to add the END TLV to the message size */ - resp_size += sizeof(struct channel_list_end_tlv); - /* Send TLVs over HW channel */ OSAL_MEMSET(&trigger, 0, sizeof(struct ustorm_trigger_vf_zone)); trigger.vf_pf_msg_valid = 1; diff --git a/drivers/net/txgbe/txgbe_ethdev_vf.c b/drivers/net/txgbe/txgbe_ethdev_vf.c index 67ae69dec3..be460ab733 100644 --- a/drivers/net/txgbe/txgbe_ethdev_vf.c +++ b/drivers/net/txgbe/txgbe_ethdev_vf.c @@ -1291,6 +1291,8 @@ txgbevf_dev_interrupt_get_status(struct rte_eth_dev *dev) /* Workround for ICR lost */ intr->flags |= TXGBE_FLAG_MAILBOX; + RTE_SET_USED(eicr); + return 0; } diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c index deba64be6a..642c64dc2e 100644 --- a/drivers/net/vmxnet3/vmxnet3_rxtx.c +++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c @@ -294,6 +294,7 @@ vmxnet3_dev_clear_queues(struct rte_eth_dev *dev) } } +#ifdef RTE_LIBRTE_VMXNET3_DEBUG_TX static int vmxnet3_unmap_pkt(uint16_t eop_idx, vmxnet3_tx_queue_t *txq) { @@ -322,24 +323,31 @@ vmxnet3_unmap_pkt(uint16_t eop_idx, vmxnet3_tx_queue_t *txq) return completed + 1; } +#endif static void vmxnet3_tq_tx_complete(vmxnet3_tx_queue_t *txq) { + #ifdef RTE_LIBRTE_VMXNET3_DEBUG_TX int completed = 0; + #endif vmxnet3_comp_ring_t *comp_ring = &txq->comp_ring; struct Vmxnet3_TxCompDesc *tcd = (struct Vmxnet3_TxCompDesc *) (comp_ring->base + comp_ring->next2proc); while (tcd->gen == comp_ring->gen) { + #ifdef RTE_LIBRTE_VMXNET3_DEBUG_TX completed += vmxnet3_unmap_pkt(tcd->txdIdx, txq); + #endif vmxnet3_comp_ring_adv_next2proc(comp_ring); tcd = (struct Vmxnet3_TxCompDesc *)(comp_ring->base + comp_ring->next2proc); } + #ifdef RTE_LIBRTE_VMXNET3_DEBUG_TX PMD_TX_LOG(DEBUG, "Processed %d tx comps & command descs.", completed); + #endif } uint16_t From patchwork Fri Nov 12 14:01:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Conor Walsh X-Patchwork-Id: 104246 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 97C2CA034F; Fri, 12 Nov 2021 15:02:26 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 87CF141142; Fri, 12 Nov 2021 15:02:26 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 2F61A410EA for ; Fri, 12 Nov 2021 15:02:25 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10165"; a="232978982" X-IronPort-AV: E=Sophos;i="5.87,229,1631602800"; d="scan'208";a="232978982" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Nov 2021 06:02:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,229,1631602800"; d="scan'208";a="493013539" Received: from silpixa00401160.ir.intel.com ([10.55.129.96]) by orsmga007.jf.intel.com with ESMTP; 12 Nov 2021 06:02:14 -0800 From: Conor Walsh To: ferruh.yigit@intel.com, david.marchand@redhat.com, longfengx.liang@intel.com, dev@dpdk.org Cc: david.hunt@intel.com, yipeng1.wang@intel.com, sameh.gobriel@intel.com, bruce.richardson@intel.com, vladimir.medvedkin@intel.com, hemant.agrawal@nxp.com, sachin.saxena@oss.nxp.com, fiona.trahe@intel.com, john.griffin@intel.com, deepak.k.jain@intel.com, harry.van.haaren@intel.com, ajit.khaparde@broadcom.com, somnath.kotur@broadcom.com, xuanziyang2@huawei.com, cloud.wangxiaoyun@huawei.com, zhouguoyang@huawei.com, sthotton@marvell.com, srinivasan@marvell.com, heinrich.kuhn@corigine.com, hkalra@marvell.com, rmody@marvell.com, dsinghrawat@marvell.com, jiawenwu@trustnetic.com, yongwang@vmware.com, john.mcnamara@intel.com, shreyansh.jain@nxp.com, santosh.shukla@caviumnetworks.com, gakhil@marvell.com, roy.fan.zhang@intel.com, arkadiuszx.kusztal@intel.com, michael.baucom@broadcom.com, venkatkumar.duvvuru@broadcom.com, lance.richardson@broadcom.com, kishore.padmanabha@broadcom.com, jerin.jacob@caviumnetworks.com, derek.chickles@caviumnetworks.com, ssrinivasan@caviumnetworks.com, mjatharakonda@oneconvergence.com, simon.horman@corigine.com, david.george@sophos.com, sony.chacko@qlogic.com, harish.patil@qlogic.com, stephen@networkplumber.org, tomaszx.kulasek@intel.com, ian.betts@intel.com, liang.j.ma@intel.com, lei.a.yao@intel.com, Conor Walsh Subject: [PATCH 6/7] examples/performance-thread: fix unused but set variables Date: Fri, 12 Nov 2021 14:01:10 +0000 Message-Id: <20211112140111.922171-7-conor.walsh@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211112140111.922171-1-conor.walsh@intel.com> References: <20211112140111.922171-1-conor.walsh@intel.com> MIME-Version: 1.0 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 This patch removes the hits variable from the cpu_load_collector function within the performance thread example app as it is an unused but set variable. Bugzilla ID: 881 Fixes: d48415e1fee3 ("examples/performance-thread: add l3fwd-thread app") Signed-off-by: Conor Walsh Reported-by: Liang Longfeng --- examples/performance-thread/l3fwd-thread/main.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c index 3a6a33bda3..8a35040597 100644 --- a/examples/performance-thread/l3fwd-thread/main.c +++ b/examples/performance-thread/l3fwd-thread/main.c @@ -1885,7 +1885,6 @@ process_burst(struct rte_mbuf *pkts_burst[MAX_PKT_BURST], int nb_rx, static int __rte_noreturn cpu_load_collector(__rte_unused void *arg) { unsigned i, j, k; - uint64_t hits; uint64_t prev_tsc, diff_tsc, cur_tsc; uint64_t total[MAX_CPU] = { 0 }; unsigned min_cpu = MAX_CPU; @@ -1972,12 +1971,10 @@ cpu_load_collector(__rte_unused void *arg) { printf("cpu# proc%% poll%% overhead%%\n\n"); for (i = min_cpu; i <= max_cpu; i++) { - hits = 0; printf("CPU %d:", i); for (j = 0; j < MAX_CPU_COUNTER; j++) { printf("%7" PRIu64 "", cpu_load.hits[j][i] * 100 / cpu_load.counter); - hits += cpu_load.hits[j][i]; cpu_load.hits[j][i] = 0; } printf("%7" PRIu64 "\n", From patchwork Fri Nov 12 14:01:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Conor Walsh X-Patchwork-Id: 104247 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A6BEAA034F; Fri, 12 Nov 2021 15:02:35 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8F7B441147; Fri, 12 Nov 2021 15:02:35 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 9AC37410EA for ; Fri, 12 Nov 2021 15:02:34 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10165"; a="319339750" X-IronPort-AV: E=Sophos;i="5.87,229,1631602800"; d="scan'208";a="319339750" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Nov 2021 06:02:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,229,1631602800"; d="scan'208";a="493013601" Received: from silpixa00401160.ir.intel.com ([10.55.129.96]) by orsmga007.jf.intel.com with ESMTP; 12 Nov 2021 06:02:24 -0800 From: Conor Walsh To: ferruh.yigit@intel.com, david.marchand@redhat.com, longfengx.liang@intel.com, dev@dpdk.org Cc: david.hunt@intel.com, yipeng1.wang@intel.com, sameh.gobriel@intel.com, bruce.richardson@intel.com, vladimir.medvedkin@intel.com, hemant.agrawal@nxp.com, sachin.saxena@oss.nxp.com, fiona.trahe@intel.com, john.griffin@intel.com, deepak.k.jain@intel.com, harry.van.haaren@intel.com, ajit.khaparde@broadcom.com, somnath.kotur@broadcom.com, xuanziyang2@huawei.com, cloud.wangxiaoyun@huawei.com, zhouguoyang@huawei.com, sthotton@marvell.com, srinivasan@marvell.com, heinrich.kuhn@corigine.com, hkalra@marvell.com, rmody@marvell.com, dsinghrawat@marvell.com, jiawenwu@trustnetic.com, yongwang@vmware.com, john.mcnamara@intel.com, shreyansh.jain@nxp.com, santosh.shukla@caviumnetworks.com, gakhil@marvell.com, roy.fan.zhang@intel.com, arkadiuszx.kusztal@intel.com, michael.baucom@broadcom.com, venkatkumar.duvvuru@broadcom.com, lance.richardson@broadcom.com, kishore.padmanabha@broadcom.com, jerin.jacob@caviumnetworks.com, derek.chickles@caviumnetworks.com, ssrinivasan@caviumnetworks.com, mjatharakonda@oneconvergence.com, simon.horman@corigine.com, david.george@sophos.com, sony.chacko@qlogic.com, harish.patil@qlogic.com, stephen@networkplumber.org, tomaszx.kulasek@intel.com, ian.betts@intel.com, liang.j.ma@intel.com, lei.a.yao@intel.com, Conor Walsh Subject: [PATCH 7/7] lib/power: fix unused but set variables Date: Fri, 12 Nov 2021 14:01:11 +0000 Message-Id: <20211112140111.922171-8-conor.walsh@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211112140111.922171-1-conor.walsh@intel.com> References: <20211112140111.922171-1-conor.walsh@intel.com> MIME-Version: 1.0 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 This patch removes the tot_ppi variable from the update_stats function within empty poll in the power library as it is an unused but set variable. Bugzilla ID: 881 Fixes: 450f0791312c ("power: add traffic pattern aware power control") Signed-off-by: Conor Walsh Reported-by: Liang Longfeng --- lib/power/rte_power_empty_poll.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/power/rte_power_empty_poll.c b/lib/power/rte_power_empty_poll.c index 975aa92997..8a2d60c576 100644 --- a/lib/power/rte_power_empty_poll.c +++ b/lib/power/rte_power_empty_poll.c @@ -207,7 +207,7 @@ update_training_stats(struct priority_worker *poll_stats, static __rte_always_inline uint32_t update_stats(struct priority_worker *poll_stats) { - uint64_t tot_edpi = 0, tot_ppi = 0; + uint64_t tot_edpi = 0; uint32_t j, percent; struct priority_worker *s = poll_stats; @@ -237,7 +237,6 @@ update_stats(struct priority_worker *poll_stats) for (j = 0; j < BINS_AV; j++) { tot_edpi += s->edpi_av[j]; - tot_ppi += s->ppi_av[j]; } tot_edpi = tot_edpi / BINS_AV;