diff mbox series

[v3,11/17] net/bnxt: use the right function to free mbuf

Message ID 20201209235347.16180-12-ajit.khaparde@broadcom.com (mailing list archive)
State Accepted, archived
Delegated to: Ajit Khaparde
Headers show
Series fixes and refactoring changes for bnxt | expand

Checks

Context Check Description
ci/checkpatch warning coding style issues

Commit Message

Ajit Khaparde Dec. 9, 2020, 11:53 p.m. UTC
mbufs are being allocated using rte_mbuf_raw_alloc().
Use corresponding rte_mbuf_raw_free() to free mbuf.

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_reps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Lance Richardson Dec. 10, 2020, 3:56 p.m. UTC | #1
On Wed, Dec 9, 2020 at 6:57 PM Ajit Khaparde <ajitkhaparde@gmail.com> wrote:
>
> mbufs are being allocated using rte_mbuf_raw_alloc().
> Use corresponding rte_mbuf_raw_free() to free mbuf.
>
> Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
>
> Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> ---
>  drivers/net/bnxt/bnxt_reps.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/bnxt/bnxt_reps.c b/drivers/net/bnxt/bnxt_reps.c
> index e5ba0909b..167c46ad4 100644
> --- a/drivers/net/bnxt/bnxt_reps.c
> +++ b/drivers/net/bnxt/bnxt_reps.c
> @@ -65,7 +65,7 @@ bnxt_vfr_recv(uint16_t port_id, uint16_t queue_id, struct rte_mbuf *mbuf)
>                 /* Representor Rx ring full, drop pkt */
>                 vfr_bp->rx_drop_bytes[que] += mbuf->pkt_len;
>                 vfr_bp->rx_drop_pkts[que]++;
> -               rte_pktmbuf_free(mbuf);
> +               rte_mbuf_raw_free(mbuf);
>         }
>
>         return 0;
> --
> 2.21.1 (Apple Git-122.3)
>
Acked-by: Lance Richardson <lance.richardson@broadcom.com>
diff mbox series

Patch

diff --git a/drivers/net/bnxt/bnxt_reps.c b/drivers/net/bnxt/bnxt_reps.c
index e5ba0909b..167c46ad4 100644
--- a/drivers/net/bnxt/bnxt_reps.c
+++ b/drivers/net/bnxt/bnxt_reps.c
@@ -65,7 +65,7 @@  bnxt_vfr_recv(uint16_t port_id, uint16_t queue_id, struct rte_mbuf *mbuf)
 		/* Representor Rx ring full, drop pkt */
 		vfr_bp->rx_drop_bytes[que] += mbuf->pkt_len;
 		vfr_bp->rx_drop_pkts[que]++;
-		rte_pktmbuf_free(mbuf);
+		rte_mbuf_raw_free(mbuf);
 	}
 
 	return 0;