DPDK patches and discussions
 help / color / mirror / Atom feed
From: Weiguo Li <liwg06@foxmail.com>
To: ganapati.kundapura@intel.com
Cc: jay.jayatheerthan@intel.com, s.v.naga.harish.k@intel.com, dev@dpdk.org
Subject: RE:[PATCH v2] eventdev/eth_rx: fix memory leak when token parsing finished
Date: Thu,  3 Feb 2022 11:38:07 +0800	[thread overview]
Message-ID: <tencent_4BEF9F916D11CD98641E87538A08101DD907@qq.com> (raw)
In-Reply-To: <tencent_4D46BA4584635E78424E69222A741CBFFD09@qq.com>

Hi Ganapati,

Thanks for your reminding.

I'm a bit confused by "eth_dev_id validate" you metiond below.
I'll post a new patch for your review if this make clear.

Thanks,
-Weiguo

> ------------------ Original ------------------
> From: "Kundapura, Ganapati" <ganapati.kundapura@intel.com>;
> Date: Thu, Feb 3, 2022 00:47 AM
> To: "Weiguo Li"<liwg06@foxmail.com>;"Jayatheerthan, Jay"<jay.jayatheerthan@intel.com>;
> Cc: "Naga Harish K, S V"<s.v.naga.harish.k@intel.com>;"dev@dpdk.org"<dev@dpdk.org>;
> Subject: RE: [PATCH v2] eventdev/eth_rx: fix memory leak when token parsing finished
> 
> Hi Weiguo,
>    Also noticed that usage of macros like RTE_EVENT_ETH_RX_ADAPTER_ID_VALID_OR_ERR_RET and 
> RTE_ETH_VALID_PORTID_OR_ERR_RET to validate rx_adapter_id and eth_dev_id returns error
> bypassing the freeing of memory get from strdup() in error case.
>
> Thanks,
> Ganapati
> > > >  	token = strtok(l_params, ",");
> > Validate token
> 
> > > >  	/* Get device ID from parameter string */
> > > >  	eth_dev_id = strtoul(token, NULL, 10);
> > > >  	RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(eth_dev_id, -EINVAL);
> > Use RTE_ETH_VALID_PORTID_OR_ERR_RET to validate eth_dev_id

I looked up the macro defines:
RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET -- use rte_event_pmd_is_valid_dev()
RTE_ETH_VALID_PORTID_OR_ERR_RET     -- use rte_eth_dev_is_valid_port() 

If you mean the validate of "eth_dev_id" here be replaced by rte_eth_dev_is_valid_port() ?
or both rte_event_pmd_is_valid_dev() and rte_eth_dev_is_valid_port() used 
to do the validation?
	
	

  parent reply	other threads:[~2022-02-03  3:38 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-02  7:13 [PATCH] " Weiguo Li
2022-02-02  7:40 ` [PATCH v2] " Weiguo Li
2022-02-02  7:48   ` Kundapura, Ganapati
2022-02-02  8:25     ` Jayatheerthan, Jay
2022-02-02 14:54     ` Kundapura, Ganapati
2022-02-02 16:47       ` Kundapura, Ganapati
2022-02-03  3:38   ` Weiguo Li [this message]
2022-02-03  5:44     ` Kundapura, Ganapati
2022-02-03  8:49   ` [PATCH v4] " Weiguo Li
2022-02-03 13:09     ` Kundapura, Ganapati
2022-02-04  6:54     ` Jayatheerthan, Jay
2022-02-04  7:49     ` [PATCH v5] " Weiguo Li
2022-02-04  7:57       ` Jayatheerthan, Jay
2022-02-04  8:21     ` [PATCH v6] " Weiguo Li
2022-02-04  9:47       ` Jayatheerthan, Jay
2022-02-18  9:39         ` Jerin Jacob
2022-02-22 10:08           ` Kevin Traynor
2022-02-23  7:21             ` Naga Harish K, S V
2022-02-03  6:02 ` [PATCH] " Stephen Hemminger
2022-02-03  7:18 ` [PATCH v3] " Weiguo Li

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=tencent_4BEF9F916D11CD98641E87538A08101DD907@qq.com \
    --to=liwg06@foxmail.com \
    --cc=dev@dpdk.org \
    --cc=ganapati.kundapura@intel.com \
    --cc=jay.jayatheerthan@intel.com \
    --cc=s.v.naga.harish.k@intel.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).