Commit Graph

14 Commits (09cfd3c52ea76f43b3cb15e570aeddf633d65e80)

Author SHA1 Message Date
Dave Ertman 34138ea02a ice: Remove deprecated ice_lag_move_new_vf_nodes() call
Moving the code to handle the LAG part of a VF reset to helper
functions deprecated the function ice_lag_move_new_vf_nodes().
The cleanup missed a call to this function in the error path of
ice_vc_cfg_qs_msg().

In the case that would end in the error path, a NULL pointer would
be encountered due to the empty list of netdevs for members of the
aggregate.

Remove the unnecessary call to ice_lag_move_new_vf_nodes(), and since
this is the only call to this function, remove the function as well.

Fixes: 351d8d8ab6 ("ice: breakout common LAG code into helpers")
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
Tested-by: Priya Singh <priyax.singh@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2025-09-19 08:42:08 -07:00
Paul Greenwalt ccde82e909 ice: add E830 Earliest TxTime First Offload support
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->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 <aleksandr.loktionov@intel.com>
Co-developed-by: Alice Michael <alice.michael@intel.com>
Signed-off-by: Alice Michael <alice.michael@intel.com>
Signed-off-by: Paul Greenwalt <paul.greenwalt@intel.com>
Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2025-09-19 08:42:07 -07:00
Przemek Kitszel e0d2795ab4 ice: finish virtchnl.c split into rss.c
Move functions out of virt/virtchnl.c to virt/rss.c.

Same "git tricks" used as for the split into virt/queues.c
that is immediately preceding this split.

Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2025-08-27 09:20:06 +02:00
Przemek Kitszel 270251b946 ice: extract virt/rss.c: cleanup - p2
Remove remaining portion of the stuff that stays within virtchnl.c,
(separate commits to have nicer, removal-only, history).

Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2025-08-27 09:20:06 +02:00
Przemek Kitszel 4c2ce64efd ice: extract virt/rss.c: cleanup - p1
Start removing stuff from virt/rss.c that will be kept in the main
virtchnl file.

Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2025-08-27 09:20:06 +02:00
Przemek Kitszel 2802bb558e ice: split RSS stuff out of virtchnl.c - copy back
Add copy of virtchnl.c under the original name/location.
Now both virt/virtchnl.c and virt/rss.c have the same content,
and only the former of the two in use.

Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2025-08-27 09:20:05 +02:00
Przemek Kitszel f4e667eb2a ice: split RSS stuff out of virtchnl.c - tmp rename
Temporary rename of virtchnl.c into rss.c

In order to split virtchnl.c in a way that makes it much easier
to still blame new file, we do it via multiple git steps.

Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2025-08-27 09:20:05 +02:00
Przemek Kitszel c762b0a537 ice: finish virtchnl.c split into queues.c
Move queue configuration functions out of virtchnl.c to queues.c.

Technically the move was started by an earlier commit of the series,
that was duplicating virtchnl.c as queues.c (what forces git to nicely
show blame when asked), followed by a couple of cleanup commits (that
removed stuff that is not moved from the new file, again - multiple
commits, to avoid git saving on changes lines by reusing removed lines
as a content of some kept function), with this final commit actually
enabling compilation of the new file, removing stuff from the virtchnl.c,
and making some moved functions visible (via static keyword removal).

Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2025-08-27 09:20:04 +02:00
Przemek Kitszel cfee454ca1 ice: extract virt/queues.c: cleanup - p3
Remove final portion of the stuff that stays within virtchnl.c,
(separate commits to have nicer, removal-only, history).

Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2025-08-27 09:17:43 +02:00
Przemek Kitszel 3061d214ee ice: extract virt/queues.c: cleanup - p2
Remove next piece of the content that stays in virtchnl.c,
(separate commits to have nicer git history).

Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2025-08-27 09:17:43 +02:00
Przemek Kitszel ce5c0fd759 ice: extract virt/queues.c: cleanup - p1
Start removing stuff from virt/queues.c that will be kept in the
main virtchnl file.

Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2025-08-27 09:17:43 +02:00
Przemek Kitszel 879753f395 ice: split queue stuff out of virtchnl.c - copy back
Add copy of virtchnl.c under the original name/location.
Now both virt/virtchnl.c and virt/queues.c have the same content,
and only the former of the two is in use.

Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2025-08-27 09:17:43 +02:00
Przemek Kitszel 1948b867c1 ice: split queue stuff out of virtchnl.c - tmp rename
Temporary rename of virtchnl.c into queues.c

In order to split virtchnl.c in a way that makes it much easier
to still blame new file, we do it via multiple git steps.

Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2025-08-27 09:17:41 +02:00
Przemek Kitszel 5de6c855e2 ice: add virt/ and move ice_virtchnl* files there
Introduce virt/ directory to collect virtchnl files.
We are going to implement a few sizable extensions soon, each of them
increasing virt/ size, so it looks sensible to introduce a new dir.

Suggested-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2025-08-25 10:59:57 +02:00