Skip to content

Commit 550921c

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 2026-03-03 (ice, libie, iavf, igb, igc) Larysa removes VF restriction for LLDP filters on ice to allow for LLDP traffic to reach the correct destination. Jakub adds retry mechanism for AdminQ Read/Write SFF EEPROM call to follow hardware specification on ice. Zilin Guan adds cleanup path to free XDP rings on failure in ice_set_ringparam(). Michal bypasses firmware logging unroll in libie when it isn't supported. Kohei Enju fixes iavf to take into account hardware MTU support when setting max MTU values. Vivek Behera fixes issues on igb and igc using incorrect IRQs when Tx/Rx queues do not share the same IRQ. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: igc: Fix trigger of incorrect irq in igc_xsk_wakeup function igb: Fix trigger of incorrect irq in igb_xsk_wakeup iavf: fix netdev->max_mtu to respect actual hardware limit libie: don't unroll if fwlog isn't supported ice: Fix memory leak in ice_set_ringparam() ice: fix retry for AQ command 0x06EE ice: reintroduce retry mechanism for indirect AQ ice: fix adding AQ LLDP filter for VF ==================== Link: https://patch.msgid.link/20260303231155.2895065-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2 parents ff2c591 + 554a1c3 commit 550921c

7 files changed

Lines changed: 110 additions & 47 deletions

File tree

drivers/net/ethernet/intel/iavf/iavf_main.c

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2793,7 +2793,22 @@ static void iavf_init_config_adapter(struct iavf_adapter *adapter)
27932793
netdev->watchdog_timeo = 5 * HZ;
27942794

27952795
netdev->min_mtu = ETH_MIN_MTU;
2796-
netdev->max_mtu = LIBIE_MAX_MTU;
2796+
2797+
/* PF/VF API: vf_res->max_mtu is max frame size (not MTU).
2798+
* Convert to MTU.
2799+
*/
2800+
if (!adapter->vf_res->max_mtu) {
2801+
netdev->max_mtu = LIBIE_MAX_MTU;
2802+
} else if (adapter->vf_res->max_mtu < LIBETH_RX_LL_LEN + ETH_MIN_MTU ||
2803+
adapter->vf_res->max_mtu >
2804+
LIBETH_RX_LL_LEN + LIBIE_MAX_MTU) {
2805+
netdev_warn_once(adapter->netdev,
2806+
"invalid max frame size %d from PF, using default MTU %d",
2807+
adapter->vf_res->max_mtu, LIBIE_MAX_MTU);
2808+
netdev->max_mtu = LIBIE_MAX_MTU;
2809+
} else {
2810+
netdev->max_mtu = adapter->vf_res->max_mtu - LIBETH_RX_LL_LEN;
2811+
}
27972812

