From: Mauricio Vasquez <mauricio.vasquez@polito.it>
To: Ferruh Yigit <ferruh.yigit@intel.com>,
Fulvio Risso <fulvio.risso@polito.it>,
bruce.richardson@intel.com
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2] net/ring: remove unnecessary NULL check
Date: Wed, 2 Nov 2016 08:50:09 -0500 [thread overview]
Message-ID: <d459c003-0966-1f32-b59a-b85613f5f011@polito.it> (raw)
In-Reply-To: <200cca44-01e1-084b-ce86-0e47ca943f9a@intel.com>
Dear Ferruh,
You are right, I messed up the brackets.
I already sent v3.
Thanks,
Mauricio.
On 11/02/2016 08:15 AM, Ferruh Yigit wrote:
> On 11/2/2016 12:49 PM, Fulvio Risso wrote:
>> Dear Ferruh,
>> Maybe I'm wrong, but I cannot see your point.
>> The code is absolutely the same, only the following line
>>
>> if (eth_dev->data) {
>>
>> is actually removed.
> Please double check the condition "rx_queues" freed:
>
> before the patch:
> ==========
> if (eth_dev->data) {
> internals = eth_dev->data->dev_private;
> if (internals->action == DEV_CREATE) {
> /*
> * it is only necessary to delete the rings in rx_queues because
> * they are the same used in tx_queues
> */
> for (i = 0; i < eth_dev->data->nb_rx_queues; i++) {
> r = eth_dev->data->rx_queues[i];
> rte_ring_free(r->rng);
> }
> }
>
> rte_free(eth_dev->data->rx_queues);
> rte_free(eth_dev->data->tx_queues);
> rte_free(eth_dev->data->dev_private);
> }
> ==========
>
>
> After the patch:
> ==========
> internals = eth_dev->data->dev_private;
> if (internals->action == DEV_CREATE) {
> /*
> * it is only necessary to delete the rings in rx_queues because
> * they are the same used in tx_queues
> */
> for (i = 0; i < eth_dev->data->nb_rx_queues; i++) {
> r = eth_dev->data->rx_queues[i];
> rte_ring_free(r->rng);
> }
>
> rte_free(eth_dev->data->rx_queues);
> rte_free(eth_dev->data->tx_queues);
> rte_free(eth_dev->data->dev_private);
> }
> ==========
>
>
> Thanks,
> ferruh
>
next prev parent reply other threads:[~2016-11-02 13:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-01 3:48 [dpdk-dev] [PATCH] pmd_ring: fix coverity issue Mauricio Vasquez B
2016-11-01 14:17 ` Ferruh Yigit
2016-11-01 19:55 ` [dpdk-dev] [PATCH v2] net/ring: remove unnecessary NULL check Mauricio Vasquez B
2016-11-02 11:38 ` Ferruh Yigit
2016-11-02 12:49 ` Fulvio Risso
2016-11-02 13:15 ` Ferruh Yigit
2016-11-02 13:50 ` Mauricio Vasquez [this message]
2016-11-02 13:46 ` [dpdk-dev] [PATCH v3] " Mauricio Vasquez B
2016-11-02 14:05 ` Ferruh Yigit
2016-11-07 13:08 ` Thomas Monjalon
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=d459c003-0966-1f32-b59a-b85613f5f011@polito.it \
--to=mauricio.vasquez@polito.it \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=fulvio.risso@polito.it \
/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).