All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net 0/2][pull request] Intel Wired LAN Driver Updates 2022-03-02
@ 2022-03-02 17:59 Tony Nguyen
  2022-03-02 17:59 ` [PATCH net 1/2] ixgbe: xsk: change !netif_carrier_ok() handling in ixgbe_xmit_zc() Tony Nguyen
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Tony Nguyen @ 2022-03-02 17:59 UTC (permalink / raw)
  To: davem, kuba
  Cc: Tony Nguyen, netdev, maciej.fijalkowski, magnus.karlsson, ast,
	daniel, hawk, john.fastabend, bpf, andrii, kpsingh, kafai, yhs,
	songliubraving

This series contains updates to ixgbe and ice drivers.

Maciej fixes an issue that occurs when carrier is not ok and xsk_pool
is present that will cause ksoftirqd to consume 100% CPU by changing
the value returned when the carrier state is not ok for ixgbe. He also
removes checks against ice_ring_is_xdp() that can't occur for ice.

The following are changes since commit 4761df52f1549cc8c5ffcad0b2095fffe2c5435d:
  Merge git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue 10GbE

Maciej Fijalkowski (2):
  ixgbe: xsk: change !netif_carrier_ok() handling in ixgbe_xmit_zc()
  ice: avoid XDP checks in ice_clean_tx_irq()

 drivers/net/ethernet/intel/ice/ice_txrx.c    | 7 +------
 drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 6 ++++--
 2 files changed, 5 insertions(+), 8 deletions(-)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH net 1/2] ixgbe: xsk: change !netif_carrier_ok() handling in ixgbe_xmit_zc()
  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
  2022-03-02 17:59 ` [PATCH net 2/2] ice: avoid XDP checks in ice_clean_tx_irq() Tony Nguyen
  2022-03-03 16:40 ` [PATCH net 0/2][pull request] Intel Wired LAN Driver Updates 2022-03-02 patchwork-bot+netdevbpf
  2 siblings, 0 replies; 7+ messages in thread
From: Tony Nguyen @ 2022-03-02 17:59 UTC (permalink / raw)
  To: davem, kuba
  Cc: Maciej Fijalkowski, netdev, anthony.l.nguyen, magnus.karlsson,
	ast, daniel, hawk, john.fastabend, bpf, andrii, kpsingh, kafai,
	yhs, songliubraving, Maurice Baijens, Sandeep Penigalapati

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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH net 2/2] ice: avoid XDP checks in ice_clean_tx_irq()
  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 ` [PATCH net 1/2] ixgbe: xsk: change !netif_carrier_ok() handling in ixgbe_xmit_zc() Tony Nguyen
