<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/net/ethernet/intel/ice/ice_lib.c, branch linux-6.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.18.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.18.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2026-02-06T15:57:32Z</updated>
<entry>
<title>ice: Fix NULL pointer dereference in ice_vsi_set_napi_queues</title>
<updated>2026-02-06T15:57:32Z</updated>
<author>
<name>Aaron Ma</name>
<email>aaron.ma@canonical.com</email>
</author>
<published>2025-12-25T06:21:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=36126ddbe924727add05a594dedf230d3b575e4d'/>
<id>urn:sha1:36126ddbe924727add05a594dedf230d3b575e4d</id>
<content type='text'>
[ Upstream commit 9bb30be4d89ff9a8d7ab1aa0eb2edaca83431f85 ]

Add NULL pointer checks in ice_vsi_set_napi_queues() to prevent crashes
during resume from suspend when rings[q_idx]-&gt;q_vector is NULL.

Tested adaptor:
60:00.0 Ethernet controller [0200]: Intel Corporation Ethernet Controller E810-XXV for SFP [8086:159b] (rev 02)
        Subsystem: Intel Corporation Ethernet Network Adapter E810-XXV-2 [8086:4003]

SR-IOV state: both disabled and enabled can reproduce this issue.

kernel version: v6.18

Reproduce steps:
Boot up and execute suspend like systemctl suspend or rtcwake.

