From: Yunjian Wang <wangyunjian@huawei.com> This series include two fixes patches for bnxt driver. Yunjian Wang (2): net/bnxt: fix memory leak when freeing vf_info net/bnxt: add memory allocation check in vf_info init drivers/net/bnxt/bnxt_ethdev.c | 3 +-- drivers/net/bnxt/bnxt_hwrm.c | 22 ++++++++++++++++++++-- drivers/net/bnxt/bnxt_hwrm.h | 1 + 3 files changed, 22 insertions(+), 4 deletions(-) -- 2.23.0
Ping for review, please.
> -----Original Message-----
> From: wangyunjian
> Sent: Friday, July 31, 2020 8:09 PM
> To: dev@dpdk.org
> Cc: ajit.khaparde@broadcom.com; somnath.kotur@broadcom.com; Lilijun
> (Jerry) <jerry.lilijun@huawei.com>; xudingke <xudingke@huawei.com>;
> wangyunjian <wangyunjian@huawei.com>
> Subject: [dpdk-dev] [PATCH 0/2] fixes for bnxt driver
>
> From: Yunjian Wang <wangyunjian@huawei.com>
>
> This series include two fixes patches for bnxt driver.
>
> Yunjian Wang (2):
> net/bnxt: fix memory leak when freeing vf_info
> net/bnxt: add memory allocation check in vf_info init
>
> drivers/net/bnxt/bnxt_ethdev.c | 3 +--
> drivers/net/bnxt/bnxt_hwrm.c | 22 ++++++++++++++++++++--
> drivers/net/bnxt/bnxt_hwrm.h | 1 +
> 3 files changed, 22 insertions(+), 4 deletions(-)
>
> --
> 2.23.0
>
On Mon, Aug 31, 2020 at 5:58 PM wangyunjian <wangyunjian@huawei.com> wrote: > > > Ping for review, please. yes. It’s in the pipeline and will be applied in a day or two. Thanks Ajit > > > > > -----Original Message----- > > > From: wangyunjian > > > Sent: Friday, July 31, 2020 8:09 PM > > > To: dev@dpdk.org > > > Cc: ajit.khaparde@broadcom.com; somnath.kotur@broadcom.com; Lilijun > > > (Jerry) <jerry.lilijun@huawei.com>; xudingke <xudingke@huawei.com>; > > > wangyunjian <wangyunjian@huawei.com> > > > Subject: [dpdk-dev] [PATCH 0/2] fixes for bnxt driver > > > > > > From: Yunjian Wang <wangyunjian@huawei.com> > > > > > > This series include two fixes patches for bnxt driver. > > > > > > Yunjian Wang (2): > > > net/bnxt: fix memory leak when freeing vf_info > > > net/bnxt: add memory allocation check in vf_info init > > > > > > drivers/net/bnxt/bnxt_ethdev.c | 3 +-- > > > drivers/net/bnxt/bnxt_hwrm.c | 22 ++++++++++++++++++++-- > > > drivers/net/bnxt/bnxt_hwrm.h | 1 + > > > 3 files changed, 22 insertions(+), 4 deletions(-) > > > > > > -- > > > 2.23.0 > > > > > > >
On Fri, Jul 31, 2020 at 5:09 AM wangyunjian <wangyunjian@huawei.com> wrote: > From: Yunjian Wang <wangyunjian@huawei.com> > > This series include two fixes patches for bnxt driver. > > Yunjian Wang (2): > net/bnxt: fix memory leak when freeing vf_info > net/bnxt: add memory allocation check in vf_info init > Patchset applied to dpdk-next-net-brcm. Thanks > > drivers/net/bnxt/bnxt_ethdev.c | 3 +-- > drivers/net/bnxt/bnxt_hwrm.c | 22 ++++++++++++++++++++-- > drivers/net/bnxt/bnxt_hwrm.h | 1 + > 3 files changed, 22 insertions(+), 4 deletions(-) > > -- > 2.23.0 > > >
From: Yunjian Wang <wangyunjian@huawei.com> This series include two fixes patches for bnxt driver. Yunjian Wang (2): net/bnxt: remove logically dead code net/bnxt: fix a wrong use of rte_free when freeing mbuf drivers/net/bnxt/bnxt_reps.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.18.1
From: Yunjian Wang <wangyunjian@huawei.com> This patch removes logically dead code reported by coverity. Coverity issue: 360824 Fixes: 6dc83230b43b ("net/bnxt: support port representor data path") Cc: stable@dpdk.org Signed-off-by: Yunjian Wang <wangyunjian@huawei.com> --- drivers/net/bnxt/bnxt_reps.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/bnxt/bnxt_reps.c b/drivers/net/bnxt/bnxt_reps.c index 6fa9a30d2..e924025cf 100644 --- a/drivers/net/bnxt/bnxt_reps.c +++ b/drivers/net/bnxt/bnxt_reps.c @@ -44,8 +44,6 @@ bnxt_vfr_recv(uint16_t port_id, uint16_t queue_id, struct rte_mbuf *mbuf) uint8_t que; vfr_eth_dev = &rte_eth_devices[port_id]; - if (!vfr_eth_dev) - return 1; vfr_bp = vfr_eth_dev->data->dev_private; /* If rxq_id happens to be > max rep_queue, use rxq0 */ que = queue_id < BNXT_MAX_VF_REP_RINGS ? queue_id : 0; -- 2.18.1
From: Yunjian Wang <wangyunjian@huawei.com> We should use rte_pktmbuf_free() instead of rte_free() to free the mbuf. Fixes: 6dc83230b43b ("net/bnxt: support port representor data path") Cc: stable@dpdk.org Signed-off-by: Yunjian Wang <wangyunjian@huawei.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 e924025cf..26bd0f626 100644 --- a/drivers/net/bnxt/bnxt_reps.c +++ b/drivers/net/bnxt/bnxt_reps.c @@ -61,7 +61,7 @@ bnxt_vfr_recv(uint16_t port_id, uint16_t queue_id, struct rte_mbuf *mbuf) } else { vfr_bp->rx_drop_bytes[que] += mbuf->pkt_len; vfr_bp->rx_drop_pkts[que]++; - rte_free(mbuf); /* Representor Rx ring full, drop pkt */ + rte_pktmbuf_free(mbuf); /* Representor Rx ring full, drop pkt */ } return 0; -- 2.18.1
On Sat, Sep 5, 2020 at 2:37 AM wangyunjian <wangyunjian@huawei.com> wrote: > From: Yunjian Wang <wangyunjian@huawei.com> > > This series include two fixes patches for bnxt driver. > Patchset applied to dpdk-next-net-brcm. Thanks > > Yunjian Wang (2): > net/bnxt: remove logically dead code > net/bnxt: fix a wrong use of rte_free when freeing mbuf > > drivers/net/bnxt/bnxt_reps.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > -- > 2.18.1 > > >