* [PATCH 1/6] app/test: fix unused but set variables
[not found] ` <20211115175855.1091621-1-conor.walsh@intel.com>
@ 2021-11-15 17:58 ` Conor Walsh
2021-11-15 17:58 ` [PATCH 2/6] drivers/bus/fslmc: " Conor Walsh
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ 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] 7+ messages in thread
* [PATCH 2/6] drivers/bus/fslmc: fix unused but set variables
[not found] ` <20211115175855.1091621-1-conor.walsh@intel.com>
2021-11-15 17:58 ` [PATCH 1/6] app/test: fix unused but set variables Conor Walsh
@ 2021-11-15 17:58 ` Conor Walsh
2021-11-15 17:58 ` [PATCH 3/6] drivers/common/qat: " Conor Walsh
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ 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] 7+ messages in thread
* [PATCH 3/6] drivers/common/qat: fix unused but set variables
[not found] ` <20211115175855.1091621-1-conor.walsh@intel.com>
2021-11-15 17:58 ` [PATCH 1/6] app/test: fix unused but set variables 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
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ 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] 7+ messages in thread
* [PATCH 4/6] drivers/event/sw: fix unused but set variables
[not found] ` <20211115175855.1091621-1-conor.walsh@intel.com>
` (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
2021-11-15 17:58 ` [PATCH 6/6] examples/performance-thread: " Conor Walsh
5 siblings, 0 replies; 7+ 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] 7+ messages in thread
* [PATCH 5/6] drivers/net: fix unused but set variables
[not found] ` <20211115175855.1091621-1-conor.walsh@intel.com>
` (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
5 siblings, 1 reply; 7+ 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] 7+ messages in thread
* [PATCH 6/6] examples/performance-thread: fix unused but set variables
[not found] ` <20211115175855.1091621-1-conor.walsh@intel.com>
` (4 preceding siblings ...)
2021-11-15 17:58 ` [PATCH 5/6] drivers/net: " Conor Walsh
@ 2021-11-15 17:58 ` Conor Walsh
5 siblings, 0 replies; 7+ 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] 7+ 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; 7+ 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] 7+ messages in thread
end of thread, other threads:[~2021-11-16 12:04 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20211112140111.922171-1-conor.walsh@intel.com>
[not found] ` <20211115175855.1091621-1-conor.walsh@intel.com>
2021-11-15 17:58 ` [PATCH 1/6] app/test: fix unused but set variables 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
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).