From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2] eal: fix check number of bytes from read function Date: Fri, 22 Jul 2016 18:22:03 +0200 Message-ID: <2958319.nnKoaMGsx5@xps13> References: <1469024689-1076-1-git-send-email-michalx.k.jastrzebski@intel.com> <2746518.l5JpmnHLoW@xps13> <95d86f88-9898-b630-0c3b-e0c8a72fdc69@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: Sergio Gonzalez Monroy , bruce.richardson@intel.com, dev@dpdk.org, michalx.kobylinski@intel.com, david.marchand@6wind.com To: Michal Jastrzebski Return-path: Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) by dpdk.org (Postfix) with ESMTP id 3DFE32B8E for ; Fri, 22 Jul 2016 18:22:05 +0200 (CEST) Received: by mail-wm0-f51.google.com with SMTP id f65so63445315wmi.0 for ; Fri, 22 Jul 2016 09:22:05 -0700 (PDT) In-Reply-To: <95d86f88-9898-b630-0c3b-e0c8a72fdc69@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2016-07-22 17:02, Sergio Gonzalez Monroy: > On 22/07/2016 16:24, Thomas Monjalon wrote: > > 2016-07-22 16:33, Michal Jastrzebski: > >> v2: > >> -moved close(fd) just after read. > >> -when read() from fd we expect 8 bytes, so PFN_MASK_SIZE macro > >> was introduced instead sizeof(uint64_t). > >> -removed errno print when read returns less than 8 bytes > > Looks better. [...] > > Better title to explain the issue: > > mem: fix check of physical address retrieval [...] > >> + retval = read(fd, &page, sizeof(uint64_t)); > > We could use PFN_MASK_SIZE here [...] > > useless whitespace [...] > > If you and Sergio agree, I can make the minor changes before applying. > > Go for it! Applied with above changes, thanks