Message ID | 20211123163955.154512-24-alexandr.lobakin@intel.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: introduce and use generic XDP stats | expand |
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c index 8e448288ee26..7d0c540d6b76 100644 --- a/drivers/net/ethernet/intel/igc/igc_main.c +++ b/drivers/net/ethernet/intel/igc/igc_main.c @@ -2604,6 +2604,8 @@ static void igc_xdp_xmit_zc(struct igc_ring *ring) __netif_tx_lock(nq, cpu); budget = igc_desc_unused(ring); + if (unlikely(!budget)) + goto out_unlock; while (xsk_tx_peek_desc(pool, &xdp_desc) && budget--) { u32 cmd_type, olinfo_status; @@ -2644,6 +2646,7 @@ static void igc_xdp_xmit_zc(struct igc_ring *ring) xsk_tx_release(pool); } +out_unlock: __netif_tx_unlock(nq); }