Skip to content

Commit 6c7273a

Browse files
mfijalkokuba-moo
authored andcommitted
ixgbe: xsk: change !netif_carrier_ok() handling in ixgbe_xmit_zc()
Commit c685c69 ("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: c685c69 ("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> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 312f2d5 commit 6c7273a

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,12 +390,14 @@ static bool ixgbe_xmit_zc(struct ixgbe_ring *xdp_ring, unsigned int budget)
390390
u32 cmd_type;
391391

392392
while (budget-- > 0) {
393-
if (unlikely(!ixgbe_desc_unused(xdp_ring)) ||
394-
!netif_carrier_ok(xdp_ring->netdev)) {
393+
if (unlikely(!ixgbe_desc_unused(xdp_ring))) {
395394
work_done = false;
396395
break;
397396
}
398397

398+
if (!netif_carrier_ok(xdp_ring->netdev))
399+
break;
400+
399401
if (!xsk_tx_peek_desc(pool, &desc))
400402
break;
401403

0 commit comments

Comments
 (0)