From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <olivier.matz@6wind.com>
Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67])
 by dpdk.org (Postfix) with ESMTP id D08CFAD9A
 for <dev@dpdk.org>; Wed, 18 May 2016 13:17:19 +0200 (CEST)
Received: from was59-1-82-226-113-214.fbx.proxad.net ([82.226.113.214]
 helo=[192.168.0.10])
 by mail.droids-corp.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <olivier.matz@6wind.com>)
 id 1b2zVa-0007gL-Gx; Wed, 18 May 2016 13:19:23 +0200
To: David Marchand <david.marchand@6wind.com>
References: <1463143859-3105-1-git-send-email-olivier.matz@6wind.com>
 <1463479192-2488-1-git-send-email-olivier.matz@6wind.com>
 <1463479192-2488-6-git-send-email-olivier.matz@6wind.com>
 <CALwxeUsY7Khn27RhKpDzdMV4VC9OcidHA2hTxHXeX3yuNWiCNQ@mail.gmail.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, Chao Zhu <chaozhu@linux.vnet.ibm.com>,
 Yuanhan Liu <yuanhan.liu@linux.intel.com>, "Xie, Huawei"
 <huawei.xie@intel.com>
From: Olivier Matz <olivier.matz@6wind.com>
Message-ID: <573C4F30.80500@6wind.com>
Date: Wed, 18 May 2016 13:17:04 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101
 Icedove/38.6.0
MIME-Version: 1.0
In-Reply-To: <CALwxeUsY7Khn27RhKpDzdMV4VC9OcidHA2hTxHXeX3yuNWiCNQ@mail.gmail.com>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Subject: Re: [dpdk-dev] [PATCH v2 5/7] eal/linux: mmap ioports on ppc64
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Wed, 18 May 2016 11:17:20 -0000

Hi David,

On 05/17/2016 05:54 PM, David Marchand wrote:
> On Tue, May 17, 2016 at 11:59 AM, Olivier Matz <olivier.matz@6wind.com> wrote:
>> +       /* mmap the pci resource */
>> +       fd = open(filename, O_RDWR);
>> +       if (fd < 0) {
>> +               RTE_LOG(ERR, EAL, "Cannot open %s: %s\n", filename,
>> +                       strerror(errno));
>> +               goto error;
>> +       }
>> +       addr = mmap(NULL, end_addr + 1, PROT_READ | PROT_WRITE,
>> +               MAP_SHARED, fd, 0);
> 
> Sorry, did not catch it in v1, but a close(fd) is missing here.
> With this, I think the patchset looks good.

Good catch, I'm fixing it.

Thanks,
Olivier