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-10-15-ice-iavf-ixgbe-i40e-e1000e'

Jacob Keller says:

====================
Intel Wired LAN Driver Updates 2025-10-15 (ice, iavf, ixgbe, i40e, e1000e) [part]

Jacob revives one-year-old work from Jesse Brandeburg to implement the
standardized statistics interfaces from ethtool in the ice driver.

Vitaly introduces a new private flag to control the K1 power state of ICH
network controllers supported by the e1000e driver. This flag has been
extensively discussed on the list and deemed the best available option to
provide a field workaround without impacting the many configurations that
have no issues with the K1 power state.
====================

Link: https://patch.msgid.link/20251016-jk-iwl-next-2025-10-15-v2-0-ff3a390d9fc6@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+205 -78
+3 -1
Documentation/networking/statistics.rst
··· 184 184 the `ETHTOOL_FLAG_STATS` flag in `ETHTOOL_A_HEADER_FLAGS`. Currently 185 185 statistics are supported in the following commands: 186 186 187 - - `ETHTOOL_MSG_PAUSE_GET` 188 187 - `ETHTOOL_MSG_FEC_GET` 188 + - `ETHTOOL_MSG_LINKSTATE_GET` 189 189 - `ETHTOOL_MSG_MM_GET` 190 + - `ETHTOOL_MSG_PAUSE_GET` 191 + - `ETHTOOL_MSG_TSINFO_GET` 190 192 191 193 debugfs 192 194 -------
+1
drivers/net/ethernet/intel/e1000e/e1000.h
··· 461 461 #define FLAG2_CHECK_RX_HWTSTAMP BIT(13) 462 462 #define FLAG2_CHECK_SYSTIM_OVERFLOW BIT(14) 463 463 #define FLAG2_ENABLE_S0IX_FLOWS BIT(15) 464 + #define FLAG2_DISABLE_K1 BIT(16) 464 465 465 466 #define E1000_RX_DESC_PS(R, i) \ 466 467 (&(((union e1000_rx_desc_packet_split *)((R).desc))[i]))
+40 -5
drivers/net/ethernet/intel/e1000e/ethtool.c
··· 26 26 static const char e1000e_priv_flags_strings[][ETH_GSTRING_LEN] = { 27 27 #define E1000E_PRIV_FLAGS_S0IX_ENABLED BIT(0) 28 28 "s0ix-enabled", 29 + #define E1000E_PRIV_FLAGS_DISABLE_K1 BIT(1) 30 + "disable-k1", 29 31 }; 30 32 31 33 #define E1000E_PRIV_FLAGS_STR_LEN ARRAY_SIZE(e1000e_priv_flags_strings) ··· 2303 2301 if (adapter->flags2 & FLAG2_ENABLE_S0IX_FLOWS) 2304 2302 priv_flags |= E1000E_PRIV_FLAGS_S0IX_ENABLED; 2305 2303 2304 + if (adapter->flags2 & FLAG2_DISABLE_K1) 2305 + priv_flags |= E1000E_PRIV_FLAGS_DISABLE_K1; 2306 + 2306 2307 return priv_flags; 2307 2308 } 2308 2309 2309 2310 static int e1000e_set_priv_flags(struct net_device *netdev, u32 priv_flags) 2310 2311 { 2311 2312 struct e1000_adapter *adapter = netdev_priv(netdev); 2313 + struct e1000_hw *hw = &adapter->hw; 2312 2314 unsigned int flags2 = adapter->flags2; 2315 + unsigned int changed; 2313 2316 2314 - flags2 &= ~FLAG2_ENABLE_S0IX_FLOWS; 2317 + flags2 &= ~(FLAG2_ENABLE_S0IX_FLOWS | FLAG2_DISABLE_K1); 2318 + 2315 2319 if (priv_flags & E1000E_PRIV_FLAGS_S0IX_ENABLED) { 2316 - struct e1000_hw *hw = &adapter->hw; 2317 - 2318 - if (hw->mac.type < e1000_pch_cnp) 2320 + if (hw->mac.type < e1000_pch_cnp) { 2321 + e_err("S0ix is not supported on this device\n"); 2319 2322 return -EINVAL; 2323 + } 2324 + 2320 2325 flags2 |= FLAG2_ENABLE_S0IX_FLOWS; 2321 2326 } 2322 2327 2323 - if (flags2 != adapter->flags2) 2328 + if (priv_flags & E1000E_PRIV_FLAGS_DISABLE_K1) { 2329 + if (hw->mac.type < e1000_ich8lan) { 2330 + e_err("Disabling K1 is not supported on this device\n"); 2331 + return -EINVAL; 2332 + } 2333 + 2334 + flags2 |= FLAG2_DISABLE_K1; 2335 + } 2336 + 2337 + changed = adapter->flags2 ^ flags2; 2338 + if (changed) 2324 2339 adapter->flags2 = flags2; 2340 + 2341 + if (changed & FLAG2_DISABLE_K1) { 2342 + /* reset the hardware to apply the changes */ 2343 + while (test_and_set_bit(__E1000_RESETTING, 2344 + &adapter->state)) 2345 + usleep_range(1000, 2000); 2346 + 2347 + if (netif_running(adapter->netdev)) { 2348 + e1000e_down(adapter, true); 2349 + e1000e_up(adapter); 2350 + } else { 2351 + e1000e_reset(adapter); 2352 + } 2353 + 2354 + clear_bit(__E1000_RESETTING, &adapter->state); 2355 + } 2325 2356 2326 2357 return 0; 2327 2358 }
+23 -18
drivers/net/ethernet/intel/e1000e/ich8lan.c
··· 286 286 } 287 287 288 288 /** 289 - * e1000_reconfigure_k1_exit_timeout - reconfigure K1 exit timeout to 290 - * align to MTP and later platform requirements. 289 + * e1000_reconfigure_k1_params - reconfigure Kumeran K1 parameters. 291 290 * @hw: pointer to the HW structure 291 + * 292 + * By default K1 is enabled after MAC reset, so this function only 293 + * disables it. 292 294 * 293 295 * Context: PHY semaphore must be held by caller. 294 296 * Return: 0 on success, negative on failure 295 297 */ 296 - static s32 e1000_reconfigure_k1_exit_timeout(struct e1000_hw *hw) 298 + static s32 e1000_reconfigure_k1_params(struct e1000_hw *hw) 297 299 { 298 300 u16 phy_timeout; 299 301 u32 fextnvm12; 300 302 s32 ret_val; 301 303 302 - if (hw->mac.type < e1000_pch_mtp) 304 + if (hw->mac.type < e1000_pch_mtp) { 305 + if (hw->adapter->flags2 & FLAG2_DISABLE_K1) 306 + return e1000_configure_k1_ich8lan(hw, false); 303 307 return 0; 308 + } 304 309 305 310 /* Change Kumeran K1 power down state from P0s to P1 */ 306 311 fextnvm12 = er32(FEXTNVM12); ··· 315 310 316 311 /* Wait for the interface the settle */ 317 312 usleep_range(1000, 1100); 313 + if (hw->adapter->flags2 & FLAG2_DISABLE_K1) 314 + return e1000_configure_k1_ich8lan(hw, false); 318 315 319 316 /* Change K1 exit timeout */ 320 317 ret_val = e1e_rphy_locked(hw, I217_PHY_TIMEOUTS_REG, ··· 380 373 /* At this point the PHY might be inaccessible so don't 381 374 * propagate the failure 382 375 */ 383 - if (e1000_reconfigure_k1_exit_timeout(hw)) 384 - e_dbg("Failed to reconfigure K1 exit timeout\n"); 376 + if (e1000_reconfigure_k1_params(hw)) 377 + e_dbg("Failed to reconfigure K1 parameters\n"); 385 378 386 379 fallthrough; 387 380 case e1000_pch_lpt: ··· 480 473 if (hw->mac.type >= e1000_pch_mtp) { 481 474 ret_val = hw->phy.ops.acquire(hw); 482 475 if (ret_val) { 483 - e_err("Failed to reconfigure K1 exit timeout\n"); 476 + e_err("Failed to reconfigure K1 parameters\n"); 484 477 goto out; 485 478 } 486 - ret_val = e1000_reconfigure_k1_exit_timeout(hw); 479 + ret_val = e1000_reconfigure_k1_params(hw); 487 480 hw->phy.ops.release(hw); 488 481 } 489 482 } ··· 4955 4948 u16 i; 4956 4949 4957 4950 e1000_initialize_hw_bits_ich8lan(hw); 4958 - if (hw->mac.type >= e1000_pch_mtp) { 4959 - ret_val = hw->phy.ops.acquire(hw); 4960 - if (ret_val) 4961 - return ret_val; 4951 + ret_val = hw->phy.ops.acquire(hw); 4952 + if (ret_val) 4953 + return ret_val; 4962 4954 4963 - ret_val = e1000_reconfigure_k1_exit_timeout(hw); 4964 - hw->phy.ops.release(hw); 4965 - if (ret_val) { 4966 - e_dbg("Error failed to reconfigure K1 exit timeout\n"); 4967 - return ret_val; 4968 - } 4955 + ret_val = e1000_reconfigure_k1_params(hw); 4956 + hw->phy.ops.release(hw); 4957 + if (ret_val) { 4958 + e_dbg("Error failed to reconfigure K1 parameters\n"); 4959 + return ret_val; 4969 4960 } 4970 4961 4971 4962 /* Initialize identification LED */
+3
drivers/net/ethernet/intel/e1000e/netdev.c
··· 7675 7675 /* init PTP hardware clock */ 7676 7676 e1000e_ptp_init(adapter); 7677 7677 7678 + if (hw->mac.type >= e1000_pch_mtp) 7679 + adapter->flags2 |= FLAG2_DISABLE_K1; 7680 + 7678 7681 /* reset the hardware with the new settings */ 7679 7682 e1000e_reset(adapter); 7680 7683
+111 -33
drivers/net/ethernet/intel/ice/ice_ethtool.c
··· 794 794 static void 795 795 ice_get_regs(struct net_device *netdev, struct ethtool_regs *regs, void *p) 796 796 { 797 - struct ice_netdev_priv *np = netdev_priv(netdev); 798 - struct ice_pf *pf = np->vsi->back; 797 + struct ice_pf *pf = ice_netdev_to_pf(netdev); 799 798 struct ice_hw *hw = &pf->hw; 800 799 u32 *regs_buf = (u32 *)p; 801 800 unsigned int i; ··· 809 810 810 811 static u32 ice_get_msglevel(struct net_device *netdev) 811 812 { 812 - struct ice_netdev_priv *np = netdev_priv(netdev); 813 - struct ice_pf *pf = np->vsi->back; 813 + struct ice_pf *pf = ice_netdev_to_pf(netdev); 814 814 815 815 #ifndef CONFIG_DYNAMIC_DEBUG 816 816 if (pf->hw.debug_mask) ··· 822 824 823 825 static void ice_set_msglevel(struct net_device *netdev, u32 data) 824 826 { 825 - struct ice_netdev_priv *np = netdev_priv(netdev); 826 - struct ice_pf *pf = np->vsi->back; 827 + struct ice_pf *pf = ice_netdev_to_pf(netdev); 827 828 828 829 #ifndef CONFIG_DYNAMIC_DEBUG 829 830 if (ICE_DBG_USER & data) ··· 837 840 static void ice_get_link_ext_stats(struct net_device *netdev, 838 841 struct ethtool_link_ext_stats *stats) 839 842 { 840 - struct ice_netdev_priv *np = netdev_priv(netdev); 841 - struct ice_pf *pf = np->vsi->back; 843 + struct ice_pf *pf = ice_netdev_to_pf(netdev); 842 844 843 845 stats->link_down_events = pf->link_down_events; 844 846 } 845 847 846 848 static int ice_get_eeprom_len(struct net_device *netdev) 847 849 { 848 - struct ice_netdev_priv *np = netdev_priv(netdev); 849 - struct ice_pf *pf = np->vsi->back; 850 + struct ice_pf *pf = ice_netdev_to_pf(netdev); 850 851 851 852 return (int)pf->hw.flash.flash_size; 852 853 } ··· 853 858 ice_get_eeprom(struct net_device *netdev, struct ethtool_eeprom *eeprom, 854 859 u8 *bytes) 855 860 { 856 - struct ice_netdev_priv *np = netdev_priv(netdev); 857 - struct ice_vsi *vsi = np->vsi; 858 - struct ice_pf *pf = vsi->back; 861 + struct ice_pf *pf = ice_netdev_to_pf(netdev); 859 862 struct ice_hw *hw = &pf->hw; 860 863 struct device *dev; 861 864 int ret; ··· 952 959 */ 953 960 static u64 ice_eeprom_test(struct net_device *netdev) 954 961 { 955 - struct ice_netdev_priv *np = netdev_priv(netdev); 956 - struct ice_pf *pf = np->vsi->back; 962 + struct ice_pf *pf = ice_netdev_to_pf(netdev); 957 963 958 964 netdev_info(netdev, "EEPROM test\n"); 959 965 return !!(ice_nvm_validate_checksum(&pf->hw)); ··· 1266 1274 */ 1267 1275 static u64 ice_loopback_test(struct net_device *netdev) 1268 1276 { 1269 - struct ice_netdev_priv *np = netdev_priv(netdev); 1270 - struct ice_vsi *orig_vsi = np->vsi, *test_vsi; 1271 - struct ice_pf *pf = orig_vsi->back; 1277 + struct ice_pf *pf = ice_netdev_to_pf(netdev); 1278 + struct ice_vsi *test_vsi; 1272 1279 u8 *tx_frame __free(kfree) = NULL; 1273 1280 u8 broadcast[ETH_ALEN], ret = 0; 1274 1281 int num_frames, valid_frames; ··· 1356 1365 */ 1357 1366 static u64 ice_intr_test(struct net_device *netdev) 1358 1367 { 1359 - struct ice_netdev_priv *np = netdev_priv(netdev); 1360 - struct ice_pf *pf = np->vsi->back; 1368 + struct ice_pf *pf = ice_netdev_to_pf(netdev); 1361 1369 u16 swic_old = pf->sw_int_count; 1362 1370 1363 1371 netdev_info(netdev, "interrupt test\n"); ··· 1384 1394 ice_self_test(struct net_device *netdev, struct ethtool_test *eth_test, 1385 1395 u64 *data) 1386 1396 { 1387 - struct ice_netdev_priv *np = netdev_priv(netdev); 1397 + struct ice_pf *pf = ice_netdev_to_pf(netdev); 1388 1398 bool if_running = netif_running(netdev); 1389 - struct ice_pf *pf = np->vsi->back; 1390 1399 struct device *dev; 1391 1400 1392 1401 dev = ice_pf_to_dev(pf); ··· 1709 1720 */ 1710 1721 static u32 ice_get_priv_flags(struct net_device *netdev) 1711 1722 { 1712 - struct ice_netdev_priv *np = netdev_priv(netdev); 1713 - struct ice_vsi *vsi = np->vsi; 1714 - struct ice_pf *pf = vsi->back; 1723 + struct ice_pf *pf = ice_netdev_to_pf(netdev); 1715 1724 u32 i, ret_flags = 0; 1716 1725 1717 1726 for (i = 0; i < ICE_PRIV_FLAG_ARRAY_SIZE; i++) { ··· 4404 4417 ice_get_module_info(struct net_device *netdev, 4405 4418 struct ethtool_modinfo *modinfo) 4406 4419 { 4407 - struct ice_netdev_priv *np = netdev_priv(netdev); 4408 - struct ice_vsi *vsi = np->vsi; 4409 - struct ice_pf *pf = vsi->back; 4420 + struct ice_pf *pf = ice_netdev_to_pf(netdev); 4410 4421 struct ice_hw *hw = &pf->hw; 4411 4422 u8 sff8472_comp = 0; 4412 4423 u8 sff8472_swap = 0; ··· 4476 4491 ice_get_module_eeprom(struct net_device *netdev, 4477 4492 struct ethtool_eeprom *ee, u8 *data) 4478 4493 { 4479 - struct ice_netdev_priv *np = netdev_priv(netdev); 4494 + struct ice_pf *pf = ice_netdev_to_pf(netdev); 4480 4495 #define SFF_READ_BLOCK_SIZE 8 4481 4496 u8 value[SFF_READ_BLOCK_SIZE] = { 0 }; 4482 4497 u8 addr = ICE_I2C_EEPROM_DEV_ADDR; 4483 - struct ice_vsi *vsi = np->vsi; 4484 - struct ice_pf *pf = vsi->back; 4485 4498 struct ice_hw *hw = &pf->hw; 4486 4499 bool is_sfp = false; 4487 4500 unsigned int i, j; ··· 4644 4661 pi->lport, err); 4645 4662 } 4646 4663 4664 + static void ice_get_eth_mac_stats(struct net_device *netdev, 4665 + struct ethtool_eth_mac_stats *mac_stats) 4666 + { 4667 + struct ice_pf *pf = ice_netdev_to_pf(netdev); 4668 + struct ice_hw_port_stats *ps = &pf->stats; 4669 + 4670 + mac_stats->FramesTransmittedOK = ps->eth.tx_unicast + 4671 + ps->eth.tx_multicast + 4672 + ps->eth.tx_broadcast; 4673 + mac_stats->FramesReceivedOK = ps->eth.rx_unicast + 4674 + ps->eth.rx_multicast + 4675 + ps->eth.rx_broadcast; 4676 + mac_stats->FrameCheckSequenceErrors = ps->crc_errors; 4677 + mac_stats->OctetsTransmittedOK = ps->eth.tx_bytes; 4678 + mac_stats->OctetsReceivedOK = ps->eth.rx_bytes; 4679 + mac_stats->MulticastFramesXmittedOK = ps->eth.tx_multicast; 4680 + mac_stats->BroadcastFramesXmittedOK = ps->eth.tx_broadcast; 4681 + mac_stats->MulticastFramesReceivedOK = ps->eth.rx_multicast; 4682 + mac_stats->BroadcastFramesReceivedOK = ps->eth.rx_broadcast; 4683 + mac_stats->InRangeLengthErrors = ps->rx_len_errors; 4684 + mac_stats->FrameTooLongErrors = ps->rx_oversize; 4685 + } 4686 + 4687 + static void ice_get_pause_stats(struct net_device *netdev, 4688 + struct ethtool_pause_stats *pause_stats) 4689 + { 4690 + struct ice_pf *pf = ice_netdev_to_pf(netdev); 4691 + struct ice_hw_port_stats *ps = &pf->stats; 4692 + 4693 + pause_stats->tx_pause_frames = ps->link_xon_tx + ps->link_xoff_tx; 4694 + pause_stats->rx_pause_frames = ps->link_xon_rx + ps->link_xoff_rx; 4695 + } 4696 + 4697 + static const struct ethtool_rmon_hist_range ice_rmon_ranges[] = { 4698 + { 0, 64 }, 4699 + { 65, 127 }, 4700 + { 128, 255 }, 4701 + { 256, 511 }, 4702 + { 512, 1023 }, 4703 + { 1024, 1522 }, 4704 + { 1523, 9522 }, 4705 + {} 4706 + }; 4707 + 4708 + static void ice_get_rmon_stats(struct net_device *netdev, 4709 + struct ethtool_rmon_stats *rmon, 4710 + const struct ethtool_rmon_hist_range **ranges) 4711 + { 4712 + struct ice_pf *pf = ice_netdev_to_pf(netdev); 4713 + struct ice_hw_port_stats *ps = &pf->stats; 4714 + 4715 + rmon->undersize_pkts = ps->rx_undersize; 4716 + rmon->oversize_pkts = ps->rx_oversize; 4717 + rmon->fragments = ps->rx_fragments; 4718 + rmon->jabbers = ps->rx_jabber; 4719 + 4720 + rmon->hist[0] = ps->rx_size_64; 4721 + rmon->hist[1] = ps->rx_size_127; 4722 + rmon->hist[2] = ps->rx_size_255; 4723 + rmon->hist[3] = ps->rx_size_511; 4724 + rmon->hist[4] = ps->rx_size_1023; 4725 + rmon->hist[5] = ps->rx_size_1522; 4726 + rmon->hist[6] = ps->rx_size_big; 4727 + 4728 + rmon->hist_tx[0] = ps->tx_size_64; 4729 + rmon->hist_tx[1] = ps->tx_size_127; 4730 + rmon->hist_tx[2] = ps->tx_size_255; 4731 + rmon->hist_tx[3] = ps->tx_size_511; 4732 + rmon->hist_tx[4] = ps->tx_size_1023; 4733 + rmon->hist_tx[5] = ps->tx_size_1522; 4734 + rmon->hist_tx[6] = ps->tx_size_big; 4735 + 4736 + *ranges = ice_rmon_ranges; 4737 + } 4738 + 4739 + /* ice_get_ts_stats - provide timestamping stats 4740 + * @netdev: the netdevice pointer from ethtool 4741 + * @ts_stats: the ethtool data structure to fill in 4742 + */ 4743 + static void ice_get_ts_stats(struct net_device *netdev, 4744 + struct ethtool_ts_stats *ts_stats) 4745 + { 4746 + struct ice_pf *pf = ice_netdev_to_pf(netdev); 4747 + struct ice_ptp *ptp = &pf->ptp; 4748 + 4749 + ts_stats->pkts = ptp->tx_hwtstamp_good; 4750 + ts_stats->err = ptp->tx_hwtstamp_skipped + 4751 + ptp->tx_hwtstamp_flushed + 4752 + ptp->tx_hwtstamp_discarded; 4753 + ts_stats->lost = ptp->tx_hwtstamp_timeouts; 4754 + } 4755 + 4647 4756 #define ICE_ETHTOOL_PFR (ETH_RESET_IRQ | ETH_RESET_DMA | \ 4648 4757 ETH_RESET_FILTER | ETH_RESET_OFFLOAD) 4649 4758 ··· 4757 4682 */ 4758 4683 static int ice_ethtool_reset(struct net_device *dev, u32 *flags) 4759 4684 { 4760 - struct ice_netdev_priv *np = netdev_priv(dev); 4761 - struct ice_pf *pf = np->vsi->back; 4685 + struct ice_pf *pf = ice_netdev_to_pf(dev); 4762 4686 enum ice_reset_req reset; 4763 4687 4764 4688 switch (*flags) { ··· 4818 4744 .get_link_ksettings = ice_get_link_ksettings, 4819 4745 .set_link_ksettings = ice_set_link_ksettings, 4820 4746 .get_fec_stats = ice_get_fec_stats, 4747 + .get_eth_mac_stats = ice_get_eth_mac_stats, 4748 + .get_pause_stats = ice_get_pause_stats, 4749 + .get_rmon_stats = ice_get_rmon_stats, 4750 + .get_ts_stats = ice_get_ts_stats, 4821 4751 .get_drvinfo = ice_get_drvinfo, 4822 4752 .get_regs_len = ice_get_regs_len, 4823 4753 .get_regs = ice_get_regs,
+2 -6
drivers/net/ethernet/intel/ice/ice_flex_pipe.c
··· 574 574 int ice_udp_tunnel_set_port(struct net_device *netdev, unsigned int table, 575 575 unsigned int idx, struct udp_tunnel_info *ti) 576 576 { 577 - struct ice_netdev_priv *np = netdev_priv(netdev); 578 - struct ice_vsi *vsi = np->vsi; 579 - struct ice_pf *pf = vsi->back; 577 + struct ice_pf *pf = ice_netdev_to_pf(netdev); 580 578 enum ice_tunnel_type tnl_type; 581 579 int status; 582 580 u16 index; ··· 596 598 int ice_udp_tunnel_unset_port(struct net_device *netdev, unsigned int table, 597 599 unsigned int idx, struct udp_tunnel_info *ti) 598 600 { 599 - struct ice_netdev_priv *np = netdev_priv(netdev); 600 - struct ice_vsi *vsi = np->vsi; 601 - struct ice_pf *pf = vsi->back; 601 + struct ice_pf *pf = ice_netdev_to_pf(netdev); 602 602 enum ice_tunnel_type tnl_type; 603 603 int status; 604 604
+1 -2
drivers/net/ethernet/intel/ice/ice_lag.c
··· 2177 2177 */ 2178 2178 static void ice_lag_disable_sriov_bond(struct ice_lag *lag) 2179 2179 { 2180 - struct ice_netdev_priv *np = netdev_priv(lag->netdev); 2181 - struct ice_pf *pf = np->vsi->back; 2180 + struct ice_pf *pf = ice_netdev_to_pf(lag->netdev); 2182 2181 2183 2182 ice_clear_feature_support(pf, ICE_F_SRIOV_LAG); 2184 2183 ice_clear_feature_support(pf, ICE_F_SRIOV_AA_LAG);
+6 -7
drivers/net/ethernet/intel/ice/ice_main.c
··· 7138 7138 &prev_ps->mac_remote_faults, 7139 7139 &cur_ps->mac_remote_faults); 7140 7140 7141 + ice_stat_update32(hw, GLPRT_RLEC(port), pf->stat_prev_loaded, 7142 + &prev_ps->rx_len_errors, &cur_ps->rx_len_errors); 7143 + 7141 7144 ice_stat_update32(hw, GLPRT_RUC(port), pf->stat_prev_loaded, 7142 7145 &prev_ps->rx_undersize, &cur_ps->rx_undersize); 7143 7146 ··· 8074 8071 ice_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq, 8075 8072 struct net_device *dev, u32 filter_mask, int nlflags) 8076 8073 { 8077 - struct ice_netdev_priv *np = netdev_priv(dev); 8078 - struct ice_vsi *vsi = np->vsi; 8079 - struct ice_pf *pf = vsi->back; 8074 + struct ice_pf *pf = ice_netdev_to_pf(dev); 8080 8075 u16 bmode; 8081 8076 8082 8077 bmode = pf->first_sw->bridge_mode; ··· 8144 8143 u16 __always_unused flags, 8145 8144 struct netlink_ext_ack __always_unused *extack) 8146 8145 { 8147 - struct ice_netdev_priv *np = netdev_priv(dev); 8148 - struct ice_pf *pf = np->vsi->back; 8146 + struct ice_pf *pf = ice_netdev_to_pf(dev); 8149 8147 struct nlattr *attr, *br_spec; 8150 8148 struct ice_hw *hw = &pf->hw; 8151 8149 struct ice_sw *pf_sw; ··· 9578 9578 */ 9579 9579 int ice_open(struct net_device *netdev) 9580 9580 { 9581 - struct ice_netdev_priv *np = netdev_priv(netdev); 9582 - struct ice_pf *pf = np->vsi->back; 9581 + struct ice_pf *pf = ice_netdev_to_pf(netdev); 9583 9582 9584 9583 if (ice_is_reset_in_progress(pf->state)) { 9585 9584 netdev_err(netdev, "can't open net device while reset is in progress");
+11 -4
drivers/net/ethernet/intel/ice/ice_ptp.c
··· 500 500 if (tstamp) { 501 501 shhwtstamps.hwtstamp = ns_to_ktime(tstamp); 502 502 ice_trace(tx_tstamp_complete, skb, idx); 503 + 504 + /* Count the number of Tx timestamps that succeeded */ 505 + pf->ptp.tx_hwtstamp_good++; 503 506 } 504 507 505 508 skb_tstamp_tx(skb, &shhwtstamps); ··· 561 558 { 562 559 struct ice_ptp_port *ptp_port; 563 560 unsigned long flags; 561 + u32 tstamp_good = 0; 564 562 struct ice_pf *pf; 565 563 struct ice_hw *hw; 566 564 u64 tstamp_ready; ··· 662 658 if (tstamp) { 663 659 shhwtstamps.hwtstamp = ns_to_ktime(tstamp); 664 660 ice_trace(tx_tstamp_complete, skb, idx); 661 + 662 + /* Count the number of Tx timestamps that succeeded */ 663 + tstamp_good++; 665 664 } 666 665 667 666 skb_tstamp_tx(skb, &shhwtstamps); 668 667 dev_kfree_skb_any(skb); 669 668 } 669 + 670 + pf->ptp.tx_hwtstamp_good += tstamp_good; 670 671 } 671 672 672 673 /** ··· 2215 2206 int ice_ptp_hwtstamp_get(struct net_device *netdev, 2216 2207 struct kernel_hwtstamp_config *config) 2217 2208 { 2218 - struct ice_netdev_priv *np = netdev_priv(netdev); 2219 - struct ice_pf *pf = np->vsi->back; 2209 + struct ice_pf *pf = ice_netdev_to_pf(netdev); 2220 2210 2221 2211 if (pf->ptp.state != ICE_PTP_READY) 2222 2212 return -EIO; ··· 2286 2278 struct kernel_hwtstamp_config *config, 2287 2279 struct netlink_ext_ack *extack) 2288 2280 { 2289 - struct ice_netdev_priv *np = netdev_priv(netdev); 2290 - struct ice_pf *pf = np->vsi->back; 2281 + struct ice_pf *pf = ice_netdev_to_pf(netdev); 2291 2282 int err; 2292 2283 2293 2284 if (pf->ptp.state != ICE_PTP_READY)
+2
drivers/net/ethernet/intel/ice/ice_ptp.h
··· 237 237 * @clock: pointer to registered PTP clock device 238 238 * @tstamp_config: hardware timestamping configuration 239 239 * @reset_time: kernel time after clock stop on reset 240 + * @tx_hwtstamp_good: number of completed Tx timestamp requests 240 241 * @tx_hwtstamp_skipped: number of Tx time stamp requests skipped 241 242 * @tx_hwtstamp_timeouts: number of Tx skbs discarded with no time stamp 242 243 * @tx_hwtstamp_flushed: number of Tx skbs flushed due to interface closed ··· 262 261 struct ptp_clock *clock; 263 262 struct kernel_hwtstamp_config tstamp_config; 264 263 u64 reset_time; 264 + u64 tx_hwtstamp_good; 265 265 u32 tx_hwtstamp_skipped; 266 266 u32 tx_hwtstamp_timeouts; 267 267 u32 tx_hwtstamp_flushed;
+1 -2
drivers/net/ethernet/intel/ice/ice_sriov.c
··· 1190 1190 */ 1191 1191 int ice_set_vf_spoofchk(struct net_device *netdev, int vf_id, bool ena) 1192 1192 { 1193 - struct ice_netdev_priv *np = netdev_priv(netdev); 1194 - struct ice_pf *pf = np->vsi->back; 1193 + struct ice_pf *pf = ice_netdev_to_pf(netdev); 1195 1194 struct ice_vsi *vf_vsi; 1196 1195 struct device *dev; 1197 1196 struct ice_vf *vf;
+1
drivers/net/ethernet/intel/ice/ice_type.h
··· 1063 1063 u64 error_bytes; /* errbc */ 1064 1064 u64 mac_local_faults; /* mlfc */ 1065 1065 u64 mac_remote_faults; /* mrfc */ 1066 + u64 rx_len_errors; /* rlec */ 1066 1067 u64 link_xon_rx; /* lxonrxc */ 1067 1068 u64 link_xoff_rx; /* lxoffrxc */ 1068 1069 u64 link_xon_tx; /* lxontxc */