]> git.droids-corp.org - dpdk.git/blobdiff - drivers/net/bnxt/bnxt_rxq.c
net/bnxt: support LRO
[dpdk.git] / drivers / net / bnxt / bnxt_rxq.c
index 0d7d708a1bf2c81a3afc8d07c44e5f607619d965..d8b970e8e39a97a275f6db78c572c0505e1dfde7 100644 (file)
@@ -214,6 +214,7 @@ err_out:
 static void bnxt_rx_queue_release_mbufs(struct bnxt_rx_queue *rxq)
 {
        struct bnxt_sw_rx_bd *sw_ring;
+       struct bnxt_tpa_info *tpa_info;
        uint16_t i;
 
        if (rxq) {
@@ -236,6 +237,17 @@ static void bnxt_rx_queue_release_mbufs(struct bnxt_rx_queue *rxq)
                                }
                        }
                }
+
+               /* Free up mbufs in TPA */
+               tpa_info = rxq->rx_ring->tpa_info;
+               if (tpa_info) {
+                       for (i = 0; i < BNXT_TPA_MAX; i++) {
+                               if (tpa_info[i].mbuf) {
+                                       rte_pktmbuf_free_seg(tpa_info[i].mbuf);
+                                       tpa_info[i].mbuf = NULL;
+                               }
+                       }
+               }
        }
 }