From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: davem@davemloft.net, kuba@kernel.org
Cc: Maciej Fijalkowski <maciej.fijalkowski@intel.com>,
netdev@vger.kernel.org, anthony.l.nguyen@intel.com,
magnus.karlsson@intel.com, ast@kernel.org, daniel@iogearbox.net,
hawk@kernel.org, john.fastabend@gmail.com, bpf@vger.kernel.org,
andrii@kernel.org, kpsingh@kernel.org, kafai@fb.com, yhs@fb.com,
songliubraving@fb.com,
Maurice Baijens <maurice.baijens@ellips.com>,
Sandeep Penigalapati <sandeep.penigalapati@intel.com>
Subject: [PATCH net 1/2] ixgbe: xsk: change !netif_carrier_ok() handling in ixgbe_xmit_zc()
Date: Wed, 2 Mar 2022 09:59:27 -0800 [thread overview]
Message-ID: <20220302175928.4129098-2-anthony.l.nguyen@intel.com> (raw)
In-Reply-To: <20220302175928.4129098-1-anthony.l.nguyen@intel.com>
From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Commit c685c69fba71 ("ixgbe: don't do any AF_XDP zero-copy transmit if
netif is not OK") addressed the ring transient state when
MEM_TYPE_XSK_BUFF_POOL was being configured which in turn caused the
interface to through down/up. Maurice reported that when carrier is not
ok and xsk_pool is present on ring pair, ksoftirqd will consume 100% CPU
cycles due to the constant NAPI rescheduling as ixgbe_poll() states that
there is still some work to be done.
To fix this, do not set work_done to false for a !netif_carrier_ok().
Fixes: c685c69fba71 ("ixgbe: don't do any AF_XDP zero-copy transmit if netif is not OK")
Reported-by: Maurice Baijens <maurice.baijens@ellips.com>
Tested-by: Maurice Baijens <maurice.baijens@ellips.com>
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Tested-by: Sandeep Penigalapati <sandeep.penigalapati@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c
index b3fd8e5cd85b..6a5e9cf6b5da 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c
@@ -390,12 +390,14 @@ static bool ixgbe_xmit_zc(struct ixgbe_ring *xdp_ring, unsigned int budget)
u32 cmd_type;
while (budget-- > 0) {
- if (unlikely(!ixgbe_desc_unused(xdp_ring)) ||
- !netif_carrier_ok(xdp_ring->netdev)) {
+ if (unlikely(!ixgbe_desc_unused(xdp_ring))) {
work_done = false;
break;
}
+ if (!netif_carrier_ok(xdp_ring->netdev))
+ break;
+
if (!xsk_tx_peek_desc(pool, &desc))
break;
--
2.31.1
next prev parent reply other threads:[~2022-03-02 17:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-02 17:59 [PATCH net 0/2][pull request] Intel Wired LAN Driver Updates 2022-03-02 Tony Nguyen
2022-03-02 17:59 ` Tony Nguyen [this message]
2022-03-02 17:59 ` [PATCH net 2/2] ice: avoid XDP checks in ice_clean_tx_irq() Tony Nguyen
2022-03-03 16:19 ` Jakub Kicinski
2022-03-03 16:28 ` Jakub Kicinski
2022-03-03 18:25 ` Tony Nguyen
2022-03-03 16:40 ` [PATCH net 0/2][pull request] Intel Wired LAN Driver Updates 2022-03-02 patchwork-bot+netdevbpf
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=20220302175928.4129098-2-anthony.l.nguyen@intel.com \
--to=anthony.l.nguyen@intel.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=hawk@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kpsingh@kernel.org \
--cc=kuba@kernel.org \
--cc=maciej.fijalkowski@intel.com \
--cc=magnus.karlsson@intel.com \
--cc=maurice.baijens@ellips.com \
--cc=netdev@vger.kernel.org \
--cc=sandeep.penigalapati@intel.com \
--cc=songliubraving@fb.com \
--cc=yhs@fb.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