+
+ agg_buf = (rxcmp->agg_bufs_v1 & RX_PKT_CMPL_AGG_BUFS_MASK)
+ >> RX_PKT_CMPL_AGG_BUFS_SFT;
+ if (agg_buf) {
+ cp_cons = RING_CMP(cpr->cp_ring_struct, tmp_raw_cons + agg_buf);
+ rxcmp = (struct rx_pkt_cmpl *)
+ &cpr->cp_desc_ring[cp_cons];
+ if (!CMP_VALID(rxcmp, tmp_raw_cons + agg_buf,
+ cpr->cp_ring_struct))
+ return -EBUSY;
+ RTE_LOG(DEBUG, PMD, "JUMBO Frame %d. %x, agg_buf %x,\n",
+ mbuf->pkt_len, rxcmp->agg_bufs_v1, agg_buf);
+ }
+
+ for (i = 0; i < agg_buf; i++) {
+ struct bnxt_sw_rx_bd *ag_buf;
+ struct rte_mbuf *ag_mbuf;
+ tmp_raw_cons = NEXT_RAW_CMP(tmp_raw_cons);
+ cp_cons = RING_CMP(cpr->cp_ring_struct, tmp_raw_cons);
+ rxcmp = (struct rx_pkt_cmpl *)
+ &cpr->cp_desc_ring[cp_cons];
+ ag_cons = rxcmp->opaque;
+ ag_buf = &rxr->ag_buf_ring[ag_cons];
+ ag_mbuf = ag_buf->mbuf;
+ ag_mbuf->nb_segs = 1;
+ ag_mbuf->data_len = rxcmp->len;
+
+ mbuf->nb_segs++;
+ mbuf->pkt_len += ag_mbuf->data_len;
+ if (mbuf->next == NULL) {
+ mbuf->next = ag_mbuf;
+ } else {
+ struct rte_mbuf *temp_mbuf = mbuf;
+
+ while (temp_mbuf->next != NULL)
+ temp_mbuf = temp_mbuf->next;
+ temp_mbuf->next = ag_mbuf;
+ }
+ ag_buf->mbuf = NULL;
+
+ ag_prod = RING_NEXT(rxr->ag_ring_struct, ag_prod);
+ if (bnxt_alloc_ag_data(rxq, rxr, ag_prod)) {
+ RTE_LOG(ERR, PMD,
+ "agg mbuf alloc failed: prod=0x%x\n",
+ ag_prod);
+ rc = -ENOMEM;
+ }
+ rxr->ag_prod = ag_prod;
+
+#ifdef BNXT_DEBUG
+ if (!CMP_VALID((struct cmpl_base *)
+ &cpr->cp_desc_ring[cp_cons], tmp_raw_cons,
+ cpr->cp_ring_struct))
+ return -EBUSY;
+#endif
+ }
+