Intel Wired LAN Driver Updates 2026-06-09 (idpf, ice, i40e, iavf, ixgbe, igc, igb, e1000e, e1000)
Subsystems (4)
Tony Nguyen
maintainerMarco Crivellari replaces obsolete use of system_unbound_wq to system_dfl_wq for idpf.
Natalia removes redundant PTP checks on ice.
Corinna Vinschen removes redundant MAC address check on iavf.
Jakub Raczynski replaces open-coded array size calculation to use ARRAY_SIZE for i40e and iavf drivers.
Piotr removes a couple redundant assignments on ixgbe.
Kurt Kanzenbach moves processing of Tx timestamps from system workqueue to BH workqueue for igb.
Alex utilizes ktime_get_* helpers for igb and e1000e.
Daiki Harada replaces napi_schedule() to, more appropriate, napi_schedule_irqoff() call in igb and igc.
Matt Vollrath does the same on e1000e.
Agalakov Daniil skips unnecessary endian conversions on e1000e and e1000.
Maximilian Pezzullo fixes some typos on igb and igc.
The following are changes since commit 9415471e01c1aaac43daa6af3a261dc0c6c3a47c:
selftests/net/openvswitch: guard command substitutions against empty output
and are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue 1GbE
Agalakov Daniil (2):
e1000: limit endianness conversion to boundary words
e1000e: limit endianness conversion to boundary words
Aleksandr Loktionov (2):
igb: use ktime_get_real helpers in igb_ptp_reset()
e1000e: use ktime_get_real_ns() in e1000e_systim_reset()
Corinna Vinschen (1):
iavf: iavf_virtchnl_completion: drop duplicate ether_addr_equal() test
Daiki Harada (2):
igb: use napi_schedule_irqoff() instead of napi_schedule()
igc: use napi_schedule_irqoff() instead of napi_schedule()
Jakub Raczynski (1):
net/intel: Replace manual array size calculation with ARRAY_SIZE
Kurt Kanzenbach (1):
igb: Retrieve Tx timestamp from BH workqueue
Marco Crivellari (1):
idpf: Replace use of system_unbound_wq with system_dfl_wq
Matt Vollrath (1):
e1000e: Use __napi_schedule_irqoff()
Maximilian Pezzullo (2):
igb: fix typos in comments
igc: fix typos in comments
Natalia Wochtman (1):
ice: remove redundant checks from PTP init
Piotr Kwapulinski (1):
ixgbe: e610: remove redundant assignment
.../net/ethernet/intel/e1000/e1000_ethtool.c | 10 ++++++---- drivers/net/ethernet/intel/e1000e/ethtool.c | 19 ++++++++++++------- drivers/net/ethernet/intel/e1000e/netdev.c | 8 ++++---- drivers/net/ethernet/intel/i40e/i40e_adminq.h | 2 +- drivers/net/ethernet/intel/iavf/iavf_adminq.h | 2 +- .../net/ethernet/intel/iavf/iavf_virtchnl.c | 12 +++++------- drivers/net/ethernet/intel/ice/ice_ptp.c | 14 ++++---------- drivers/net/ethernet/intel/idpf/idpf_txrx.c | 2 +- .../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_main.c | 10 +++++----- drivers/net/ethernet/intel/igb/igb_ptp.c | 7 ++++--- drivers/net/ethernet/intel/igc/igc_diag.c | 2 +- drivers/net/ethernet/intel/igc/igc_main.c | 10 +++++----- drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c | 14 ++++---------- 17 files changed, 57 insertions(+), 63 deletions(-)
Signature · 1 line
2.47.1
Tony Nguyen
maintainerPATCH 1/15 idpf: Replace use of system_unbound_wq with system_dfl_wq
From: Marco Crivellari <[email protected]>
This patch continues the effort to refactor workqueue APIs, which has begun with the changes introducing new workqueues and a new alloc_workqueue flag:
commit 128ea9f6ccfb ("workqueue: Add system_percpu_wq and system_dfl_wq") commit 930c2ea566af ("workqueue: Add new WQ_PERCPU flag")
The point of the refactoring is to eventually alter the default behavior of workqueues to become unbound by default so that their workload placement is optimized by the scheduler.
Before that to happen, workqueue users must be converted to the better named new workqueues with no intended behaviour changes:
system_wq -> system_percpu_wq
system_unbound_wq -> system_dfl_wq
This way the old obsolete workqueues (system_wq, system_unbound_wq) can be removed in the future.
--- drivers/net/ethernet/intel/idpf/idpf_txrx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/idpf/idpf_txrx.c +1 -1
@@ -2022,7 +2022,7 @@ static void idpf_tx_read_tstamp(struct idpf_tx_queue *txq, struct sk_buff *skb)/* Fetch timestamp from completion descriptor through * virtchnl msg to report to stack. */ -queue_work (system_unbound_wq, txq->tstamp_task); +queue_work (system_dfl_wq, txq->tstamp_task);break ; }
Signature · 1 line
2.47.1
Tony Nguyen
maintainerPATCH 2/15 ice: remove redundant checks from PTP init
In reply to Tony NguyenFrom: Natalia Wochtman <[email protected]>
Remove unnecessary condition checks in ice_ptp_setup_adapter() and ice_ptp_init(). They are duplicated in ice_pf_src_tmr_owned().
Change ice_ptp_setup_adapter() to return void.
--- drivers/net/ethernet/intel/ice/ice_ptp.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-)
drivers/net/ethernet/intel/ice/ice_ptp.c +4 -10
@@ -3059,14 +3059,9 @@ void ice_ptp_rebuild(struct ice_pf *pf, enum ice_reset_req reset_type)dev_err (ice_pf_to_dev (pf),"PTP reset failed %d\n" , err); } -static int ice_ptp_setup_adapter (struct ice_pf *pf) +static void ice_ptp_setup_adapter (struct ice_pf *pf) { -if (!ice_pf_src_tmr_owned (pf) || !ice_is_primary (&pf->hw)) -return -EPERM ; - pf->adapter->ctrl_pf = pf; - -return 0 ; }static int ice_ptp_setup_pf (struct ice_pf *pf)
@@ -3309,10 +3304,9 @@ void ice_ptp_init(struct ice_pf *pf)/* If this function owns the clock hardware, it must allocate and * configure the PTP clock device to represent it. */ -if (ice_pf_src_tmr_owned (pf) &&ice_is_primary (hw)) { - err =ice_ptp_setup_adapter (pf); -if (err) - goto err_exit; +if (ice_pf_src_tmr_owned (pf)) { +ice_ptp_setup_adapter (pf); + err =ice_ptp_init_owner (pf);if (err) goto err_exit;
Signature · 1 line
2.47.1
Tony Nguyen
maintainerPATCH 3/15 iavf: iavf_virtchnl_completion: drop duplicate ether_addr_equal() test
In reply to Tony NguyenFrom: Corinna Vinschen <[email protected]>
This is just a simple cleanup fix. Commit 35a2443d0910f ("iavf: Add waiting for response from PF in set mac") introduced a duplicate ether_addr_equal() check, so the current code tests the new MAC twice against the former MAC.
Remove the outer ether_addr_equal() test, remnant of commit c5c922b3e09b ("iavf: fix MAC address setting for VFs when filter is rejected")
--- drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c +5 -7
@@ -2550,13 +2550,11 @@ void iavf_virtchnl_completion(struct iavf_adapter *adapter,case VIRTCHNL_OP_ADD_ETH_ADDR :if (!v_retval)iavf_mac_add_ok (adapter); -if (!ether_addr_equal (netdev->dev_addr, adapter->hw.mac.addr)) -if (!ether_addr_equal (netdev->dev_addr, - adapter->hw.mac.addr)) { -netif_addr_lock_bh (netdev); -eth_hw_addr_set (netdev, adapter->hw.mac.addr); -netif_addr_unlock_bh (netdev); - } +if (!ether_addr_equal (netdev->dev_addr, adapter->hw.mac.addr)) { +netif_addr_lock_bh (netdev); +eth_hw_addr_set (netdev, adapter->hw.mac.addr); +netif_addr_unlock_bh (netdev); + }wake_up (&adapter->vc_waitqueue);break ;case VIRTCHNL_OP_GET_STATS : {
Signature · 1 line
2.47.1
Tony Nguyen
maintainerPATCH 4/15 net/intel: Replace manual array size calculation with ARRAY_SIZE
In reply to Tony NguyenFrom: Jakub Raczynski <[email protected]>
There are still places in the code where manual calculation of array size exist, but it is good to enforce usage of single macro through the whole code as it makes code bit more readable.
While at it, beautify condition surrounding it by reversing check and remove unnecessary casting.
--- drivers/net/ethernet/intel/i40e/i40e_adminq.h | 2 +- drivers/net/ethernet/intel/iavf/iavf_adminq.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_adminq.h +1 -1
@@ -109,7 +109,7 @@ static inline int i40e_aq_rc_to_posix(int aq_ret, int aq_rc) -EFBIG, /* I40E_AQ_RC_EFBIG */ }; -if (!((u32 )aq_rc < (sizeof (aq_to_posix) /sizeof ((aq_to_posix)[0 ])))) +if (aq_rc >=ARRAY_SIZE (aq_to_posix))return -ERANGE ;return aq_to_posix[aq_rc];
drivers/net/ethernet/intel/iavf/iavf_adminq.h +1 -1
@@ -113,7 +113,7 @@ static inline int iavf_aq_rc_to_posix(int aq_ret, int aq_rc)if (aq_ret ==IAVF_ERR_ADMIN_QUEUE_TIMEOUT )return -EAGAIN ; -if (!((u32 )aq_rc < (sizeof (aq_to_posix) /sizeof ((aq_to_posix)[0 ])))) +if (aq_rc >=ARRAY_SIZE (aq_to_posix))return -ERANGE ;return aq_to_posix[aq_rc];
Signature · 1 line
2.47.1
Tony Nguyen
maintainerPATCH 5/15 ixgbe: e610: remove redundant assignment
In reply to Tony NguyenFrom: Piotr Kwapulinski <[email protected]>
Remove unnecessary code. No functional impact.
--- drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-)
drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c +4 -10
@@ -142,20 +142,14 @@ static int ixgbe_aci_send_cmd_execute(struct ixgbe_hw *hw, IXGBE_PF_HICR);/* Read sync Admin Command response */ -if ((hicr &IXGBE_PF_HICR_SV )) { -for (i =0 ; i <IXGBE_ACI_DESC_SIZE_IN_DWORDS ; i++) { +if ((hicr &IXGBE_PF_HICR_SV )) +for (i =0 ; i <IXGBE_ACI_DESC_SIZE_IN_DWORDS ; i++) raw_desc[i] =IXGBE_READ_REG (hw,IXGBE_PF_HIDA (i)); - raw_desc[i] = raw_desc[i]; - } - }/* Read async Admin Command response */ -if ((hicr &IXGBE_PF_HICR_EV ) && !(hicr &IXGBE_PF_HICR_C )) { -for (i =0 ; i <IXGBE_ACI_DESC_SIZE_IN_DWORDS ; i++) { +if ((hicr &IXGBE_PF_HICR_EV ) && !(hicr &IXGBE_PF_HICR_C )) +for (i =0 ; i <IXGBE_ACI_DESC_SIZE_IN_DWORDS ; i++) raw_desc[i] =IXGBE_READ_REG (hw,IXGBE_PF_HIDA_2 (i)); - raw_desc[i] = raw_desc[i]; - } - }/* Handle timeout and invalid state of HICR register */ if (hicr &IXGBE_PF_HICR_C )
Signature · 1 line
2.47.1
Tony Nguyen
maintainerPATCH 6/15 igb: Retrieve Tx timestamp from BH workqueue
In reply to Tony NguyenFrom: Kurt Kanzenbach <[email protected]>
Retrieve Tx timestamp from system BH instead of regular system workqueue.
The current implementation uses schedule_work() which is executed by the system work queue and kworkers to retrieve Tx timestamps. This increases latency and can lead to timeouts in case of heavy system load. i210 is often used in industrial systems, where timestamp timeouts can be fatal.
Therefore, switch to the system BH workqueues which are executed in softirq context shortly after the IRQ handler returns.
Tested between Intel i210 and i350 with ptp4l gPTP profile:
|ptp4l[30.405]: rms 4 max 7 freq +12825 +/- 3 delay 247 +/- 0 |ptp4l[31.406]: rms 2 max 3 freq +12829 +/- 3 delay 248 +/- 0 |ptp4l[32.406]: rms 3 max 3 freq +12827 +/- 3 delay 248 +/- 0 |ptp4l[33.406]: rms 2 max 3 freq +12827 +/- 3 delay 248 +/- 0 |ptp4l[34.407]: rms 3 max 6 freq +12825 +/- 4 delay 248 +/- 0 |ptp4l[35.407]: rms 3 max 6 freq +12822 +/- 4 delay 246 +/- 0 |ptp4l[36.407]: rms 7 max 10 freq +12812 +/- 5 delay 248 +/- 0 |ptp4l[37.408]: rms 5 max 8 freq +12808 +/- 3 delay 248 +/- 0
Furthermore, Miroslav Lichvar tested with ntpperf and chrony on Intel i350:
Without the patch:
| | responses | response time (ns) |rate clients | lost invalid basic xleave | min mean max stddev |150000 15000 0.00% 0.00% 0.00% 100.00% +4188 +36475 +193328 16179 |157500 15750 0.02% 0.00% 0.02% 99.96% +6373 +42969 +683894 22682 |165375 16384 0.03% 0.00% 0.00% 99.97% +7911 +43960 +692471 24454 |173643 16384 0.06% 0.00% 0.00% 99.94% +8323 +45627 +707240 28452 |182325 16384 0.06% 0.00% 0.00% 99.94% +8404 +47292 +722524 26936 |191441 16384 0.00% 0.00% 0.00% 100.00% +8930 +51738 +223727 14272 |201013 16384 0.05% 0.00% 0.00% 99.95% +9634 +53696 +776445 23783 |211063 16384 0.00% 0.00% 0.00% 100.00% +14393 +54558 +329546 20473 |221616 16384 2.59% 0.00% 0.05% 97.36% +23924 +321205 +518192 21838 |232696 16384 7.00% 0.00% 0.10% 92.90% +33396 +337709 +575661 21017 |244330 16384 10.82% 0.00% 0.15% 89.03% +34188 +340248 +556237 20880 | |With the patch: |150000 15000 5.11% 0.00% 0.00% 94.88% +4426 +460642 +640884 83746 |157500 15750 11.54% 0.00% 0.26% 88.20% +14434 +543656 +738355 30349 |165375 16384 15.61% 0.00% 0.31% 84.08% +35822 +515304 +833859 25596 |173643 16384 19.58% 0.00% 0.37% 80.05% +20762 +568962 +900100 28118 |182325 16384 23.46% 0.00% 0.42% 76.13% +41829 +547974 +804170 27890 |191441 16384 27.23% 0.00% 0.46% 72.31% +15182 +557920 +798212 28868 |201013 16384 30.51% 0.00% 0.49% 69.00% +15980 +560764 +805576 29979 |211063 16384 0.06% 0.00% 0.00% 99.94% +12668 +80487 +410555 62182 |221616 16384 2.94% 0.00% 0.05% 97.00% +21587 +342769 +517566 23359 |232696 16384 6.94% 0.00% 0.10% 92.96% +16581 +336068 +484574 18453 |244330 16384 11.45% 0.00% 0.14% 88.41% +23608 +345023 +564130 19177
There are some minor differences at lower rates, but no performance regressions at higher ones.
--- drivers/net/ethernet/intel/igb/igb_main.c | 4 ++-- drivers/net/ethernet/intel/igb/igb_ptp.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/intel/igb/igb_main.c +2 -2
@@ -6571,7 +6571,7 @@ netdev_tx_t igb_xmit_frame_ring(struct sk_buff *skb, adapter->ptp_tx_skb =skb_get (skb); adapter->ptp_tx_start = jiffies;if (adapter->hw.mac.type == e1000_82576) -schedule_work (&adapter->ptp_tx_work); +queue_work (system_bh_wq, &adapter->ptp_tx_work); }else { adapter->tx_hwtstamp_skipped++; }
@@ -7075,7 +7075,7 @@ static void igb_tsync_interrupt(struct igb_adapter *adapter)if (tsicr &E1000_TSICR_TXTS ) {/* retrieve hardware timestamp */ -schedule_work (&adapter->ptp_tx_work); +queue_work (system_bh_wq, &adapter->ptp_tx_work); }if (tsicr &TSINTR_TT0 )
drivers/net/ethernet/intel/igb/igb_ptp.c +1 -1
@@ -832,7 +832,7 @@ static void igb_ptp_tx_work(struct work_struct *work)igb_ptp_tx_hwtstamp (adapter); else/* reschedule to check later */ - schedule_work(&adapter->ptp_tx_work); + queue_work(system_bh_wq, &adapter->ptp_tx_work); }static void igb_ptp_overflow_check (struct work_struct *work)
Signature · 1 line
2.47.1
Simon Horman
reviewerRe: [PATCH net-next 06/15] igb: Retrieve Tx timestamp from BH workqueue
This is an AI-generated review of your patch. The human sending this email has considered the AI review valid, or at least plausible. Full review at: https://sashiko.dev
---
igb: Retrieve Tx timestamp from BH workqueue
Retrieve Tx timestamp from system BH instead of regular system workqueue.
The current implementation uses schedule_work() which is executed by the system work queue and kworkers to retrieve Tx timestamps. This increases latency and can lead to timeouts in case of heavy system load. i210 is often used in industrial systems, where timestamp timeouts can be fatal.
Simon says:
I think that first issue below, flagged as pre-existing, can be considered in the context of possible follow-up.
However, the issues flagged below that, regarding scheduling work and possible softirq storms, do seem to be something that warrants investigation in the context of this patch-set.
drivers/net/ethernet/intel/igb/igb_main.c netdev_tx_t igb_xmit_frame_ring(struct sk_buff *skb,
Quoted 5 lines
drivers/net/ethernet/intel/igb/igb_main.c +0
-0@@ -6571,7 +6571,7 @@ netdev_tx_t igb_xmit_frame_ring(struct sk_buff *skb,
[Severity: High]
This is a pre-existing issue, but does this function modify the shared SKB data area without verifying exclusive ownership?
In igb_xmit_frame_ring(), just before the work is queued:
if (adapter->tstamp_config.tx_type == HWTSTAMP_TX_ON &&
!test_and_set_bit_lock(__IGB_PTP_TX_IN_PROGRESS,
&adapter->state)) {
skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;If the SKB is cloned (e.g. via tc mirred or packet sniffers), won't modifying the shared shinfo region create a data race with other network paths?
[Severity: High]
This is a pre-existing issue, but can the error path sleep in atomic context?
igb_xmit_frame_ring() runs in atomic context as the ndo_start_xmit callback, but the cleanup path calls a blocking function:
cleanup_tx_tstamp:
if (unlikely(tx_flags & IGB_TX_FLAGS_TSTAMP)) {
...
if (adapter->hw.mac.type == e1000_82576)
cancel_work_sync(&adapter->ptp_tx_work);Could this trigger scheduling while atomic warnings or potential deadlocks?
drivers/net/ethernet/intel/igb/igb_main.c netdev_tx_t igb_xmit_frame_ring(struct sk_buff *skb, · line 6574
Quoted 5 lines
drivers/net/ethernet/intel/igb/igb_main.c +1
-1adapter->ptp_tx_skb =skb_get (skb); adapter->ptp_tx_start = jiffies;if (adapter->hw.mac.type == e1000_82576) -schedule_work (&adapter->ptp_tx_work); +queue_work (system_bh_wq, &adapter->ptp_tx_work);
[Severity: High]
Does this change introduce a softirq polling storm for e1000_82576 MACs?
For this specific MAC type, the work is scheduled immediately upon packet transmission. When queueing to system_bh_wq instead of a regular workqueue, the polling loop in igb_ptp_tx_work() will now run in softirq context.
Quoted 3 lines
drivers/net/ethernet/intel/igb/igb_main.c +0
-0}else { adapter->tx_hwtstamp_skipped++; }
[ ... ]
drivers/net/ethernet/intel/igb/igb_ptp.c static void igb_ptp_tx_work(struct work_struct *work) · line 835
Quoted 10 lines
drivers/net/ethernet/intel/igb/igb_ptp.c +1
-1@@ -832,7 +832,7 @@ static void igb_ptp_tx_work(struct work_struct *work)igb_ptp_tx_hwtstamp (adapter); else/* reschedule to check later */ - schedule_work(&adapter->ptp_tx_work); + queue_work(system_bh_wq, &adapter->ptp_tx_work);
[Severity: High]
If the hardware timestamp is not yet valid, won't this work item unconditionally reschedule itself to system_bh_wq without delay?
Because the work requeues itself immediately, this could create a tight polling loop in softirq context, maximizing the CPU's softirq time limit and degrading network processing and overall system latency.
[Severity: High]
This is a pre-existing issue, but is there a use-after-free race condition between igb_ptp_tx_work() and the watchdog task igb_ptp_tx_hang()?
Both functions independently check if the timeout has elapsed using adapter->ptp_tx_start. If igb_ptp_tx_work() detects a timeout, it frees the SKB and clears the state bit, allowing a new PTP packet to be queued:
if (time_is_before_jiffies(adapter->ptp_tx_start +
IGB_PTP_TX_TIMEOUT)) {
dev_kfree_skb_any(adapter->ptp_tx_skb);
...
clear_bit_unlock(__IGB_PTP_TX_IN_PROGRESS, &adapter->state);If igb_ptp_tx_hang() concurrently evaluates the timeout as true based on the old ptp_tx_start but is preempted, could it resume and mistakenly cancel the work for the newly queued packet?
igb_ptp_tx_hang() {
bool timeout = time_is_before_jiffies(adapter->ptp_tx_start +
IGB_PTP_TX_TIMEOUT);
...
if (timeout) {
cancel_work_sync(&adapter->ptp_tx_work);
dev_kfree_skb_any(adapter->ptp_tx_skb);Would this cause a use-after-free by freeing the new SKB and corrupting the driver's PTP state?
Quoted 1 line
drivers/net/ethernet/intel/igb/igb_ptp.c +0
-0}
Jakub Kicinski
maintainerRe: [PATCH net-next 06/15] igb: Retrieve Tx timestamp from BH workqueue
Quoted 7 lines · On Fri, 12 Jun 2026 10:57:44 +0100 Simon Horman wrote:
drivers/net/ethernet/intel/igb/igb_ptp.c static void igb_ptp_tx_work(struct work_struct *work) · line 835
Quoted 3 lines
drivers/net/ethernet/intel/igb/igb_ptp.c +1
-1/* reschedule to check later */ -schedule_work (&adapter->ptp_tx_work); +queue_work (system_bh_wq, &adapter->ptp_tx_work);[Severity: High]
If the hardware timestamp is not yet valid, won't this work item unconditionally reschedule itself tosystem_bh_wqwithout delay?
This sounds correct, the patch is basically busy polling from a tasklet. BH workqueue is not just another work queue.
Re: [PATCH net-next 06/15] igb: Retrieve Tx timestamp from BH workqueue
Quoted 11 lines · Jakub Kicinski
Quoted 7 lines · On Fri, 12 Jun 2026 10:57:44 +0100 Simon Horman wrote:
drivers/net/ethernet/intel/igb/igb_ptp.c static void igb_ptp_tx_work(struct work_struct *work) · line 835
Quoted 3 lines
drivers/net/ethernet/intel/igb/igb_ptp.c +1
-1/* reschedule to check later */ -schedule_work (&adapter->ptp_tx_work); +queue_work (system_bh_wq, &adapter->ptp_tx_work);[Severity: High]
If the hardware timestamp is not yet valid, won't this work item unconditionally reschedule itself tosystem_bh_wqwithout delay?This sounds correct, the patch is basically busy polling from a tasklet. BH workqueue is not just another work queue.
Indeed, thanks for the report. Please, drop this patch for now. I'll get an Intel 82576 NIC and see how this can be fixed.
Thanks,
Kurt
Tony Nguyen
maintainerPATCH 7/15 igb: use ktime_get_real helpers in igb_ptp_reset()
In reply to Tony NguyenFrom: Aleksandr Loktionov <[email protected]>
Replace ktime_to_ns(ktime_get_real()) with the direct equivalent ktime_get_real_ns() and ktime_to_timespec64(ktime_get_real()) with ktime_get_real_ts64() in igb_ptp_reset(). Using the combined helpers makes the intent clearer.
--- drivers/net/ethernet/intel/igb/igb_ptp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/igb/igb_ptp.c +3 -2
@@ -1500,12 +1500,13 @@ void igb_ptp_reset(struct igb_adapter *adapter)/* Re-initialize the timer. */ if ((hw->mac.type == e1000_i210) || (hw->mac.type == e1000_i211)) { -struct timespec64 ts =ktime_to_timespec64 (ktime_get_real ()); +struct timespec64 ts; +ktime_get_real_ts64 (&ts);igb_ptp_write_i210 (adapter, &ts); }else {timecounter_init (&adapter->tc, &adapter->cc, -ktime_to_ns (ktime_get_real ())); +ktime_get_real_ns ()); } out:spin_unlock_irqrestore (&adapter->tmreg_lock, flags);
Signature · 1 line
2.47.1
Tony Nguyen
maintainerPATCH 8/15 e1000e: use ktime_get_real_ns() in e1000e_systim_reset()
In reply to Tony NguyenFrom: Aleksandr Loktionov <[email protected]>
Replace ktime_to_ns(ktime_get_real()) with the direct equivalent ktime_get_real_ns() in e1000e_systim_reset(). Using the combined helper avoids the unnecessary intermediate ktime_t variable and makes the intent clearer.
--- drivers/net/ethernet/intel/e1000e/netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/e1000e/netdev.c +1 -1
@@ -3943,7 +3943,7 @@ static void e1000e_systim_reset(struct e1000_adapter *adapter)/* reset the systim ns time counter */ spin_lock_irqsave (&adapter->systim_lock, flags);timecounter_init (&adapter->tc, &adapter->cc, -ktime_to_ns (ktime_get_real ())); +ktime_get_real_ns ());spin_unlock_irqrestore (&adapter->systim_lock, flags);/* restore the previous hwtstamp configuration settings */
Signature · 1 line
2.47.1
Tony Nguyen
maintainerPATCH 9/15 igb: use napi_schedule_irqoff() instead of napi_schedule()
In reply to Tony NguyenFrom: Daiki Harada <[email protected]>
Replace napi_schedule() with napi_schedule_irqoff() in the interrupt handler path in igb driver
Tested on QEMU with igb NIC emulation (-nic user,model=igb)
--- drivers/net/ethernet/intel/igb/igb_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/intel/igb/igb_main.c +3 -3
@@ -7157,7 +7157,7 @@ static irqreturn_t igb_msix_ring(int irq, void *data)/* Write the ITR value calculated from the previous interrupt. */ igb_write_itr (q_vector); -napi_schedule (&q_vector->napi); +napi_schedule_irqoff (&q_vector->napi);return IRQ_HANDLED ; }
@@ -8198,7 +8198,7 @@ static irqreturn_t igb_intr_msi(int irq, void *data)if (icr &E1000_ICR_TS )igb_tsync_interrupt (adapter); -napi_schedule (&q_vector->napi); +napi_schedule_irqoff (&q_vector->napi);return IRQ_HANDLED ; }
@@ -8244,7 +8244,7 @@ static irqreturn_t igb_intr(int irq, void *data)if (icr &E1000_ICR_TS )igb_tsync_interrupt (adapter); -napi_schedule (&q_vector->napi); +napi_schedule_irqoff (&q_vector->napi);return IRQ_HANDLED ; }
Signature · 1 line
2.47.1
Tony Nguyen
maintainerPATCH 10/15 igc: use napi_schedule_irqoff() instead of napi_schedule()
In reply to Tony NguyenFrom: Daiki Harada <[email protected]>
Replace napi_schedule() with napi_schedule_irqoff() in the interrupt handler path in igc driver Tested on Intel Corporation Ethernet Controller I226-V.
--- drivers/net/ethernet/intel/igc/igc_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/intel/igc/igc_main.c +3 -3
@@ -5688,7 +5688,7 @@ static irqreturn_t igc_msix_ring(int irq, void *data)/* Write the ITR value calculated from the previous interrupt. */ igc_write_itr (q_vector); -napi_schedule (&q_vector->napi); +napi_schedule_irqoff (&q_vector->napi);return IRQ_HANDLED ; }
@@ -6059,7 +6059,7 @@ static irqreturn_t igc_intr_msi(int irq, void *data)if (icr &IGC_ICR_TS )igc_tsync_interrupt (adapter); -napi_schedule (&q_vector->napi); +napi_schedule_irqoff (&q_vector->napi);return IRQ_HANDLED ; }
@@ -6105,7 +6105,7 @@ static irqreturn_t igc_intr(int irq, void *data)if (icr &IGC_ICR_TS )igc_tsync_interrupt (adapter); -napi_schedule (&q_vector->napi); +napi_schedule_irqoff (&q_vector->napi);return IRQ_HANDLED ; }
Signature · 1 line
2.47.1
Tony Nguyen
maintainerPATCH 11/15 e1000e: Use __napi_schedule_irqoff()
In reply to Tony NguyenFrom: Matt Vollrath <[email protected]>
The __napi_schedule_irqoff() macro is intended to bypass saving and restoring IRQ state when scheduling is requested from an IRQ handler, where hard interrupts are already disabled. Use this macro in all three interrupt handlers.
This was tested on a system with an I218-V and MSI interrupts. Because this is an optimization, I was interested in measuring the impact, so I added ktime_get() time measurement to e1000_intr_msi and a print of the last sample in the watchdog task. For each test case I ran a bi-directional iperf3 to saturate the line. With some help from awk, here are the statistics.
49 samples each, all units ns
previous: min 678 max 1265 mean 879.429 median 806 stddev 137.188 noirq: min 707 max 1165 mean 811.857 median 790 stddev 89.486
According to this informal comparison, the mean time to handle an interrupt from start to finish is improved by about 8% under load.
--- drivers/net/ethernet/intel/e1000e/netdev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/intel/e1000e/netdev.c +3 -3
@@ -1803,7 +1803,7 @@ static irqreturn_t e1000_intr_msi(int __always_unused irq, void *data) adapter->total_tx_packets =0 ; adapter->total_rx_bytes =0 ; adapter->total_rx_packets =0 ; -__napi_schedule (&adapter->napi); +__napi_schedule_irqoff (&adapter->napi); }return IRQ_HANDLED ;
@@ -1882,7 +1882,7 @@ static irqreturn_t e1000_intr(int __always_unused irq, void *data) adapter->total_tx_packets =0 ; adapter->total_rx_bytes =0 ; adapter->total_rx_packets =0 ; -__napi_schedule (&adapter->napi); +__napi_schedule_irqoff (&adapter->napi); }return IRQ_HANDLED ;
@@ -1951,7 +1951,7 @@ static irqreturn_t e1000_intr_msix_rx(int __always_unused irq, void *data)if (napi_schedule_prep (&adapter->napi)) { adapter->total_rx_bytes =0 ; adapter->total_rx_packets =0 ; -__napi_schedule (&adapter->napi); +__napi_schedule_irqoff (&adapter->napi); }return IRQ_HANDLED ; }
Signature · 1 line
2.47.1
Tony Nguyen
maintainerPATCH 12/15 e1000: limit endianness conversion to boundary words
In reply to Tony NguyenFrom: Agalakov Daniil <[email protected]>
[Why]
In e1000_set_eeprom(), the eeprom_buff is allocated to hold a range of words. However, only the boundary words (the first and the last) are populated from the EEPROM if the write request is not word-aligned. The words in the middle of the buffer remain uninitialized because they are intended to be completely overwritten by the new data via memcpy().
The previous implementation had a loop that performed le16_to_cpus() on the entire buffer. This resulted in endianness conversion being performed on uninitialized memory for all interior words.
Fix this by converting the endianness only for the boundary words immediately after they are successfully read from the EEPROM.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
--- drivers/net/ethernet/intel/e1000/e1000_ethtool.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/net/ethernet/intel/e1000/e1000_ethtool.c +6 -4
@@ -499,6 +499,9 @@ static int e1000_set_eeprom(struct net_device *netdev,if (ret_val) goto out; +/* Device's eeprom is always little-endian, word addressable */ +le16_to_cpus (&eeprom_buff[0 ]); + ptr++; }if ((eeprom->offset + eeprom->len) &1 ) {
@@ -509,11 +512,10 @@ static int e1000_set_eeprom(struct net_device *netdev, &eeprom_buff[last_word - first_word]);if (ret_val) goto out; - } -/* Device's eeprom is always little-endian, word addressable */ -for (i =0 ; i < last_word - first_word +1 ; i++) -le16_to_cpus (&eeprom_buff[i]); +/* Device's eeprom is always little-endian, word addressable */ +le16_to_cpus (&eeprom_buff[last_word - first_word]); + }memcpy (ptr, bytes, eeprom->len);
Signature · 1 line
2.47.1
Tony Nguyen
maintainerPATCH 13/15 e1000e: limit endianness conversion to boundary words
In reply to Tony NguyenFrom: Agalakov Daniil <[email protected]>
[Why]
In e1000_set_eeprom(), the eeprom_buff is allocated to hold a range of words. However, only the boundary words (the first and the last) are populated from the EEPROM if the write request is not word-aligned. The words in the middle of the buffer remain uninitialized because they are intended to be completely overwritten by the new data via memcpy().
The previous implementation had a loop that performed le16_to_cpus() on the entire buffer. This resulted in endianness conversion being performed on uninitialized memory for all interior words.
Fix this by converting the endianness only for the boundary words immediately after they are successfully read from the EEPROM.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
--- drivers/net/ethernet/intel/e1000e/ethtool.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-)
drivers/net/ethernet/intel/e1000e/ethtool.c +12 -7
@@ -583,20 +583,25 @@ static int e1000_set_eeprom(struct net_device *netdev,/* need read/modify/write of first changed EEPROM word */ /* only the second byte of the word is being modified */ ret_val =e1000_read_nvm (hw, first_word,1 , &eeprom_buff[0 ]); +if (ret_val) + goto out; + +/* Device's eeprom is always little-endian, word addressable */ +le16_to_cpus (&eeprom_buff[0 ]); + ptr++; } -if (((eeprom->offset + eeprom->len) &1 ) && (!ret_val)) +if ((eeprom->offset + eeprom->len) &1 ) {/* need read/modify/write of last changed EEPROM word */ /* only the first byte of the word is being modified */ ret_val =e1000_read_nvm (hw, last_word,1 , &eeprom_buff[last_word - first_word]); +if (ret_val) + goto out; -if (ret_val) - goto out; - -/* Device's eeprom is always little-endian, word addressable */ -for (i =0 ; i < last_word - first_word +1 ; i++) -le16_to_cpus (&eeprom_buff[i]); +/* Device's eeprom is always little-endian, word addressable */ +le16_to_cpus (&eeprom_buff[last_word - first_word]); + }memcpy (ptr, bytes, eeprom->len);
Signature · 1 line
2.47.1
Tony Nguyen
maintainerPATCH 14/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 15/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
@@ -1797,7 +1797,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,
@@ -7039,7 +7039,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
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Tue, 9 Jun 2026 14:35:41 -0700 you wrote:
Marco Crivellari replaces obsolete use of
system_unbound_wqtosystem_dfl_wqfor idpf.Natalia removes redundant PTP checks on ice.
Corinna Vinschen removes redundant MAC address check on iavf.
[...]
Here is the summary with links:
- [net-next,01/15] idpf: Replace use of system_unbound_wq with system_dfl_wq
https://git.kernel.org/netdev/net-next/c/711bdf0b7879 - [net-next,02/15] ice: remove redundant checks from PTP init https://git.kernel.org/netdev/net-next/c/e5652e6d37fe - [net-next,03/15] iavf: iavf_virtchnl_completion: drop duplicate ether_addr_equal() test https://git.kernel.org/netdev/net-next/c/8538aaea10e1 - [net-next,04/15] net/intel: Replace manual array size calculation with ARRAY_SIZE https://git.kernel.org/netdev/net-next/c/48d588dc9f26 - [net-next,05/15] ixgbe: e610: remove redundant assignment https://git.kernel.org/netdev/net-next/c/06be82a0d9d7 - [net-next,06/15] igb: Retrieve Tx timestamp from BH workqueue (no matching commit) - [net-next,07/15] igb: use ktime_get_real helpers in igb_ptp_reset() https://git.kernel.org/netdev/net-next/c/2040b8ba371b - [net-next,08/15] e1000e: use ktime_get_real_ns() in e1000e_systim_reset() https://git.kernel.org/netdev/net-next/c/1b4558e0b4e8 - [net-next,09/15] igb: use napi_schedule_irqoff() instead of napi_schedule() https://git.kernel.org/netdev/net-next/c/ef298ba0f9ed - [net-next,10/15] igc: use napi_schedule_irqoff() instead of napi_schedule() https://git.kernel.org/netdev/net-next/c/046100cdeb98 - [net-next,11/15] e1000e: Use __napi_schedule_irqoff() https://git.kernel.org/netdev/net-next/c/4d9508d97b7b - [net-next,12/15] e1000: limit endianness conversion to boundary words https://git.kernel.org/netdev/net-next/c/4cc8566ae0d1 - [net-next,13/15] e1000e: limit endianness conversion to boundary words https://git.kernel.org/netdev/net-next/c/a5ecafcfb27b - [net-next,14/15] igb: fix typos in comments https://git.kernel.org/netdev/net-next/c/2904b67ba2f1 - [net-next,15/15] igc: fix typos in comments https://git.kernel.org/netdev/net-next/c/d4e035b3a517
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html