Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b4f46598 authored by Maciej Fijalkowski's avatar Maciej Fijalkowski Committed by Greg Kroah-Hartman
Browse files

ixgbe: xsk: change !netif_carrier_ok() handling in ixgbe_xmit_zc()



commit 6c7273a266759d9d36f7c862149f248bcdeddc0f upstream.

Commit c685c69f ("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: c685c69f ("ixgbe: don't do any AF_XDP zero-copy transmit if netif is not OK")
Reported-by: default avatarMaurice Baijens <maurice.baijens@ellips.com>
Tested-by: default avatarMaurice Baijens <maurice.baijens@ellips.com>
Signed-off-by: default avatarMaciej Fijalkowski <maciej.fijalkowski@intel.com>
Tested-by: default avatarSandeep Penigalapati <sandeep.penigalapati@intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e50c5896
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -583,12 +583,14 @@ static bool ixgbe_xmit_zc(struct ixgbe_ring *xdp_ring, unsigned int budget)
	u32 cmd_type;
	u32 cmd_type;


	while (budget-- > 0) {
	while (budget-- > 0) {
		if (unlikely(!ixgbe_desc_unused(xdp_ring)) ||
		if (unlikely(!ixgbe_desc_unused(xdp_ring))) {
		    !netif_carrier_ok(xdp_ring->netdev)) {
			work_done = false;
			work_done = false;
			break;
			break;
		}
		}


		if (!netif_carrier_ok(xdp_ring->netdev))
			break;

		if (!xsk_umem_consume_tx(xdp_ring->xsk_umem, &desc))
		if (!xsk_umem_consume_tx(xdp_ring->xsk_umem, &desc))
			break;
			break;