27982813
if (!is_valid_ether_addr(adapter->hw.mac.addr)) {
27992814
dev_info(&pdev->dev, "Invalid MAC address %pM, using random\n",

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

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1816,6 +1816,7 @@ static bool ice_should_retry_sq_send_cmd(u16 opcode)
18161816
case ice_aqc_opc_lldp_stop:
18171817
case ice_aqc_opc_lldp_start:
18181818
case ice_aqc_opc_lldp_filter_ctrl:
1819+
case ice_aqc_opc_sff_eeprom:
18191820
return true;
18201821
}
18211822

@@ -1841,6 +1842,7 @@ ice_sq_send_cmd_retry(struct ice_hw *hw, struct ice_ctl_q_info *cq,
18411842
{
18421843
struct libie_aq_desc desc_cpy;
18431844
bool is_cmd_for_retry;
1845+
u8 *buf_cpy = NULL;
18441846
u8 idx = 0;
18451847
u16 opcode;
18461848
int status;
@@ -1850,8 +1852,11 @@ ice_sq_send_cmd_retry(struct ice_hw *hw, struct ice_ctl_q_info *cq,
18501852
memset(&desc_cpy, 0, sizeof(desc_cpy));
18511853

18521854
if (is_cmd_for_retry) {
1853-
/* All retryable cmds are direct, without buf. */
1854-
WARN_ON(buf);
1855+
if (buf) {
1856+
buf_cpy = kmemdup(buf, buf_size, GFP_KERNEL);
1857+
if (!buf_cpy)
1858+
return -ENOMEM;
1859+
}
18551860

18561861
memcpy(&desc_cpy, desc, sizeof(desc_cpy));
18571862
}
@@ -1863,12 +1868,14 @@ ice_sq_send_cmd_retry(struct ice_hw *hw, struct ice_ctl_q_info *cq,
18631868
hw->adminq.sq_last_status != LIBIE_AQ_RC_EBUSY)
18641869
break;
18651870

1871+
if (buf_cpy)
1872+
memcpy(buf, buf_cpy, buf_size);
18661873
memcpy(desc, &desc_cpy, sizeof(desc_cpy));
1867-
18681874
msleep(ICE_SQ_SEND_DELAY_TIME_MS);
18691875

18701876
} while (++idx < ICE_SQ_SEND_MAX_EXECUTE);
18711877

1878+
kfree(buf_cpy);
18721879
return status;
18731880
}
18741881

@@ -6391,7 +6398,7 @@ int ice_lldp_fltr_add_remove(struct ice_hw *hw, struct ice_vsi *vsi, bool add)
63916398
struct ice_aqc_lldp_filter_ctrl *cmd;
63926399
struct libie_aq_desc desc;
63936400

6394-
if (vsi->type != ICE_VSI_PF || !ice_fw_supports_lldp_fltr_ctrl(hw))
6401+
if (!ice_fw_supports_lldp_fltr_ctrl(hw))
63956402
return -EOPNOTSUPP;
63966403

63976404
cmd = libie_aq_raw(&desc);

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

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3332,7 +3332,7 @@ ice_set_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring,
33323332
rx_rings = kzalloc_objs(*rx_rings, vsi->num_rxq);
33333333
if (!rx_rings) {
33343334
err = -ENOMEM;
3335-
goto done;
3335+
goto free_xdp;
33363336
}
33373337

33383338
ice_for_each_rxq(vsi, i) {
@@ -3359,7 +3359,7 @@ ice_set_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring,
33593359
}
33603360
kfree(rx_rings);
33613361
err = -ENOMEM;
3362-
goto free_tx;
3362+
goto free_xdp;
33633363
}
33643364
}
33653365

@@ -3411,6 +3411,13 @@ ice_set_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring,
34113411
}
34123412
goto done;
34133413

