Skip to content

Commit 528dd46

Browse files
committed
Merge tag 'net-6.10-rc8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull more networking fixes from Jakub Kicinski: "A quick follow up to yesterday's pull. We got a regressions report for the bnxt patch as soon as it got to your tree. The ethtool fix is also good to have, although it's an older regression. Current release - regressions: - eth: bnxt_en: fix crash in bnxt_get_max_rss_ctx_ring() on older HW when user tries to decrease the ring count Previous releases - regressions: - ethtool: fix RSS setting, accept "no change" setting if the driver doesn't support the new features - eth: i40e: remove needless retries of NVM update, don't wait 20min when we know the firmware update won't succeed" * tag 'net-6.10-rc8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: bnxt_en: Fix crash in bnxt_get_max_rss_ctx_ring() octeontx2-af: fix issue with IPv4 match for RSS octeontx2-af: fix issue with IPv6 ext match for RSS octeontx2-af: fix detection of IP layer octeontx2-af: fix a issue with cpt_lf_alloc mailbox octeontx2-af: replace cpt slot with lf id on reg write i40e: fix: remove needless retries of NVM update net: ethtool: Fix RSS setting
2 parents 975f3b6 + f7ce5eb commit 528dd46

File tree

7 files changed

+36
-19
lines changed

7 files changed

+36
-19
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6151,6 +6151,9 @@ u16 bnxt_get_max_rss_ctx_ring(struct bnxt *bp)
61516151
u16 i, tbl_size, max_ring = 0;
61526152
struct bnxt_rss_ctx *rss_ctx;
61536153

6154+
if (!BNXT_SUPPORTS_MULTI_RSS_CTX(bp))
6155+
return 0;
6156+
61546157
tbl_size = bnxt_get_rxfh_indir_size(bp->dev);
61556158

61566159
list_for_each_entry(rss_ctx, &bp->rss_ctx_list, list) {

drivers/net/ethernet/intel/i40e/i40e_adminq.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,6 @@ static inline int i40e_aq_rc_to_posix(int aq_ret, int aq_rc)
109109
-EFBIG, /* I40E_AQ_RC_EFBIG */
110110
};
111111

112-
/* aq_rc is invalid if AQ timed out */
113-
if (aq_ret == -EIO)
114-
return -EAGAIN;
115-
116112
if (!((u32)aq_rc < (sizeof(aq_to_posix) / sizeof((aq_to_posix)[0]))))
117113
return -ERANGE;
118114

drivers/net/ethernet/marvell/octeontx2/af/mbox.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1745,7 +1745,7 @@ struct cpt_lf_alloc_req_msg {
17451745
u16 nix_pf_func;
17461746
u16 sso_pf_func;
17471747
u16 eng_grpmsk;
1748-
int blkaddr;
1748+
u8 blkaddr;
17491749
u8 ctx_ilen_valid : 1;
17501750
u8 ctx_ilen : 7;
17511751
};

drivers/net/ethernet/marvell/octeontx2/af/npc.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,20 @@ enum npc_kpu_lb_ltype {
6363
NPC_LT_LB_CUSTOM1 = 0xF,
6464
};
6565

66+
/* Don't modify ltypes up to IP6_EXT, otherwise length and checksum of IP
67+
* headers may not be checked correctly. IPv4 ltypes and IPv6 ltypes must
68+
* differ only at bit 0 so mask 0xE can be used to detect extended headers.
69+
*/
6670
enum npc_kpu_lc_ltype {
67-
NPC_LT_LC_IP = 1,
71+
NPC_LT_LC_PTP = 1,
72+
NPC_LT_LC_IP,
6873
NPC_LT_LC_IP_OPT,
6974
NPC_LT_LC_IP6,
7075
NPC_LT_LC_IP6_EXT,
7176
NPC_LT_LC_ARP,
7277
NPC_LT_LC_RARP,
7378
NPC_LT_LC_MPLS,
7479
NPC_LT_LC_NSH,
75-
NPC_LT_LC_PTP,
7680
NPC_LT_LC_FCOE,
7781
NPC_LT_LC_NGIO,
7882
NPC_LT_LC_CUSTOM0 = 0xE,

drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,8 @@ int rvu_mbox_handler_cpt_rd_wr_register(struct rvu *rvu,
696696
struct cpt_rd_wr_reg_msg *req,
697697
struct cpt_rd_wr_reg_msg *rsp)
698698
{
699-
int blkaddr;
699+
u64 offset = req->reg_offset;
700+
int blkaddr, lf;
700701

701702
blkaddr = validate_and_get_cpt_blkaddr(req->blkaddr);
702703
if (blkaddr < 0)
@@ -707,17 +708,25 @@ int rvu_mbox_handler_cpt_rd_wr_register(struct rvu *rvu,
707708
!is_cpt_vf(rvu, req->hdr.pcifunc))
708709
return CPT_AF_ERR_ACCESS_DENIED;
709710

710-
rsp->reg_offset = req->reg_offset;
711-
rsp->ret_val = req->ret_val;
712-
rsp->is_write = req->is_write;
713-
714711
if (!is_valid_offset(rvu, req))
715712
return CPT_AF_ERR_ACCESS_DENIED;
716713

714+
/* Translate local LF used by VFs to global CPT LF */
715+
lf = rvu_get_lf(rvu, &rvu->hw->block[blkaddr], req->hdr.pcifunc,
716+
(offset & 0xFFF) >> 3);
717+
718+
/* Translate local LF's offset to global CPT LF's offset */
719+
offset &= 0xFF000;
720+
offset += lf << 3;
721+
722+
rsp->reg_offset = offset;
723+
rsp->ret_val = req->ret_val;
724+
rsp->is_write = req->is_write;
725+
717726
if (req->is_write)
718-
rvu_write64(rvu, blkaddr, req->reg_offset, req->val);
727+
rvu_write64(rvu, blkaddr, offset, req->val);
719728
else
720-
rsp->val = rvu_read64(rvu, blkaddr, req->reg_offset);
729+
rsp->val = rvu_read64(rvu, blkaddr, offset);
721730

722731
return 0;
723732
}

drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3864,6 +3864,11 @@ static int get_flowkey_alg_idx(struct nix_hw *nix_hw, u32 flow_cfg)
38643864
return -ERANGE;
38653865
}
38663866

