From: "Ruinskiy, Dima" <dima.ruinskiy@intel.com>
To: Kohei Enju <kohei@enjuk.jp>, <intel-wired-lan@lists.osuosl.org>,
<netdev@vger.kernel.org>
Cc: Tony Nguyen <anthony.l.nguyen@intel.com>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>, <kohei.enju@gmail.com>,
Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Subject: Re: [PATCH iwl-next v2 2/2] igc: enable build_skb on the non-XDP small-frame RX path
Date: Wed, 18 Mar 2026 17:57:25 +0200 [thread overview]
Message-ID: <a92e54d3-b9ca-4c6b-8b9d-b27720ca26c8@intel.com> (raw)
In-Reply-To: <20260317062205.39406-3-kohei@enjuk.jp>
On 17/03/2026 8:21, Kohei Enju wrote:
> igc implements igc_build_skb(), but it is currently unused because the
> IGC_RING_FLAG_RX_BUILD_SKB_ENABLED bit is never set. Enable the
> build_skb path when XDP is not active and the configured maximum frame
> size fits within IGC_MAX_FRAME_BUILD_SKB.
>
> In a single-queue small-packet (64-byte) RX microbenchmark on my setup,
> enabling build_skb improved the receive rate from about 3.11 Mpps to
> about 3.30 Mpps, while reducing missed packets from about 484 kpps to
> about 300 kpps.
>
> Keep the XDP path unchanged for now, since it uses a different RX buffer
> layout based on XDP_PACKET_HEADROOM, and enabling it there would need
> separate validation and buffer layout adjustments.
>
> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
> Signed-off-by: Kohei Enju <kohei@enjuk.jp>
> ---
> drivers/net/ethernet/intel/igc/igc.h | 4 ++++
> drivers/net/ethernet/intel/igc/igc_main.c | 4 ++++
> 2 files changed, 8 insertions(+)
>
> diff --git a/drivers/net/ethernet/intel/igc/igc.h b/drivers/net/ethernet/intel/igc/igc.h
> index e66799507f81..acbd2c237667 100644
> --- a/drivers/net/ethernet/intel/igc/igc.h
> +++ b/drivers/net/ethernet/intel/igc/igc.h
> @@ -734,6 +734,10 @@ enum igc_ring_flags_t {
>
> #define ring_uses_build_skb(ring) \
> test_bit(IGC_RING_FLAG_RX_BUILD_SKB_ENABLED, &(ring)->flags)
> +#define set_ring_uses_build_skb(ring) \
> + set_bit(IGC_RING_FLAG_RX_BUILD_SKB_ENABLED, &(ring)->flags)
> +#define clear_ring_uses_build_skb(ring) \
> + clear_bit(IGC_RING_FLAG_RX_BUILD_SKB_ENABLED, &(ring)->flags)
>
> static inline unsigned int igc_rx_bufsz(struct igc_ring *ring)
> {
> diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
> index 79192b02e6be..b44f89311a4e 100644
> --- a/drivers/net/ethernet/intel/igc/igc_main.c
> +++ b/drivers/net/ethernet/intel/igc/igc_main.c
> @@ -474,6 +474,7 @@ static void igc_clean_rx_ring(struct igc_ring *ring)
> igc_clean_rx_ring_page_shared(ring);
>
> clear_ring_uses_large_buffer(ring);
> + clear_ring_uses_build_skb(ring);
>
> ring->next_to_alloc = 0;
> ring->next_to_clean = 0;
> @@ -654,6 +655,9 @@ static void igc_configure_rx_ring(struct igc_adapter *adapter,
>
> if (igc_xdp_is_enabled(adapter))
> set_ring_uses_large_buffer(ring);
> + else if (!(adapter->flags & IGC_FLAG_RX_LEGACY) &&
> + adapter->max_frame_size <= IGC_MAX_FRAME_BUILD_SKB)
> + set_ring_uses_build_skb(ring);
>
> /* disable the queue */
> wr32(IGC_RXDCTL(reg_idx), 0);
Reviewed-by: Dima Ruinskiy <dima.ruinskiy@intel.com>
next prev parent reply other threads:[~2026-03-18 15:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-17 6:21 [PATCH iwl-next v2 0/2] igc: enable build_skb path Kohei Enju
2026-03-17 6:21 ` [PATCH iwl-next v2 1/2] igc: set RX hardware timestamps in igc_build_skb() Kohei Enju
2026-03-18 15:56 ` Ruinskiy, Dima
2026-03-23 17:21 ` [Intel-wired-lan] " Dahan, AvigailX
2026-03-17 6:21 ` [PATCH iwl-next v2 2/2] igc: enable build_skb on the non-XDP small-frame RX path Kohei Enju
2026-03-18 15:57 ` Ruinskiy, Dima [this message]
2026-03-23 17:23 ` [Intel-wired-lan] " Dahan, AvigailX
2026-03-19 16:11 ` [PATCH iwl-next v2 0/2] igc: enable build_skb path Simon Horman
2026-03-20 6:05 ` Kohei Enju
2026-03-20 20:30 ` Tony Nguyen
2026-03-21 7:13 ` [Intel-wired-lan] " Kohei Enju
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=a92e54d3-b9ca-4c6b-8b9d-b27720ca26c8@intel.com \
--to=dima.ruinskiy@intel.com \
--cc=aleksandr.loktionov@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=kohei.enju@gmail.com \
--cc=kohei@enjuk.jp \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox