Skip to content

Commit f287d6a

Browse files
committed
Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue
Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2024-03-05 (idpf, ice, i40e, igc, e1000e) This series contains updates to idpf, ice, i40e, igc and e1000e drivers. Emil disables local BH on NAPI schedule for proper handling of softirqs on idpf. Jake stops reporting of virtchannel RSS option which in unsupported on ice. Rand Deeb adds null check to prevent possible null pointer dereference on ice. Michal Schmidt moves DPLL mutex initialization to resolve uninitialized mutex usage for ice. Jesse fixes incorrect variable usage for calculating Tx stats on ice. Ivan Vecera corrects logic for firmware equals check on i40e. Florian Kauer prevents memory corruption for XDP_REDIRECT on igc. Sasha reverts an incorrect use of FIELD_GET which caused a regression for Wake on LAN on e1000e. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents b7fb772 + ba54b1a commit f287d6a

File tree

9 files changed

+15
-22
lines changed

9 files changed

+15
-22
lines changed

drivers/net/ethernet/intel/e1000e/ich8lan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2559,7 +2559,7 @@ void e1000_copy_rx_addrs_to_phy_ich8lan(struct e1000_hw *hw)
25592559
hw->phy.ops.write_reg_page(hw, BM_RAR_H(i),
25602560
(u16)(mac_reg & 0xFFFF));
25612561
hw->phy.ops.write_reg_page(hw, BM_RAR_CTRL(i),
2562-
FIELD_GET(E1000_RAH_AV, mac_reg));
2562+
(u16)((mac_reg & E1000_RAH_AV) >> 16));
25632563
}
25642564

25652565
e1000_disable_phy_wakeup_reg_access_bm(hw, &phy_reg);

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -567,8 +567,7 @@ static inline bool i40e_is_fw_ver_lt(struct i40e_hw *hw, u16 maj, u16 min)
567567
**/
568568
static inline bool i40e_is_fw_ver_eq(struct i40e_hw *hw, u16 maj, u16 min)
569569
{
570-
return (hw->aq.fw_maj_ver > maj ||
571-
(hw->aq.fw_maj_ver == maj && hw->aq.fw_min_ver == min));
570+
return (hw->aq.fw_maj_ver == maj && hw->aq.fw_min_ver == min);
572571
}
573572

574573
#endif /* _I40E_PROTOTYPE_H_ */

drivers/net/ethernet/intel/ice/ice_dpll.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2120,6 +2120,7 @@ void ice_dpll_init(struct ice_pf *pf)
21202120
struct ice_dplls *d = &pf->dplls;
21212121
int err = 0;
21222122

2123+
mutex_init(&d->lock);
21232124
err = ice_dpll_init_info(pf, cgu);
21242125
if (err)
21252126
goto err_exit;
@@ -2132,7 +2133,6 @@ void ice_dpll_init(struct ice_pf *pf)
21322133
err = ice_dpll_init_pins(pf, cgu);
21332134
if (err)
21342135
goto deinit_pps;
2135-
mutex_init(&d->lock);
21362136
if (cgu) {
21372137
err = ice_dpll_init_worker(pf);
21382138
if (err)

drivers/net/ethernet/intel/ice/ice_lib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3192,7 +3192,7 @@ ice_vsi_realloc_stat_arrays(struct ice_vsi *vsi)
31923192
}
31933193
}
31943194

