Intel Wired LAN Driver Updates 2026-03-30 (igc, igb, ice)
Subsystems (5)
Tony Nguyen
maintainerFor igc:
Mika Westerberg makes improvements to power management flows with a focus on PTM.
Kohei Enju adds ethtool support for get/set hash key.
Maximilian Pezzullo fixes some typos.
For igb:
Takashi Kozu adds ethtool support for get/set hash key.
Kohei Enju adds setting of skb hash type based on values from Rx descriptor.
Maximilian Pezzullo fixes some typos here as well.
For ice:
Arkadiusz adds support for unmanaged DPLL for ice E830 devices; device settings are fixed but can be queried by DPLL.
Jake adds clarification for needed action on devlink reload command.
Przemyslaw Korba expands the size of a char array to silence a format-truncation warning.
The following are changes since commit cf0d9080c6f795bc6be08babbffa29b62c06e9b0:
Merge branch 'net-hsr-subsystem-cleanups-and-modernization'
and are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue 1GbE
Arkadiusz Kubalewski (1):
ice: add support for unmanaged DPLL on E830 NIC
Jacob Keller (1):
ice: mention fw_activate action along with devlink reload
Kohei Enju (4):
igc: prepare for RSS key get/set support
igc: expose RSS key via ethtool get_rxfh
igc: allow configuring RSS key via ethtool set_rxfh
igb: set skb hash type from RSS_TYPE
Maximilian Pezzullo (2):
igb: fix typos in comments
igc: fix typos in comments
Mika Westerberg (3):
igc: Call netif_queue_set_napi() with rtnl locked
igc: Let the PCI core deal with the PM resume flow
igc: Don't reset the hardware on suspend path
Przemyslaw Korba (1):
ice: dpll: Fix compilation warning
Takashi Kozu (3):
igb: prepare for RSS key get/set support
igb: expose RSS key via ethtool get_rxfh
igb: allow configuring RSS key via ethtool set_rxfh
.../device_drivers/ethernet/intel/ice.rst | 83 +++++ .../net/ethernet/intel/ice/devlink/health.c | 4 + .../net/ethernet/intel/ice/ice_adminq_cmd.h | 12 + drivers/net/ethernet/intel/ice/ice_common.c | 136 ++++++++ drivers/net/ethernet/intel/ice/ice_common.h | 8 + drivers/net/ethernet/intel/ice/ice_dpll.c | 304 ++++++++++++++++-- drivers/net/ethernet/intel/ice/ice_dpll.h | 10 + .../net/ethernet/intel/ice/ice_fw_update.c | 2 +- drivers/net/ethernet/intel/ice/ice_main.c | 11 +- drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 46 +++ drivers/net/ethernet/intel/ice/ice_ptp_hw.h | 1 + drivers/net/ethernet/intel/igb/e1000_82575.h | 21 ++ .../net/ethernet/intel/igb/e1000_defines.h | 2 +- drivers/net/ethernet/intel/igb/e1000_mac.c | 2 +- drivers/net/ethernet/intel/igb/e1000_mbx.h | 2 +- drivers/net/ethernet/intel/igb/e1000_nvm.c | 2 +- drivers/net/ethernet/intel/igb/igb.h | 3 + drivers/net/ethernet/intel/igb/igb_ethtool.c | 85 +++-- drivers/net/ethernet/intel/igb/igb_main.c | 25 +- drivers/net/ethernet/intel/igc/igc.h | 5 +- drivers/net/ethernet/intel/igc/igc_diag.c | 2 +- drivers/net/ethernet/intel/igc/igc_ethtool.c | 73 +++-- drivers/net/ethernet/intel/igc/igc_main.c | 43 ++- 23 files changed, 774 insertions(+), 108 deletions(-)
Signature · 1 line
2.47.1
Tony Nguyen
maintainerPATCH 1/15 igc: Call netif_queue_set_napi() with rtnl locked
From: Mika Westerberg <[email protected]>
When runtime resuming igc we get:
[ 516.161666] RTNL: assertion failed at ./include/net/netdev_lock.h (72)
Happens because commit 310ae9eb2617 ("net: designate queue -> napi linking as "ops protected"") added check for this. For this reason drop the special case for runtime PM from __igc_resume(). This makes it take rtnl lock unconditionally.
--- drivers/net/ethernet/intel/igc/igc_main.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
drivers/net/ethernet/intel/igc/igc_main.c +5 -7
@@ -7536,7 +7536,7 @@ static void igc_deliver_wake_packet(struct net_device *netdev)netif_rx (skb); } -static int __igc_resume (struct device *dev,bool rpm) +static int __igc_resume (struct device *dev) {struct pci_dev *pdev =to_pci_dev (dev);struct net_device *netdev =pci_get_drvdata (pdev);
@@ -7581,11 +7581,9 @@ static int __igc_resume(struct device *dev, bool rpm)wr32 (IGC_WUS , ~0 );if (netif_running (netdev)) { -if (!rpm) -rtnl_lock (); +rtnl_lock (); err =__igc_open (netdev, true); -if (!rpm) -rtnl_unlock (); +rtnl_unlock ();if (!err)netif_device_attach (netdev); }
@@ -7595,12 +7593,12 @@ static int __igc_resume(struct device *dev, bool rpm)static int igc_resume (struct device *dev) { -return __igc_resume (dev, false); +return __igc_resume (dev); }static int igc_runtime_resume (struct device *dev) { -return __igc_resume (dev, true); +return __igc_resume (dev); }static int igc_suspend (struct device *dev)
Signature · 1 line
2.47.1
Re: [PATCH net-next 01/15] igc: Call netif_queue_set_napi() with rtnl locked
Quoted 10 lines · Tony Nguyen
From: Mika Westerberg <[email protected]>
When runtime resuming igc we get:
[ 516.161666] RTNL: assertion failed at ./include/net/netdev_lock.h (72)Happens because commit
310ae9eb2617("net: designate queue -> napi linking as "ops protected"") added check for this. For this reason drop the special case for runtime PM from__igc_resume(). This makes it take rtnl lock unconditionally.
Taking the rtnl lock unconditionally certainly makes the code nicer, but the commit log only mentions the "avoid the warning" benefit, not the actual reason this is safe to do.
Quoted 54 lines
Signed-off-by Mika Westerberg <[email protected]>Reviewed-by Jacob Keller <[email protected]>Tested-by Avigail Dahan <[email protected]>Signed-off-by Tony Nguyen <[email protected]>--- drivers/net/ethernet/intel/igc/igc_main.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)drivers/net/ethernet/intel/igc/igc_main.c +5
-7@@ -7536,7 +7536,7 @@ static void igc_deliver_wake_packet(struct net_device *netdev)netif_rx (skb); } -static int __igc_resume (struct device *dev,bool rpm) +static int __igc_resume (struct device *dev) {struct pci_dev *pdev =to_pci_dev (dev);struct net_device *netdev =pci_get_drvdata (pdev);@@ -7581,11 +7581,9 @@ static int __igc_resume(struct device *dev, bool rpm)wr32 (IGC_WUS , ~0 );if (netif_running (netdev)) { -if (!rpm) -rtnl_lock (); +rtnl_lock (); err =__igc_open (netdev, true); -if (!rpm) -rtnl_unlock (); +rtnl_unlock ();if (!err)netif_device_attach (netdev); }@@ -7595,12 +7593,12 @@ static int __igc_resume(struct device *dev, bool rpm)static int igc_resume (struct device *dev) { -return __igc_resume (dev, false); +return __igc_resume (dev); }static int igc_runtime_resume (struct device *dev) { -return __igc_resume (dev, true); +return __igc_resume (dev); }static int igc_suspend (struct device *dev)Signature · 1 line
2.47.1
Paolo Abeni
maintainerRe: [PATCH net-next 01/15] igc: Call netif_queue_set_napi() with rtnl locked
Quoted 7 lines · Bjorn Helgaas
Quoted 6 lines · Tony Nguyen
From: Mika Westerberg <[email protected]>
When runtime resuming igc we get:
[ 516.161666] RTNL: assertion failed at ./include/net/netdev_lock.h (72)
Quoted 8 lines
Quoted 4 lines
Happens because commit
310ae9eb2617("net: designate queue -> napi linking as "ops protected"") added check for this. For this reason drop the special case for runtime PM from__igc_resume(). This makes it take rtnl lock unconditionally.Taking the rtnl lock unconditionally certainly makes the code nicer, but the commit log only mentions the "avoid the warning" benefit, not the actual reason this is safe to do.
Sashiko says it's not safe:
---
Can this regression cause a self-deadlock when a runtime resume is triggered from paths that already hold the rtnl lock?
If the network interface is logically up but the link is disconnected, igc_runtime_idle() allows the device to enter runtime suspend. When a user queries the device using ethtool, the networking core acquires rtnl_lock() and then calls pm_runtime_get_sync() to ensure the hardware is awake.
This synchronously executes the driver's runtime resume callback, which calls __igc_resume(). Because netif_running(netdev) is true, the modified __igc_resume() unconditionally attempts to acquire rtnl_lock(). Since the executing thread already holds this non-recursive mutex, it appears the system would self-deadlock, hanging the network stack.
---
/P
Re: [PATCH net-next 01/15] igc: Call netif_queue_set_napi() with rtnl locked
Hi,
Quoted 19 lines · Paolo Abeni
Quoted 7 lines · Bjorn Helgaas
Quoted 6 lines · Tony Nguyen
From: Mika Westerberg <[email protected]>
When runtime resuming igc we get:
[ 516.161666] RTNL: assertion failed at ./include/net/netdev_lock.h (72)Quoted 8 lines
Quoted 4 lines
Happens because commit
310ae9eb2617("net: designate queue -> napi linking as "ops protected"") added check for this. For this reason drop the special case for runtime PM from__igc_resume(). This makes it take rtnl lock unconditionally.Taking the rtnl lock unconditionally certainly makes the code nicer, but the commit log only mentions the "avoid the warning" benefit, not the actual reason this is safe to do.
Sashiko says it's not safe:
Quoted 14 lines
---
Can this regression cause a self-deadlock when a runtime resume is triggered from paths that already hold the rtnl lock?
If the network interface is logically up but the link is disconnected,igc_runtime_idle()allows the device to enter runtime suspend. When a user queries the device using ethtool, the networking core acquiresrtnl_lock()and then callspm_runtime_get_sync()to ensure the hardware is awake.
This synchronously executes the driver's runtime resume callback, which calls__igc_resume(). Becausenetif_running(netdev)is true, the modified__igc_resume()unconditionally attempts to acquirertnl_lock(). Since the executing thread already holds this non-recursive mutex, it appears the system would self-deadlock, hanging the network stack.
---
It's a good analysis. I just tried this flow:
1. Boot the system up, nothing connected to igc NIC.
2. Plug in cable to igc.
3. Configure the interface.
4. Enable runtime PM for igc.
5. Unplug the cable.
6. Verify igc is runtime suspended.
7. Run ethtool <interface>
This leads to deadlock as below.
igc maintainers, please drop this patch. I apologize I did not realize this flow when I did it.
[ 1231.655924] INFO: task ethtool:3139 blocked for more than 122 seconds. [ 1231.662515] Tainted: G U 7.0.0-rc6+ #1748 [ 1231.668551] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 1231.676410] task:ethtool state:D stack:0 pid:3139 tgid:3139 ppid:292 task_flags:0x480000 flags:0x00080800 [ 1231.687508] Call Trace: [ 1231.689997] <TASK> [ 1231.692132] __schedule+0x58a/0x1820 [ 1231.695747] ? sysvec_apic_timer_interrupt+0x4c/0xa0 [ 1231.700742] ? asm_sysvec_apic_timer_interrupt+0x1b/0x20 [ 1231.706090] schedule+0x64/0xe0 [ 1231.709262] schedule_preempt_disabled+0x15/0x30 [ 1231.713907] __mutex_lock+0x377/0xa60 [ 1231.717606] __mutex_lock_slowpath+0x13/0x20 [ 1231.721905] mutex_lock+0x2c/0x40 [ 1231.725259] rtnl_lock+0x15/0x20 [ 1231.728541] __igc_resume+0x19a/0x2b0 [igc] [ 1231.732798] igc_runtime_resume+0xe/0x20 [igc] [ 1231.737288] pci_pm_runtime_resume+0xce/0x100 [ 1231.741678] ? __pfx_pci_pm_runtime_resume+0x10/0x10 [ 1231.746681] __rpm_callback+0xab/0x310 [ 1231.750458] ? ktime_get_mono_fast_ns+0x3a/0x100 [ 1231.755107] ? __pfx_pci_pm_runtime_resume+0x10/0x10 [ 1231.760096] rpm_resume+0x4bb/0x670 [ 1231.763618] __pm_runtime_resume+0x5c/0x80 [ 1231.767749] dev_ethtool+0x19d/0xc90 [ 1231.771352] dev_ioctl+0x23c/0x550 [ 1231.774791] sock_do_ioctl+0x11f/0x1b0 [ 1231.778569] sock_ioctl+0x27f/0x390 [ 1231.782091] ? handle_mm_fault+0x11a5/0x1250 [ 1231.786388] __se_sys_ioctl+0x75/0xd0 [ 1231.790077] __x64_sys_ioctl+0x1d/0x30 [ 1231.793851] x64_sys_call+0x14ed/0x2d30 [ 1231.797719] do_syscall_64+0xfb/0x680 [ 1231.801404] ? arch_exit_to_user_mode_prepare+0xd/0xb0 [ 1231.806559] ? irqentry_exit+0x3b/0x510 [ 1231.810413] entry_SYSCALL_64_after_hwframe+0x76/0x7e
Tony Nguyen
maintainerPATCH 2/15 igc: Let the PCI core deal with the PM resume flow
In reply to Tony NguyenFrom: Mika Westerberg <[email protected]>
Currently igc driver calls pci_set_power_state() and pci_restore_state() and the like to bring the device back from low power states. However, PCI core handles all this on behalf of the driver. Furthermore with PTM enabled the PCI core re-enables it on resume but the driver calls pci_restore_state() which ends up disabling it again.
For this reason let the PCI core handle the common PM resume flow.
--- drivers/net/ethernet/intel/igc/igc_main.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/net/ethernet/intel/igc/igc_main.c +0 -6
@@ -7544,9 +7544,6 @@ static int __igc_resume(struct device *dev)struct igc_hw *hw = &adapter->hw;u32 err, val; -pci_set_power_state (pdev,PCI_D0 ); -pci_restore_state (pdev); -if (!pci_device_is_present (pdev))return -ENODEV ; err =pci_enable_device_mem (pdev);
@@ -7556,9 +7553,6 @@ static int __igc_resume(struct device *dev) }pci_set_master (pdev); -pci_enable_wake (pdev, PCI_D3hot,0 ); -pci_enable_wake (pdev, PCI_D3cold,0 ); -if (igc_is_device_id_i226 (hw))pci_disable_link_state (pdev,PCIE_LINK_STATE_L1_2 );
Signature · 1 line
2.47.1
Re: [PATCH net-next 02/15] igc: Let the PCI core deal with the PM resume flow
Quoted 8 lines · Tony Nguyen
From: Mika Westerberg <[email protected]>
Currently igc driver calls
pci_set_power_state()andpci_restore_state()and the like to bring the device back from low power states. However, PCI core handles all this on behalf of the driver. Furthermore with PTM enabled the PCI core re-enables it on resume but the driver callspci_restore_state()which ends up disabling it again.
Quoted 8 lines
For this reason let the PCI core handle the common PM resume flow.
Signed-off-by Mika Westerberg <[email protected]>Reviewed-by Andy Shevchenko <[email protected]>Reviewed-by Jacob Keller <[email protected]>Tested-by Avigail Dahan <[email protected]>Signed-off-by Tony Nguyen <[email protected]>
I love it, thanks a lot for doing this!
Quoted 9 lines
--- drivers/net/ethernet/intel/igc/igc_main.c | 6 ------ 1 file changed, 6 deletions(-)drivers/net/ethernet/intel/igc/igc_main.c +0
-0
drivers/net/ethernet/intel/igc/igc_main.c static int __igc_resume(struct device *dev) · line 7549
Quoted 9 lines
drivers/net/ethernet/intel/igc/igc_main.c +0
-3@@ -7544,9 +7544,6 @@ static int __igc_resume(struct device *dev)struct igc_hw *hw = &adapter->hw;u32 err, val; -pci_set_power_state (pdev,PCI_D0 ); -pci_restore_state (pdev); -if (!pci_device_is_present (pdev))return -ENODEV ; err =pci_enable_device_mem (pdev);
__igc_shutdown() calls pci_disable_device() in the suspend paths, which disables bus mastering. There are only a relative handful of drivers that do this, mostly for NICs, so I'm not sure if it's really necessary or if it's been cargo-culted.
Here in the resume path we call pci_enable_device_mem(), pci_set_master(), and conditionally call pci_disable_link_state(). I suspect all those are unnecessary because pci_pm_resume() should have called pci_restore_state() before we get here.
Quoted 13 lines
drivers/net/ethernet/intel/igc/igc_main.c +0
-3@@ -7556,9 +7553,6 @@ static int __igc_resume(struct device *dev) }pci_set_master (pdev); -pci_enable_wake (pdev, PCI_D3hot,0 ); -pci_enable_wake (pdev, PCI_D3cold,0 ); -if (igc_is_device_id_i226 (hw))pci_disable_link_state (pdev,PCIE_LINK_STATE_L1_2 );Signature · 1 line
2.47.1
Tony Nguyen
maintainerPATCH 3/15 igc: Don't reset the hardware on suspend path
In reply to Tony NguyenFrom: Mika Westerberg <[email protected]>
Commit c01163dbd1b8 ("PCI/PM: Always disable PTM for all devices during suspend") made the PCI core to suspend (disable) PTM before driver suspend hooks are called. In case of igc what happens is that on suspend path PCI core calls pci_suspend_ptm() then igc suspend hook that calls igc_down() that ends up calling igc_ptp_reset() (which according to the comment is actually needed for re-enabling the device). Anyways that function also poll IGC_PTM_STAT that will end up timing out because PTM is already disabled:
[ 160.716119] igc 0000:03:00.0 enp3s0: Timeout reading IGC_PTM_STAT register
There should be no reason resetting the hardware on suspend path so fix this by avoiding the reset.
--- drivers/net/ethernet/intel/igc/igc.h | 2 +- drivers/net/ethernet/intel/igc/igc_ethtool.c | 6 +++--- drivers/net/ethernet/intel/igc/igc_main.c | 13 +++++++------ 3 files changed, 11 insertions(+), 10 deletions(-)
drivers/net/ethernet/intel/igc/igc.h +1 -1
@@ -349,7 +349,7 @@ struct igc_adapter { };void igc_up (struct igc_adapter *adapter); -void igc_down (struct igc_adapter *adapter); +void igc_down (struct igc_adapter *adapter,bool reset);int igc_open (struct net_device *netdev);int igc_close (struct net_device *netdev);int igc_setup_tx_resources (struct igc_ring *ring);
drivers/net/ethernet/intel/igc/igc_ethtool.c +3 -3
@@ -638,7 +638,7 @@ igc_ethtool_set_ringparam(struct net_device *netdev, goto clear_reset; } -igc_down (adapter); +igc_down (adapter, true);/* We can't just free everything and then setup again, * because the ISRs in MSI-X mode get passed pointers
@@ -737,7 +737,7 @@ static int igc_ethtool_set_pauseparam(struct net_device *netdev,if (adapter->fc_autoneg ==AUTONEG_ENABLE ) { hw->fc.requested_mode = igc_fc_default;if (netif_running (adapter->netdev)) { -igc_down (adapter); +igc_down (adapter, true);igc_up (adapter); }else {igc_reset (adapter);
@@ -2077,7 +2077,7 @@ igc_ethtool_set_link_ksettings(struct net_device *netdev,/* reset the link */ if (netif_running (adapter->netdev)) { -igc_down (adapter); +igc_down (adapter, true);igc_up (adapter); }else {igc_reset (adapter);
drivers/net/ethernet/intel/igc/igc_main.c +7 -6
@@ -5312,8 +5312,9 @@ void igc_update_stats(struct igc_adapter *adapter)/** * igc_down - Close the interface * @adapter: board private structure +* @reset: issue reset */ -void igc_down (struct igc_adapter *adapter) +void igc_down (struct igc_adapter *adapter,bool reset) {struct net_device *netdev = adapter->netdev;struct igc_hw *hw = &adapter->hw;
@@ -5369,7 +5370,7 @@ void igc_down(struct igc_adapter *adapter) adapter->link_speed =0 ; adapter->link_duplex =0 ; -if (!pci_channel_offline (adapter->pdev)) +if (reset && !pci_channel_offline (adapter->pdev))igc_reset (adapter);/* clear VLAN promisc flag so VFTA will be updated if necessary */
@@ -5387,7 +5388,7 @@ void igc_reinit_locked(struct igc_adapter *adapter) {while (test_and_set_bit (__IGC_RESETTING, &adapter->state))usleep_range (1000 ,2000 ); -igc_down (adapter); +igc_down (adapter, true);igc_up (adapter);clear_bit (__IGC_RESETTING, &adapter->state); }
@@ -5441,7 +5442,7 @@ static int igc_change_mtu(struct net_device *netdev, int new_mtu) adapter->max_frame_size = max_frame;if (netif_running (netdev)) -igc_down (adapter); +igc_down (adapter, true);netdev_dbg (netdev,"changing MTU from %d to %d\n" , netdev->mtu, new_mtu);WRITE_ONCE (netdev->mtu, new_mtu);
@@ -6305,7 +6306,7 @@ static int __igc_close(struct net_device *netdev, bool suspending)if (!suspending)pm_runtime_get_sync (&pdev->dev); -igc_down (adapter); +igc_down (adapter, !suspending);igc_release_hw_control (adapter);
@@ -7646,7 +7647,7 @@ static pci_ers_result_t igc_io_error_detected(struct pci_dev *pdev, }if (netif_running (netdev)) -igc_down (adapter); +igc_down (adapter, true);pci_disable_device (pdev);rtnl_unlock ();
Signature · 1 line
2.47.1
Tony Nguyen
maintainerPATCH 4/15 igc: prepare for RSS key get/set support
In reply to Tony NguyenFrom: Kohei Enju <[email protected]>
Store the RSS key inside struct igc_adapter and introduce the igc_write_rss_key() helper function. This allows the driver to program the RSSRK registers using a persistent RSS key, instead of using a stack-local buffer in igc_setup_mrqc().
This is a preparation patch for adding RSS key get/set support in subsequent changes, and no functional change is intended in this patch.
--- drivers/net/ethernet/intel/igc/igc.h | 3 +++ drivers/net/ethernet/intel/igc/igc_ethtool.c | 20 ++++++++++++++++++++ drivers/net/ethernet/intel/igc/igc_main.c | 8 ++++---- 3 files changed, 27 insertions(+), 4 deletions(-)
drivers/net/ethernet/intel/igc/igc.h +3 -0
@@ -30,6 +30,7 @@ void igc_ethtool_set_ops(struct net_device *);#define MAX_ETYPE_FILTER 8#define IGC_RETA_SIZE 128 +#define IGC_RSS_KEY_SIZE 40/* SDP support */ #define IGC_N_EXTTS 2
@@ -302,6 +303,7 @@ struct igc_adapter {unsigned int nfc_rule_count;u8 rss_indir_tbl[IGC_RETA_SIZE ]; +u8 rss_key[IGC_RSS_KEY_SIZE ];unsigned long link_check_timeout;struct igc_info ei;
@@ -360,6 +362,7 @@ unsigned int igc_get_max_rss_queues(struct igc_adapter *adapter);void igc_set_flag_queue_pairs (struct igc_adapter *adapter,const u32 max_rss_queues);int igc_reinit_queues (struct igc_adapter *adapter); +void igc_write_rss_key (struct igc_adapter *adapter);void igc_write_rss_indir_tbl (struct igc_adapter *adapter);bool igc_has_link (struct igc_adapter *adapter);void igc_reset (struct igc_adapter *adapter);
drivers/net/ethernet/intel/igc/igc_ethtool.c +20 -0
@@ -1460,6 +1460,26 @@ static int igc_ethtool_set_rxnfc(struct net_device *dev, } } +/** +* igc_write_rss_key - Program the RSS key into device registers +* @adapter: board private structure +* +* Write the RSS key stored in adapter->rss_key to the IGC_RSSRK registers. +* Each 32-bit chunk of the key is read using get_unaligned_le32() and written +* to the appropriate register. +*/ +void igc_write_rss_key (struct igc_adapter *adapter) +{ +struct igc_hw *hw = &adapter->hw; +u32 val; +int i; + +for (i =0 ; i <IGC_RSS_KEY_SIZE /4 ; i++) { + val =get_unaligned_le32 (&adapter->rss_key[i *4 ]); +wr32 (IGC_RSSRK (i), val); + } +} +void igc_write_rss_indir_tbl (struct igc_adapter *adapter) {struct igc_hw *hw = &adapter->hw;
drivers/net/ethernet/intel/igc/igc_main.c +4 -4
@@ -785,11 +785,8 @@ static void igc_setup_mrqc(struct igc_adapter *adapter)struct igc_hw *hw = &adapter->hw;u32 j, num_rx_queues;u32 mrqc, rxcsum; -u32 rss_key[10 ]; -netdev_rss_key_fill (rss_key,sizeof (rss_key)); -for (j =0 ; j <10 ; j++) -wr32 (IGC_RSSRK (j), rss_key[j]); +igc_write_rss_key (adapter); num_rx_queues = adapter->rss_queues;
@@ -5048,6 +5045,9 @@ static int igc_sw_init(struct igc_adapter *adapter)pci_read_config_word (pdev,PCI_COMMAND , &hw->bus.pci_cmd_word); +/* init RSS key */ +netdev_rss_key_fill (adapter->rss_key,sizeof (adapter->rss_key)); +/* set default ring sizes */ adapter->tx_ring_count =IGC_DEFAULT_TXD ; adapter->rx_ring_count =IGC_DEFAULT_RXD ;
Signature · 1 line
2.47.1
Tony Nguyen
maintainerPATCH 5/15 igc: expose RSS key via ethtool get_rxfh
In reply to Tony NguyenFrom: Kohei Enju <[email protected]>
Implement igc_ethtool_get_rxfh_key_size() and extend igc_ethtool_get_rxfh() to return the RSS key to userspace.
This can be tested using ethtool -x <dev>.
--- drivers/net/ethernet/intel/igc/igc_ethtool.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-)
drivers/net/ethernet/intel/igc/igc_ethtool.c +13 -4
@@ -1502,6 +1502,11 @@ void igc_write_rss_indir_tbl(struct igc_adapter *adapter) } } +static u32 igc_ethtool_get_rxfh_key_size (struct net_device *netdev) +{ +return IGC_RSS_KEY_SIZE ; +} +static u32 igc_ethtool_get_rxfh_indir_size (struct net_device *netdev) {return IGC_RETA_SIZE ;
@@ -1514,10 +1519,13 @@ static int igc_ethtool_get_rxfh(struct net_device *netdev,int i; rxfh->hfunc =ETH_RSS_HASH_TOP ; -if (!rxfh->indir) -return 0 ; -for (i =0 ; i <IGC_RETA_SIZE ; i++) - rxfh->indir[i] = adapter->rss_indir_tbl[i]; + +if (rxfh->indir) +for (i =0 ; i <IGC_RETA_SIZE ; i++) + rxfh->indir[i] = adapter->rss_indir_tbl[i]; + +if (rxfh->key) +memcpy (rxfh->key, adapter->rss_key,sizeof (adapter->rss_key));return 0 ; }
@@ -2195,6 +2203,7 @@ static const struct ethtool_ops igc_ethtool_ops = { .get_rxnfc = igc_ethtool_get_rxnfc, .set_rxnfc = igc_ethtool_set_rxnfc, .get_rx_ring_count = igc_ethtool_get_rx_ring_count, + .get_rxfh_key_size = igc_ethtool_get_rxfh_key_size, .get_rxfh_indir_size = igc_ethtool_get_rxfh_indir_size, .get_rxfh = igc_ethtool_get_rxfh, .set_rxfh = igc_ethtool_set_rxfh,
Signature · 1 line
2.47.1
Tony Nguyen
maintainerPATCH 6/15 igc: allow configuring RSS key via ethtool set_rxfh
In reply to Tony NguyenFrom: Kohei Enju <[email protected]>
Change igc_ethtool_set_rxfh() to accept and save a userspace-provided RSS key. When a key is provided, store it in the adapter and write the RSSRK registers accordingly.
This can be tested using ethtool -X <dev> hkey <key>.
--- drivers/net/ethernet/intel/igc/igc_ethtool.c | 30 +++++++++++--------- 1 file changed, 17 insertions(+), 13 deletions(-)
drivers/net/ethernet/intel/igc/igc_ethtool.c +17 -13
@@ -1539,24 +1539,28 @@ static int igc_ethtool_set_rxfh(struct net_device *netdev,int i;/* We do not allow change in unsupported parameters */ -if (rxfh->key || - (rxfh->hfunc !=ETH_RSS_HASH_NO_CHANGE && - rxfh->hfunc !=ETH_RSS_HASH_TOP )) +if (rxfh->hfunc !=ETH_RSS_HASH_NO_CHANGE && + rxfh->hfunc !=ETH_RSS_HASH_TOP )return -EOPNOTSUPP ; -if (!rxfh->indir) -return 0 ; - num_queues = adapter->rss_queues; +if (rxfh->indir) { + num_queues = adapter->rss_queues; -/* Verify user input. */ -for (i =0 ; i <IGC_RETA_SIZE ; i++) -if (rxfh->indir[i] >= num_queues) -return -EINVAL ; +/* Verify user input. */ +for (i =0 ; i <IGC_RETA_SIZE ; i++) +if (rxfh->indir[i] >= num_queues) +return -EINVAL ; -for (i =0 ; i <IGC_RETA_SIZE ; i++) - adapter->rss_indir_tbl[i] = rxfh->indir[i]; +for (i =0 ; i <IGC_RETA_SIZE ; i++) + adapter->rss_indir_tbl[i] = rxfh->indir[i]; -igc_write_rss_indir_tbl (adapter); +igc_write_rss_indir_tbl (adapter); + } + +if (rxfh->key) { +memcpy (adapter->rss_key, rxfh->key,sizeof (adapter->rss_key)); +igc_write_rss_key (adapter); + }return 0 ; }
Signature · 1 line
2.47.1
Tony Nguyen
maintainerPATCH 7/15 igb: prepare for RSS key get/set support
In reply to Tony NguyenFrom: Takashi Kozu <[email protected]>
Store the RSS key inside struct igb_adapter and introduce the igb_write_rss_key() helper function. This allows the driver to program the E1000 registers using a persistent RSS key, instead of using a stack-local buffer in igb_setup_mrqc().
--- drivers/net/ethernet/intel/igb/igb.h | 3 +++ drivers/net/ethernet/intel/igb/igb_ethtool.c | 21 ++++++++++++++++++++ drivers/net/ethernet/intel/igb/igb_main.c | 8 ++++---- 3 files changed, 28 insertions(+), 4 deletions(-)
drivers/net/ethernet/intel/igb/igb.h +3 -0
@@ -495,6 +495,7 @@ struct hwmon_buff {#define IGB_N_PEROUT 2#define IGB_N_SDP 4#define IGB_RETA_SIZE 128 +#define IGB_RSS_KEY_SIZE 40enum igb_filter_match_flags {IGB_FILTER_FLAG_ETHER_TYPE =0x1 ,
@@ -655,6 +656,7 @@ struct igb_adapter {struct i2c_client *i2c_client;u32 rss_indir_tbl_init;u8 rss_indir_tbl[IGB_RETA_SIZE ]; +u8 rss_key[IGB_RSS_KEY_SIZE ];unsigned long link_check_timeout;int copper_tries;
@@ -735,6 +737,7 @@ void igb_down(struct igb_adapter *);void igb_reinit_locked (struct igb_adapter *);void igb_reset (struct igb_adapter *);int igb_reinit_queues (struct igb_adapter *); +void igb_write_rss_key (struct igb_adapter *adapter);void igb_write_rss_indir_tbl (struct igb_adapter *);int igb_set_spd_dplx (struct igb_adapter *,u32 ,u8 );int igb_setup_tx_resources (struct igb_ring *);
drivers/net/ethernet/intel/igb/igb_ethtool.c +21 -0
@@ -3019,6 +3019,27 @@ static int igb_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd)return ret; } +/** +* igb_write_rss_key - Program the RSS key into device registers +* @adapter: board private structure +* +* Write the RSS key stored in adapter->rss_key to the E1000 hardware registers. +* Each 32-bit chunk of the key is read using get_unaligned_le32() and written +* to the appropriate register. +*/ +void igb_write_rss_key (struct igb_adapter *adapter) +{ +struct e1000_hw *hw = &adapter->hw; + +ASSERT_RTNL (); + +for (int i =0 ; i <IGB_RSS_KEY_SIZE /4 ; i++) { +u32 val =get_unaligned_le32 (&adapter->rss_key[i *4 ]); + +wr32 (E1000_RSSRK (i), val); + } +} +static int igb_get_eee (struct net_device *netdev,struct ethtool_keee *edata) {struct igb_adapter *adapter =netdev_priv (netdev);
drivers/net/ethernet/intel/igb/igb_main.c +4 -4
@@ -4049,6 +4049,9 @@ static int igb_sw_init(struct igb_adapter *adapter)pci_read_config_word (pdev,PCI_COMMAND , &hw->bus.pci_cmd_word); +/* init RSS key */ +netdev_rss_key_fill (adapter->rss_key,sizeof (adapter->rss_key)); +/* set default ring sizes */ adapter->tx_ring_count =IGB_DEFAULT_TXD ; adapter->rx_ring_count =IGB_DEFAULT_RXD ;
@@ -4523,11 +4526,8 @@ static void igb_setup_mrqc(struct igb_adapter *adapter)struct e1000_hw *hw = &adapter->hw;u32 mrqc, rxcsum;u32 j, num_rx_queues; -u32 rss_key[10 ]; -netdev_rss_key_fill (rss_key,sizeof (rss_key)); -for (j =0 ; j <10 ; j++) -wr32 (E1000_RSSRK (j), rss_key[j]); +igb_write_rss_key (adapter); num_rx_queues = adapter->rss_queues;
Signature · 1 line
2.47.1
Tony Nguyen
maintainerPATCH 8/15 igb: expose RSS key via ethtool get_rxfh
In reply to Tony NguyenFrom: Takashi Kozu <[email protected]>
Implement igb_get_rxfh_key_size() and extend igb_get_rxfh() to return the RSS key to userspace.
This can be tested using ethtool -x <dev>.
--- drivers/net/ethernet/intel/igb/igb_ethtool.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)
drivers/net/ethernet/intel/igb/igb_ethtool.c +12 -4
@@ -3297,10 +3297,12 @@ static int igb_get_rxfh(struct net_device *netdev,int i; rxfh->hfunc =ETH_RSS_HASH_TOP ; -if (!rxfh->indir) -return 0 ; -for (i =0 ; i <IGB_RETA_SIZE ; i++) - rxfh->indir[i] = adapter->rss_indir_tbl[i]; +if (rxfh->indir) +for (i =0 ; i <IGB_RETA_SIZE ; i++) + rxfh->indir[i] = adapter->rss_indir_tbl[i]; + +if (rxfh->key) +memcpy (rxfh->key, adapter->rss_key,sizeof (adapter->rss_key));return 0 ; }
@@ -3340,6 +3342,11 @@ void igb_write_rss_indir_tbl(struct igb_adapter *adapter) } } +static u32 igb_get_rxfh_key_size (struct net_device *netdev) +{ +return IGB_RSS_KEY_SIZE ; +} +static int igb_set_rxfh (struct net_device *netdev,struct ethtool_rxfh_param *rxfh,struct netlink_ext_ack *extack)
@@ -3504,6 +3511,7 @@ static const struct ethtool_ops igb_ethtool_ops = { .get_module_eeprom = igb_get_module_eeprom, .get_rxfh_indir_size = igb_get_rxfh_indir_size, .get_rxfh = igb_get_rxfh, + .get_rxfh_key_size = igb_get_rxfh_key_size, .set_rxfh = igb_set_rxfh, .get_rxfh_fields = igb_get_rxfh_fields, .set_rxfh_fields = igb_set_rxfh_fields,
Signature · 1 line
2.47.1
Tony Nguyen
maintainerPATCH 9/15 igb: allow configuring RSS key via ethtool set_rxfh
In reply to Tony NguyenFrom: Takashi Kozu <[email protected]>
Change igb_set_rxfh() to accept and save a userspace-provided RSS key. When a key is provided, store it in the adapter and write the E1000 registers accordingly.
This can be tested using ethtool -X <dev> hkey <key>.
--- drivers/net/ethernet/intel/igb/igb_ethtool.c | 48 +++++++++++--------- 1 file changed, 26 insertions(+), 22 deletions(-)
drivers/net/ethernet/intel/igb/igb_ethtool.c +26 -22
@@ -3357,35 +3357,39 @@ static int igb_set_rxfh(struct net_device *netdev,u32 num_queues;/* We do not allow change in unsupported parameters */ -if (rxfh->key || - (rxfh->hfunc !=ETH_RSS_HASH_NO_CHANGE && - rxfh->hfunc !=ETH_RSS_HASH_TOP )) +if (rxfh->hfunc !=ETH_RSS_HASH_NO_CHANGE && + rxfh->hfunc !=ETH_RSS_HASH_TOP )return -EOPNOTSUPP ; -if (!rxfh->indir) -return 0 ; - num_queues = adapter->rss_queues; +if (rxfh->indir) { + num_queues = adapter->rss_queues; -switch (hw->mac.type) { -case e1000_82576: -/* 82576 supports 2 RSS queues for SR-IOV */ -if (adapter->vfs_allocated_count) - num_queues =2 ; -break ; -default : -break ; - } +switch (hw->mac.type) { +case e1000_82576: +/* 82576 supports 2 RSS queues for SR-IOV */ +if (adapter->vfs_allocated_count) + num_queues =2 ; +break ; +default : +break ; + } -/* Verify user input. */ -for (i =0 ; i <IGB_RETA_SIZE ; i++) -if (rxfh->indir[i] >= num_queues) -return -EINVAL ; +/* Verify user input. */ +for (i =0 ; i <IGB_RETA_SIZE ; i++) +if (rxfh->indir[i] >= num_queues) +return -EINVAL ; -for (i =0 ; i <IGB_RETA_SIZE ; i++) - adapter->rss_indir_tbl[i] = rxfh->indir[i]; +for (i =0 ; i <IGB_RETA_SIZE ; i++) + adapter->rss_indir_tbl[i] = rxfh->indir[i]; + +igb_write_rss_indir_tbl (adapter); + } -igb_write_rss_indir_tbl (adapter); +if (rxfh->key) { +memcpy (adapter->rss_key, rxfh->key,sizeof (adapter->rss_key)); +igb_write_rss_key (adapter); + }return 0 ; }
Signature · 1 line
2.47.1
Tony Nguyen
maintainerPATCH 10/15 igb: set skb hash type from RSS_TYPE
In reply to Tony NguyenFrom: Kohei Enju <[email protected]>
igb always marks the RX hash as L3 regardless of RSS_TYPE in the advanced descriptor, which may indicate L4 (TCP/UDP) hash. This can trigger unnecessary SW hash recalculation and breaks toeplitz selftests.
Use RSS_TYPE from pkt_info to set the correct PKT_HASH_TYPE_*
Tested by toeplitz.py with the igb RSS key get/set patches applied as they are required for toeplitz.py (see Link below).
# ethtool -N $DEV rx-flow-hash udp4 sdfn # ethtool -N $DEV rx-flow-hash udp6 sdfn # python toeplitz.py | grep -E "^# Totals"
Without patch:
# Totals: pass:0 fail:12 xfail:0 xpass:0 skip:0 error:0
With patch:
# Totals: pass:12 fail:0 xfail:0 xpass:0 skip:0 error:0
--- drivers/net/ethernet/intel/igb/e1000_82575.h | 21 ++++++++++++++++++++ drivers/net/ethernet/intel/igb/igb_main.c | 17 ++++++++++++---- 2 files changed, 34 insertions(+), 4 deletions(-)
drivers/net/ethernet/intel/igb/e1000_82575.h +21 -0
@@ -87,6 +87,27 @@ union e1000_adv_rx_desc { } wb;/* writeback */ }; +#define E1000_RSS_TYPE_NO_HASH 0 +#define E1000_RSS_TYPE_HASH_TCP_IPV4 1 +#define E1000_RSS_TYPE_HASH_IPV4 2 +#define E1000_RSS_TYPE_HASH_TCP_IPV6 3 +#define E1000_RSS_TYPE_HASH_IPV6_EX 4 +#define E1000_RSS_TYPE_HASH_IPV6 5 +#define E1000_RSS_TYPE_HASH_TCP_IPV6_EX 6 +#define E1000_RSS_TYPE_HASH_UDP_IPV4 7 +#define E1000_RSS_TYPE_HASH_UDP_IPV6 8 +#define E1000_RSS_TYPE_HASH_UDP_IPV6_EX 9 + +#define E1000_RSS_TYPE_MASK GENMASK(3, 0) + +#define E1000_RSS_L4_TYPES_MASK \ + (BIT(E1000_RSS_TYPE_HASH_TCP_IPV4) | \ + BIT(E1000_RSS_TYPE_HASH_TCP_IPV6) | \ + BIT(E1000_RSS_TYPE_HASH_TCP_IPV6_EX) | \ + BIT(E1000_RSS_TYPE_HASH_UDP_IPV4) | \ + BIT(E1000_RSS_TYPE_HASH_UDP_IPV6) | \ + BIT(E1000_RSS_TYPE_HASH_UDP_IPV6_EX)) +#define E1000_RXDADV_HDRBUFLEN_MASK 0x7FE0#define E1000_RXDADV_HDRBUFLEN_SHIFT 5#define E1000_RXDADV_STAT_TS 0x10000/* Pkt was time stamped */
drivers/net/ethernet/intel/igb/igb_main.c +13 -4
@@ -8821,10 +8821,19 @@ static inline void igb_rx_hash(struct igb_ring *ring,union e1000_adv_rx_desc *rx_desc, struct sk_buff *skb) { -if (ring->netdev->features &NETIF_F_RXHASH ) -skb_set_hash (skb, -le32_to_cpu (rx_desc->wb.lower.hi_dword.rss), -PKT_HASH_TYPE_L3 ); + u16 rss_type; + +if (!(ring->netdev->features &NETIF_F_RXHASH )) +return ; + + rss_type =le16_to_cpu (rx_desc->wb.lower.lo_dword.pkt_info) & +E1000_RSS_TYPE_MASK ; +if (!rss_type) +return ; + +skb_set_hash (skb,le32_to_cpu (rx_desc->wb.lower.hi_dword.rss), + (E1000_RSS_L4_TYPES_MASK &BIT (rss_type)) ? +PKT_HASH_TYPE_L4 :PKT_HASH_TYPE_L3 ); }/**
Signature · 1 line
2.47.1
Tony Nguyen
maintainerPATCH 11/15 igb: fix typos in comments
In reply to Tony NguyenFrom: Maximilian Pezzullo <[email protected]>
Fix spelling errors in code comments:
- e1000_nvm.c: 'likley' -> 'likely'
- e1000_mac.c: 'auto-negotitation' -> 'auto-negotiation'
- e1000_mbx.h: 'exra' -> 'extra'
- e1000_defines.h: 'Aserted' -> 'Asserted'
--- drivers/net/ethernet/intel/igb/e1000_defines.h | 2 +- drivers/net/ethernet/intel/igb/e1000_mac.c | 2 +- drivers/net/ethernet/intel/igb/e1000_mbx.h | 2 +- drivers/net/ethernet/intel/igb/e1000_nvm.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
drivers/net/ethernet/intel/igb/e1000_defines.h +1 -1
@@ -442,7 +442,7 @@/* Interrupt Cause Set */ #define E1000_ICS_LSC E1000_ICR_LSC/* Link Status Change */ #define E1000_ICS_RXDMT0 E1000_ICR_RXDMT0/* rx desc min. threshold */ -#define E1000_ICS_DRSTA E1000_ICR_DRSTA/* Device Reset Aserted */ +#define E1000_ICS_DRSTA E1000_ICR_DRSTA/* Device Reset Asserted */ /* Extended Interrupt Cause Set */ /* E1000_EITR_CNT_IGNR is only for 82576 and newer */
drivers/net/ethernet/intel/igb/e1000_mac.c +1 -1
@@ -1581,7 +1581,7 @@ s32 igb_disable_pcie_master(struct e1000_hw *hw)* igb_validate_mdi_setting - Verify MDI/MDIx settings * @hw: pointer to the HW structure * -* Verify that when not using auto-negotitation that MDI/MDIx is correctly +* Verify that when not using auto-negotiation that MDI/MDIx is correctly * set, which is forced to MDI mode only. **/ s32 igb_validate_mdi_setting (struct e1000_hw *hw)
drivers/net/ethernet/intel/igb/e1000_mbx.h +1 -1
@@ -30,7 +30,7 @@/* Indicates that VF is still clear to send requests */ #define E1000_VT_MSGTYPE_CTS 0x20000000#define E1000_VT_MSGINFO_SHIFT 16 -/* bits 23:16 are used for exra info for certain messages */ +/* bits 23:16 are used for extra info for certain messages */ #define E1000_VT_MSGINFO_MASK (0xFF << E1000_VT_MSGINFO_SHIFT)#define E1000_VF_RESET 0x01/* VF requests reset */
drivers/net/ethernet/intel/igb/e1000_nvm.c +1 -1
@@ -405,7 +405,7 @@ s32 igb_read_nvm_eerd(struct e1000_hw *hw, u16 offset, u16 words, u16 *data)* Writes data to EEPROM at offset using SPI interface. * * If e1000_update_nvm_checksum is not called after this function , the -* EEPROM will most likley contain an invalid checksum. +* EEPROM will most likely contain an invalid checksum. **/ s32 igb_write_nvm_spi (struct e1000_hw *hw,u16 offset,u16 words,u16 *data) {
Signature · 1 line
2.47.1
Tony Nguyen
maintainerPATCH 12/15 igc: fix typos in comments
In reply to Tony NguyenFrom: Maximilian Pezzullo <[email protected]>
Fix spelling errors in code comments:
- igc_diag.c: 'autonegotioation' -> 'autonegotiation'
- igc_main.c: 'revisons' -> 'revisions' (two occurrences)
--- drivers/net/ethernet/intel/igc/igc_diag.c | 2 +- drivers/net/ethernet/intel/igc/igc_main.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/intel/igc/igc_diag.c +1 -1
@@ -172,7 +172,7 @@ bool igc_link_test(struct igc_adapter *adapter, u64 *data) *data =0 ; -/* add delay to give enough time for autonegotioation to finish */ +/* add delay to give enough time for autonegotiation to finish */ ssleep (5 ); link_up =igc_has_link (adapter);
drivers/net/ethernet/intel/igc/igc_main.c +2 -2
@@ -1794,7 +1794,7 @@ static const enum pkt_hash_types igc_rss_type_table[IGC_RSS_TYPE_MAX_TABLE] = { [IGC_RSS_TYPE_HASH_UDP_IPV6_EX] = PKT_HASH_TYPE_L4, [10] = PKT_HASH_TYPE_NONE, /* RSS Type above 9 "Reserved" by HW */ [11] = PKT_HASH_TYPE_NONE, /* keep array sized for SW bit-mask */ - [12] = PKT_HASH_TYPE_NONE, /* to handle future HW revisons */ + [12] = PKT_HASH_TYPE_NONE, /* to handle future HW revisions */ [13] = PKT_HASH_TYPE_NONE, [14] = PKT_HASH_TYPE_NONE, [15] = PKT_HASH_TYPE_NONE,
@@ -7040,7 +7040,7 @@ static enum xdp_rss_hash_type igc_xdp_rss_type[IGC_RSS_TYPE_MAX_TABLE] = { [IGC_RSS_TYPE_HASH_UDP_IPV6_EX] = XDP_RSS_TYPE_L4_IPV6_UDP_EX, [10] = XDP_RSS_TYPE_NONE, /* RSS Type above 9 "Reserved" by HW */ [11] = XDP_RSS_TYPE_NONE, /* keep array sized for SW bit-mask */ - [12] = XDP_RSS_TYPE_NONE, /* to handle future HW revisons */ + [12] = XDP_RSS_TYPE_NONE, /* to handle future HW revisions */ [13] = XDP_RSS_TYPE_NONE, [14] = XDP_RSS_TYPE_NONE, [15] = XDP_RSS_TYPE_NONE,
Signature · 1 line
2.47.1
Tony Nguyen
maintainerPATCH 13/15 ice: add support for unmanaged DPLL on E830 NIC
In reply to Tony NguyenFrom: Arkadiusz Kubalewski <[email protected]>
Hardware variants of E830 may support an unmanaged DPLL where the configuration is hardcoded within the hardware and firmware, meaning users cannot modify settings. However, users are able to check the DPLL lock status and obtain configuration information through the Linux DPLL and devlink health subsystem.
Availability of 'loss of lock' health status code determines if such support is available, if true, register single DPLL device with 1 input and 1 output and provide hardcoded/read only properties of a pin and DPLL device. User is only allowed to check DPLL device status and receive notifications on DPLL lock status change.
When present, the DPLL device locks to an external signal provided through the PCIe/OCP pin. The expected input signal is 1PPS
(1 Pulse Per Second) embedded on a 10MHz reference clock.
The DPLL produces output:
- for MAC (Media Access Control) & PHY (Physical Layer) clocks,
- 1PPS for synchronization of onboard PHC (Precision Hardware Clock) timer.
--- .../device_drivers/ethernet/intel/ice.rst | 83 +++++ .../net/ethernet/intel/ice/devlink/health.c | 4 + .../net/ethernet/intel/ice/ice_adminq_cmd.h | 12 + drivers/net/ethernet/intel/ice/ice_common.c | 136 ++++++++ drivers/net/ethernet/intel/ice/ice_common.h | 8 + drivers/net/ethernet/intel/ice/ice_dpll.c | 302 ++++++++++++++++-- drivers/net/ethernet/intel/ice/ice_dpll.h | 10 + drivers/net/ethernet/intel/ice/ice_main.c | 11 +- drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 46 +++ drivers/net/ethernet/intel/ice/ice_ptp_hw.h | 1 + 10 files changed, 592 insertions(+), 21 deletions(-)
Documentation/networking/device_drivers/ethernet/intel/ice.rst +83 -0
@@ -941,6 +941,89 @@ To see input signal on those PTP pins, you need to configure DPLL properly. Output signal is only visible on DPLL and to send it to the board SMA/U.FL pins, DPLL output pins have to be manually configured. +Unmanaged DPLL Support +---------------------- +Hardware variants of E830 may support an unmanaged DPLL: + +- Intel(R) Ethernet Network Adapter E830-XXVDA8F for OCP 3.0, + +- Intel(R) Ethernet Network Adapter E830-XXVDA4F. + +In the case of the unmanaged DPLL, the configuration is hardcoded within the +hardware and firmware, meaning users cannot modify settings. However, +users can check the DPLL lock status and obtain configuration information +through the Linux DPLL subsystem. + +When present, the DPLL device locks to an external signal provided through the +PCIe/OCP pin. The expected input signal is 1PPS (1 Pulse Per Second) embedded +on a 10MHz reference clock. +The DPLL produces output: + +- for MAC (Media Access Control) & PHY (Physical Layer) clocks, + +- 1PPS for synchronization of onboard PHC (Precision Hardware Clock) timer. + +Requirements: The Linux kernel must have support for both the DPLL Subsystem +and the Embedded Sync patch series. + +Example output of querying the Linux DPLL subsystem can be found below. + +.. code-block:: console + :caption: Dumping the DPLL pins + + $ <ynl> --spec Documentation/netlink/specs/dpll.yaml --dump pin-get + [{'board-label': '1588-TIME_SYNC', + 'capabilities': set(), + 'clock-id': 282574471561216, + 'esync-frequency': 1, + 'esync-frequency-supported': [{'frequency-max': 1, 'frequency-min': 1}], + 'esync-pulse': 25, + 'frequency': 10000000, + 'id': 13, + 'module-name': 'ice', + 'parent-device': [{'direction': 'input', + 'parent-id': 6, + 'state': 'connected'}], + 'phase-adjust-max': 0, + 'phase-adjust-min': 0, + 'type': 'ext'}, + {'board-label': 'MAC-PHY-CLK', + 'capabilities': set(), + 'clock-id': 282574471561216, + 'frequency': 156250000, + 'id': 14, + 'module-name': 'ice', + 'parent-device': [{'direction': 'output', + 'parent-id': 6, + 'state': 'connected'}], + 'phase-adjust-max': 0, + 'phase-adjust-min': 0, + 'type': 'synce-eth-port'}, + {'board-label': '1588-TIME_REF', + 'capabilities': set(), + 'clock-id': 282574471561216, + 'frequency': 1, + 'id': 15, + 'module-name': 'ice', + 'parent-device': [{'direction': 'output', + 'parent-id': 6, + 'state': 'connected'}], + 'phase-adjust-max': 0, + 'phase-adjust-min': 0, + 'type': 'int-oscillator'}] + +.. code-block:: console + :caption: Dumping the DPLL devices + + $ <ynl> --spec Documentation/netlink/specs/dpll.yaml --dump device-get + [{'clock-id': 282574471561216, + 'id': 6, + 'lock-status': 'locked', + 'mode': 'manual', + 'mode-supported': ['manual'], + 'module-name': 'ice', + 'type': 'pps'}] + GNSS module ----------- Requires kernel compiled with CONFIG_GNSS=y or CONFIG_GNSS=m.
drivers/net/ethernet/intel/ice/devlink/health.c +4 -0
@@ -101,6 +101,8 @@ static const struct ice_health_status ice_health_status_lookup[] = {"Supplied MIB file is invalid. DCB reverted to default configuration." ,"Disable FW-LLDP and check DCBx system configuration." , {ice_port_number_label, "MIB ID"}}, + {ICE_AQC_HEALTH_STATUS_INFO_LOSS_OF_LOCK ,"Local DPLL lock status" , + NULL,}, };static int ice_health_status_lookup_compare (const void *a,const void *b)
@@ -242,6 +244,8 @@ void ice_process_health_status_event(struct ice_pf *pf, struct ice_rq_event_info pf->health_reporters.fw_status = *health_info;devlink_health_report (pf->health_reporters.fw,"FW syndrome reported" ,NULL ); +if (status_code ==ICE_AQC_HEALTH_STATUS_INFO_LOSS_OF_LOCK ) +ice_dpll_lock_state_set_unmanaged (pf, health_info, true);break ;case ICE_AQC_HEALTH_STATUS_PF :case ICE_AQC_HEALTH_STATUS_PORT :
drivers/net/ethernet/intel/ice/ice_adminq_cmd.h +12 -0
@@ -1498,6 +1498,7 @@ struct ice_aqc_get_link_topo {#define ICE_AQC_GET_LINK_TOPO_NODE_NR_PCA9575 0x21#define ICE_AQC_GET_LINK_TOPO_NODE_NR_ZL30632_80032 0x24#define ICE_AQC_GET_LINK_TOPO_NODE_NR_SI5383_5384 0x25 +#define ICE_AQC_GET_LINK_TOPO_NODE_NR_ZL80640 0x27#define ICE_AQC_GET_LINK_TOPO_NODE_NR_E822_PHY 0x30#define ICE_AQC_GET_LINK_TOPO_NODE_NR_C827 0x31#define ICE_AQC_GET_LINK_TOPO_NODE_NR_GEN_CLK_MUX 0x47
@@ -2481,11 +2482,14 @@ enum ice_aqc_health_status {ICE_AQC_HEALTH_STATUS_ERR_BMC_RESET =0x50B ,ICE_AQC_HEALTH_STATUS_ERR_LAST_MNG_FAIL =0x50C ,ICE_AQC_HEALTH_STATUS_ERR_RESOURCE_ALLOC_FAIL =0x50D , +ICE_AQC_HEALTH_STATUS_INFO_LOSS_OF_LOCK =0x601 ,ICE_AQC_HEALTH_STATUS_ERR_FW_LOOP =0x1000 ,ICE_AQC_HEALTH_STATUS_ERR_FW_PFR_FAIL =0x1001 , ICE_AQC_HEALTH_STATUS_ERR_LAST_FAIL_AQ = 0x1002, }; +#define ICE_AQC_HEALTH_STATUS_CODE_NUM 64 +/* Get Health Status (indirect 0xFF22) */ struct ice_aqc_get_health_status { __le16 health_status_count;
@@ -2512,6 +2516,13 @@ struct ice_aqc_health_status_elem {__le32 internal_data2; }; +/* Get Health Status response buffer entry, (0xFF21) +* repeated per reported health status +*/ +struct ice_aqc_health_status_supp_elem { +__le16 health_status_code; +}; +/* Admin Queue command opcodes */ enum ice_adminq_opc {/* AQ commands */
@@ -2675,6 +2686,7 @@ enum ice_adminq_opc {/* System Diagnostic commands */ ice_aqc_opc_set_health_status_cfg =0xFF20 , + ice_aqc_opc_get_supported_health_status_codes =0xFF21 , ice_aqc_opc_get_health_status = 0xFF22,/* FW Logging Commands */
drivers/net/ethernet/intel/ice/ice_common.c +136 -0
148 lines not on this page · raw message
drivers/net/ethernet/intel/ice/ice_common.h +8 -0
@@ -162,6 +162,7 @@ ice_aq_get_phy_caps(struct ice_port_info *pi, bool qual_mods, u8 report_mode,bool ice_is_phy_rclk_in_netlist (struct ice_hw *hw);bool ice_is_clock_mux_in_netlist (struct ice_hw *hw);bool ice_is_cgu_in_netlist (struct ice_hw *hw); +bool ice_is_unmanaged_cgu_in_netlist (struct ice_hw *hw);bool ice_is_gps_in_netlist (struct ice_hw *hw); int ice_aq_get_netlist_node(struct ice_hw *hw, struct ice_aqc_get_link_topo *cmd,
@@ -188,6 +189,13 @@ ice_get_link_default_override(struct ice_link_default_override_tlv *ldo, struct ice_port_info *pi);bool ice_is_phy_caps_an_enabled (struct ice_aqc_get_phy_caps_data *caps);bool ice_is_fw_health_report_supported (struct ice_hw *hw); +int ice_aq_get_health_status (struct ice_hw *hw, +struct ice_aqc_health_status_elem *buff,int num); +int ice_is_health_status_code_supported (struct ice_hw *hw,u16 code, +bool *supported); +int ice_get_last_health_status_code (struct ice_hw *hw, +struct ice_aqc_health_status_elem *out, +u16 code);int ice_aq_set_health_status_cfg (struct ice_hw *hw,u8 event_source);int ice_aq_get_phy_equalization (struct ice_hw *hw,u16 data_in,u16 op_code,u8 serdes_num,int *output);
drivers/net/ethernet/intel/ice/ice_dpll.c +282 -20
443 lines not on this page · raw message
drivers/net/ethernet/intel/ice/ice_dpll.h +10 -0
@@ -146,14 +146,22 @@ struct ice_dplls {s32 output_phase_adj_max;u32 periodic_counter;bool generic; + bool unmanaged; };#if IS_ENABLED (CONFIG_PTP_1588_CLOCK )void ice_dpll_init (struct ice_pf *pf);void ice_dpll_deinit (struct ice_pf *pf); +void ice_dpll_lock_state_set_unmanaged (struct ice_pf *pf, +const struct ice_aqc_health_status_elem *buff, +bool notify);#else static inline void ice_dpll_init (struct ice_pf *pf) { }static inline void ice_dpll_deinit (struct ice_pf *pf) { } +static inline void +ice_dpll_lock_state_set_unmanaged (struct ice_pf *pf, +const struct ice_aqc_health_status_elem *buff, +bool notify) { }#endif #endif
@@ -173,3 +181,5 @@ static inline void ice_dpll_deinit(struct ice_pf *pf) { }#define ICE_CGU_R11_SYNCE_S_BYP_CLK GENMASK(6, 1)#define ICE_CGU_BYPASS_MUX_OFFSET_E825C 3 +#define ICE_DPLL_UNMANAGED_PIN_NUM 4 +#define ICE_DPLL_IN_ESYNC_ENABLED ICE_AQC_GET_CGU_IN_CFG_FLG2_ESYNC_EN
drivers/net/ethernet/intel/ice/ice_main.c +10 -1
@@ -4787,7 +4787,9 @@ void ice_deinit_dev(struct ice_pf *pf)static void ice_init_features (struct ice_pf *pf) { +u16 code =ICE_AQC_HEALTH_STATUS_INFO_LOSS_OF_LOCK ;struct device *dev =ice_pf_to_dev (pf); +int err;if (ice_is_safe_mode (pf))return ;
@@ -4799,8 +4801,15 @@ static void ice_init_features(struct ice_pf *pf)if (ice_is_feature_supported (pf,ICE_F_GNSS ))ice_gnss_init (pf); +/* Initialize unmanaged DPLL detection */ + err =ice_is_health_status_code_supported (&pf->hw, code, + &pf->dplls.unmanaged); +if (err || !ice_is_unmanaged_cgu_in_netlist (&pf->hw)) + pf->dplls.unmanaged = false; +if (ice_is_feature_supported (pf,ICE_F_CGU ) || -ice_is_feature_supported (pf,ICE_F_PHY_RCLK )) +ice_is_feature_supported (pf,ICE_F_PHY_RCLK ) || + pf->dplls.unmanaged)ice_dpll_init (pf);/* Note: Flow director init failure is non-fatal to load */
drivers/net/ethernet/intel/ice/ice_ptp_hw.c +46 -0
70 lines not on this page · raw message
drivers/net/ethernet/intel/ice/ice_ptp_hw.h +1 -0
@@ -356,6 +356,7 @@ int ice_read_sma_ctrl(struct ice_hw *hw, u8 *data);int ice_write_sma_ctrl (struct ice_hw *hw,u8 data);int ice_ptp_read_sdp_ac (struct ice_hw *hw,__le16 *entries,uint *num_entries);int ice_cgu_get_num_pins (struct ice_hw *hw,bool input); +int ice_cgu_get_pin_num (struct ice_hw *hw,bool input);enum dpll_pin_type ice_cgu_get_pin_type (struct ice_hw *hw,u8 pin,bool input);struct dpll_pin_frequency *ice_cgu_get_pin_freq_supp (struct ice_hw *hw,u8 pin,bool input,u8 *num);
Signature · 1 line
2.47.1
Paolo Abeni
maintainerRe: [net-next,13/15] ice: add support for unmanaged DPLL on E830 NIC
This is an AI-generated review of your patch. The human sending this email has considered the AI review valid, or at least plausible.
For local reproduction steps see https://netdev-ai.bots.linux.dev/ai-local.html
---
ice: add support for unmanaged DPLL on E830 NIC
Hardware variants of E830 may support an unmanaged DPLL where the configuration is hardcoded within the hardware and firmware, meaning users cannot modify settings. However, users are able to check the DPLL lock status and obtain configuration information through the Linux DPLL and devlink health subsystem.
Quoted 4 lines
drivers/net/ethernet/intel/ice/ice_dpll.c +0
-0
[ ... ]
Quoted 19 lines
drivers/net/ethernet/intel/ice/ice_dpll.c +5
-2@@ -3148,12 +3176,15 @@ ice_dpll_init_direct_pins(struct ice_pf *pf, bool cgu,int ret; ret =ice_dpll_get_pins (pf, pins, start_idx, count, pf->dplls.clock_id); -if (ret) +if (!cgu || ret)return ret; -if (cgu) { + +if (first) { ret =ice_dpll_register_pins (first, pins, ops, count);if (ret) goto release_pins; + } +if (second) { ret =ice_dpll_register_pins (second, pins, ops, count);if (ret) goto unregister_first;
drivers/net/ethernet/intel/ice/ice_dpll.c ice_dpll_init_direct_pins(struct ice_pf *pf, bool cgu, · line 3200
Quoted 9 lines
drivers/net/ethernet/intel/ice/ice_dpll.c +2
-1@@ -3162,7 +3193,8 @@ ice_dpll_init_direct_pins(struct ice_pf *pf, bool cgu,return 0 ; unregister_first: -ice_dpll_unregister_pins (first, pins, ops, count); +if (first) +ice_dpll_unregister_pins (first, pins, ops, count); release_pins:ice_dpll_release_pins (pins, count);return ret;
NULL checks were added to ice_dpll_init_direct_pins for handling unmanaged DPLL initialization where only one DPLL device is active. However, is the corresponding cleanup function ice_dpll_deinit_direct_pins missing the same NULL checks?
In unmanaged mode, only pf->dplls.pps.dpll is initialized while pf->dplls.eec.dpll remains NULL. When ice_dpll_init_pins calls ice_dpll_init_direct_pins(pf, true, outputs, count, num_outputs, output_ops, eec.dpll, pps.dpll), if this second call (for output pins) fails, the error path calls ice_dpll_deinit_direct_pins(pf, true, ..., pps.dpll, eec.dpll).
Looking at ice_dpll_deinit_direct_pins:
static void ice_dpll_deinit_direct_pins(struct ice_pf *pf, bool cgu,
struct ice_dpll_pin *pins, int count, const struct dpll_pin_ops *ops, struct dpll_device *first, struct dpll_device *second)
{
if (cgu) {
ice_dpll_unregister_pins(first, pins, ops, count);
ice_dpll_unregister_pins(second, pins, ops, count);
}
ice_dpll_release_pins(pins, count);
}When cgu=true and second=NULL, ice_dpll_unregister_pins is called with dpll=NULL. Then dpll_pin_unregister(dpll, pin) dereferences dpll with xa_empty(&dpll->pin_refs), causing a NULL pointer dereference.
Shouldn't ice_dpll_deinit_direct_pins add NULL checks for first and second, matching the guards you added in ice_dpll_init_direct_pins?
Quoted 4 lines
drivers/net/ethernet/intel/ice/ice_dpll.h +0
-0
[ ... ]
drivers/net/ethernet/intel/ice/ice_dpll.h static inline void ice_dpll_deinit(struct ice_pf *pf) { } · line 185
Quoted 6 lines
drivers/net/ethernet/intel/ice/ice_dpll.h +2
-0@@ -173,3 +181,5 @@ static inline void ice_dpll_deinit(struct ice_pf *pf) { }#define ICE_CGU_R11_SYNCE_S_BYP_CLK GENMASK(6, 1)#define ICE_CGU_BYPASS_MUX_OFFSET_E825C 3 +#define ICE_DPLL_UNMANAGED_PIN_NUM 4 +#define ICE_DPLL_IN_ESYNC_ENABLED ICE_AQC_GET_CGU_IN_CFG_FLG2_ESYNC_EN
This isn't a bug, but ICE_DPLL_UNMANAGED_PIN_NUM is defined but never used. Looking at the unmanaged pin descriptors, ice_e830_unmanaged_inputs has 1 entry and ice_e830_unmanaged_outputs has 2 entries (totaling 3 pins, not 4).
Tony Nguyen
maintainerRe: [net-next,13/15] ice: add support for unmanaged DPLL on E830 NIC
Quoted 93 lines · Paolo Abeni
This is an AI-generated review of your patch. The human sending this email has considered the AI review valid, or at least plausible.
For local reproduction steps see https://netdev-ai.bots.linux.dev/ai-local.html
---
ice: add support for unmanaged DPLL on E830 NICHardware variants of E830 may support an unmanaged DPLL where the configuration is hardcoded within the hardware and firmware, meaning users cannot modify settings. However, users are able to check the DPLL lock status and obtain configuration information through the Linux DPLL and devlink health subsystem.
Quoted 4 lines
drivers/net/ethernet/intel/ice/ice_dpll.c +0
-0[ ... ]
Quoted 19 lines
drivers/net/ethernet/intel/ice/ice_dpll.c +5
-2@@ -3148,12 +3176,15 @@ ice_dpll_init_direct_pins(struct ice_pf *pf, bool cgu,int ret; ret =ice_dpll_get_pins (pf, pins, start_idx, count, pf->dplls.clock_id); -if (ret) +if (!cgu || ret)return ret; -if (cgu) { + +if (first) { ret =ice_dpll_register_pins (first, pins, ops, count);if (ret) goto release_pins; + } +if (second) { ret =ice_dpll_register_pins (second, pins, ops, count);if (ret) goto unregister_first;drivers/net/ethernet/intel/ice/ice_dpll.c ice_dpll_init_direct_pins(struct ice_pf *pf, bool cgu, · line 3200
Quoted 9 lines
drivers/net/ethernet/intel/ice/ice_dpll.c +2
-1@@ -3162,7 +3193,8 @@ ice_dpll_init_direct_pins(struct ice_pf *pf, bool cgu,return 0 ; unregister_first: -ice_dpll_unregister_pins (first, pins, ops, count); +if (first) +ice_dpll_unregister_pins (first, pins, ops, count); release_pins:ice_dpll_release_pins (pins, count);return ret;NULL checks were added to
ice_dpll_init_direct_pinsfor handling unmanaged DPLL initialization where only one DPLL device is active. However, is the corresponding cleanup functionice_dpll_deinit_direct_pinsmissing the same NULL checks?In unmanaged mode, only
pf->dplls.pps.dpllis initialized whilepf->dplls.eec.dpllremains NULL. Whenice_dpll_init_pinscallsice_dpll_init_direct_pins(pf, true, outputs, count, num_outputs, output_ops, eec.dpll, pps.dpll), if this second call (for output pins) fails, the error path callsice_dpll_deinit_direct_pins(pf, true, ..., pps.dpll, eec.dpll).Looking at
ice_dpll_deinit_direct_pins:static void ice_dpll_deinit_direct_pins(struct
ice_pf*pf, bool cgu,
structice_dpll_pin*pins, int count, const structdpll_pin_ops*ops, structdpll_device*first, structdpll_device*second){ if (cgu) { ice_dpll_unregister_pins(first, pins, ops, count); ice_dpll_unregister_pins(second, pins, ops, count); } ice_dpll_release_pins(pins, count); }When cgu=true and second=NULL,
ice_dpll_unregister_pinsis called with dpll=NULL. Thendpll_pin_unregister(dpll, pin)dereferences dpll withxa_empty(&dpll->pin_refs), causing a NULL pointer dereference.Shouldn't
ice_dpll_deinit_direct_pinsadd NULL checks for first and second, matching the guards you added inice_dpll_init_direct_pins?Quoted 4 lines
drivers/net/ethernet/intel/ice/ice_dpll.h +0
-0[ ... ]
Quoted 3 lines
drivers/net/ethernet/intel/ice/ice_dpll.h +0
-0@@ -173,3 +181,5 @@ static inline void ice_dpll_deinit(struct ice_pf *pf) { }#define ICE_CGU_R11_SYNCE_S_BYP_CLK GENMASK(6, 1)
Quoted 8 lines
drivers/net/ethernet/intel/ice/ice_dpll.h static inline void ice_dpll_deinit(struct ice_pf *pf) { } · line 185
Quoted 3 lines
drivers/net/ethernet/intel/ice/ice_dpll.h +2
-0#define ICE_CGU_BYPASS_MUX_OFFSET_E825C 3 +#define ICE_DPLL_UNMANAGED_PIN_NUM 4 +#define ICE_DPLL_IN_ESYNC_ENABLED ICE_AQC_GET_CGU_IN_CFG_FLG2_ESYNC_ENThis isn't a bug, but
ICE_DPLL_UNMANAGED_PIN_NUMis defined but never used. Looking at the unmanaged pin descriptors,ice_e830_unmanaged_inputshas 1 entry andice_e830_unmanaged_outputshas 2 entries (totaling 3 pins, not 4).
Hi Paolo,
We're working on changes to resolve these issues.
Thanks,
Tony
Tony Nguyen
maintainerPATCH 14/15 ice: mention fw_activate action along with devlink reload
In reply to Tony NguyenFrom: Jacob Keller <[email protected]>
The ice driver reports a helpful status message when updating firmware indicating what action is necessary to enable the new firmware. This is done because some updates require power cycling or rebooting the machine but some can be activated via devlink.
The ice driver only supports activating firmware with the specific action of "fw_activate" a bare "devlink dev reload" will *not* update the firmware, and will only perform driver reinitialization.
Update the status message to explicitly reflect that the reload must use the fw_activate action.
I considered modifying the text to spell out the full command, but felt that was both overkill and something that would belong better as part of the user space program and not hard coded into the kernel driver output.
--- drivers/net/ethernet/intel/ice/ice_fw_update.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/ice/ice_fw_update.c +1 -1
@@ -726,7 +726,7 @@ static int ice_finalize_update(struct pldmfw *context)switch (priv->reset_level) {case ICE_AQC_NVM_EMPR_FLAG :devlink_flash_update_status_notify (devlink, -"Activate new firmware by devlink reload" , +"Activate new firmware by devlink reload action fw_activate" ,NULL ,0 ,0 );break ;case ICE_AQC_NVM_PERST_FLAG :
Signature · 1 line
2.47.1
Tony Nguyen
maintainerPATCH 15/15 ice: dpll: Fix compilation warning
In reply to Tony NguyenFrom: Przemyslaw Korba <[email protected]>
Introduced by commit ad1df4f2d591 ("ice: dpll: Support E825-C SyncE and dynamic pin discovery"):
ice_dpll.c: In function 'ice_dpll_init':
ice_dpll.c:3588:59: error: '%u' directive output may be truncated writing between 1 and 10 bytes into a region of size 4 [-Werror=format-truncation=] snprintf(pin_name, sizeof(pin_name), "rclk%u", i);
--- drivers/net/ethernet/intel/ice/ice_dpll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/ice/ice_dpll.c +1 -1
@@ -3571,7 +3571,7 @@ static int ice_dpll_init_fwnode_pins(struct ice_pf *pf, struct ice_dpll_pin *pins, int start_idx) { - char pin_name[8]; + char pin_name[16];int i, ret; pf->dplls.wq =create_singlethread_workqueue ("ice_dpll_wq" );
Signature · 1 line
2.47.1