All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jacob Keller <jacob.e.keller@intel.com>
To: Michal Kubiak <michal.kubiak@intel.com>,
	<intel-wired-lan@lists.osuosl.org>
Cc: <maciej.fijalkowski@intel.com>, <aleksander.lobakin@intel.com>,
	<larysa.zaremba@intel.com>, <netdev@vger.kernel.org>,
	<przemyslaw.kitszel@intel.com>, <pmenzel@molgen.mpg.de>,
	<anthony.l.nguyen@intel.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v2 0/3] ice: convert Rx path to Page Pool
Date: Fri, 8 Aug 2025 16:37:39 -0700	[thread overview]
Message-ID: <ebe632af-cd30-4fa5-9c31-51fcc979b300@intel.com> (raw)
In-Reply-To: <20250808155659.1053560-1-michal.kubiak@intel.com>


[-- Attachment #1.1: Type: text/plain, Size: 4171 bytes --]



On 8/8/2025 8:56 AM, Michal Kubiak wrote:
> This series modernizes the Rx path in the ice driver by removing legacy
> code and switching to the Page Pool API. The changes follow the same
> direction as previously done for the iavf driver, and aim to simplify
> buffer management, improve maintainability, and prepare for future
> infrastructure reuse.
> 
> An important motivation for this work was addressing reports of poor
> performance in XDP_TX mode when IOMMU is enabled. The legacy Rx model
> incurred significant overhead due to per-frame DMA mapping, which
> limited throughput in virtualized environments. This series eliminates
> those bottlenecks by adopting Page Pool and bi-directional DMA mapping.
> 
> The first patch removes the legacy Rx path, which relied on manual skb
> allocation and header copying. This path has become obsolete due to the
> availability of build_skb() and the increasing complexity of supporting
> features like XDP and multi-buffer.
> 
> The second patch drops the page splitting and recycling logic. While
> once used to optimize memory usage, this logic introduced significant
> complexity and hotpath overhead. Removing it simplifies the Rx flow and
> sets the stage for Page Pool adoption.
> 
> The final patch switches the driver to use the Page Pool and libeth
> APIs. It also updates the XDP implementation to use libeth_xdp helpers
> and optimizes XDP_TX by avoiding per-frame DMA mapping. This results in
> a significant performance improvement in virtualized environments with
> IOMMU enabled (over 5x gain in XDP_TX throughput). In other scenarios,
> performance remains on par with the previous implementation.
> 
> This conversion also aligns with the broader effort to modularize and
> unify XDP support across Intel Ethernet drivers.
> 
> Tested on various workloads including netperf and XDP modes (PASS, DROP,
> TX) with and without IOMMU. No regressions observed.
> 

Thanks for double checking again against 9K MTU :D

> Last but not least, it is suspected that this series may also help
> mitigate the memory consumption issues recently reported in the driver.
> For further details, see:
> 
> https://lore.kernel.org/intel-wired-lan/CAK8fFZ4hY6GUJNENz3wY9jaYLZXGfpr7dnZxzGMYoE44caRbgw@mail.gmail.com/
> 

I believe we at least resolved the memory leak already, but if this
patch helps us reduce the amount of memory overhead queues take thats
good too.

> Thanks,
> Michal
> 
> ---
> 
> v2:
>  - Fix the traffic hang issue on iperf3 testing while MTU=9K is set (Jake).
>  - Fix crashes on MTU=9K and iperf3 testing (Jake).
>  - Improve the logic in the Rx path after it was integrated with libeth (Jake & Olek).
>  - Remove unused variables and structure members (Jake).
>  - Extract the fix for using a bad allocation counter to a separate patch targeted to "net"
>    (Paul).
> 
> 
> v1: https://lore.kernel.org/intel-wired-lan/20250704161859.871152-1-michal.kubiak@intel.com/
> 
> Michal Kubiak (3):
>   ice: remove legacy Rx and construct SKB
>   ice: drop page splitting and recycling
>   ice: switch to Page Pool
> 
>  drivers/net/ethernet/intel/Kconfig            |   1 +
>  drivers/net/ethernet/intel/ice/ice.h          |   3 +-
>  drivers/net/ethernet/intel/ice/ice_base.c     | 124 ++--
>  drivers/net/ethernet/intel/ice/ice_ethtool.c  |  22 +-
>  drivers/net/ethernet/intel/ice/ice_lib.c      |   1 -
>  drivers/net/ethernet/intel/ice/ice_main.c     |  21 +-
>  drivers/net/ethernet/intel/ice/ice_txrx.c     | 645 +++---------------
>  drivers/net/ethernet/intel/ice/ice_txrx.h     |  41 +-
>  drivers/net/ethernet/intel/ice/ice_txrx_lib.c |  65 +-
>  drivers/net/ethernet/intel/ice/ice_txrx_lib.h |   9 -
>  drivers/net/ethernet/intel/ice/ice_virtchnl.c |   5 +-
>  drivers/net/ethernet/intel/ice/ice_xsk.c      | 146 +---
>  drivers/net/ethernet/intel/ice/ice_xsk.h      |   6 +-
>  13 files changed, 215 insertions(+), 874 deletions(-)
> 

Nice to continue seeing significant code size reductions with efforts
like these.

For the series:

Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Jacob Keller <jacob.e.keller@intel.com>
To: Michal Kubiak <michal.kubiak@intel.com>,
	<intel-wired-lan@lists.osuosl.org>
Cc: <maciej.fijalkowski@intel.com>, <aleksander.lobakin@intel.com>,
	<larysa.zaremba@intel.com>, <netdev@vger.kernel.org>,
	<przemyslaw.kitszel@intel.com>, <pmenzel@molgen.mpg.de>,
	<anthony.l.nguyen@intel.com>
Subject: Re: [PATCH iwl-next v2 0/3] ice: convert Rx path to Page Pool
Date: Fri, 8 Aug 2025 16:37:39 -0700	[thread overview]
Message-ID: <ebe632af-cd30-4fa5-9c31-51fcc979b300@intel.com> (raw)
In-Reply-To: <20250808155659.1053560-1-michal.kubiak@intel.com>


[-- Attachment #1.1: Type: text/plain, Size: 4171 bytes --]



On 8/8/2025 8:56 AM, Michal Kubiak wrote:
> This series modernizes the Rx path in the ice driver by removing legacy
> code and switching to the Page Pool API. The changes follow the same
> direction as previously done for the iavf driver, and aim to simplify
> buffer management, improve maintainability, and prepare for future
> infrastructure reuse.
> 
> An important motivation for this work was addressing reports of poor
> performance in XDP_TX mode when IOMMU is enabled. The legacy Rx model
> incurred significant overhead due to per-frame DMA mapping, which
> limited throughput in virtualized environments. This series eliminates
> those bottlenecks by adopting Page Pool and bi-directional DMA mapping.
> 
> The first patch removes the legacy Rx path, which relied on manual skb
> allocation and header copying. This path has become obsolete due to the
> availability of build_skb() and the increasing complexity of supporting
> features like XDP and multi-buffer.
> 
> The second patch drops the page splitting and recycling logic. While
> once used to optimize memory usage, this logic introduced significant
> complexity and hotpath overhead. Removing it simplifies the Rx flow and
> sets the stage for Page Pool adoption.
> 
> The final patch switches the driver to use the Page Pool and libeth
> APIs. It also updates the XDP implementation to use libeth_xdp helpers
> and optimizes XDP_TX by avoiding per-frame DMA mapping. This results in
> a significant performance improvement in virtualized environments with
> IOMMU enabled (over 5x gain in XDP_TX throughput). In other scenarios,
> performance remains on par with the previous implementation.
> 
> This conversion also aligns with the broader effort to modularize and
> unify XDP support across Intel Ethernet drivers.
> 
> Tested on various workloads including netperf and XDP modes (PASS, DROP,
> TX) with and without IOMMU. No regressions observed.
> 

Thanks for double checking again against 9K MTU :D

> Last but not least, it is suspected that this series may also help
> mitigate the memory consumption issues recently reported in the driver.
> For further details, see:
> 
> https://lore.kernel.org/intel-wired-lan/CAK8fFZ4hY6GUJNENz3wY9jaYLZXGfpr7dnZxzGMYoE44caRbgw@mail.gmail.com/
> 

I believe we at least resolved the memory leak already, but if this
patch helps us reduce the amount of memory overhead queues take thats
good too.

> Thanks,
> Michal
> 
> ---
> 
> v2:
>  - Fix the traffic hang issue on iperf3 testing while MTU=9K is set (Jake).
>  - Fix crashes on MTU=9K and iperf3 testing (Jake).
>  - Improve the logic in the Rx path after it was integrated with libeth (Jake & Olek).
>  - Remove unused variables and structure members (Jake).
>  - Extract the fix for using a bad allocation counter to a separate patch targeted to "net"
>    (Paul).
> 
> 
> v1: https://lore.kernel.org/intel-wired-lan/20250704161859.871152-1-michal.kubiak@intel.com/
> 
> Michal Kubiak (3):
>   ice: remove legacy Rx and construct SKB
>   ice: drop page splitting and recycling
>   ice: switch to Page Pool
> 
>  drivers/net/ethernet/intel/Kconfig            |   1 +
>  drivers/net/ethernet/intel/ice/ice.h          |   3 +-
>  drivers/net/ethernet/intel/ice/ice_base.c     | 124 ++--
>  drivers/net/ethernet/intel/ice/ice_ethtool.c  |  22 +-
>  drivers/net/ethernet/intel/ice/ice_lib.c      |   1 -
>  drivers/net/ethernet/intel/ice/ice_main.c     |  21 +-
>  drivers/net/ethernet/intel/ice/ice_txrx.c     | 645 +++---------------
>  drivers/net/ethernet/intel/ice/ice_txrx.h     |  41 +-
>  drivers/net/ethernet/intel/ice/ice_txrx_lib.c |  65 +-
>  drivers/net/ethernet/intel/ice/ice_txrx_lib.h |   9 -
>  drivers/net/ethernet/intel/ice/ice_virtchnl.c |   5 +-
>  drivers/net/ethernet/intel/ice/ice_xsk.c      | 146 +---
>  drivers/net/ethernet/intel/ice/ice_xsk.h      |   6 +-
>  13 files changed, 215 insertions(+), 874 deletions(-)
> 

Nice to continue seeing significant code size reductions with efforts
like these.

For the series:

Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

  parent reply	other threads:[~2025-08-08 23:37 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-08 15:56 [Intel-wired-lan] [PATCH iwl-next v2 0/3] ice: convert Rx path to Page Pool Michal Kubiak
2025-08-08 15:56 ` Michal Kubiak
2025-08-08 15:56 ` [Intel-wired-lan] [PATCH iwl-next v2 1/3] ice: remove legacy Rx and construct SKB Michal Kubiak
2025-08-08 15:56   ` Michal Kubiak
2025-08-29  6:17   ` [Intel-wired-lan] " Rinitha, SX
2025-08-29  6:17     ` Rinitha, SX
     [not found]   ` <PH0PR11MB5013108C34B30F5DB4F01D019606A@PH0PR11MB5013.namprd11.prod.outlook.com>
2025-09-02  5:56     ` Singh, PriyaX
2025-09-02  5:56       ` Singh, PriyaX
2025-09-03 15:09   ` Alexander Lobakin
2025-09-03 15:09     ` Alexander Lobakin
2025-09-03 16:03     ` [Intel-wired-lan] " Michal Kubiak
2025-09-03 16:03       ` Michal Kubiak
2025-08-08 15:56 ` [Intel-wired-lan] [PATCH iwl-next v2 2/3] ice: drop page splitting and recycling Michal Kubiak
2025-08-08 15:56   ` Michal Kubiak
2025-08-29  6:14   ` [Intel-wired-lan] " Rinitha, SX
2025-08-29  6:14     ` Rinitha, SX
     [not found]   ` <PH0PR11MB501328DFC538260A11368B499606A@PH0PR11MB5013.namprd11.prod.outlook.com>
2025-09-02  6:06     ` Singh, PriyaX
2025-09-03  7:18       ` Singh, PriyaX
2025-09-03  7:53         ` Singh, PriyaX
2025-09-03  7:53           ` Singh, PriyaX
2025-08-08 15:56 ` [Intel-wired-lan] [PATCH iwl-next v2 3/3] ice: switch to Page Pool Michal Kubiak
2025-08-08 15:56   ` Michal Kubiak
2025-08-29  6:12   ` [Intel-wired-lan] " Rinitha, SX
2025-08-29  6:12     ` Rinitha, SX
     [not found]   ` <PH0PR11MB50137E847BF9F0BF2FBF127D9606A@PH0PR11MB5013.namprd11.prod.outlook.com>
2025-09-02  6:13     ` Singh, PriyaX
2025-09-03  7:24       ` Singh, PriyaX
2025-09-03  7:57         ` Singh, PriyaX
2025-09-03  7:57           ` Singh, PriyaX
2025-08-08 23:37 ` Jacob Keller [this message]
2025-08-08 23:37   ` [PATCH iwl-next v2 0/3] ice: convert Rx path " Jacob Keller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ebe632af-cd30-4fa5-9c31-51fcc979b300@intel.com \
    --to=jacob.e.keller@intel.com \
    --cc=aleksander.lobakin@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=larysa.zaremba@intel.com \
    --cc=maciej.fijalkowski@intel.com \
    --cc=michal.kubiak@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pmenzel@molgen.mpg.de \
    --cc=przemyslaw.kitszel@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.