3867+
/* Mask to match ipv6(NPC_LT_LC_IP6) and ipv6 ext(NPC_LT_LC_IP6_EXT) */
3868+
#define NPC_LT_LC_IP6_MATCH_MSK ((~(NPC_LT_LC_IP6 ^ NPC_LT_LC_IP6_EXT)) & 0xf)
3869+
/* Mask to match both ipv4(NPC_LT_LC_IP) and ipv4 ext(NPC_LT_LC_IP_OPT) */
3870+
#define NPC_LT_LC_IP_MATCH_MSK ((~(NPC_LT_LC_IP ^ NPC_LT_LC_IP_OPT)) & 0xf)
3871+
38673872
static int set_flowkey_fields(struct nix_rx_flowkey_alg *alg, u32 flow_cfg)
38683873
{
38693874
int idx, nr_field, key_off, field_marker, keyoff_marker;
@@ -3933,7 +3938,7 @@ static int set_flowkey_fields(struct nix_rx_flowkey_alg *alg, u32 flow_cfg)
39333938
field->hdr_offset = 9; /* offset */
39343939
field->bytesm1 = 0; /* 1 byte */
39353940
field->ltype_match = NPC_LT_LC_IP;
3936-
field->ltype_mask = 0xF;
3941+
field->ltype_mask = NPC_LT_LC_IP_MATCH_MSK;
39373942
break;
39383943
case NIX_FLOW_KEY_TYPE_IPV4:
39393944
case NIX_FLOW_KEY_TYPE_INNR_IPV4:
@@ -3960,8 +3965,7 @@ static int set_flowkey_fields(struct nix_rx_flowkey_alg *alg, u32 flow_cfg)
39603965
field->bytesm1 = 3; /* DIP, 4 bytes */
39613966
}
39623967
}
3963-
3964-
field->ltype_mask = 0xF; /* Match only IPv4 */
3968+
field->ltype_mask = NPC_LT_LC_IP_MATCH_MSK;
39653969
keyoff_marker = false;
39663970
break;
39673971
case NIX_FLOW_KEY_TYPE_IPV6:
@@ -3990,7 +3994,7 @@ static int set_flowkey_fields(struct nix_rx_flowkey_alg *alg, u32 flow_cfg)
39903994
field->bytesm1 = 15; /* DIP,16 bytes */
39913995
}
39923996
}
3993-
field->ltype_mask = 0xF; /* Match only IPv6 */
3997+
field->ltype_mask = NPC_LT_LC_IP6_MATCH_MSK;
39943998
break;
39953999
case NIX_FLOW_KEY_TYPE_TCP:
39964000
case NIX_FLOW_KEY_TYPE_UDP:

net/ethtool/ioctl.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1306,7 +1306,8 @@ static noinline_for_stack int ethtool_set_rxfh(struct net_device *dev,
13061306
if (rxfh.input_xfrm && rxfh.input_xfrm != RXH_XFRM_SYM_XOR &&
13071307
rxfh.input_xfrm != RXH_XFRM_NO_CHANGE)
13081308
return -EINVAL;
1309-
if ((rxfh.input_xfrm & RXH_XFRM_SYM_XOR) &&
1309+
if (rxfh.input_xfrm != RXH_XFRM_NO_CHANGE &&
1310+
(rxfh.input_xfrm & RXH_XFRM_SYM_XOR) &&
13101311
!ops->cap_rss_sym_xor_supported)
13111312
return -EOPNOTSUPP;
13121313

0 commit comments

Comments
 (0)