Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'intel-wired-lan-driver-updates-2025-11-25-ice-idpf-iavf-ixgbe-ixgbevf-e1000e'

Tony Nguyen says:

====================
Intel Wired LAN Driver Updates 2025-11-25 (ice, idpf, iavf, ixgbe, ixgbevf, e1000e)

Natalia cleans up ixgbevf_q_vector struct removing an unused field.

Emil converts vport state tracking from enum to bitmap and removes
unneeded states for idpf.

Tony removes an unneeded check from e1000e.

Alok Tiwari removes an unnecessary second call to
ixgbe_non_sfp_link_config() and adjusts the checked member, in idpf, to
reflect the member that is later used. He also fixes various typos and
messages for better clarity misc Intel drivers.
====================

Link: https://patch.msgid.link/20251125223632.1857532-1-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+47 -65
+1 -5
drivers/net/ethernet/intel/e1000e/ethtool.c
··· 551 551 { 552 552 struct e1000_adapter *adapter = netdev_priv(netdev); 553 553 struct e1000_hw *hw = &adapter->hw; 554 - size_t total_len, max_len; 555 554 u16 *eeprom_buff; 556 555 int ret_val = 0; 556 + size_t max_len; 557 557 int first_word; 558 558 int last_word; 559 559 void *ptr; ··· 570 570 return -EINVAL; 571 571 572 572 max_len = hw->nvm.word_size * 2; 573 - 574 - if (check_add_overflow(eeprom->offset, eeprom->len, &total_len) || 575 - total_len > max_len) 576 - return -EFBIG; 577 573 578 574 first_word = eeprom->offset >> 1; 579 575 last_word = (eeprom->offset + eeprom->len - 1) >> 1;
+8 -4
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c
··· 793 793 794 794 len = virtchnl_struct_size(vvfl, vlan_id, count); 795 795 if (len > IAVF_MAX_AQ_BUF_SIZE) { 796 - dev_warn(&adapter->pdev->dev, "Too many add VLAN changes in one request\n"); 796 + dev_info(&adapter->pdev->dev, 797 + "virtchnl: Too many VLAN add (v1) requests; splitting into multiple messages to PF\n"); 797 798 while (len > IAVF_MAX_AQ_BUF_SIZE) 798 799 len = virtchnl_struct_size(vvfl, vlan_id, 799 800 --count); ··· 839 838 840 839 len = virtchnl_struct_size(vvfl_v2, filters, count); 841 840 if (len > IAVF_MAX_AQ_BUF_SIZE) { 842 - dev_warn(&adapter->pdev->dev, "Too many add VLAN changes in one request\n"); 841 + dev_info(&adapter->pdev->dev, 842 + "virtchnl: Too many VLAN add (v2) requests; splitting into multiple messages to PF\n"); 843 843 while (len > IAVF_MAX_AQ_BUF_SIZE) 844 844 len = virtchnl_struct_size(vvfl_v2, filters, 845 845 --count); ··· 943 941 944 942 len = virtchnl_struct_size(vvfl, vlan_id, count); 945 943 if (len > IAVF_MAX_AQ_BUF_SIZE) { 946 - dev_warn(&adapter->pdev->dev, "Too many delete VLAN changes in one request\n"); 944 + dev_info(&adapter->pdev->dev, 945 + "virtchnl: Too many VLAN delete (v1) requests; splitting into multiple messages to PF\n"); 947 946 while (len > IAVF_MAX_AQ_BUF_SIZE) 948 947 len = virtchnl_struct_size(vvfl, vlan_id, 949 948 --count); ··· 990 987 991 988 len = virtchnl_struct_size(vvfl_v2, filters, count); 992 989 if (len > IAVF_MAX_AQ_BUF_SIZE) { 993 - dev_warn(&adapter->pdev->dev, "Too many add VLAN changes in one request\n"); 990 + dev_info(&adapter->pdev->dev, 991 + "virtchnl: Too many VLAN delete (v2) requests; splitting into multiple messages to PF\n"); 994 992 while (len > IAVF_MAX_AQ_BUF_SIZE) 995 993 len = virtchnl_struct_size(vvfl_v2, filters, 996 994 --count);
+1 -1
drivers/net/ethernet/intel/ice/ice_fdir.c
··· 1121 1121 * ice_fdir_has_frag - does flow type have 2 ptypes 1122 1122 * @flow: flow ptype 1123 1123 * 1124 - * returns true is there is a fragment packet for this ptype 1124 + * Return: true if there is a fragment packet for this ptype 1125 1125 */ 1126 1126 bool ice_fdir_has_frag(enum ice_fltr_ptype flow) 1127 1127 {
+1 -1
drivers/net/ethernet/intel/ice/ice_fw_update.c
··· 534 534 } 535 535 536 536 if (completion_retval) { 537 - dev_err(dev, "Firmware failed to erase %s (module 0x02%x), aq_err %s\n", 537 + dev_err(dev, "Firmware failed to erase %s (module 0x%02x), aq_err %s\n", 538 538 component, module, 539 539 libie_aq_str((enum libie_aq_err)completion_retval)); 540 540 NL_SET_ERR_MSG_MOD(extack, "Firmware failed to erase flash");
+5 -7
drivers/net/ethernet/intel/idpf/idpf.h
··· 131 131 132 132 /** 133 133 * enum idpf_vport_state - Current vport state 134 - * @__IDPF_VPORT_DOWN: Vport is down 135 - * @__IDPF_VPORT_UP: Vport is up 136 - * @__IDPF_VPORT_STATE_LAST: Must be last, number of states 134 + * @IDPF_VPORT_UP: Vport is up 135 + * @IDPF_VPORT_STATE_NBITS: Must be last, number of states 137 136 */ 138 137 enum idpf_vport_state { 139 - __IDPF_VPORT_DOWN, 140 - __IDPF_VPORT_UP, 141 - __IDPF_VPORT_STATE_LAST, 138 + IDPF_VPORT_UP, 139 + IDPF_VPORT_STATE_NBITS 142 140 }; 143 141 144 142 /** ··· 160 162 u16 vport_idx; 161 163 u16 max_tx_hdr_size; 162 164 u16 tx_max_bufs; 163 - enum idpf_vport_state state; 165 + DECLARE_BITMAP(state, IDPF_VPORT_STATE_NBITS); 164 166 struct rtnl_link_stats64 netstats; 165 167 spinlock_t stats_lock; 166 168 };
+6 -6
drivers/net/ethernet/intel/idpf/idpf_ethtool.c
··· 402 402 } 403 403 404 404 rss_data = &adapter->vport_config[np->vport_idx]->user_config.rss_data; 405 - if (np->state != __IDPF_VPORT_UP) 405 + if (!test_bit(IDPF_VPORT_UP, np->state)) 406 406 goto unlock_mutex; 407 407 408 408 rxfh->hfunc = ETH_RSS_HASH_TOP; ··· 452 452 } 453 453 454 454 rss_data = &adapter->vport_config[vport->idx]->user_config.rss_data; 455 - if (np->state != __IDPF_VPORT_UP) 455 + if (!test_bit(IDPF_VPORT_UP, np->state)) 456 456 goto unlock_mutex; 457 457 458 458 if (rxfh->hfunc != ETH_RSS_HASH_NO_CHANGE && ··· 1183 1183 idpf_vport_ctrl_lock(netdev); 1184 1184 vport = idpf_netdev_to_vport(netdev); 1185 1185 1186 - if (np->state != __IDPF_VPORT_UP) { 1186 + if (!test_bit(IDPF_VPORT_UP, np->state)) { 1187 1187 idpf_vport_ctrl_unlock(netdev); 1188 1188 1189 1189 return; ··· 1335 1335 idpf_vport_ctrl_lock(netdev); 1336 1336 vport = idpf_netdev_to_vport(netdev); 1337 1337 1338 - if (np->state != __IDPF_VPORT_UP) 1338 + if (!test_bit(IDPF_VPORT_UP, np->state)) 1339 1339 goto unlock_mutex; 1340 1340 1341 1341 if (q_num >= vport->num_rxq && q_num >= vport->num_txq) { ··· 1523 1523 idpf_vport_ctrl_lock(netdev); 1524 1524 vport = idpf_netdev_to_vport(netdev); 1525 1525 1526 - if (np->state != __IDPF_VPORT_UP) 1526 + if (!test_bit(IDPF_VPORT_UP, np->state)) 1527 1527 goto unlock_mutex; 1528 1528 1529 1529 for (i = 0; i < vport->num_txq; i++) { ··· 1726 1726 ts_stats->err = u64_stats_read(&vport->tstamp_stats.discarded); 1727 1727 } while (u64_stats_fetch_retry(&vport->tstamp_stats.stats_sync, start)); 1728 1728 1729 - if (np->state != __IDPF_VPORT_UP) 1729 + if (!test_bit(IDPF_VPORT_UP, np->state)) 1730 1730 goto exit; 1731 1731 1732 1732 for (u16 i = 0; i < vport->num_txq_grp; i++) {
+12 -12
drivers/net/ethernet/intel/idpf/idpf_lib.c
··· 519 519 } 520 520 spin_unlock_bh(&vport_config->mac_filter_list_lock); 521 521 522 - if (np->state == __IDPF_VPORT_UP) { 522 + if (test_bit(IDPF_VPORT_UP, np->state)) { 523 523 int err; 524 524 525 525 err = idpf_add_del_mac_filters(vport, np, false, async); ··· 590 590 if (err) 591 591 return err; 592 592 593 - if (np->state == __IDPF_VPORT_UP) 593 + if (test_bit(IDPF_VPORT_UP, np->state)) 594 594 err = idpf_add_del_mac_filters(vport, np, true, async); 595 595 596 596 return err; ··· 894 894 { 895 895 struct idpf_netdev_priv *np = netdev_priv(vport->netdev); 896 896 897 - if (np->state <= __IDPF_VPORT_DOWN) 897 + if (!test_bit(IDPF_VPORT_UP, np->state)) 898 898 return; 899 899 900 900 if (rtnl) ··· 921 921 idpf_xdp_rxq_info_deinit_all(vport); 922 922 idpf_vport_queues_rel(vport); 923 923 idpf_vport_intr_rel(vport); 924 - np->state = __IDPF_VPORT_DOWN; 924 + clear_bit(IDPF_VPORT_UP, np->state); 925 925 926 926 if (rtnl) 927 927 rtnl_unlock(); ··· 1345 1345 netif_tx_start_all_queues(vport->netdev); 1346 1346 } 1347 1347 1348 - np->state = __IDPF_VPORT_UP; 1348 + set_bit(IDPF_VPORT_UP, np->state); 1349 1349 1350 1350 return 0; 1351 1351 } ··· 1391 1391 struct idpf_vport_config *vport_config; 1392 1392 int err; 1393 1393 1394 - if (np->state != __IDPF_VPORT_DOWN) 1394 + if (test_bit(IDPF_VPORT_UP, np->state)) 1395 1395 return -EBUSY; 1396 1396 1397 1397 if (rtnl) ··· 1602 1602 1603 1603 /* Once state is put into DOWN, driver is ready for dev_open */ 1604 1604 np = netdev_priv(vport->netdev); 1605 - np->state = __IDPF_VPORT_DOWN; 1605 + clear_bit(IDPF_VPORT_UP, np->state); 1606 1606 if (test_and_clear_bit(IDPF_VPORT_UP_REQUESTED, vport_config->flags)) 1607 1607 idpf_vport_open(vport, true); 1608 1608 ··· 1801 1801 continue; 1802 1802 1803 1803 np = netdev_priv(adapter->netdevs[i]); 1804 - if (np->state == __IDPF_VPORT_UP) 1804 + if (test_bit(IDPF_VPORT_UP, np->state)) 1805 1805 set_bit(IDPF_VPORT_UP_REQUESTED, 1806 1806 adapter->vport_config[i]->flags); 1807 1807 } ··· 1939 1939 enum idpf_vport_reset_cause reset_cause) 1940 1940 { 1941 1941 struct idpf_netdev_priv *np = netdev_priv(vport->netdev); 1942 - enum idpf_vport_state current_state = np->state; 1942 + bool vport_is_up = test_bit(IDPF_VPORT_UP, np->state); 1943 1943 struct idpf_adapter *adapter = vport->adapter; 1944 1944 struct idpf_vport *new_vport; 1945 1945 int err; ··· 1990 1990 goto free_vport; 1991 1991 } 1992 1992 1993 - if (current_state <= __IDPF_VPORT_DOWN) { 1993 + if (!vport_is_up) { 1994 1994 idpf_send_delete_queues_msg(vport); 1995 1995 } else { 1996 1996 set_bit(IDPF_VPORT_DEL_QUEUES, vport->flags); ··· 2023 2023 if (err) 2024 2024 goto err_open; 2025 2025 2026 - if (current_state == __IDPF_VPORT_UP) 2026 + if (vport_is_up) 2027 2027 err = idpf_vport_open(vport, false); 2028 2028 2029 2029 goto free_vport; ··· 2033 2033 vport->num_rxq, vport->num_bufq); 2034 2034 2035 2035 err_open: 2036 - if (current_state == __IDPF_VPORT_UP) 2036 + if (vport_is_up) 2037 2037 idpf_vport_open(vport, false); 2038 2038 2039 2039 free_vport:
+1 -1
drivers/net/ethernet/intel/idpf/idpf_singleq_txrx.c
··· 570 570 np = netdev_priv(tx_q->netdev); 571 571 nq = netdev_get_tx_queue(tx_q->netdev, tx_q->idx); 572 572 573 - dont_wake = np->state != __IDPF_VPORT_UP || 573 + dont_wake = !test_bit(IDPF_VPORT_UP, np->state) || 574 574 !netif_carrier_ok(tx_q->netdev); 575 575 __netif_txq_completed_wake(nq, ss.packets, ss.bytes, 576 576 IDPF_DESC_UNUSED(tx_q), IDPF_TX_WAKE_THRESH,
+6 -6
drivers/net/ethernet/intel/idpf/idpf_txrx.c
··· 134 134 { 135 135 idpf_xsk_clear_queue(complq, VIRTCHNL2_QUEUE_TYPE_TX_COMPLETION); 136 136 137 - if (!complq->comp) 137 + if (!complq->desc_ring) 138 138 return; 139 139 140 140 dma_free_coherent(complq->netdev->dev.parent, complq->size, ··· 922 922 err = idpf_rx_desc_alloc(vport, q); 923 923 if (err) { 924 924 pci_err(vport->adapter->pdev, 925 - "Memory allocation for Rx Queue %u failed\n", 926 - i); 925 + "Memory allocation for Rx queue %u from queue group %u failed\n", 926 + j, i); 927 927 goto err_out; 928 928 } 929 929 } ··· 939 939 err = idpf_bufq_desc_alloc(vport, q); 940 940 if (err) { 941 941 pci_err(vport->adapter->pdev, 942 - "Memory allocation for Rx Buffer Queue %u failed\n", 943 - i); 942 + "Memory allocation for Rx Buffer Queue %u from queue group %u failed\n", 943 + j, i); 944 944 goto err_out; 945 945 } 946 946 } ··· 2275 2275 /* Update BQL */ 2276 2276 nq = netdev_get_tx_queue(tx_q->netdev, tx_q->idx); 2277 2277 2278 - dont_wake = !complq_ok || np->state != __IDPF_VPORT_UP || 2278 + dont_wake = !complq_ok || !test_bit(IDPF_VPORT_UP, np->state) || 2279 2279 !netif_carrier_ok(tx_q->netdev); 2280 2280 /* Check if the TXQ needs to and can be restarted */ 2281 2281 __netif_txq_completed_wake(nq, tx_q->cleaned_pkts, tx_q->cleaned_bytes,
+2 -2
drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
··· 68 68 69 69 vport->link_up = v2e->link_status; 70 70 71 - if (np->state != __IDPF_VPORT_UP) 71 + if (!test_bit(IDPF_VPORT_UP, np->state)) 72 72 return; 73 73 74 74 if (vport->link_up) { ··· 2755 2755 2756 2756 2757 2757 /* Don't send get_stats message if the link is down */ 2758 - if (np->state <= __IDPF_VPORT_DOWN) 2758 + if (!test_bit(IDPF_VPORT_UP, np->state)) 2759 2759 return 0; 2760 2760 2761 2761 stats_msg.vport_id = cpu_to_le32(vport->vport_id);
+1 -1
drivers/net/ethernet/intel/idpf/xdp.c
··· 418 418 if (test_bit(IDPF_REMOVE_IN_PROG, vport->adapter->flags) || 419 419 !test_bit(IDPF_VPORT_REG_NETDEV, cfg->flags) || 420 420 !!vport->xdp_prog == !!prog) { 421 - if (np->state == __IDPF_VPORT_UP) 421 + if (test_bit(IDPF_VPORT_UP, np->state)) 422 422 idpf_xdp_copy_prog_to_rqs(vport, prog); 423 423 424 424 old = xchg(&vport->xdp_prog, prog);
+2 -2
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
··· 7449 7449 adapter->hw.link.link_info.link_cfg_err); 7450 7450 7451 7451 err = ixgbe_non_sfp_link_config(&adapter->hw); 7452 - if (ixgbe_non_sfp_link_config(&adapter->hw)) 7452 + if (err) 7453 7453 e_dev_err("Link setup failed, err %d.\n", err); 7454 7454 } 7455 7455 ··· 12046 12046 * @pdev: PCI device information struct 12047 12047 * 12048 12048 * ixgbe_remove is called by the PCI subsystem to alert the driver 12049 - * that it should release a PCI device. The could be caused by a 12049 + * that it should release a PCI device. This could be caused by a 12050 12050 * Hot-Plug event, or because the driver is going to be removed from 12051 12051 * memory. 12052 12052 **/
+1 -17
drivers/net/ethernet/intel/ixgbevf/ixgbevf.h
··· 241 241 char name[IFNAMSIZ + 9]; 242 242 243 243 /* for dynamic allocation of rings associated with this q_vector */ 244 - struct ixgbevf_ring ring[0] ____cacheline_internodealigned_in_smp; 245 - #ifdef CONFIG_NET_RX_BUSY_POLL 246 - unsigned int state; 247 - #define IXGBEVF_QV_STATE_IDLE 0 248 - #define IXGBEVF_QV_STATE_NAPI 1 /* NAPI owns this QV */ 249 - #define IXGBEVF_QV_STATE_POLL 2 /* poll owns this QV */ 250 - #define IXGBEVF_QV_STATE_DISABLED 4 /* QV is disabled */ 251 - #define IXGBEVF_QV_OWNED (IXGBEVF_QV_STATE_NAPI | IXGBEVF_QV_STATE_POLL) 252 - #define IXGBEVF_QV_LOCKED (IXGBEVF_QV_OWNED | IXGBEVF_QV_STATE_DISABLED) 253 - #define IXGBEVF_QV_STATE_NAPI_YIELD 8 /* NAPI yielded this QV */ 254 - #define IXGBEVF_QV_STATE_POLL_YIELD 16 /* poll yielded this QV */ 255 - #define IXGBEVF_QV_YIELD (IXGBEVF_QV_STATE_NAPI_YIELD | \ 256 - IXGBEVF_QV_STATE_POLL_YIELD) 257 - #define IXGBEVF_QV_USER_PEND (IXGBEVF_QV_STATE_POLL | \ 258 - IXGBEVF_QV_STATE_POLL_YIELD) 259 - spinlock_t lock; 260 - #endif /* CONFIG_NET_RX_BUSY_POLL */ 244 + struct ixgbevf_ring ring[] ____cacheline_internodealigned_in_smp; 261 245 }; 262 246 263 247 /* microsecond values for various ITR rates shifted by 2 to fit itr register