public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexander Lobakin <alexandr.lobakin@intel.com>
To: intel-wired-lan@lists.osuosl.org
Cc: Alexander Lobakin <alexandr.lobakin@intel.com>,
	Tony Nguyen <anthony.l.nguyen@intel.com>,
	Jesse Brandeburg <jesse.brandeburg@intel.com>,
	Maciej Fijalkowski <maciej.fijalkowski@intel.com>,
	Michal Swiatkowski <michal.swiatkowski@linux.intel.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH net-next 4/9] iavf: switch to napi_build_skb()
Date: Tue, 23 Nov 2021 18:18:35 +0100	[thread overview]
Message-ID: <20211123171840.157471-5-alexandr.lobakin@intel.com> (raw)
In-Reply-To: <20211123171840.157471-1-alexandr.lobakin@intel.com>

napi_build_skb() reuses per-cpu NAPI skbuff_head cache in order
to save some cycles on freeing/allocating skbuff_heads on every
new Rx or completed Tx.
iavf driver runs Tx completion polling cycle right before the Rx
one and uses napi_consume_skb() to feed the cache with skbuff_heads
of completed entries, so it's never empty and always warm at that
moment. Switch to the napi_build_skb() to relax mm pressure on
heavy Rx.

Signed-off-by: Alexander Lobakin <alexandr.lobakin@intel.com>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
---
 drivers/net/ethernet/intel/iavf/iavf_txrx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/iavf/iavf_txrx.c b/drivers/net/ethernet/intel/iavf/iavf_txrx.c
index 3525eab8e9f9..90fdd828e5d8 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_txrx.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_txrx.c
@@ -1363,7 +1363,7 @@ static struct sk_buff *iavf_build_skb(struct iavf_ring *rx_ring,
 	net_prefetch(va);

 	/* build an skb around the page buffer */
-	skb = build_skb(va - IAVF_SKB_PAD, truesize);
+	skb = napi_build_skb(va - IAVF_SKB_PAD, truesize);
 	if (unlikely(!skb))
 		return NULL;

--
2.33.1


  parent reply	other threads:[~2021-11-23 17:24 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-23 17:18 [PATCH net-next 0/9] intel: switch to napi_build_skb() Alexander Lobakin
2021-11-23 17:18 ` [PATCH net-next 1/9] e1000: switch to napi_consume_skb() Alexander Lobakin
2021-12-28  0:06   ` [Intel-wired-lan] " Brelinski, Tony
2021-11-23 17:18 ` [PATCH net-next 2/9] e1000: switch to napi_build_skb() Alexander Lobakin
2021-12-28  0:07   ` [Intel-wired-lan] " Brelinski, Tony
2021-11-23 17:18 ` [PATCH net-next 3/9] i40e: " Alexander Lobakin
2021-12-03 14:44   ` [Intel-wired-lan] " G, GurucharanX
2021-11-23 17:18 ` Alexander Lobakin [this message]
2021-12-14 12:50   ` [Intel-wired-lan] [PATCH net-next 4/9] iavf: " Jankowski, Konrad0
2021-11-23 17:18 ` [PATCH net-next 5/9] ice: " Alexander Lobakin
2021-12-07 10:03   ` [Intel-wired-lan] " G, GurucharanX
2021-11-23 17:18 ` [PATCH net-next 6/9] igb: " Alexander Lobakin
2021-12-22  3:45   ` [Intel-wired-lan] " G, GurucharanX
2021-11-23 17:18 ` [PATCH net-next 7/9] igc: " Alexander Lobakin
2021-12-08  8:15   ` [Intel-wired-lan] " Kraus, NechamaX
2021-11-23 17:18 ` [PATCH net-next 8/9] ixgbe: " Alexander Lobakin
2021-12-03 14:45   ` [Intel-wired-lan] " G, GurucharanX
2021-11-23 17:18 ` [PATCH net-next 9/9] ixgbevf: " Alexander Lobakin
2021-12-12 13:47   ` [Intel-wired-lan] " Jankowski, Konrad0

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=20211123171840.157471-5-alexandr.lobakin@intel.com \
    --to=alexandr.lobakin@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jesse.brandeburg@intel.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maciej.fijalkowski@intel.com \
    --cc=michal.swiatkowski@linux.intel.com \
    --cc=netdev@vger.kernel.org \
    /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