[Intel-wired-lan] [PATCH iwl-next v3 1/3] ice: remove legacy Rx and construct SKB
Sanigani, SarithaX
sarithax.sanigani at intel.com
Fri Oct 31 04:58:52 UTC 2025
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces at osuosl.org<mailto:intel-wired-lan-bounces at osuosl.org>> On Behalf Of Michal Kubiak
> Sent: Thursday, September 25, 2025 2:53 PM
> To: intel-wired-lan at lists.osuosl.org<mailto:intel-wired-lan at lists.osuosl.org>
> Cc: Fijalkowski, Maciej <maciej.fijalkowski at intel.com<mailto:maciej.fijalkowski at intel.com>>; Lobakin, Aleksander <aleksander.lobakin at intel.com<mailto:aleksander.lobakin at intel.com>>; Keller, Jacob E <jacob.e.keller at intel.com<mailto:jacob.e.keller at intel.com>>;
> Zaremba, Larysa <larysa.zaremba at intel.com<mailto:larysa.zaremba at intel.com>>; netdev at vger.kernel.org<mailto:netdev at vger.kernel.org>; Kitszel, Przemyslaw <przemyslaw.kitszel at intel.com<mailto:przemyslaw.kitszel at intel.com>>; pmenzel at molgen.mpg.de<mailto:pmenzel at molgen.mpg.de>;
> Nguyen, Anthony L <anthony.l.nguyen at intel.com<mailto:anthony.l.nguyen at intel.com>>; Kubiak, Michal <michal.kubiak at intel.com<mailto:michal.kubiak at intel.com>>
> Subject: [Intel-wired-lan] [PATCH iwl-next v3 1/3] ice: remove legacy Rx and construct SKB
>
> The commit 53844673d555 ("iavf: kill 'legacy-rx' for good") removed the legacy Rx path in the iavf driver. This change applies the same rationale to the ice driver.
>
> The legacy Rx path relied on manual skb allocation and header copying, which has become increasingly inefficient and difficult to maintain.
> With the stabilization of build_skb() and the growing adoption of features like XDP, page_pool, and multi-buffer support, the legacy approach is no longer viable.
>
> Key drawbacks of the legacy path included:
> - Higher memory pressure due to direct page allocations and splitting;
> - Redundant memcpy() operations for packet headers;
> - CPU overhead from eth_get_headlen() and Flow Dissector usage;
> - Compatibility issues with XDP, which imposes strict headroom and
> tailroom requirements.
>
> The ice driver, like iavf, does not benefit from the minimal headroom savings that legacy Rx once offered, as it already splits pages into fixed halves. Removing this path simplifies the Rx logic, eliminates unnecessary branches in the hotpath, and prepares the driver for upcoming enhancements.
>
> In addition to removing the legacy Rx path, this change also eliminates the custom construct_skb() functions from both the standard and zero-copy (ZC) Rx paths. These are replaced with the build_skb() > and standardized xdp_build_skb_from_zc() helpers, aligning the driver with the modern XDP infrastructure and reducing code duplication.
>
> This cleanup also reduces code complexity and improves maintainability as we move toward a more unified and modern Rx model across drivers.
>
> Co-developed-by: Alexander Lobakin <aleksander.lobakin at intel.com<mailto:aleksander.lobakin at intel.com>>
> Signed-off-by: Alexander Lobakin <aleksander.lobakin at intel.com<mailto:aleksander.lobakin at intel.com>>
> Reviewed-by: Alexander Lobakin <aleksander.lobakin at intel.com<mailto:aleksander.lobakin at intel.com>>
> Reviewed-by: Jacob Keller <jacob.e.keller at intel.com<mailto:jacob.e.keller at intel.com>>
> Signed-off-by: Michal Kubiak <michal.kubiak at intel.com<mailto:michal.kubiak at intel.com>>
> ---
> drivers/net/ethernet/intel/ice/ice.h | 1 -
> drivers/net/ethernet/intel/ice/ice_base.c | 23 +-----
> drivers/net/ethernet/intel/ice/ice_ethtool.c | 5 --
> drivers/net/ethernet/intel/ice/ice_main.c | 11 +--
> drivers/net/ethernet/intel/ice/ice_txrx.c | 86 +-------------------
> drivers/net/ethernet/intel/ice/ice_txrx.h | 16 ----
> drivers/net/ethernet/intel/ice/ice_xsk.c | 72 +---------------
> 7 files changed, 6 insertions(+), 208 deletions(-)
>
Tested-by: Saritha Sanigani <sarithax.sanigani at intel.com<mailto:sarithax.sanigani at intel.com>> (A Contingent Worker at Intel)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20251031/80eec57a/attachment.htm>
More information about the Intel-wired-lan
mailing list