/* Attempt to alloc Rx buf in case of a previous allocation failure. */
if (rc == -ENOMEM) {
- int i;
+ int i = RING_NEXT(rxr->rx_ring_struct, prod);
+ int cnt = nb_rx_pkts;
- for (i = prod; i <= nb_rx_pkts;
- i = RING_NEXT(rxr->rx_ring_struct, i)) {
+ for (; cnt;
+ i = RING_NEXT(rxr->rx_ring_struct, i), cnt--) {
struct bnxt_sw_rx_bd *rx_buf = &rxr->rx_buf_ring[i];
/* Buffer already allocated for this index. */
if (!cfa_code)
return;
- if (cfa_code && !bp->mark_table[cfa_code].valid) {
- PMD_DRV_LOG(WARNING, "Invalid mark_tbl entry! cfa_code: 0x%x\n",
- cfa_code);
+ if (cfa_code && !bp->mark_table[cfa_code].valid)
return;
- }
flags2 = rte_le_to_cpu_16(rxcmp1->flags2);
meta = rte_le_to_cpu_32(rxcmp1->metadata);