Skip to content

Commit

Permalink
net/bnxt: remove some unused variables
Browse files Browse the repository at this point in the history
[ upstream commit 2d72ec8 ]

Reported by clang 13.

Bugzilla ID: 881
Fixes: b87abb2 ("net/bnxt: support marking packet")
Fixes: 88badb3 ("net/bnxt: add helper functions for blob/regfile ops")

Reported-by: Liang Longfeng <longfengx.liang@intel.com>
Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
  • Loading branch information
conorwalsh-intel authored and steevenlee committed Nov 28, 2021
1 parent ae0fe7d commit 415c636
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
22 changes: 0 additions & 22 deletions drivers/net/bnxt/bnxt_rxr.c
Expand Up @@ -759,9 +759,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)
Expand All @@ -770,25 +767,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 |= PKT_RX_FDIR | PKT_RX_FDIR_ID;
}
Expand Down
3 changes: 0 additions & 3 deletions drivers/net/bnxt/tf_ulp/ulp_utils.c
Expand Up @@ -175,7 +175,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;
Expand All @@ -186,12 +185,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;
Expand Down

0 comments on commit 415c636

Please sign in to comment.