3414+
free_xdp:
3415+
if (xdp_rings) {
3416+
ice_for_each_xdp_txq(vsi, i)
3417+
ice_free_tx_ring(&xdp_rings[i]);
3418+
kfree(xdp_rings);
3419+
}
3420+
34143421
free_tx:
34153422
/* error cleanup if the Rx allocations failed after getting Tx */
34163423
if (tx_rings) {
@@ -4509,7 +4516,7 @@ ice_get_module_eeprom(struct net_device *netdev,
45094516
u8 addr = ICE_I2C_EEPROM_DEV_ADDR;
45104517
struct ice_hw *hw = &pf->hw;
45114518
bool is_sfp = false;
4512-
unsigned int i, j;
4519+
unsigned int i;
45134520
u16 offset = 0;
45144521
u8 page = 0;
45154522
int status;
@@ -4551,26 +4558,19 @@ ice_get_module_eeprom(struct net_device *netdev,
45514558
if (page == 0 || !(data[0x2] & 0x4)) {
45524559
u32 copy_len;
45534560

4554-
/* If i2c bus is busy due to slow page change or
4555-
* link management access, call can fail. This is normal.
4556-
* So we retry this a few times.
4557-
*/
4558-
for (j = 0; j < 4; j++) {
4559-
status = ice_aq_sff_eeprom(hw, 0, addr, offset, page,
4560-
!is_sfp, value,
4561-
SFF_READ_BLOCK_SIZE,
4562-
0, NULL);
4563-
netdev_dbg(netdev, "SFF %02X %02X %02X %X = %02X%02X%02X%02X.%02X%02X%02X%02X (%X)\n",
4564-
addr, offset, page, is_sfp,
4565-
value[0], value[1], value[2], value[3],
4566-
value[4], value[5], value[6], value[7],
4567-
status);
4568-
if (status) {
4569-
usleep_range(1500, 2500);
4570-
memset(value, 0, SFF_READ_BLOCK_SIZE);
4571-
continue;
4572-
}
4573-
break;
4561+
status = ice_aq_sff_eeprom(hw, 0, addr, offset, page,
4562+
!is_sfp, value,
4563+
SFF_READ_BLOCK_SIZE,
4564+
0, NULL);
4565+
netdev_dbg(netdev, "SFF %02X %02X %02X %X = %02X%02X%02X%02X.%02X%02X%02X%02X (%pe)\n",
4566+
addr, offset, page, is_sfp,
4567+
value[0], value[1], value[2], value[3],
4568+
value[4], value[5], value[6], value[7],
4569+
ERR_PTR(status));
4570+
if (status) {
4571+
netdev_err(netdev, "%s: error reading module EEPROM: status %pe\n",
4572+
__func__, ERR_PTR(status));
4573+
return status;
45744574
}
45754575

45764576
/* Make sure we have enough room for the new block */

drivers/net/ethernet/intel/igb/igb_xsk.c

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,16 @@ bool igb_xmit_zc(struct igb_ring *tx_ring, struct xsk_buff_pool *xsk_pool)
524524
return nb_pkts < budget;
525525
}
526526

527+
static u32 igb_sw_irq_prep(struct igb_q_vector *q_vector)
528+
{
529+
u32 eics = 0;
530+
531+
if (!napi_if_scheduled_mark_missed(&q_vector->napi))
532+
eics = q_vector->eims_value;
533+
534+
return eics;
535+
}
536+
527537
int igb_xsk_wakeup(struct net_device *dev, u32 qid, u32 flags)
528538
{
529539
struct igb_adapter *adapter = netdev_priv(dev);
@@ -542,20 +552,32 @@ int igb_xsk_wakeup(struct net_device *dev, u32 qid, u32 flags)
542552

543553
ring = adapter->tx_ring[qid];
544554

545-
if (test_bit(IGB_RING_FLAG_TX_DISABLED, &ring->flags))
546-
return -ENETDOWN;
547-
548555
if (!READ_ONCE(ring->xsk_pool))
549556
return -EINVAL;
550557

551-
if (!napi_if_scheduled_mark_missed(&ring->q_vector->napi)) {
558+
if (flags & XDP_WAKEUP_TX) {
559+
if (test_bit(IGB_RING_FLAG_TX_DISABLED, &ring->flags))
560+
return -ENETDOWN;
561+
562+
eics |= igb_sw_irq_prep(ring->q_vector);
563+
}
564+
565+
if (flags & XDP_WAKEUP_RX) {
566+
/* If IGB_FLAG_QUEUE_PAIRS is active, the q_vector
567+
* and NAPI is shared between RX and TX.
568+
* If NAPI is already running it would be marked as missed
569+
* from the TX path, making this RX call a NOP
570+
*/
571+
ring = adapter->rx_ring[qid];
572+
eics |= igb_sw_irq_prep(ring->q_vector);
573+
}
574+
575+
if (eics) {
552576
/* Cause software interrupt */
553-
if (adapter->flags & IGB_FLAG_HAS_MSIX) {
554-
eics |= ring->q_vector->eims_value;
577+
if (adapter->flags & IGB_FLAG_HAS_MSIX)
555578
wr32(E1000_EICS, eics);
556-
} else {
579+
else
557580
wr32(E1000_ICS, E1000_ICS_RXDMT0);
558-
}
559581
}
560582

561583
return 0;

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

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6906,28 +6906,29 @@ static int igc_xdp_xmit(struct net_device *dev, int num_frames,
69066906
return nxmit;
69076907
}
69086908

6909-
static void igc_trigger_rxtxq_interrupt(struct igc_adapter *adapter,
6910-
struct igc_q_vector *q_vector)
6909+
static u32 igc_sw_irq_prep(struct igc_q_vector *q_vector)
69116910
{
6912-
struct igc_hw *hw = &adapter->hw;
69136911
u32 eics = 0;
69146912

6915-
eics |= q_vector->eims_value;
6916-
wr32(IGC_EICS, eics);
6913+
if (!napi_if_scheduled_mark_missed(&q_vector->napi))
6914+
eics = q_vector->eims_value;
6915+
6916+
return eics;
69176917
}
69186918

69196919
int igc_xsk_wakeup(struct net_device *dev, u32 queue_id, u32 flags)
69206920
{
69216921
struct igc_adapter *adapter = netdev_priv(dev);
6922-
struct igc_q_vector *q_vector;
6922+
struct igc_hw *hw = &adapter->hw;
69236923
struct igc_ring *ring;
6924+
u32 eics = 0;
69246925

69256926
if (test_bit(__IGC_DOWN, &adapter->state))
69266927
return -ENETDOWN;
69276928

69286929
if (!igc_xdp_is_enabled(adapter))
69296930
return -ENXIO;
6930-
6931+
/* Check if queue_id is valid. Tx and Rx queue numbers are always same */
69316932
if (queue_id >= adapter->num_rx_queues)
69326933
return -EINVAL;
69336934

@@ -6936,9 +6937,22 @@ int igc_xsk_wakeup(struct net_device *dev, u32 queue_id, u32 flags)
69366937
if (!ring->xsk_pool)
69376938
return -ENXIO;
69386939

6939-
q_vector = adapter->q_vector[queue_id];
6940-
if (!napi_if_scheduled_mark_missed(&q_vector->napi))
6941-
igc_trigger_rxtxq_interrupt(adapter, q_vector);
6940+
if (flags & XDP_WAKEUP_RX)
6941+
eics |= igc_sw_irq_prep(ring->q_vector);
6942+
6943+
if (flags & XDP_WAKEUP_TX) {
6944+
/* If IGC_FLAG_QUEUE_PAIRS is active, the q_vector
6945+
* and NAPI is shared between RX and TX.
6946+
* If NAPI is already running it would be marked as missed
6947+
* from the RX path, making this TX call a NOP
6948+
*/
6949+
ring = adapter->tx_ring[queue_id];
6950+
eics |= igc_sw_irq_prep(ring->q_vector);
6951+
}
6952+
6953+
if (eics)
6954+
/* Cause software interrupt */
6955+
wr32(IGC_EICS, eics);
69426956

69436957
return 0;
69446958
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,8 @@ static void igc_ptp_free_tx_buffer(struct igc_adapter *adapter,
550550
tstamp->buffer_type = 0;
551551

552552
/* Trigger txrx interrupt for transmit completion */
553-
igc_xsk_wakeup(adapter->netdev, tstamp->xsk_queue_index, 0);
553+
igc_xsk_wakeup(adapter->netdev, tstamp->xsk_queue_index,
554+
XDP_WAKEUP_TX);
554555

555556
return;
556557
}

drivers/net/ethernet/intel/libie/fwlog.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,6 +1049,10 @@ void libie_fwlog_deinit(struct libie_fwlog *fwlog)
10491049
{
10501050
int status;
10511051

1052+
/* if FW logging isn't supported it means no configuration was done */
1053+
if (!libie_fwlog_supported(fwlog))
1054+
return;
1055+
10521056
/* make sure FW logging is disabled to not put the FW in a weird state
10531057
* for the next driver load
10541058
*/

0 commit comments

Comments
 (0)