@ 2022-03-02 17:59 ` Tony Nguyen
  2022-03-03 16:19   ` Jakub Kicinski
  2022-03-03 16:40 ` [PATCH net 0/2][pull request] Intel Wired LAN Driver Updates 2022-03-02 patchwork-bot+netdevbpf
  2 siblings, 1 reply; 7+ messages in thread
From: Tony Nguyen @ 2022-03-02 17:59 UTC (permalink / raw)
  To: davem, kuba
  Cc: Maciej Fijalkowski, netdev, anthony.l.nguyen, magnus.karlsson,
	ast, daniel, hawk, john.fastabend, bpf, andrii, kpsingh, kafai,
	yhs, songliubraving, Alexander Lobakin, Kiran Bhandare

From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>

Commit 9610bd988df9 ("ice: optimize XDP_TX workloads") introduced Tx IRQ
cleaning routine dedicated for XDP rings. Currently it is impossible to
call ice_clean_tx_irq() against XDP ring, so it is safe to drop
ice_ring_is_xdp() calls in there.

Fixes: 1c96c16858ba ("ice: update to newer kernel API")
Fixes: cc14db11c8a4 ("ice: use prefetch methods")
Reviewed-by: Alexander Lobakin <alexandr.lobakin@intel.com>
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Tested-by: Kiran Bhandare <kiranx.bhandare@intel.com>  (A Contingent Worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/ice/ice_txrx.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_txrx.c b/drivers/net/ethernet/intel/ice/ice_txrx.c
index 3e38695f1c9d..2a1a12299fbb 100644
--- a/drivers/net/ethernet/intel/ice/ice_txrx.c
+++ b/drivers/net/ethernet/intel/ice/ice_txrx.c
@@ -221,8 +221,7 @@ static bool ice_clean_tx_irq(struct ice_tx_ring *tx_ring, int napi_budget)
 	struct ice_tx_buf *tx_buf;
 
 	/* get the bql data ready */
-	if (!ice_ring_is_xdp(tx_ring))
-		netdev_txq_bql_complete_prefetchw(txring_txq(tx_ring));
+	netdev_txq_bql_complete_prefetchw(txring_txq(tx_ring));
 
 	tx_buf = &tx_ring->tx_buf[i];
 	tx_desc = ICE_TX_DESC(tx_ring, i);
@@ -311,10 +310,6 @@ static bool ice_clean_tx_irq(struct ice_tx_ring *tx_ring, int napi_budget)
 	tx_ring->next_to_clean = i;
 
 	ice_update_tx_ring_stats(tx_ring, total_pkts, total_bytes);
-
-	if (ice_ring_is_xdp(tx_ring))
-		return !!budget;
-
 	netdev_tx_completed_queue(txring_txq(tx_ring), total_pkts, total_bytes);
 
 #define TX_WAKE_THRESHOLD ((s16)(DESC_NEEDED * 2))
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH net 2/2] ice: avoid XDP checks in ice_clean_tx_irq()
  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
  0 siblings, 1 reply; 7+ messages in thread
From: Jakub Kicinski @ 2022-03-03 16:19 UTC (permalink / raw)
  To: Tony Nguyen
  Cc: davem, Maciej Fijalkowski, netdev, magnus.karlsson, ast, daniel,
	hawk, john.fastabend, bpf, andrii, kpsingh, kafai, yhs,
	songliubraving, Alexander Lobakin, Kiran Bhandare

On Wed,  2 Mar 2022 09:59:28 -0800 Tony Nguyen wrote:
> From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
> 
> Commit 9610bd988df9 ("ice: optimize XDP_TX workloads") introduced Tx IRQ
> cleaning routine dedicated for XDP rings. Currently it is impossible to
> call ice_clean_tx_irq() against XDP ring, so it is safe to drop
> ice_ring_is_xdp() calls in there.
> 
> Fixes: 1c96c16858ba ("ice: update to newer kernel API")
> Fixes: cc14db11c8a4 ("ice: use prefetch methods")
> Reviewed-by: Alexander Lobakin <alexandr.lobakin@intel.com>
> Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
> Tested-by: Kiran Bhandare <kiranx.bhandare@intel.com>  (A Contingent Worker at Intel)
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>

Is this really a fix?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net 2/2] ice: avoid XDP checks in ice_clean_tx_irq()
  2022-03-03 16:19   ` Jakub Kicinski
@ 2022-03-03 16:28     ` Jakub Kicinski
  2022-03-03 18:25       ` Tony Nguyen
  0 siblings, 1 reply; 7+ messages in thread
From: Jakub Kicinski @ 2022-03-03 16:28 UTC (permalink / raw)
  To: Tony Nguyen
  Cc: davem, Maciej Fijalkowski, netdev, magnus.karlsson, ast, daniel,
	hawk, john.fastabend, bpf, andrii, kpsingh, kafai, yhs,
	songliubraving, Alexander Lobakin, Kiran Bhandare

