File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
drivers/net/ethernet/intel/ice Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -587,6 +587,7 @@ int ice_clean_rx_irq_zc(struct ice_rx_ring *rx_ring, int budget)
587587 unsigned int xdp_xmit = 0 ;
588588 struct bpf_prog * xdp_prog ;
589589 bool failure = false;
590+ int entries_to_alloc ;
590591
591592 /* ZC patch is enabled only when XDP program is set,
592593 * so here it can not be NULL
@@ -678,7 +679,9 @@ int ice_clean_rx_irq_zc(struct ice_rx_ring *rx_ring, int budget)
678679 ice_receive_skb (rx_ring , skb , vlan_tag );
679680 }
680681
681- failure |= !ice_alloc_rx_bufs_zc (rx_ring , ICE_DESC_UNUSED (rx_ring ));
682+ entries_to_alloc = ICE_DESC_UNUSED (rx_ring );
683+ if (entries_to_alloc > ICE_RING_QUARTER (rx_ring ))
684+ failure |= !ice_alloc_rx_bufs_zc (rx_ring , entries_to_alloc );
682685
683686 ice_finalize_xdp_rx (xdp_ring , xdp_xmit );
684687 ice_update_rx_ring_stats (rx_ring , total_rx_packets , total_rx_bytes );
You can’t perform that action at this time.
0 commit comments