Log:
&lt;1&gt;[  231.443607] BUG: kernel NULL pointer dereference, address: 0000000000000040
&lt;1&gt;[  231.444052] #PF: supervisor read access in kernel mode
&lt;1&gt;[  231.444484] #PF: error_code(0x0000) - not-present page
&lt;6&gt;[  231.444913] PGD 0 P4D 0
&lt;4&gt;[  231.445342] Oops: Oops: 0000 [#1] SMP NOPTI
&lt;4&gt;[  231.446635] RIP: 0010:netif_queue_set_napi+0xa/0x170
&lt;4&gt;[  231.447067] Code: 31 f6 31 ff c3 cc cc cc cc 0f 1f 80 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1f 44 00 00 48 85 c9 74 0b &lt;48&gt; 83 79 30 00 0f 84 39 01 00 00 55 41 89 d1 49 89 f8 89 f2 48 89
&lt;4&gt;[  231.447513] RSP: 0018:ffffcc780fc078c0 EFLAGS: 00010202
&lt;4&gt;[  231.447961] RAX: ffff8b848ca30400 RBX: ffff8b848caf2028 RCX: 0000000000000010
&lt;4&gt;[  231.448443] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff8b848dbd4000
&lt;4&gt;[  231.448896] RBP: ffffcc780fc078e8 R08: 0000000000000000 R09: 0000000000000000
&lt;4&gt;[  231.449345] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000001
&lt;4&gt;[  231.449817] R13: ffff8b848dbd4000 R14: ffff8b84833390c8 R15: 0000000000000000
&lt;4&gt;[  231.450265] FS:  00007c7b29e9d740(0000) GS:ffff8b8c068e2000(0000) knlGS:0000000000000000
&lt;4&gt;[  231.450715] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
&lt;4&gt;[  231.451179] CR2: 0000000000000040 CR3: 000000030626f004 CR4: 0000000000f72ef0
&lt;4&gt;[  231.451629] PKRU: 55555554
&lt;4&gt;[  231.452076] Call Trace:
&lt;4&gt;[  231.452549]  &lt;TASK&gt;
&lt;4&gt;[  231.452996]  ? ice_vsi_set_napi_queues+0x4d/0x110 [ice]
&lt;4&gt;[  231.453482]  ice_resume+0xfd/0x220 [ice]
&lt;4&gt;[  231.453977]  ? __pfx_pci_pm_resume+0x10/0x10
&lt;4&gt;[  231.454425]  pci_pm_resume+0x8c/0x140
&lt;4&gt;[  231.454872]  ? __pfx_pci_pm_resume+0x10/0x10
&lt;4&gt;[  231.455347]  dpm_run_callback+0x5f/0x160
&lt;4&gt;[  231.455796]  ? dpm_wait_for_superior+0x107/0x170
&lt;4&gt;[  231.456244]  device_resume+0x177/0x270
&lt;4&gt;[  231.456708]  dpm_resume+0x209/0x2f0
&lt;4&gt;[  231.457151]  dpm_resume_end+0x15/0x30
&lt;4&gt;[  231.457596]  suspend_devices_and_enter+0x1da/0x2b0
&lt;4&gt;[  231.458054]  enter_state+0x10e/0x570

Add defensive checks for both the ring pointer and its q_vector
before dereferencing, allowing the system to resume successfully even when
q_vectors are unmapped.

Fixes: 2a5dc090b92cf ("ice: move netif_queue_set_napi to rtnl-protected sections")
Reviewed-by: Aleksandr Loktionov &lt;aleksandr.loktionov@intel.com&gt;
Signed-off-by: Aaron Ma &lt;aaron.ma@canonical.com&gt;
Reviewed-by: Paul Menzel &lt;pmenzel@molgen.mpg.de&gt;
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ice: Avoid detrimental cleanup for bond during interface stop</title>
<updated>2026-01-30T09:32:10Z</updated>
<author>
<name>Dave Ertman</name>
<email>david.m.ertman@intel.com</email>
</author>
<published>2025-11-20T17:58:26Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=753171a695b9342388930b3b15fe5ee485f0e7d5'/>
<id>urn:sha1:753171a695b9342388930b3b15fe5ee485f0e7d5</id>
<content type='text'>
[ Upstream commit a9d45c22ed120cdd15ff56d0a6e4700c46451901 ]

When the user issues an administrative down to an interface that is the
primary for an aggregate bond, the prune lists are being purged. This
breaks communication to the secondary interface, which shares a prune
list on the main switch block while bonded together.

For the primary interface of an aggregate, avoid deleting these prune
lists during stop, and since they are hardcoded to specific values for
the default vlan and QinQ vlans, the attempt to re-add them during the
up phase will quietly fail without any additional problem.

Fixes: 1e0f9881ef79 ("ice: Flesh out implementation of support for SRIOV on bonded interface")
Reviewed-by: Jacob Keller &lt;jacob.e.keller@intel.com&gt;
Reviewed-by: Marcin Szycik &lt;marcin.szycik@linux.intel.com&gt;
Signed-off-by: Dave Ertman &lt;david.m.ertman@intel.com&gt;
Tested-by: Rinitha S &lt;sx.rinitha@intel.com&gt; (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ice: initialize ring_stats-&gt;syncp</title>
<updated>2026-01-30T09:32:10Z</updated>
<author>
<name>Jacob Keller</name>
<email>jacob.e.keller@intel.com</email>
</author>
<published>2025-11-20T20:20:41Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0bc8d94bf66949c5e5207cc5d302a3af39b8f323'/>
<id>urn:sha1:0bc8d94bf66949c5e5207cc5d302a3af39b8f323</id>
<content type='text'>
[ Upstream commit 8439016c3b8b5ab687c2420317b1691585106611 ]

The u64_stats_sync structure is empty on 64-bit systems. However, on 32-bit
systems it contains a seqcount_t which needs to be initialized. While the
memory is zero-initialized, a lack of u64_stats_init means that lockdep
won't get initialized properly. Fix this by adding u64_stats_init() calls
to the rings just after allocation.

Fixes: 2b245cb29421 ("ice: Implement transmit and NAPI support")
Reviewed-by: Aleksandr Loktionov &lt;aleksandr.loktionov@intel.com&gt;
Signed-off-by: Jacob Keller &lt;jacob.e.keller@intel.com&gt;
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
Tested-by: Rinitha S &lt;sx.rinitha@intel.com&gt; (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ice: add E830 Earliest TxTime First Offload support</title>
<updated>2025-09-19T15:42:07Z</updated>
<author>
<name>Paul Greenwalt</name>
<email>paul.greenwalt@intel.com</email>
</author>
<published>2025-08-18T13:22:57Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ccde82e909467abdf098a8ee6f63e1ecf9a47ce5'/>
<id>urn:sha1:ccde82e909467abdf098a8ee6f63e1ecf9a47ce5</id>
<content type='text'>
E830 supports Earliest TxTime First (ETF) hardware offload, which is
configured via the ETF Qdisc on a per-queue basis (see tc-etf(8)). ETF
introduces a new Tx flow mechanism that utilizes a timestamp ring
(tstamp_ring) alongside the standard Tx ring. This timestamp ring is
used to indicate when hardware will transmit a packet. Tx Time is
supported on the first 2048 Tx queues of the device, and the NVM image
limits the maximum number of Tx queues to 2048 for the device.

The allocation and initialization of the timestamp ring occur when the
feature is enabled on a specific Tx queue via tc-etf. The requested Tx
Time queue index cannot be greater than the number of Tx queues
(vsi-&gt;num_txq).

To support ETF, the following flags and bitmap are introduced:

 - ICE_F_TXTIME: Device feature flag set for E830 NICs, indicating ETF
   support.
 - txtime_txqs: PF-level bitmap set when ETF is enabled and cleared
   when disabled for a specific Tx queue. It is used by
   ice_is_txtime_ena() to check if ETF is allocated and configured on
   any Tx queue, which is checked during Tx ring allocation.
 - ICE_TX_FLAGS_TXTIME: Per Tx ring flag set when ETF is allocated and
   configured for a specific Tx queue. It determines ETF status during
   packet transmission and is checked by ice_is_txtime_ena() to verify
   if ETF is enabled on any Tx queue.

Due to a hardware issue that can result in a malicious driver detection
event, additional timestamp descriptors are required when wrapping
around the timestamp ring. Up to 64 additional timestamp descriptors
are reserved, reducing the available Tx descriptors.

To accommodate this, ICE_MAX_NUM_DESC_BY_MAC is introduced, defining:

 - E830: Maximum Tx descriptor count of 8096 (8K - 32 - 64 for timestamp
   fetch descriptors).
 - E810 and E82X: Maximum Tx descriptor count of 8160 (8K - 32).

Reviewed-by: Aleksandr Loktionov &lt;aleksandr.loktionov@intel.com&gt;
Co-developed-by: Alice Michael &lt;alice.michael@intel.com&gt;
Signed-off-by: Alice Michael &lt;alice.michael@intel.com&gt;
Signed-off-by: Paul Greenwalt &lt;paul.greenwalt@intel.com&gt;
Acked-by: Maciej Fijalkowski &lt;maciej.fijalkowski@intel.com&gt;
Tested-by: Rinitha S &lt;sx.rinitha@intel.com&gt; (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue</title>
<updated>2025-07-25T23:01:18Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2025-07-25T23:01:18Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e9e91870ac21ad7941774b62e2b9af2658dc503c'/>
<id>urn:sha1:e9e91870ac21ad7941774b62e2b9af2658dc503c</id>
<content type='text'>
Tony Nguyen says:

====================
libie: commonize adminq structure

Michal Swiatkowski says:

It is a prework to allow reusing some specific Intel code (eq. fwlog).

Move common *_aq_desc structure to libie header and changing
it in ice, ixgbe, i40e and iavf.

Only generic adminq commands can be easily moved to common header, as
rest is slightly different. Format remains the same. It will be better
to correctly move it when it will be needed to commonize other part of
the code.

Move *_aq_str() to new libie module (libie_adminq) and use it across
drivers. The functions are exactly the same in each driver. Some more
adminq helpers/functions can be moved to libie_adminq when needed.

* '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue:
  i40e: use libie_aq_str
  iavf: use libie_aq_str
  ice: use libie_aq_str
  libie: add adminq helper for converting err to str
  iavf: use libie adminq descriptors
  i40e: use libie adminq descriptors
  ixgbe: use libie adminq descriptors
  ice, libie: move generic adminq descriptors to lib
====================

Link: https://patch.msgid.link/20250724182826.3758850-1-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: Fix typos</title>
<updated>2025-07-25T17:29:07Z</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2025-07-23T20:15:05Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=fe09560f82415d6592e74821e031a76eed173a03'/>
<id>urn:sha1:fe09560f82415d6592e74821e031a76eed173a03</id>
<content type='text'>
Fix typos in comments and error messages.

Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: David Arinzon &lt;darinzon@amazon.com&gt;
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
Link: https://patch.msgid.link/20250723201528.2908218-1-helgaas@kernel.org
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>ice: use libie_aq_str</title>
<updated>2025-07-24T16:40:49Z</updated>
<author>
<name>Michal Swiatkowski</name>
<email>michal.swiatkowski@linux.intel.com</email>
</author>
<published>2025-04-25T06:08:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e99c1618f9dfc0ec87660f8df1dc83693f2724ff'/>
<id>urn:sha1:e99c1618f9dfc0ec87660f8df1dc83693f2724ff</id>
<content type='text'>
Simple:
s/ice_aq_str/libie_aq_str

Add libie_aminq module in ice Kconfig.

Reviewed-by: Przemek Kitszel &lt;przemyslaw.kitszel@intel.com&gt;
Signed-off-by: Michal Swiatkowski &lt;michal.swiatkowski@linux.intel.com&gt;
Reviewed-by: Aleksandr Loktionov &lt;aleksandr.loktionov@intel.com&gt;
Tested-by: Rinitha S &lt;sx.rinitha@intel.com&gt; (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
</content>
</entry>
<entry>
<title>ice, libie: move generic adminq descriptors to lib</title>
<updated>2025-07-24T16:22:26Z</updated>
<author>
<name>Michal Swiatkowski</name>
<email>michal.swiatkowski@linux.intel.com</email>
</author>
<published>2025-06-16T20:29:56Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=fdb7f139864aa332ea8f161beb636dc0599c64f2'/>
<id>urn:sha1:fdb7f139864aa332ea8f161beb636dc0599c64f2</id>
<content type='text'>
The descriptor structure is the same in ice, ixgbe and i40e. Move it to
common libie header to use it across different driver.

Leave device specific adminq commands in separate folders. This lead to
a change that need to be done in filling/getting descriptor:
- previous: struct specific_desc *cmd;
	    cmd = &amp;desc.params.specific_desc;
- now: struct specific_desc *cmd;
       cmd = libie_aq_raw(&amp;desc);

Do this changes across the driver to allow clean build. The casting only
have to be done in case of specific descriptors, for generic one union
can still be used.

Changes beside code moving:
- change ICE_ prefix to LIBIE_ prefix (ice_ and libie_ too)
- remove shift variables not otherwise needed (in libie_aq_flags)
- fill/get descriptor data based on desc.params.raw whenever the
  descriptor isn't defined in libie
- move defines from the libie_aq_sth structure outside
- add libie_aq_raw helper and use it instead of explicit casting

Reviewed by: Przemek Kitszel &lt;przemyslaw.kitszel@intel.com&gt;
Reviewed-by: Aleksandr Loktionov &lt;aleksandr.loktionov@intel.com&gt;
Signed-off-by: Michal Swiatkowski &lt;michal.swiatkowski@linux.intel.com&gt;
Tested-by: Rinitha S &lt;sx.rinitha@intel.com&gt; (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
</content>
</entry>
<entry>
<title>ice: move ice_vsi_update_l2tsel to ice_lib.c</title>
<updated>2025-07-10T21:36:58Z</updated>
<author>
<name>Jacob Keller</name>
<email>jacob.e.keller@intel.com</email>
</author>
<published>2025-06-18T22:24:39Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4f98ac2d8e53c414ef79d7ea1fd0201e45d76779'/>
<id>urn:sha1:4f98ac2d8e53c414ef79d7ea1fd0201e45d76779</id>
<content type='text'>
A future change is going to need to call ice_vsi_update_l2tsel from a new
context outside of ice_virtchnl.c

Since this function deals with a generic VSI, move it into ice_lib.c to
enable calling it from other places in the ice driver.

Signed-off-by: Jacob Keller &lt;jacob.e.keller@intel.com&gt;
Reviewed-by: Madhu Chittim &lt;madhu.chittim@intel.com&gt;
Reviewed-by: Przemek Kitszel &lt;przemyslaw.kitszel@intel.com&gt;
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
</content>
</entry>
<entry>
<title>ice: add a separate Rx handler for flow director commands</title>
<updated>2025-06-09T16:56:18Z</updated>
<author>
<name>Michal Kubiak</name>
<email>michal.kubiak@intel.com</email>
</author>
<published>2025-05-14T12:37:24Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=dc5e7a3513efcbf886c53dc5401b524aa3dea92a'/>
<id>urn:sha1:dc5e7a3513efcbf886c53dc5401b524aa3dea92a</id>
<content type='text'>
The "ice" driver implementation uses the control VSI to handle
the flow director configuration for PFs and VFs.

Unfortunately, although a separate VSI type was created to handle flow
director queues, the Rx queue handler was shared between the flow
director and a standard NAPI Rx handler.

Such a design approach was not very flexible. First, it mixed hotpath
and slowpath code, blocking their further optimization. It also created
a huge overkill for the flow director command processing, which is
descriptor-based only, so there is no need to allocate Rx data buffers.

For the above reasons, implement a separate Rx handler for the control
VSI. Also, remove from the NAPI handler the code dedicated to
configuring the flow director rules on VFs.
Do not allocate Rx data buffers to the flow director queues because
their processing is descriptor-based only.
Finally, allow Rx data queues to be allocated only for VSIs that have
netdev assigned to them.

This handler splitting approach is the first step in converting the
driver to use the Page Pool (which can only be used for data queues).

Test hints:
  1. Create a VF for any PF managed by the ice driver.
  2. In a loop, add and delete flow director rules for the VF, e.g.:

       for i in {1..128}; do
           q=$(( i % 16 ))
           ethtool -N ens802f0v0 flow-type tcp4 dst-port "$i" action "$q"
       done

       for i in {0..127}; do
           ethtool -N ens802f0v0 delete "$i"
       done

Suggested-by: Maciej Fijalkowski &lt;maciej.fijalkowski@intel.com&gt;
Suggested-by: Michal Swiatkowski &lt;michal.swiatkowski@intel.com&gt;
Acked-by: Maciej Fijalkowski &lt;maciej.fijalkowski@intel.com&gt;
Reviewed-by: Jacob Keller &lt;jacob.e.keller@intel.com&gt;
Reviewed-by: Przemek Kitszel &lt;przemyslaw.kitszel@intel.com&gt;
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
Signed-off-by: Michal Kubiak &lt;michal.kubiak@intel.com&gt;
Tested-by: Rafal Romanowski &lt;rafal.romanowski@intel.com&gt;
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
</content>
</entry>
</feed>
