* [PATCH 0/7] fix unused but set variables
@ 2021-11-12 14:01 Conor Walsh
2021-11-12 14:01 ` [PATCH 1/7] app/test: " Conor Walsh
` (7 more replies)
0 siblings, 8 replies; 31+ messages in thread
From: Conor Walsh @ 2021-11-12 14:01 UTC (permalink / raw)
To: ferruh.yigit, david.marchand, longfengx.liang, dev
Cc: david.hunt, yipeng1.wang, sameh.gobriel, bruce.richardson,
vladimir.medvedkin, hemant.agrawal, sachin.saxena, fiona.trahe,
john.griffin, deepak.k.jain, harry.van.haaren, ajit.khaparde,
somnath.kotur, xuanziyang2, cloud.wangxiaoyun, zhouguoyang,
sthotton, srinivasan, heinrich.kuhn, hkalra, rmody, dsinghrawat,
jiawenwu, yongwang, john.mcnamara, shreyansh.jain,
santosh.shukla, gakhil, roy.fan.zhang, arkadiuszx.kusztal,
michael.baucom, venkatkumar.duvvuru, lance.richardson,
kishore.padmanabha, jerin.jacob, derek.chickles, ssrinivasan,
mjatharakonda, simon.horman, david.george, sony.chacko,
harish.patil, stephen, tomaszx.kulasek, ian.betts, liang.j.ma,
lei.a.yao, Conor Walsh
When DPDK is compiled with clang 13, several warnings for unused but set
variables are present.
This patchset fixes these warnings, which were present within:
- app/test
- drivers/bus/fslmc
- drivers/common/qat
- drivers/event/sw
- drivers/net
- examples/performance-thread
- lib/power
I split this patchset into 7 patches grouped broadly by subdir, as this
set touches code from a lot of different authors I thought it would make
it easier to review.
Bugzilla ID: 881
Conor Walsh (7):
app/test: fix unused but set variables
drivers/bus/fslmc: fix unused but set variables
drivers/common/qat: fix unused but set variables
drivers/event/sw: fix unused but set variables
drivers/net: fix unused but set variables
examples/performance-thread: fix unused but set variables
lib/power: fix unused but set variables
app/test/test_distributor_perf.c | 3 ---
app/test/test_thash_perf.c | 2 ++
drivers/bus/fslmc/fslmc_bus.c | 2 --
drivers/common/qat/qat_pf2vf.c | 2 --
drivers/event/sw/sw_evdev.c | 2 --
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 +++++++
.../performance-thread/l3fwd-thread/main.c | 3 ---
lib/power/rte_power_empty_poll.c | 3 +--
16 files changed, 17 insertions(+), 57 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 1/7] app/test: fix unused but set variables
2021-11-12 14:01 [PATCH 0/7] fix unused but set variables Conor Walsh
@ 2021-11-12 14:01 ` Conor Walsh
2021-11-12 14:29 ` Medvedkin, Vladimir
2021-11-12 14:01 ` [PATCH 2/7] drivers/bus/fslmc: " Conor Walsh
` (6 subsequent siblings)
7 siblings, 1 reply; 31+ messages in thread
From: Conor Walsh @ 2021-11-12 14:01 UTC (permalink / raw)
To: ferruh.yigit, david.marchand, longfengx.liang, dev
Cc: david.hunt, yipeng1.wang, sameh.gobriel, bruce.richardson,
vladimir.medvedkin, hemant.agrawal, sachin.saxena, fiona.trahe,
john.griffin, deepak.k.jain, harry.van.haaren, ajit.khaparde,
somnath.kotur, xuanziyang2, cloud.wangxiaoyun, zhouguoyang,
sthotton, srinivasan, heinrich.kuhn, hkalra, rmody, dsinghrawat,
jiawenwu, yongwang, john.mcnamara, shreyansh.jain,
santosh.shukla, gakhil, roy.fan.zhang, arkadiuszx.kusztal,
michael.baucom, venkatkumar.duvvuru, lance.richardson,
kishore.padmanabha, jerin.jacob, derek.chickles, ssrinivasan,
mjatharakonda, simon.horman, david.george, sony.chacko,
harish.patil, stephen, tomaszx.kulasek, ian.betts, liang.j.ma,
lei.a.yao, Conor Walsh
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 <conor.walsh@intel.com>
Reported-by: Liang Longfeng <longfengx.liang@intel.com>
---
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;
}
--
2.25.1
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 2/7] drivers/bus/fslmc: fix unused but set variables
2021-11-12 14:01 [PATCH 0/7] fix unused but set variables Conor Walsh
2021-11-12 14:01 ` [PATCH 1/7] app/test: " Conor Walsh
@ 2021-11-12 14:01 ` Conor Walsh
2021-11-12 14:01 ` [PATCH 3/7] drivers/common/qat: " Conor Walsh
` (5 subsequent siblings)
7 siblings, 0 replies; 31+ messages in thread
From: Conor Walsh @ 2021-11-12 14:01 UTC (permalink / raw)
To: ferruh.yigit, david.marchand, longfengx.liang, dev
Cc: david.hunt, yipeng1.wang, sameh.gobriel, bruce.richardson,
vladimir.medvedkin, hemant.agrawal, sachin.saxena, fiona.trahe,
john.griffin, deepak.k.jain, harry.van.haaren, ajit.khaparde,
somnath.kotur, xuanziyang2, cloud.wangxiaoyun, zhouguoyang,
sthotton, srinivasan, heinrich.kuhn, hkalra, rmody, dsinghrawat,
jiawenwu, yongwang, john.mcnamara, shreyansh.jain,
santosh.shukla, gakhil, roy.fan.zhang, arkadiuszx.kusztal,
michael.baucom, venkatkumar.duvvuru, lance.richardson,
kishore.padmanabha, jerin.jacob, derek.chickles, ssrinivasan,
mjatharakonda, simon.horman, david.george, sony.chacko,
harish.patil, stephen, tomaszx.kulasek, ian.betts, liang.j.ma,
lei.a.yao, Conor Walsh
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 <conor.walsh@intel.com>
Reported-by: Liang Longfeng <longfengx.liang@intel.com>
---
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);
--
2.25.1
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 3/7] drivers/common/qat: fix unused but set variables
2021-11-12 14:01 [PATCH 0/7] fix unused but set variables Conor Walsh
2021-11-12 14:01 ` [PATCH 1/7] app/test: " Conor Walsh
2021-11-12 14:01 ` [PATCH 2/7] drivers/bus/fslmc: " Conor Walsh
@ 2021-11-12 14:01 ` Conor Walsh
2021-11-12 14:01 ` [PATCH 4/7] drivers/event/sw: " Conor Walsh
` (4 subsequent siblings)
7 siblings, 0 replies; 31+ messages in thread
From: Conor Walsh @ 2021-11-12 14:01 UTC (permalink / raw)
To: ferruh.yigit, david.marchand, longfengx.liang, dev
Cc: david.hunt, yipeng1.wang, sameh.gobriel, bruce.richardson,
vladimir.medvedkin, hemant.agrawal, sachin.saxena, fiona.trahe,
john.griffin, deepak.k.jain, harry.van.haaren, ajit.khaparde,
somnath.kotur, xuanziyang2, cloud.wangxiaoyun, zhouguoyang,
sthotton, srinivasan, heinrich.kuhn, hkalra, rmody, dsinghrawat,
jiawenwu, yongwang, john.mcnamara, shreyansh.jain,
santosh.shukla, gakhil, roy.fan.zhang, arkadiuszx.kusztal,
michael.baucom, venkatkumar.duvvuru, lance.richardson,
kishore.padmanabha, jerin.jacob, derek.chickles, ssrinivasan,
mjatharakonda, simon.horman, david.george, sony.chacko,
harish.patil, stephen, tomaszx.kulasek, ian.betts, liang.j.ma,
lei.a.yao, Conor Walsh
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 <conor.walsh@intel.com>
Reported-by: Liang Longfeng <longfengx.liang@intel.com>
---
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));
--
2.25.1
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 4/7] drivers/event/sw: fix unused but set variables
2021-11-12 14:01 [PATCH 0/7] fix unused but set variables Conor Walsh
` (2 preceding siblings ...)
2021-11-12 14:01 ` [PATCH 3/7] drivers/common/qat: " Conor Walsh
@ 2021-11-12 14:01 ` Conor Walsh
2021-11-12 15:15 ` Van Haaren, Harry
2021-11-12 14:01 ` [PATCH 5/7] drivers/net: " Conor Walsh
` (3 subsequent siblings)
7 siblings, 1 reply; 31+ messages in thread
From: Conor Walsh @ 2021-11-12 14:01 UTC (permalink / raw)
To: ferruh.yigit, david.marchand, longfengx.liang, dev
Cc: david.hunt, yipeng1.wang, sameh.gobriel, bruce.richardson,
vladimir.medvedkin, hemant.agrawal, sachin.saxena, fiona.trahe,
john.griffin, deepak.k.jain, harry.van.haaren, ajit.khaparde,
somnath.kotur, xuanziyang2, cloud.wangxiaoyun, zhouguoyang,
sthotton, srinivasan, heinrich.kuhn, hkalra, rmody, dsinghrawat,
jiawenwu, yongwang, john.mcnamara, shreyansh.jain,
santosh.shukla, gakhil, roy.fan.zhang, arkadiuszx.kusztal,
michael.baucom, venkatkumar.duvvuru, lance.richardson,
kishore.padmanabha, jerin.jacob, derek.chickles, ssrinivasan,
mjatharakonda, simon.horman, david.george, sony.chacko,
harish.patil, stephen, tomaszx.kulasek, ian.betts, liang.j.ma,
lei.a.yao, Conor Walsh
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 <conor.walsh@intel.com>
Reported-by: Liang Longfeng <longfengx.liang@intel.com>
---
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;
--
2.25.1
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 5/7] drivers/net: fix unused but set variables
2021-11-12 14:01 [PATCH 0/7] fix unused but set variables Conor Walsh
` (3 preceding siblings ...)
2021-11-12 14:01 ` [PATCH 4/7] drivers/event/sw: " Conor Walsh
@ 2021-11-12 14:01 ` Conor Walsh
2021-11-12 16:17 ` Ferruh Yigit
2021-11-15 9:28 ` David Marchand
2021-11-12 14:01 ` [PATCH 6/7] examples/performance-thread: " Conor Walsh
` (2 subsequent siblings)
7 siblings, 2 replies; 31+ messages in thread
From: Conor Walsh @ 2021-11-12 14:01 UTC (permalink / raw)
To: ferruh.yigit, david.marchand, longfengx.liang, dev
Cc: david.hunt, yipeng1.wang, sameh.gobriel, bruce.richardson,
vladimir.medvedkin, hemant.agrawal, sachin.saxena, fiona.trahe,
john.griffin, deepak.k.jain, harry.van.haaren, ajit.khaparde,
somnath.kotur, xuanziyang2, cloud.wangxiaoyun, zhouguoyang,
sthotton, srinivasan, heinrich.kuhn, hkalra, rmody, dsinghrawat,
jiawenwu, yongwang, john.mcnamara, shreyansh.jain,
santosh.shukla, gakhil, roy.fan.zhang, arkadiuszx.kusztal,
michael.baucom, venkatkumar.duvvuru, lance.richardson,
kishore.padmanabha, jerin.jacob, derek.chickles, ssrinivasan,
mjatharakonda, simon.horman, david.george, sony.chacko,
harish.patil, stephen, tomaszx.kulasek, ian.betts, liang.j.ma,
lei.a.yao, Conor Walsh
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 <conor.walsh@intel.com>
Reported-by: Liang Longfeng <longfengx.liang@intel.com>
---
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
--
2.25.1
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 6/7] examples/performance-thread: fix unused but set variables
2021-11-12 14:01 [PATCH 0/7] fix unused but set variables Conor Walsh
` (4 preceding siblings ...)
2021-11-12 14:01 ` [PATCH 5/7] drivers/net: " Conor Walsh
@ 2021-11-12 14:01 ` Conor Walsh
2021-11-12 14:01 ` [PATCH 7/7] lib/power: " Conor Walsh
2021-11-15 17:58 ` [PATCH 0/6] " Conor Walsh
7 siblings, 0 replies; 31+ messages in thread
From: Conor Walsh @ 2021-11-12 14:01 UTC (permalink / raw)
To: ferruh.yigit, david.marchand, longfengx.liang, dev
Cc: david.hunt, yipeng1.wang, sameh.gobriel, bruce.richardson,
vladimir.medvedkin, hemant.agrawal, sachin.saxena, fiona.trahe,
john.griffin, deepak.k.jain, harry.van.haaren, ajit.khaparde,
somnath.kotur, xuanziyang2, cloud.wangxiaoyun, zhouguoyang,
sthotton, srinivasan, heinrich.kuhn, hkalra, rmody, dsinghrawat,
jiawenwu, yongwang, john.mcnamara, shreyansh.jain,
santosh.shukla, gakhil, roy.fan.zhang, arkadiuszx.kusztal,
michael.baucom, venkatkumar.duvvuru, lance.richardson,
kishore.padmanabha, jerin.jacob, derek.chickles, ssrinivasan,
mjatharakonda, simon.horman, david.george, sony.chacko,
harish.patil, stephen, tomaszx.kulasek, ian.betts, liang.j.ma,
lei.a.yao, Conor Walsh
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 <conor.walsh@intel.com>
Reported-by: Liang Longfeng <longfengx.liang@intel.com>
---
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",
--
2.25.1
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 7/7] lib/power: fix unused but set variables
2021-11-12 14:01 [PATCH 0/7] fix unused but set variables Conor Walsh
` (5 preceding siblings ...)
2021-11-12 14:01 ` [PATCH 6/7] examples/performance-thread: " Conor Walsh
@ 2021-11-12 14:01 ` Conor Walsh
2021-11-12 14:13 ` David Marchand
2021-11-15 17:58 ` [PATCH 0/6] " Conor Walsh
7 siblings, 1 reply; 31+ messages in thread
From: Conor Walsh @ 2021-11-12 14:01 UTC (permalink / raw)
To: ferruh.yigit, david.marchand, longfengx.liang, dev
Cc: david.hunt, yipeng1.wang, sameh.gobriel, bruce.richardson,
vladimir.medvedkin, hemant.agrawal, sachin.saxena, fiona.trahe,
john.griffin, deepak.k.jain, harry.van.haaren, ajit.khaparde,
somnath.kotur, xuanziyang2, cloud.wangxiaoyun, zhouguoyang,
sthotton, srinivasan, heinrich.kuhn, hkalra, rmody, dsinghrawat,
jiawenwu, yongwang, john.mcnamara, shreyansh.jain,
santosh.shukla, gakhil, roy.fan.zhang, arkadiuszx.kusztal,
michael.baucom, venkatkumar.duvvuru, lance.richardson,
kishore.padmanabha, jerin.jacob, derek.chickles, ssrinivasan,
mjatharakonda, simon.horman, david.george, sony.chacko,
harish.patil, stephen, tomaszx.kulasek, ian.betts, liang.j.ma,
lei.a.yao, Conor Walsh
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 <conor.walsh@intel.com>
Reported-by: Liang Longfeng <longfengx.liang@intel.com>
---
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;
--
2.25.1
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 7/7] lib/power: fix unused but set variables
2021-11-12 14:01 ` [PATCH 7/7] lib/power: " Conor Walsh
@ 2021-11-12 14:13 ` David Marchand
2021-11-12 14:17 ` Walsh, Conor
0 siblings, 1 reply; 31+ messages in thread
From: David Marchand @ 2021-11-12 14:13 UTC (permalink / raw)
To: Conor Walsh
Cc: Yigit, Ferruh, longfengx.liang, dev, David Hunt, Wang, Yipeng1,
Gobriel, Sameh, Bruce Richardson, Vladimir Medvedkin,
Hemant Agrawal, Sachin Saxena, Trahe, Fiona, John Griffin,
Deepak Kumar Jain, Van Haaren Harry, Ajit Khaparde,
Somnath Kotur, Ziyang Xuan, Xiaoyun Wang, Guoyang Zhou,
Shijith Thotton, Srisivasubramanian Srinivasan, heinrich.kuhn,
Harman Kalra, Rasesh Mody, Devendra Singh Rawat, Jiawen Wu,
Yong Wang, Mcnamara, John, Shreyansh Jain, santosh.shukla,
Akhil Goyal, Fan Zhang, Kusztal, ArkadiuszX, michael.baucom,
Venkat Duvvuru, Lance Richardson, kishore.padmanabha,
Jerin Jacob, derek.chickles, ssrinivasan, mjatharakonda,
simon.horman, david.george, sony.chacko, harish.patil,
Stephen Hemminger, Tomasz Kulasek, ian.betts, Liang Ma,
lei.a.yao
Hello Conor,
On Fri, Nov 12, 2021 at 3:02 PM Conor Walsh <conor.walsh@intel.com> wrote:
>
> 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.
About the commitlog, commenting on this patch, but it applies to other
of the series.
>
> Bugzilla ID: 881
No need for an empty line between bugzilla and fixes lines.
>
> Fixes: 450f0791312c ("power: add traffic pattern aware power control")
We will want those fixes in stable branches.
Cc: stable@dpdk.org
>
> Signed-off-by: Conor Walsh <conor.walsh@intel.com>
> Reported-by: Liang Longfeng <longfengx.liang@intel.com>
Reports come before signing off a fix :-)
Now, on this specific patch, Jim already provided a fix for this
issue, you can drop it from your series.
https://patchwork.dpdk.org/project/dpdk/patch/20211105155351.350403-1-james.r.harris@intel.com/
--
David Marchand
^ permalink raw reply [flat|nested] 31+ messages in thread
* RE: [PATCH 7/7] lib/power: fix unused but set variables
2021-11-12 14:13 ` David Marchand
@ 2021-11-12 14:17 ` Walsh, Conor
2021-11-12 14:26 ` David Marchand
0 siblings, 1 reply; 31+ messages in thread
From: Walsh, Conor @ 2021-11-12 14:17 UTC (permalink / raw)
To: David Marchand
Cc: Yigit, Ferruh, Liang, LongfengX, dev, Hunt, David, Wang, Yipeng1,
Gobriel, Sameh, Richardson, Bruce, Medvedkin, Vladimir,
Hemant Agrawal, Sachin Saxena, Trahe, Fiona, Griffin, John, Jain,
Deepak K, Van Haaren, Harry, Ajit Khaparde, Somnath Kotur,
Ziyang Xuan, Xiaoyun Wang, Guoyang Zhou, Shijith Thotton,
Srisivasubramanian Srinivasan, heinrich.kuhn, Harman Kalra,
Rasesh Mody, Devendra Singh Rawat, Jiawen Wu, Wang, Yong,
Mcnamara, John, Shreyansh Jain, santosh.shukla, Akhil Goyal,
Zhang, Roy Fan, Kusztal, ArkadiuszX, michael.baucom,
Venkat Duvvuru, Lance Richardson, kishore.padmanabha,
Jerin Jacob, derek.chickles, ssrinivasan, mjatharakonda,
simon.horman, david.george, sony.chacko, harish.patil,
Stephen Hemminger, Tomasz Kulasek, ian.betts, Liang Ma,
lei.a.yao
Hi David,
I will make those changes to the commit logs and respin them.
I'll also drop this patch from the set.
Thanks,
Conor.
> Hello Conor,
>
>
> On Fri, Nov 12, 2021 at 3:02 PM Conor Walsh <conor.walsh@intel.com>
> wrote:
> >
> > 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.
>
> About the commitlog, commenting on this patch, but it applies to other
> of the series.
> >
> > Bugzilla ID: 881
>
> No need for an empty line between bugzilla and fixes lines.
>
> >
> > Fixes: 450f0791312c ("power: add traffic pattern aware power control")
>
> We will want those fixes in stable branches.
> Cc: stable@dpdk.org
>
> >
> > Signed-off-by: Conor Walsh <conor.walsh@intel.com>
> > Reported-by: Liang Longfeng <longfengx.liang@intel.com>
>
> Reports come before signing off a fix :-)
>
>
> Now, on this specific patch, Jim already provided a fix for this
> issue, you can drop it from your series.
> https://patchwork.dpdk.org/project/dpdk/patch/20211105155351.350403-1-
> james.r.harris@intel.com/
>
>
> --
> David Marchand
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 7/7] lib/power: fix unused but set variables
2021-11-12 14:17 ` Walsh, Conor
@ 2021-11-12 14:26 ` David Marchand
0 siblings, 0 replies; 31+ messages in thread
From: David Marchand @ 2021-11-12 14:26 UTC (permalink / raw)
To: Walsh, Conor
Cc: Yigit, Ferruh, Liang, LongfengX, dev, Hunt, David, Wang, Yipeng1,
Gobriel, Sameh, Richardson, Bruce, Medvedkin, Vladimir,
Hemant Agrawal, Sachin Saxena, Trahe, Fiona, Griffin, John, Jain,
Deepak K, Van Haaren, Harry, Ajit Khaparde, Somnath Kotur,
Ziyang Xuan, Xiaoyun Wang, Guoyang Zhou, Shijith Thotton,
Srisivasubramanian Srinivasan, heinrich.kuhn, Harman Kalra,
Rasesh Mody, Devendra Singh Rawat, Jiawen Wu, Wang, Yong,
Mcnamara, John, Shreyansh Jain, santosh.shukla, Akhil Goyal,
Zhang, Roy Fan, Kusztal, ArkadiuszX, michael.baucom,
Venkat Duvvuru, Lance Richardson, kishore.padmanabha,
Jerin Jacob, derek.chickles, ssrinivasan, mjatharakonda,
simon.horman, david.george, sony.chacko, harish.patil,
Stephen Hemminger, Tomasz Kulasek, ian.betts, Liang Ma,
lei.a.yao
On Fri, Nov 12, 2021 at 3:17 PM Walsh, Conor <conor.walsh@intel.com> wrote:
>
> Hi David,
>
> I will make those changes to the commit logs and respin them.
> I'll also drop this patch from the set.
These comments are trivial.
We might get more substantial comments from drivers maintainers.
I recommend waiting a bit before respinning.
Thanks.
--
David Marchand
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 1/7] app/test: fix unused but set variables
2021-11-12 14:01 ` [PATCH 1/7] app/test: " Conor Walsh
@ 2021-11-12 14:29 ` Medvedkin, Vladimir
0 siblings, 0 replies; 31+ messages in thread
From: Medvedkin, Vladimir @ 2021-11-12 14:29 UTC (permalink / raw)
To: Conor Walsh, ferruh.yigit, david.marchand, longfengx.liang, dev
Cc: david.hunt, yipeng1.wang, sameh.gobriel, bruce.richardson,
hemant.agrawal, sachin.saxena, fiona.trahe, john.griffin,
deepak.k.jain, harry.van.haaren, ajit.khaparde, somnath.kotur,
xuanziyang2, cloud.wangxiaoyun, zhouguoyang, sthotton,
srinivasan, heinrich.kuhn, hkalra, rmody, dsinghrawat, jiawenwu,
yongwang, john.mcnamara, shreyansh.jain, santosh.shukla, gakhil,
roy.fan.zhang, arkadiuszx.kusztal, michael.baucom,
venkatkumar.duvvuru, lance.richardson, kishore.padmanabha,
jerin.jacob, derek.chickles, ssrinivasan, mjatharakonda,
simon.horman, david.george, sony.chacko, harish.patil, stephen,
tomaszx.kulasek, ian.betts, liang.j.ma, lei.a.yao
On 12/11/2021 15:01, Conor Walsh wrote:
> 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 <conor.walsh@intel.com>
> Reported-by: Liang Longfeng <longfengx.liang@intel.com>
> ---
> 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;
> }
>
>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
--
Regards,
Vladimir
^ permalink raw reply [flat|nested] 31+ messages in thread
* RE: [PATCH 4/7] drivers/event/sw: fix unused but set variables
2021-11-12 14:01 ` [PATCH 4/7] drivers/event/sw: " Conor Walsh
@ 2021-11-12 15:15 ` Van Haaren, Harry
0 siblings, 0 replies; 31+ messages in thread
From: Van Haaren, Harry @ 2021-11-12 15:15 UTC (permalink / raw)
To: Walsh, Conor, Liang, LongfengX, dev
> -----Original Message-----
> From: Walsh, Conor <conor.walsh@intel.com>
> Sent: Friday, November 12, 2021 2:01 PM
> To: Yigit, Ferruh <ferruh.yigit@intel.com>; david.marchand@redhat.com; Liang,
> LongfengX <longfengx.liang@intel.com>; dev@dpdk.org
> Cc: Hunt, David <david.hunt@intel.com>; Wang, Yipeng1
> <yipeng1.wang@intel.com>; Gobriel, Sameh <sameh.gobriel@intel.com>;
> Richardson, Bruce <bruce.richardson@intel.com>; Medvedkin, Vladimir
> <vladimir.medvedkin@intel.com>; hemant.agrawal@nxp.com;
> sachin.saxena@oss.nxp.com; Trahe, Fiona <fiona.trahe@intel.com>; Griffin, John
> <john.griffin@intel.com>; Jain, Deepak K <deepak.k.jain@intel.com>; Van
> Haaren, Harry <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; Wang, Yong <yongwang@vmware.com>; Mcnamara,
> John <john.mcnamara@intel.com>; shreyansh.jain@nxp.com;
> santosh.shukla@caviumnetworks.com; gakhil@marvell.com; Zhang, Roy Fan
> <roy.fan.zhang@intel.com>; Kusztal, ArkadiuszX
> <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; Walsh, Conor
> <conor.walsh@intel.com>
> Subject: [PATCH 4/7] drivers/event/sw: fix unused but set variables
-CC to just to people involved & list to avoid spamming too wide.
> 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 <conor.walsh@intel.com>
> Reported-by: Liang Longfeng <longfengx.liang@intel.com>
Acked by: Harry van Haaren <harry.van.haaren@intel.com>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 5/7] drivers/net: fix unused but set variables
2021-11-12 14:01 ` [PATCH 5/7] drivers/net: " Conor Walsh
@ 2021-11-12 16:17 ` Ferruh Yigit
2021-11-12 16:27 ` David Marchand
2021-11-12 16:35 ` Walsh, Conor
2021-11-15 9:28 ` David Marchand
1 sibling, 2 replies; 31+ messages in thread
From: Ferruh Yigit @ 2021-11-12 16:17 UTC (permalink / raw)
To: Conor Walsh, david.marchand, longfengx.liang, dev
Cc: david.hunt, yipeng1.wang, sameh.gobriel, bruce.richardson,
vladimir.medvedkin, hemant.agrawal, sachin.saxena, fiona.trahe,
john.griffin, deepak.k.jain, harry.van.haaren, ajit.khaparde,
somnath.kotur, xuanziyang2, cloud.wangxiaoyun, zhouguoyang,
sthotton, srinivasan, heinrich.kuhn, hkalra, rmody, dsinghrawat,
jiawenwu, yongwang, john.mcnamara, shreyansh.jain,
santosh.shukla, gakhil, roy.fan.zhang, arkadiuszx.kusztal,
michael.baucom, venkatkumar.duvvuru, lance.richardson,
kishore.padmanabha, jerin.jacob, derek.chickles, ssrinivasan,
mjatharakonda, simon.horman, david.george, sony.chacko,
harish.patil, stephen, tomaszx.kulasek, ian.betts, liang.j.ma,
lei.a.yao
On 11/12/2021 2:01 PM, Conor Walsh wrote:
> 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
> }
'PMD_TX_LOG' doesn't require 'RTE_LIBRTE_VMXNET3_DEBUG_TX' wrap.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 5/7] drivers/net: fix unused but set variables
2021-11-12 16:17 ` Ferruh Yigit
@ 2021-11-12 16:27 ` David Marchand
2021-11-12 16:38 ` Walsh, Conor
2021-11-12 16:35 ` Walsh, Conor
1 sibling, 1 reply; 31+ messages in thread
From: David Marchand @ 2021-11-12 16:27 UTC (permalink / raw)
To: Ferruh Yigit
Cc: Conor Walsh, Liang, LongfengX, dev, David Hunt, Wang, Yipeng1,
Gobriel, Sameh, Bruce Richardson, Vladimir Medvedkin,
Hemant Agrawal, Sachin Saxena, Trahe, Fiona, John Griffin,
Deepak Kumar Jain, Van Haaren Harry, Ajit Khaparde,
Somnath Kotur, Ziyang Xuan, Xiaoyun Wang, Guoyang Zhou,
Shijith Thotton, Srisivasubramanian Srinivasan, heinrich.kuhn,
Harman Kalra, Rasesh Mody, Devendra Singh Rawat, Jiawen Wu,
Yong Wang, Mcnamara, John, Shreyansh Jain, santosh.shukla,
Akhil Goyal, Fan Zhang, Kusztal, ArkadiuszX, michael.baucom,
Venkat Duvvuru, Lance Richardson, kishore.padmanabha,
Jerin Jacob, derek.chickles, ssrinivasan, mjatharakonda,
simon.horman, david.george, sony.chacko, harish.patil,
Stephen Hemminger, Tomasz Kulasek, ian.betts, Liang Ma,
lei.a.yao
On Fri, Nov 12, 2021 at 5:18 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>
> On 11/12/2021 2:01 PM, Conor Walsh wrote:
> > 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
And this vmxnet_unmap_pkt does useful work.
We should probably still call it regardless of debug logs.
> >
> > 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
> > }
>
> 'PMD_TX_LOG' doesn't require 'RTE_LIBRTE_VMXNET3_DEBUG_TX' wrap.
>
--
David Marchand
^ permalink raw reply [flat|nested] 31+ messages in thread
* RE: [PATCH 5/7] drivers/net: fix unused but set variables
2021-11-12 16:17 ` Ferruh Yigit
2021-11-12 16:27 ` David Marchand
@ 2021-11-12 16:35 ` Walsh, Conor
1 sibling, 0 replies; 31+ messages in thread
From: Walsh, Conor @ 2021-11-12 16:35 UTC (permalink / raw)
To: Yigit, Ferruh, david.marchand, Liang, LongfengX, dev
Cc: Hunt, David, Wang, Yipeng1, Gobriel, Sameh, Richardson, Bruce,
Medvedkin, Vladimir, hemant.agrawal, sachin.saxena, Trahe, Fiona,
Griffin, John, Jain, Deepak K, Van Haaren, Harry, ajit.khaparde,
somnath.kotur, xuanziyang2, cloud.wangxiaoyun, zhouguoyang,
sthotton, srinivasan, heinrich.kuhn, hkalra, rmody, dsinghrawat,
jiawenwu, Wang, Yong, Mcnamara, John, shreyansh.jain,
santosh.shukla, gakhil, Zhang, Roy Fan, Kusztal, ArkadiuszX,
michael.baucom, venkatkumar.duvvuru, lance.richardson,
kishore.padmanabha, jerin.jacob, derek.chickles, ssrinivasan,
mjatharakonda, simon.horman, david.george, sony.chacko,
harish.patil, stephen, tomaszx.kulasek, ian.betts, liang.j.ma,
lei.a.yao
> On 11/12/2021 2:01 PM, Conor Walsh wrote:
> > 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
> > }
>
> 'PMD_TX_LOG' doesn't require 'RTE_LIBRTE_VMXNET3_DEBUG_TX' wrap.
Hi Ferruh,
I will rework in v2.
Thanks,
Conor.
^ permalink raw reply [flat|nested] 31+ messages in thread
* RE: [PATCH 5/7] drivers/net: fix unused but set variables
2021-11-12 16:27 ` David Marchand
@ 2021-11-12 16:38 ` Walsh, Conor
2021-11-12 16:41 ` Stephen Hemminger
0 siblings, 1 reply; 31+ messages in thread
From: Walsh, Conor @ 2021-11-12 16:38 UTC (permalink / raw)
To: David Marchand, Yigit, Ferruh
Cc: Liang, LongfengX, dev, Hunt, David, Wang, Yipeng1, Gobriel,
Sameh, Richardson, Bruce, Medvedkin, Vladimir, Hemant Agrawal,
Sachin Saxena, Trahe, Fiona, Griffin, John, Jain, Deepak K,
Van Haaren, Harry, Ajit Khaparde, Somnath Kotur, Ziyang Xuan,
Xiaoyun Wang, Guoyang Zhou, Shijith Thotton,
Srisivasubramanian Srinivasan, heinrich.kuhn, Harman Kalra,
Rasesh Mody, Devendra Singh Rawat, Jiawen Wu, Wang, Yong,
Mcnamara, John, Shreyansh Jain, santosh.shukla, Akhil Goyal,
Zhang, Roy Fan, Kusztal, ArkadiuszX, michael.baucom,
Venkat Duvvuru, Lance Richardson, kishore.padmanabha,
Jerin Jacob, derek.chickles, ssrinivasan, mjatharakonda,
simon.horman, david.george, sony.chacko, harish.patil,
Stephen Hemminger, Tomasz Kulasek, ian.betts, Liang Ma,
lei.a.yao
> Subject: Re: [PATCH 5/7] drivers/net: fix unused but set variables
>
> On Fri, Nov 12, 2021 at 5:18 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> >
> > On 11/12/2021 2:01 PM, Conor Walsh wrote:
> > > 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
>
> And this vmxnet_unmap_pkt does useful work.
> We should probably still call it regardless of debug logs.
Would something along the lines of this make more sense?
#ifdef RTE_LIBRTE_VMXNET3_DEBUG_TX
completed += vmxnet3_unmap_pkt(tcd->txdIdx, txq);
#else
vmxnet3_unmap_pkt(tcd->txdIdx, txq);
#endif
Thanks,
Conor.
>
>
> > >
> > > 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
> > > }
> >
> > 'PMD_TX_LOG' doesn't require 'RTE_LIBRTE_VMXNET3_DEBUG_TX' wrap.
> >
>
>
> --
> David Marchand
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 5/7] drivers/net: fix unused but set variables
2021-11-12 16:38 ` Walsh, Conor
@ 2021-11-12 16:41 ` Stephen Hemminger
2021-11-12 16:46 ` Walsh, Conor
0 siblings, 1 reply; 31+ messages in thread
From: Stephen Hemminger @ 2021-11-12 16:41 UTC (permalink / raw)
To: Walsh, Conor
Cc: David Marchand, Yigit, Ferruh, Liang, LongfengX, dev, Hunt,
David, Wang, Yipeng1, Gobriel, Sameh, Richardson, Bruce,
Medvedkin, Vladimir, Hemant Agrawal, Sachin Saxena, Trahe, Fiona,
Griffin, John, Jain, Deepak K, Van Haaren, Harry, Ajit Khaparde,
Somnath Kotur, Ziyang Xuan, Xiaoyun Wang, Guoyang Zhou,
Shijith Thotton, Srisivasubramanian Srinivasan, heinrich.kuhn,
Harman Kalra, Rasesh Mody, Devendra Singh Rawat, Jiawen Wu, Wang,
Yong, Mcnamara, John, Shreyansh Jain, santosh.shukla,
Akhil Goyal, Zhang, Roy Fan, Kusztal, ArkadiuszX, michael.baucom,
Venkat Duvvuru, Lance Richardson, kishore.padmanabha,
Jerin Jacob, derek.chickles, ssrinivasan, mjatharakonda,
simon.horman, david.george, sony.chacko, harish.patil,
Tomasz Kulasek, ian.betts, Liang Ma, lei.a.yao
On Fri, 12 Nov 2021 16:38:37 +0000
"Walsh, Conor" <conor.walsh@intel.com> wrote:
> Would something along the lines of this make more sense?
>
> #ifdef RTE_LIBRTE_VMXNET3_DEBUG_TX
> completed += vmxnet3_unmap_pkt(tcd->txdIdx, txq);
> #else
> vmxnet3_unmap_pkt(tcd->txdIdx, txq);
> #endif
>
> Thanks,
> Conor.
Why not just
RTE_USED(completed);
#ifdef's introduce more testing issues.
^ permalink raw reply [flat|nested] 31+ messages in thread
* RE: [PATCH 5/7] drivers/net: fix unused but set variables
2021-11-12 16:41 ` Stephen Hemminger
@ 2021-11-12 16:46 ` Walsh, Conor
0 siblings, 0 replies; 31+ messages in thread
From: Walsh, Conor @ 2021-11-12 16:46 UTC (permalink / raw)
To: Stephen Hemminger
Cc: David Marchand, Yigit, Ferruh, Liang, LongfengX, dev, Hunt,
David, Wang, Yipeng1, Gobriel, Sameh, Richardson, Bruce,
Medvedkin, Vladimir, Hemant Agrawal, Sachin Saxena, Trahe, Fiona,
Griffin, John, Jain, Deepak K, Van Haaren, Harry, Ajit Khaparde,
Somnath Kotur, Ziyang Xuan, Xiaoyun Wang, Guoyang Zhou,
Shijith Thotton, Srisivasubramanian Srinivasan, heinrich.kuhn,
Harman Kalra, Rasesh Mody, Devendra Singh Rawat, Jiawen Wu, Wang,
Yong, Mcnamara, John, Shreyansh Jain, santosh.shukla,
Akhil Goyal, Zhang, Roy Fan, Kusztal, ArkadiuszX, michael.baucom,
Venkat Duvvuru, Lance Richardson, kishore.padmanabha,
Jerin Jacob, derek.chickles, ssrinivasan, mjatharakonda,
simon.horman, david.george, sony.chacko, harish.patil,
Tomasz Kulasek, ian.betts, Liang Ma, lei.a.yao
> On Fri, 12 Nov 2021 16:38:37 +0000
> "Walsh, Conor" <conor.walsh@intel.com> wrote:
>
> > Would something along the lines of this make more sense?
> >
> > #ifdef RTE_LIBRTE_VMXNET3_DEBUG_TX
> > completed += vmxnet3_unmap_pkt(tcd->txdIdx, txq);
> > #else
> > vmxnet3_unmap_pkt(tcd->txdIdx, txq);
> > #endif
> >
> > Thanks,
> > Conor.
>
> Why not just
> RTE_USED(completed);
>
> #ifdef's introduce more testing issues.
That makes more sense, I'll change it to that in v2.
Thanks,
Conor.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 5/7] drivers/net: fix unused but set variables
2021-11-12 14:01 ` [PATCH 5/7] drivers/net: " Conor Walsh
2021-11-12 16:17 ` Ferruh Yigit
@ 2021-11-15 9:28 ` David Marchand
2021-11-16 4:58 ` Somnath Kotur
1 sibling, 1 reply; 31+ messages in thread
From: David Marchand @ 2021-11-15 9:28 UTC (permalink / raw)
To: Ajit Khaparde, Somnath Kotur
Cc: Yigit, Ferruh, Liang, LongfengX, dev, Mcnamara, John,
Stephen Hemminger, Conor Walsh
Hello Ajit, Somnath,
On Fri, Nov 12, 2021 at 3:02 PM Conor Walsh <conor.walsh@intel.com> 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 <conor.walsh@intel.com>
> Reported-by: Liang Longfeng <longfengx.liang@intel.com>
> ---
> 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.
--
David Marchand
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 0/6] fix unused but set variables
2021-11-12 14:01 [PATCH 0/7] fix unused but set variables Conor Walsh
` (6 preceding siblings ...)
2021-11-12 14:01 ` [PATCH 7/7] lib/power: " Conor Walsh
@ 2021-11-15 17:58 ` Conor Walsh
2021-11-15 17:58 ` [PATCH 1/6] app/test: " Conor Walsh
` (6 more replies)
7 siblings, 7 replies; 31+ messages in thread
From: Conor Walsh @ 2021-11-15 17:58 UTC (permalink / raw)
To: ferruh.yigit, david.marchand, longfengx.liang, dev
Cc: david.hunt, yipeng1.wang, sameh.gobriel, bruce.richardson,
vladimir.medvedkin, hemant.agrawal, sachin.saxena, fiona.trahe,
john.griffin, deepak.k.jain, harry.van.haaren, ajit.khaparde,
somnath.kotur, xuanziyang2, cloud.wangxiaoyun, sthotton,
srinivasan, heinrich.kuhn, hkalra, rmody, dsinghrawat, jiawenwu,
yongwang, john.mcnamara, gakhil, roy.fan.zhang,
arkadiuszx.kusztal, michael.baucom, venkatkumar.duvvuru,
lance.richardson, kishore.padmanabha, jerin.jacob, mjatharakonda,
simon.horman, david.george, sony.chacko, harish.patil, stephen,
jerinjacobk, Conor Walsh
When DPDK is compiled with clang 13, several warnings for unused but set
variables are present.
This patchset fixes these warnings, which were present within:
- app/test
- drivers/bus/fslmc
- drivers/common/qat
- drivers/event/sw
- drivers/net
- examples/performance-thread
This patchset is split into 6 patches grouped broadly by subdir, as this
set touches code from a lot of different authors this should make it
easier to review.
Bugzilla ID: 881
---
v2:
- Drop lib/power patch as already covered by 0353121c3384 ("power: fix
build with clang 13").
- Rework changes to vmxnet3 to ensure vmxnet_unmap_pkt is run.
- Minor changes to commit logs.
- Dropped all addresses from CC that bounced back.
Conor Walsh (6):
app/test: fix unused but set variables
drivers/bus/fslmc: fix unused but set variables
drivers/common/qat: fix unused but set variables
drivers/event/sw: fix unused but set variables
drivers/net: fix unused but set variables
examples/performance-thread: fix unused but set variables
app/test/test_distributor_perf.c | 3 ---
app/test/test_thash_perf.c | 3 +++
drivers/bus/fslmc/fslmc_bus.c | 2 --
drivers/common/qat/qat_pf2vf.c | 2 --
drivers/event/sw/sw_evdev.c | 2 --
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 | 3 +++
drivers/net/vmxnet3/vmxnet3_rxtx.c | 3 +++
.../performance-thread/l3fwd-thread/main.c | 3 ---
15 files changed, 13 insertions(+), 55 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 1/6] app/test: fix unused but set variables
2021-11-15 17:58 ` [PATCH 0/6] " Conor Walsh
@ 2021-11-15 17:58 ` Conor Walsh
2021-11-15 17:58 ` [PATCH 2/6] drivers/bus/fslmc: " Conor Walsh
` (5 subsequent siblings)
6 siblings, 0 replies; 31+ messages in thread
From: Conor Walsh @ 2021-11-15 17:58 UTC (permalink / raw)
To: ferruh.yigit, david.marchand, longfengx.liang, dev
Cc: david.hunt, yipeng1.wang, sameh.gobriel, bruce.richardson,
vladimir.medvedkin, hemant.agrawal, sachin.saxena, fiona.trahe,
john.griffin, deepak.k.jain, harry.van.haaren, ajit.khaparde,
somnath.kotur, xuanziyang2, cloud.wangxiaoyun, sthotton,
srinivasan, heinrich.kuhn, hkalra, rmody, dsinghrawat, jiawenwu,
yongwang, john.mcnamara, gakhil, roy.fan.zhang,
arkadiuszx.kusztal, michael.baucom, venkatkumar.duvvuru,
lance.richardson, kishore.padmanabha, jerin.jacob, mjatharakonda,
simon.horman, david.george, sony.chacko, harish.patil, stephen,
jerinjacobk, Conor Walsh, stable
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")
Cc: stable@dpdk.org
Reported-by: Liang Longfeng <longfengx.liang@intel.com>
Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
app/test/test_distributor_perf.c | 3 ---
app/test/test_thash_perf.c | 3 +++
2 files changed, 3 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..687582aa32 100644
--- a/app/test/test_thash_perf.c
+++ b/app/test/test_thash_perf.c
@@ -61,6 +61,9 @@ run_rss_calc(uint32_t *tuples[BATCH_SZ], enum test_rss_type type, int len,
}
end_tsc = rte_rdtsc_precise();
+ /* To avoid compiler warnings set hash to used. */
+ RTE_SET_USED(hash);
+
return end_tsc - start_tsc;
}
--
2.25.1
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 2/6] drivers/bus/fslmc: fix unused but set variables
2021-11-15 17:58 ` [PATCH 0/6] " Conor Walsh
2021-11-15 17:58 ` [PATCH 1/6] app/test: " Conor Walsh
@ 2021-11-15 17:58 ` Conor Walsh
2021-11-15 17:58 ` [PATCH 3/6] drivers/common/qat: " Conor Walsh
` (4 subsequent siblings)
6 siblings, 0 replies; 31+ messages in thread
From: Conor Walsh @ 2021-11-15 17:58 UTC (permalink / raw)
To: ferruh.yigit, david.marchand, longfengx.liang, dev
Cc: david.hunt, yipeng1.wang, sameh.gobriel, bruce.richardson,
vladimir.medvedkin, hemant.agrawal, sachin.saxena, fiona.trahe,
john.griffin, deepak.k.jain, harry.van.haaren, ajit.khaparde,
somnath.kotur, xuanziyang2, cloud.wangxiaoyun, sthotton,
srinivasan, heinrich.kuhn, hkalra, rmody, dsinghrawat, jiawenwu,
yongwang, john.mcnamara, gakhil, roy.fan.zhang,
arkadiuszx.kusztal, michael.baucom, venkatkumar.duvvuru,
lance.richardson, kishore.padmanabha, jerin.jacob, mjatharakonda,
simon.horman, david.george, sony.chacko, harish.patil, stephen,
jerinjacobk, Conor Walsh, stable
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")
Cc: stable@dpdk.org
Reported-by: Liang Longfeng <longfengx.liang@intel.com>
Signed-off-by: Conor Walsh <conor.walsh@intel.com>
---
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);
--
2.25.1
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 3/6] drivers/common/qat: fix unused but set variables
2021-11-15 17:58 ` [PATCH 0/6] " Conor Walsh
2021-11-15 17:58 ` [PATCH 1/6] app/test: " Conor Walsh
2021-11-15 17:58 ` [PATCH 2/6] drivers/bus/fslmc: " Conor Walsh
@ 2021-11-15 17:58 ` Conor Walsh
2021-11-15 17:58 ` [PATCH 4/6] drivers/event/sw: " Conor Walsh
` (3 subsequent siblings)
6 siblings, 0 replies; 31+ messages in thread
From: Conor Walsh @ 2021-11-15 17:58 UTC (permalink / raw)
To: ferruh.yigit, david.marchand, longfengx.liang, dev
Cc: david.hunt, yipeng1.wang, sameh.gobriel, bruce.richardson,
vladimir.medvedkin, hemant.agrawal, sachin.saxena, fiona.trahe,
john.griffin, deepak.k.jain, harry.van.haaren, ajit.khaparde,
somnath.kotur, xuanziyang2, cloud.wangxiaoyun, sthotton,
srinivasan, heinrich.kuhn, hkalra, rmody, dsinghrawat, jiawenwu,
yongwang, john.mcnamara, gakhil, roy.fan.zhang,
arkadiuszx.kusztal, michael.baucom, venkatkumar.duvvuru,
lance.richardson, kishore.padmanabha, jerin.jacob, mjatharakonda,
simon.horman, david.george, sony.chacko, harish.patil, stephen,
jerinjacobk, Conor Walsh, stable
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")
Cc: stable@dpdk.org
Reported-by: Liang Longfeng <longfengx.liang@intel.com>
Signed-off-by: Conor Walsh <conor.walsh@intel.com>
---
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));
--
2.25.1
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 4/6] drivers/event/sw: fix unused but set variables
2021-11-15 17:58 ` [PATCH 0/6] " Conor Walsh
` (2 preceding siblings ...)
2021-11-15 17:58 ` [PATCH 3/6] drivers/common/qat: " Conor Walsh
@ 2021-11-15 17:58 ` Conor Walsh
2021-11-15 17:58 ` [PATCH 5/6] drivers/net: " Conor Walsh
` (2 subsequent siblings)
6 siblings, 0 replies; 31+ messages in thread
From: Conor Walsh @ 2021-11-15 17:58 UTC (permalink / raw)
To: ferruh.yigit, david.marchand, longfengx.liang, dev
Cc: david.hunt, yipeng1.wang, sameh.gobriel, bruce.richardson,
vladimir.medvedkin, hemant.agrawal, sachin.saxena, fiona.trahe,
john.griffin, deepak.k.jain, harry.van.haaren, ajit.khaparde,
somnath.kotur, xuanziyang2, cloud.wangxiaoyun, sthotton,
srinivasan, heinrich.kuhn, hkalra, rmody, dsinghrawat, jiawenwu,
yongwang, john.mcnamara, gakhil, roy.fan.zhang,
arkadiuszx.kusztal, michael.baucom, venkatkumar.duvvuru,
lance.richardson, kishore.padmanabha, jerin.jacob, mjatharakonda,
simon.horman, david.george, sony.chacko, harish.patil, stephen,
jerinjacobk, Conor Walsh, stable
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")
Cc: stable@dpdk.org
Reported-by: Liang Longfeng <longfengx.liang@intel.com>
Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
---
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;
--
2.25.1
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 5/6] drivers/net: fix unused but set variables
2021-11-15 17:58 ` [PATCH 0/6] " Conor Walsh
` (3 preceding siblings ...)
2021-11-15 17:58 ` [PATCH 4/6] drivers/event/sw: " Conor Walsh
@ 2021-11-15 17:58 ` Conor Walsh
2021-11-16 12:04 ` David Marchand
2021-11-15 17:58 ` [PATCH 6/6] examples/performance-thread: " Conor Walsh
2021-11-16 12:28 ` [PATCH 0/6] " David Marchand
6 siblings, 1 reply; 31+ messages in thread
From: Conor Walsh @ 2021-11-15 17:58 UTC (permalink / raw)
To: ferruh.yigit, david.marchand, longfengx.liang, dev
Cc: david.hunt, yipeng1.wang, sameh.gobriel, bruce.richardson,
vladimir.medvedkin, hemant.agrawal, sachin.saxena, fiona.trahe,
john.griffin, deepak.k.jain, harry.van.haaren, ajit.khaparde,
somnath.kotur, xuanziyang2, cloud.wangxiaoyun, sthotton,
srinivasan, heinrich.kuhn, hkalra, rmody, dsinghrawat, jiawenwu,
yongwang, john.mcnamara, gakhil, roy.fan.zhang,
arkadiuszx.kusztal, michael.baucom, venkatkumar.duvvuru,
lance.richardson, kishore.padmanabha, jerin.jacob, mjatharakonda,
simon.horman, david.george, sony.chacko, harish.patil, stephen,
jerinjacobk, Conor Walsh, stable
This patch fixes unused but set variables in the following net drivers:
- bnxt
- hinic
- liquidio
- nfp
- octeontx
- qede
- txgbe
- 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")
Cc: stable@dpdk.org
Reported-by: Liang Longfeng <longfengx.liang@intel.com>
Signed-off-by: Conor Walsh <conor.walsh@intel.com>
---
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 | 3 +++
drivers/net/vmxnet3/vmxnet3_rxtx.c | 3 +++
9 files changed, 10 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..8eb6fdd3c9 100644
--- a/drivers/net/txgbe/txgbe_ethdev_vf.c
+++ b/drivers/net/txgbe/txgbe_ethdev_vf.c
@@ -1291,6 +1291,9 @@ txgbevf_dev_interrupt_get_status(struct rte_eth_dev *dev)
/* Workround for ICR lost */
intr->flags |= TXGBE_FLAG_MAILBOX;
+ /* To avoid compiler warnings set eicr to used. */
+ RTE_SET_USED(eicr);
+
return 0;
}
diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index deba64be6a..77a2917137 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -340,6 +340,9 @@ vmxnet3_tq_tx_complete(vmxnet3_tx_queue_t *txq)
}
PMD_TX_LOG(DEBUG, "Processed %d tx comps & command descs.", completed);
+
+ /* To avoid compiler warnings when not in DEBUG mode set completed to used. */
+ RTE_SET_USED(completed);
}
uint16_t
--
2.25.1
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 6/6] examples/performance-thread: fix unused but set variables
2021-11-15 17:58 ` [PATCH 0/6] " Conor Walsh
` (4 preceding siblings ...)
2021-11-15 17:58 ` [PATCH 5/6] drivers/net: " Conor Walsh
@ 2021-11-15 17:58 ` Conor Walsh
2021-11-16 12:28 ` [PATCH 0/6] " David Marchand
6 siblings, 0 replies; 31+ messages in thread
From: Conor Walsh @ 2021-11-15 17:58 UTC (permalink / raw)
To: ferruh.yigit, david.marchand, longfengx.liang, dev
Cc: david.hunt, yipeng1.wang, sameh.gobriel, bruce.richardson,
vladimir.medvedkin, hemant.agrawal, sachin.saxena, fiona.trahe,
john.griffin, deepak.k.jain, harry.van.haaren, ajit.khaparde,
somnath.kotur, xuanziyang2, cloud.wangxiaoyun, sthotton,
srinivasan, heinrich.kuhn, hkalra, rmody, dsinghrawat, jiawenwu,
yongwang, john.mcnamara, gakhil, roy.fan.zhang,
arkadiuszx.kusztal, michael.baucom, venkatkumar.duvvuru,
lance.richardson, kishore.padmanabha, jerin.jacob, mjatharakonda,
simon.horman, david.george, sony.chacko, harish.patil, stephen,
jerinjacobk, Conor Walsh, stable
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")
Cc: stable@dpdk.org
Reported-by: Liang Longfeng <longfengx.liang@intel.com>
Signed-off-by: Conor Walsh <conor.walsh@intel.com>
---
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",
--
2.25.1
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 5/7] drivers/net: fix unused but set variables
2021-11-15 9:28 ` David Marchand
@ 2021-11-16 4:58 ` Somnath Kotur
2021-11-16 5:08 ` Ajit Khaparde
0 siblings, 1 reply; 31+ messages in thread
From: Somnath Kotur @ 2021-11-16 4:58 UTC (permalink / raw)
To: David Marchand
Cc: Ajit Khaparde, Yigit, Ferruh, Liang, LongfengX, dev, Mcnamara,
John, Stephen Hemminger, Conor Walsh
On Mon, Nov 15, 2021 at 2:58 PM David Marchand
<david.marchand@redhat.com> wrote:
>
> Hello Ajit, Somnath,
>
> On Fri, Nov 12, 2021 at 3:02 PM Conor Walsh <conor.walsh@intel.com> 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 <conor.walsh@intel.com>
> > Reported-by: Liang Longfeng <longfengx.liang@intel.com>
> > ---
> > 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 <somnath.kotur@broadcom.com>
>
>
> --
> David Marchand
>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 5/7] drivers/net: fix unused but set variables
2021-11-16 4:58 ` Somnath Kotur
@ 2021-11-16 5:08 ` Ajit Khaparde
0 siblings, 0 replies; 31+ messages in thread
From: Ajit Khaparde @ 2021-11-16 5:08 UTC (permalink / raw)
To: Somnath Kotur
Cc: David Marchand, Yigit, Ferruh, Liang, LongfengX, dev, Mcnamara,
John, Stephen Hemminger, Conor Walsh
On Mon, Nov 15, 2021 at 8:58 PM Somnath Kotur
<somnath.kotur@broadcom.com> wrote:
>
> On Mon, Nov 15, 2021 at 2:58 PM David Marchand
> <david.marchand@redhat.com> wrote:
> >
> > Hello Ajit, Somnath,
> >
> > On Fri, Nov 12, 2021 at 3:02 PM Conor Walsh <conor.walsh@intel.com> 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 <conor.walsh@intel.com>
> > > Reported-by: Liang Longfeng <longfengx.liang@intel.com>
> > > ---
> > > 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.
Thanks for the reminder.
> Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> >
> >
> > --
> > David Marchand
> >
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 5/6] drivers/net: fix unused but set variables
2021-11-15 17:58 ` [PATCH 5/6] drivers/net: " Conor Walsh
@ 2021-11-16 12:04 ` David Marchand
0 siblings, 0 replies; 31+ messages in thread
From: David Marchand @ 2021-11-16 12:04 UTC (permalink / raw)
To: Conor Walsh
Cc: Yigit, Ferruh, Liang, LongfengX, dev, David Hunt, Wang, Yipeng1,
Gobriel, Sameh, Bruce Richardson, Vladimir Medvedkin,
Hemant Agrawal, Sachin Saxena, Trahe, Fiona, John Griffin,
Deepak Kumar Jain, Van Haaren Harry, Ajit Khaparde,
Somnath Kotur, Ziyang Xuan, Xiaoyun Wang, Shijith Thotton,
Srisivasubramanian Srinivasan, heinrich.kuhn, Harman Kalra,
Rasesh Mody, Devendra Singh Rawat, Jiawen Wu, Yong Wang,
Mcnamara, John, Akhil Goyal, Fan Zhang, Kusztal, ArkadiuszX,
michael.baucom, Venkat Duvvuru, Lance Richardson,
kishore.padmanabha, Jerin Jacob, mjatharakonda, simon.horman,
david.george, sony.chacko, harish.patil, Stephen Hemminger,
Jerin Jacob, dpdk stable
On Mon, Nov 15, 2021 at 6:59 PM Conor Walsh <conor.walsh@intel.com> wrote:
>
> This patch fixes unused but set variables in the following net drivers:
> - bnxt
> - hinic
> - liquidio
> - nfp
> - octeontx
> - qede
> - txgbe
> - 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")
This change only moves code, it should be:
Fixes: 29a62d1476b6 ("net/nfp: add CPP bridge as service")
I will fix while applying.
> 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")
Putting everything in a single patch will make life a bit harder for
backports: we have candidates for backports in 19.11 and 20.11, and
some patches are not relevant to backport.
I'll split this patch per driver since the Fixes: tags for each driver
only affect one version.
> Cc: stable@dpdk.org
>
> Reported-by: Liang Longfeng <longfengx.liang@intel.com>
> Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
--
David Marchand
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 0/6] fix unused but set variables
2021-11-15 17:58 ` [PATCH 0/6] " Conor Walsh
` (5 preceding siblings ...)
2021-11-15 17:58 ` [PATCH 6/6] examples/performance-thread: " Conor Walsh
@ 2021-11-16 12:28 ` David Marchand
6 siblings, 0 replies; 31+ messages in thread
From: David Marchand @ 2021-11-16 12:28 UTC (permalink / raw)
To: Conor Walsh
Cc: Yigit, Ferruh, Liang, LongfengX, dev, David Hunt, Wang, Yipeng1,
Gobriel, Sameh, Bruce Richardson, Vladimir Medvedkin,
Hemant Agrawal, Sachin Saxena, Trahe, Fiona, John Griffin,
Deepak Kumar Jain, Van Haaren Harry, Ajit Khaparde,
Somnath Kotur, Ziyang Xuan, Xiaoyun Wang, Shijith Thotton,
Srisivasubramanian Srinivasan, heinrich.kuhn, Harman Kalra,
Rasesh Mody, Devendra Singh Rawat, Jiawen Wu, Yong Wang,
Mcnamara, John, Akhil Goyal, Fan Zhang, Kusztal, ArkadiuszX,
michael.baucom, Venkat Duvvuru, Lance Richardson,
kishore.padmanabha, Jerin Jacob, mjatharakonda, simon.horman,
david.george, sony.chacko, harish.patil, Stephen Hemminger,
Jerin Jacob
n Mon, Nov 15, 2021 at 6:59 PM Conor Walsh <conor.walsh@intel.com> wrote:
>
> When DPDK is compiled with clang 13, several warnings for unused but set
> variables are present.
>
> This patchset fixes these warnings, which were present within:
> - app/test
> - drivers/bus/fslmc
> - drivers/common/qat
> - drivers/event/sw
> - drivers/net
> - examples/performance-thread
>
> This patchset is split into 6 patches grouped broadly by subdir, as this
> set touches code from a lot of different authors this should make it
> easier to review.
For the series,
Reviewed-by: David Marchand <david.marchand@redhat.com>
I updated titles and did some patch splitting to simplify backports.
This has been tested with a F35 container in GHA (I'll send the patch for this):
https://github.com/david-marchand/dpdk/runs/4224438074
Series applied, thanks Conor.
--
David Marchand
^ permalink raw reply [flat|nested] 31+ messages in thread
end of thread, other threads:[~2021-11-16 12:28 UTC | newest]
Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-12 14:01 [PATCH 0/7] fix unused but set variables Conor Walsh
2021-11-12 14:01 ` [PATCH 1/7] app/test: " Conor Walsh
2021-11-12 14:29 ` Medvedkin, Vladimir
2021-11-12 14:01 ` [PATCH 2/7] drivers/bus/fslmc: " Conor Walsh
2021-11-12 14:01 ` [PATCH 3/7] drivers/common/qat: " Conor Walsh
2021-11-12 14:01 ` [PATCH 4/7] drivers/event/sw: " Conor Walsh
2021-11-12 15:15 ` Van Haaren, Harry
2021-11-12 14:01 ` [PATCH 5/7] drivers/net: " Conor Walsh
2021-11-12 16:17 ` Ferruh Yigit
2021-11-12 16:27 ` David Marchand
2021-11-12 16:38 ` Walsh, Conor
2021-11-12 16:41 ` Stephen Hemminger
2021-11-12 16:46 ` Walsh, Conor
2021-11-12 16:35 ` Walsh, Conor
2021-11-15 9:28 ` David Marchand
2021-11-16 4:58 ` Somnath Kotur
2021-11-16 5:08 ` Ajit Khaparde
2021-11-12 14:01 ` [PATCH 6/7] examples/performance-thread: " Conor Walsh
2021-11-12 14:01 ` [PATCH 7/7] lib/power: " Conor Walsh
2021-11-12 14:13 ` David Marchand
2021-11-12 14:17 ` Walsh, Conor
2021-11-12 14:26 ` David Marchand
2021-11-15 17:58 ` [PATCH 0/6] " Conor Walsh
2021-11-15 17:58 ` [PATCH 1/6] app/test: " Conor Walsh
2021-11-15 17:58 ` [PATCH 2/6] drivers/bus/fslmc: " Conor Walsh
2021-11-15 17:58 ` [PATCH 3/6] drivers/common/qat: " Conor Walsh
2021-11-15 17:58 ` [PATCH 4/6] drivers/event/sw: " Conor Walsh
2021-11-15 17:58 ` [PATCH 5/6] drivers/net: " Conor Walsh
2021-11-16 12:04 ` David Marchand
2021-11-15 17:58 ` [PATCH 6/6] examples/performance-thread: " Conor Walsh
2021-11-16 12:28 ` [PATCH 0/6] " David Marchand
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).