DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Gao Feng" <gfree.wind@vip.163.com>
To: "Burakov, Anatoly" <anatoly.burakov@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "Gao Feng" <davidfgao@tencent.com>,
	 anatoly.burakov@intel.com
Subject: Re: [dpdk-dev] [PATCH] eal: fix unlock in rte_eal_memzone_init
Date: Thu, 6 Dec 2018 17:44:56 +0800 (CST)	[thread overview]
Message-ID: <7a174fb7.12d674.16782e7eafa.Coremail.gfree.wind@vip.163.com> (raw)
In-Reply-To: <0bd99be2-07e2-da13-23bb-9774ed470f90@intel.com>

At 2018-12-06 17:09:23, "Burakov, Anatoly" <anatoly.burakov@intel.com> wrote:
>On 06-Dec-18 12:47 AM, gfree.wind@vip.163.com wrote:
>> From: Gao Feng <davidfgao@tencent.com>
>> 
>> The RTE_PROC_PRIMARY error handler lost the unlock statement in the
>> current codes. Now fix it.
>> 
>> Signed-off-by: Gao Feng <davidfgao@tencent.com>
>
>Fixes: 49df3db84883 ("memzone: replace memzone array with fbarray")
>Cc: stable@dpdk.org
>
>> ---
>>   lib/librte_eal/common/eal_common_memzone.c | 1 +
>>   1 file changed, 1 insertion(+)
>> 
>> diff --git a/lib/librte_eal/common/eal_common_memzone.c b/lib/librte_eal/common/eal_common_memzone.c
>> index b7081af..649cad4 100644
>> --- a/lib/librte_eal/common/eal_common_memzone.c
>> +++ b/lib/librte_eal/common/eal_common_memzone.c
>> @@ -375,6 +375,7 @@
>>   			rte_fbarray_init(&mcfg->memzones, "memzone",
>>   			RTE_MAX_MEMZONE, sizeof(struct rte_memzone))) {
>>   		RTE_LOG(ERR, EAL, "Cannot allocate memzone list\n");
>> +		rte_rwlock_write_unlock(&mcfg->mlock);
>>   		return -1;
>>   	} else if (rte_eal_process_type() == RTE_PROC_SECONDARY &&
>>   			rte_fbarray_attach(&mcfg->memzones)) {
>> 
>
>Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
>
>Although i would probably remove both unlocks and instead save and 

>return a value, so that unlock happens in one place. But this is OK too.


> Thanks Anatoly. 


Thanks Anatoly's review.
I also prefer keep unlock in one place. 
As a new guy, finally I choose just a fix with a minor change. I would do better next time.


And could I ask you one question, Anatoly?


I sent another dpdk patch with wrong git-send-email command, "git send-email -1 --to dev@dpdk.org patch_xxxx".
As a result, it generated another wrong reply and email thread.


I don't know if i need to send v2 patch to correct it then?
Its url is https://www.mail-archive.com/dev@dpdk.org/msg119925.html.


Best Regards
Feng


>
>-- 
>Thanks,
>Anatoly

  reply	other threads:[~2018-12-06  9:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-06  0:47 gfree.wind
2018-12-06  9:09 ` Burakov, Anatoly
2018-12-06  9:44   ` Gao Feng [this message]
2018-12-06 11:18     ` Burakov, Anatoly
2018-12-07  1:20 ` [dpdk-dev] [PATCH v2] " Gao Feng
2018-12-07  8:57   ` Burakov, Anatoly
2018-12-20 11:20     ` Thomas Monjalon
2018-12-20 11:36       ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2018-12-20 11:47         ` Gao Feng
2018-12-20 11:44       ` [dpdk-dev] " Gao Feng
2018-12-20 13:40         ` 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=7a174fb7.12d674.16782e7eafa.Coremail.gfree.wind@vip.163.com \
    --to=gfree.wind@vip.163.com \
    --cc=anatoly.burakov@intel.com \
    --cc=davidfgao@tencent.com \
    --cc=dev@dpdk.org \
    /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).