From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: dpdk-dev <dev@dpdk.org>, Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Subject: Re: [dpdk-dev] [PATCH] net/bnxt: fix a potential resource leak
Date: Thu, 22 Oct 2020 22:11:00 -0700 [thread overview]
Message-ID: <CACZ4nhuRaio7doeYeaAp8z=Jj0gY=OSiCLLeD+4x_9+w3zV9YA@mail.gmail.com> (raw)
In-Reply-To: <d9909941-980a-b818-1fab-e4531379c797@intel.com>
On Thu, Oct 22, 2020 at 4:47 AM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>
> On 10/21/2020 7:00 AM, Ajit Khaparde wrote:
> > Fix a potential resource leak in case of errors during dev args
> > parsing during device probe.
> >
> > Fixes: 6dc83230b43b ("net/bnxt: support port representor data path")
> >
> > Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> > Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
> > ---
> > drivers/net/bnxt/bnxt_ethdev.c | 35 +++++++++++++++++++++++++++++++++-
> > 1 file changed, 34 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
> > index 562cf14ba..aa2d9e00e 100644
> > --- a/drivers/net/bnxt/bnxt_ethdev.c
> > +++ b/drivers/net/bnxt/bnxt_ethdev.c
> > @@ -6285,7 +6285,7 @@ static int bnxt_rep_port_probe(struct rte_pci_device *pci_dev,
> > struct bnxt *backing_bp;
> > uint16_t num_rep;
> > int i, ret = 0;
> > - struct rte_kvargs *kvlist;
> > + struct rte_kvargs *kvlist = NULL;
> >
> > num_rep = eth_da.nb_representor_ports;
> > if (num_rep > BNXT_MAX_VF_REPS) {
> > @@ -6339,49 +6339,79 @@ static int bnxt_rep_port_probe(struct rte_pci_device *pci_dev,
> > * Invoked as for ex: "-w 000:00:0d.0,
> > * rep-based-pf=<pf index> rep-is-pf=<VF=0 or PF=1>"
> > */
> > + ret =
> > rte_kvargs_process(kvlist, BNXT_DEVARG_REP_IS_PF,
> > bnxt_parse_devarg_rep_is_pf,
> > (void *)&representor);
>
> Hi Ajit,
>
> This is a different syntax, seems repeated a few times below, is it auto generated?
> Can it be possible to merge the assignment line with the call?
Done. I tried to improvise unnecessarily to avoid changing multiple lines.
next prev parent reply other threads:[~2020-10-23 5:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-21 6:00 Ajit Khaparde
2020-10-21 14:04 ` Ajit Khaparde
2020-10-22 11:47 ` Ferruh Yigit
2020-10-23 5:11 ` Ajit Khaparde [this message]
2020-10-23 5:12 ` [dpdk-dev] [PATCH v2] " Ajit Khaparde
2020-10-23 5:17 ` Ajit Khaparde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CACZ4nhuRaio7doeYeaAp8z=Jj0gY=OSiCLLeD+4x_9+w3zV9YA@mail.gmail.com' \
--to=ajit.khaparde@broadcom.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=kalesh-anakkur.purayil@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).