3195-
tx_ring_stats = vsi_stat->rx_ring_stats;
3195+
tx_ring_stats = vsi_stat->tx_ring_stats;
31963196
vsi_stat->tx_ring_stats =
31973197
krealloc_array(vsi_stat->tx_ring_stats, req_txq,
31983198
sizeof(*vsi_stat->tx_ring_stats),

drivers/net/ethernet/intel/ice/ice_main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8013,6 +8013,8 @@ ice_bridge_setlink(struct net_device *dev, struct nlmsghdr *nlh,
80138013
pf_sw = pf->first_sw;
80148014
/* find the attribute in the netlink message */
80158015
br_spec = nlmsg_find_attr(nlh, sizeof(struct ifinfomsg), IFLA_AF_SPEC);
8016+
if (!br_spec)
8017+
return -EINVAL;
80168018

80178019
nla_for_each_nested(attr, br_spec, rem) {
80188020
__u16 mode;

drivers/net/ethernet/intel/ice/ice_virtchnl.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,6 @@ static int ice_vc_get_vf_res_msg(struct ice_vf *vf, u8 *msg)
440440
vf->driver_caps = *(u32 *)msg;
441441
else
442442
vf->driver_caps = VIRTCHNL_VF_OFFLOAD_L2 |
443-
VIRTCHNL_VF_OFFLOAD_RSS_REG |
444443
VIRTCHNL_VF_OFFLOAD_VLAN;
445444

446445
vfres->vf_cap_flags = VIRTCHNL_VF_OFFLOAD_L2;
@@ -453,14 +452,8 @@ static int ice_vc_get_vf_res_msg(struct ice_vf *vf, u8 *msg)
453452
vfres->vf_cap_flags |= ice_vc_get_vlan_caps(hw, vf, vsi,
454453
vf->driver_caps);
455454

456-
if (vf->driver_caps & VIRTCHNL_VF_OFFLOAD_RSS_PF) {
455+
if (vf->driver_caps & VIRTCHNL_VF_OFFLOAD_RSS_PF)
457456
vfres->vf_cap_flags |= VIRTCHNL_VF_OFFLOAD_RSS_PF;
458-
} else {
459-
if (vf->driver_caps & VIRTCHNL_VF_OFFLOAD_RSS_AQ)
460-
vfres->vf_cap_flags |= VIRTCHNL_VF_OFFLOAD_RSS_AQ;
461-
else
462-
vfres->vf_cap_flags |= VIRTCHNL_VF_OFFLOAD_RSS_REG;
463-
}
464457

465458
if (vf->driver_caps & VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC)
466459
vfres->vf_cap_flags |= VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC;

drivers/net/ethernet/intel/ice/ice_virtchnl_allowlist.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
* - opcodes needed by VF when caps are activated
1414
*
1515
* Caps that don't use new opcodes (no opcodes should be allowed):
16-
* - VIRTCHNL_VF_OFFLOAD_RSS_AQ
17-
* - VIRTCHNL_VF_OFFLOAD_RSS_REG
1816
* - VIRTCHNL_VF_OFFLOAD_WB_ON_ITR
1917
* - VIRTCHNL_VF_OFFLOAD_CRC
2018
* - VIRTCHNL_VF_OFFLOAD_RX_POLLING

drivers/net/ethernet/intel/idpf/idpf_virtchnl.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2087,8 +2087,10 @@ int idpf_send_disable_queues_msg(struct idpf_vport *vport)
20872087
set_bit(__IDPF_Q_POLL_MODE, vport->txqs[i]->flags);
20882088

20892089
/* schedule the napi to receive all the marker packets */
2090+
local_bh_disable();
20902091
for (i = 0; i < vport->num_q_vectors; i++)
20912092
napi_schedule(&vport->q_vectors[i].napi);
2093+
local_bh_enable();
20922094

20932095
return idpf_wait_for_marker_event(vport);
20942096
}

drivers/net/ethernet/intel/igc/igc_main.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6487,7 +6487,7 @@ static int igc_xdp_xmit(struct net_device *dev, int num_frames,
64876487
int cpu = smp_processor_id();
64886488
struct netdev_queue *nq;
64896489
struct igc_ring *ring;
6490-
int i, drops;
6490+
int i, nxmit;
64916491

64926492
if (unlikely(!netif_carrier_ok(dev)))
64936493
return -ENETDOWN;
@@ -6503,24 +6503,23 @@ static int igc_xdp_xmit(struct net_device *dev, int num_frames,
65036503
/* Avoid transmit queue timeout since we share it with the slow path */
65046504
txq_trans_cond_update(nq);
65056505

6506-
drops = 0;
6506+
nxmit = 0;
65076507
for (i = 0; i < num_frames; i++) {
65086508
int err;
65096509
struct xdp_frame *xdpf = frames[i];
65106510

65116511
err = igc_xdp_init_tx_descriptor(ring, xdpf);
6512-
if (err) {
6513-
xdp_return_frame_rx_napi(xdpf);
6514-
drops++;
6515-
}
6512+
if (err)
6513+
break;
6514+
nxmit++;
65166515
}
65176516

65186517
if (flags & XDP_XMIT_FLUSH)
65196518
igc_flush_tx_descriptors(ring);
65206519

65216520
__netif_tx_unlock(nq);
65226521

6523-
return num_frames - drops;
6522+
return nxmit;
65246523
}
65256524

65266525
static void igc_trigger_rxtxq_interrupt(struct igc_adapter *adapter,

0 commit comments

Comments
 (0)