- struct rte_mbuf *temp_frag; /* Pointer to mbuf chain head */
- struct rte_mbuf *curr_frag;
- struct rte_mbuf *rx_mb;
- uint8_t list_count = 0;
- uint16_t cons_idx;
- uint8_t i;
-
- PMD_RX_LOG(INFO, rxq, "TPA End[%02x] - len_list [%04x %04x]\n",
- cqe->tpa_agg_index, rte_le_to_cpu_16(cqe->len_list[0]),
- rte_le_to_cpu_16(cqe->len_list[1]));
-
- tpa_info = &rxq->tpa_info[cqe->tpa_agg_index];
- temp_frag = tpa_info->mbuf;
- assert(temp_frag);
-
- for (i = 0; cqe->len_list[i]; i++) {
- cons_idx = rxq->sw_rx_cons & NUM_RX_BDS(rxq);
- curr_frag = rxq->sw_rx_ring[cons_idx].mbuf;
- qede_rx_bd_ring_consume(rxq);
- curr_frag->data_len = rte_le_to_cpu_16(cqe->len_list[i]);
- temp_frag->next = curr_frag;
- temp_frag = curr_frag;
- list_count++;
- }
-
- /* Allocate RX mbuf on the RX BD ring for those many consumed */
- for (i = 0 ; i < list_count ; i++) {
- if (unlikely(qede_alloc_rx_buffer(rxq) != 0)) {
- DP_ERR(edev, "Failed to allocate mbuf for lro end\n");
- tpa_info->state = QEDE_AGG_STATE_ERROR;
- }
- }