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)
587
587
unsigned int xdp_xmit = 0 ;
588
588
struct bpf_prog * xdp_prog ;
589
589
bool failure = false;
590
+ int entries_to_alloc ;
590
591
591
592
/* ZC patch is enabled only when XDP program is set,
592
593
* 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)
678
679
ice_receive_skb (rx_ring , skb , vlan_tag );
679
680
}
680
681
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 );
682
685
683
686
ice_finalize_xdp_rx (xdp_ring , xdp_xmit );
684
687
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