On Thu, 3 Mar 2022 08:19:01 -0800 Jakub Kicinski wrote:
> On Wed,  2 Mar 2022 09:59:28 -0800 Tony Nguyen wrote:
> > From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
> > 
> > Commit 9610bd988df9 ("ice: optimize XDP_TX workloads") introduced Tx IRQ
> > cleaning routine dedicated for XDP rings. Currently it is impossible to
> > call ice_clean_tx_irq() against XDP ring, so it is safe to drop
> > ice_ring_is_xdp() calls in there.
> > 
> > Fixes: 1c96c16858ba ("ice: update to newer kernel API")
> > Fixes: cc14db11c8a4 ("ice: use prefetch methods")
> > Reviewed-by: Alexander Lobakin <alexandr.lobakin@intel.com>
> > Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
> > Tested-by: Kiran Bhandare <kiranx.bhandare@intel.com>  (A Contingent Worker at Intel)
> > Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>  
> 
> Is this really a fix?

I'll apply patch 1 from the list, please reroute this one to net-next.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net 0/2][pull request] Intel Wired LAN Driver Updates 2022-03-02
  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 ` [PATCH net 1/2] ixgbe: xsk: change !netif_carrier_ok() handling in ixgbe_xmit_zc() Tony Nguyen
  2022-03-02 17:59 ` [PATCH net 2/2] ice: avoid XDP checks in ice_clean_tx_irq() Tony Nguyen
@ 2022-03-03 16:40 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 7+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-03-03 16:40 UTC (permalink / raw)
  To: Tony Nguyen
  Cc: davem, kuba, netdev, maciej.fijalkowski, magnus.karlsson, ast,
	daniel, hawk, john.fastabend, bpf, andrii, kpsingh, kafai, yhs,
	songliubraving

Hello:

This series was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Wed,  2 Mar 2022 09:59:26 -0800 you wrote:
> This series contains updates to ixgbe and ice drivers.
> 
> Maciej fixes an issue that occurs when carrier is not ok and xsk_pool
> is present that will cause ksoftirqd to consume 100% CPU by changing
> the value returned when the carrier state is not ok for ixgbe. He also
> removes checks against ice_ring_is_xdp() that can't occur for ice.
> 
> [...]

Here is the summary with links:
  - [net,1/2] ixgbe: xsk: change !netif_carrier_ok() handling in ixgbe_xmit_zc()
    https://git.kernel.org/netdev/net/c/6c7273a26675
  - [net,2/2] ice: avoid XDP checks in ice_clean_tx_irq()
    (no matching commit)

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net 2/2] ice: avoid XDP checks in ice_clean_tx_irq()
  2022-03-03 16:28     ` Jakub Kicinski
@ 2022-03-03 18:25       ` Tony Nguyen
  0 siblings, 0 replies; 7+ messages in thread
From: Tony Nguyen @ 2022-03-03 18:25 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: davem, Maciej Fijalkowski, netdev, magnus.karlsson, ast, daniel,
	hawk, john.fastabend, bpf, andrii, kpsingh, kafai, yhs,
	songliubraving, Alexander Lobakin, Kiran Bhandare


On 3/3/2022 8:28 AM, Jakub Kicinski wrote:
> On Thu, 3 Mar 2022 08:19:01 -0800 Jakub Kicinski wrote:
>> On Wed,  2 Mar 2022 09:59:28 -0800 Tony Nguyen wrote:
>>> From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
>>>
>>> Commit 9610bd988df9 ("ice: optimize XDP_TX workloads") introduced Tx IRQ
>>> cleaning routine dedicated for XDP rings. Currently it is impossible to
>>> call ice_clean_tx_irq() against XDP ring, so it is safe to drop
>>> ice_ring_is_xdp() calls in there.
>>>
>>> Fixes: 1c96c16858ba ("ice: update to newer kernel API")
>>> Fixes: cc14db11c8a4 ("ice: use prefetch methods")
>>> Reviewed-by: Alexander Lobakin <alexandr.lobakin@intel.com>
>>> Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
>>> Tested-by: Kiran Bhandare <kiranx.bhandare@intel.com>  (A Contingent Worker at Intel)
>>> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
>> Is this really a fix?
> I'll apply patch 1 from the list, please reroute this one to net-next.

Thanks Jakub, will do.

-Tony


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-03-03 18:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH net 1/2] ixgbe: xsk: change !netif_carrier_ok() handling in ixgbe_xmit_zc() Tony Nguyen
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

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.