* [PATCH intel-net] ixgbe: xsk: change !netif_carrier_ok() handling in ixgbe_xmit_zc()
@ 2022-02-03 12:58 ` Maciej Fijalkowski
0 siblings, 0 replies; 4+ messages in thread
From: Maciej Fijalkowski @ 2022-02-03 12:58 UTC (permalink / raw)
To: intel-wired-lan
Cc: netdev, bpf, anthony.l.nguyen, kuba, davem, magnus.karlsson,
alexandr.lobakin, jesse.brandeburg, Maciej Fijalkowski,
Maurice Baijens
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>
---
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.33.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Intel-wired-lan] [PATCH intel-net] ixgbe: xsk: change !netif_carrier_ok() handling in ixgbe_xmit_zc()
@ 2022-02-03 12:58 ` Maciej Fijalkowski
0 siblings, 0 replies; 4+ messages in thread
From: Maciej Fijalkowski @ 2022-02-03 12:58 UTC (permalink / raw)
To: intel-wired-lan
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>
---
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.33.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [Intel-wired-lan] [PATCH intel-net] ixgbe: xsk: change !netif_carrier_ok() handling in ixgbe_xmit_zc()
2022-02-03 12:58 ` [Intel-wired-lan] " Maciej Fijalkowski
@ 2022-03-02 5:49 ` Penigalapati, Sandeep
-1 siblings, 0 replies; 4+ messages in thread
From: Penigalapati, Sandeep @ 2022-03-02 5:49 UTC (permalink / raw)
To: Fijalkowski, Maciej, intel-wired-lan
Cc: Maurice Baijens, netdev, kuba, bpf, davem, Karlsson, Magnus
>-----Original Message-----
>From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
>Maciej Fijalkowski
>Sent: Thursday, February 3, 2022 6:28 PM
>To: intel-wired-lan@lists.osuosl.org
>Cc: Maurice Baijens <maurice.baijens@ellips.com>; netdev@vger.kernel.org;
>kuba@kernel.org; bpf@vger.kernel.org; davem@davemloft.net; Karlsson,
>Magnus <magnus.karlsson@intel.com>
>Subject: [Intel-wired-lan] [PATCH intel-net] ixgbe: xsk: change
>!netif_carrier_ok() handling in ixgbe_xmit_zc()
>
>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>
>---
> drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
Tested-by: Sandeep Penigalapati <sandeep.penigalapati@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Intel-wired-lan] [PATCH intel-net] ixgbe: xsk: change !netif_carrier_ok() handling in ixgbe_xmit_zc()
@ 2022-03-02 5:49 ` Penigalapati, Sandeep
0 siblings, 0 replies; 4+ messages in thread
From: Penigalapati, Sandeep @ 2022-03-02 5:49 UTC (permalink / raw)
To: intel-wired-lan
>-----Original Message-----
>From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
>Maciej Fijalkowski
>Sent: Thursday, February 3, 2022 6:28 PM
To: intel-wired-lan@lists.osuosl.org
>Cc: Maurice Baijens <maurice.baijens@ellips.com>; netdev at vger.kernel.org;
>kuba at kernel.org; bpf at vger.kernel.org; davem at davemloft.net; Karlsson,
>Magnus <magnus.karlsson@intel.com>
>Subject: [Intel-wired-lan] [PATCH intel-net] ixgbe: xsk: change
>!netif_carrier_ok() handling in ixgbe_xmit_zc()
>
>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>
>---
> drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
Tested-by: Sandeep Penigalapati <sandeep.penigalapati@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-03-02 5:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-03 12:58 [PATCH intel-net] ixgbe: xsk: change !netif_carrier_ok() handling in ixgbe_xmit_zc() Maciej Fijalkowski
2022-02-03 12:58 ` [Intel-wired-lan] " Maciej Fijalkowski
2022-03-02 5:49 ` Penigalapati, Sandeep
2022-03-02 5:49 ` Penigalapati, Sandeep
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.