From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f173.google.com (mail-pd0-f173.google.com [209.85.192.173]) by dpdk.org (Postfix) with ESMTP id 29954ADA7 for ; Tue, 19 May 2015 07:57:51 +0200 (CEST) Received: by pdea3 with SMTP id a3so9269155pde.2 for ; Mon, 18 May 2015 22:57:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=a46vxiqYQRXJpOd2DWiBpd9DmPyOb344FSwpbbJj8YY=; b=c7hjRckw8k73jKycTnnryFDKxCH1rv7BABAKcTZvQU5xk5ZK/EFhGAc9Jk4wNg2+2p GPaS4Dr8qKPmNVjn7Wz8ZM+OGSfWo9xk02EmpKWTghVgA1nKO5IpSQWZaPFT8b4YETZH zkJ4I7biyzEoo+8hU4QZ0cdgMQPazWzpptCAYa4hkFrV+FqH1l2ZIhCi/4ap/y1QQIor GHQYmRMEerp0dx0ad2Ym3ShC9ejQX/hqVFBwWPiJx2/FuOT0O3ae/HVsRUNfPBvdCYPg ahqNYuwNjkbhh6ZweivkPGxY/gCKfJLuQ8ywRgQn8z6o8UzotsziJRKD7aoo6frNe4As gayQ== X-Gm-Message-State: ALoCoQkvJRMbyYRDVcRepafw6toZkSxDUYsfzXaGaCK1PrTCPJVTyzvNlisGCzAcnqhWCvikt60m X-Received: by 10.68.205.67 with SMTP id le3mr51384983pbc.94.1432015070485; Mon, 18 May 2015 22:57:50 -0700 (PDT) Received: from [10.16.129.101] (napt.igel.co.jp. [219.106.231.132]) by mx.google.com with ESMTPSA id fe10sm11819363pdb.59.2015.05.18.22.57.48 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 May 2015 22:57:49 -0700 (PDT) Message-ID: <555AD0DB.4000904@igel.co.jp> Date: Tue, 19 May 2015 14:57:47 +0900 From: Tetsuya Mukawa User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: bernard.iremonger@intel.com References: <1432014898-3543-1-git-send-email-mukawa@igel.co.jp> In-Reply-To: <1432014898-3543-1-git-send-email-mukawa@igel.co.jp> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v4 0/5] Clean up pci uio implementations X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 05:57:51 -0000 Hi Bernard, I've updated the series, because I've found the issue in BSD code. Also, I have rebased the series for latest master branch. Could you please read my below comments? On 2015/05/19 14:54, Tetsuya Mukawa wrote: > This patch set cleans up pci uio implementation. These clean up are > for consolidating pci uio implementation of linuxapp and bsdapp, and > moving consolidated functions in eal common. > Because of above, this patch set tries to implement linuxapp and bsdapp > almost same. > Actual consolidations will be done later patch set. > > PATCH v4 changes: > - Rebase to latest master branch. > - Fix bug in pci_uio_map_resource() of BSD code. 'maps[i].path' shouldn't be freed. > Fixed in below patch: > [PATCH 3/5] eal: Fix memory leaks and needless increment of pci_map_addr pci_uio_map_resource() { ....snip.... - for (i = 0; i < map_idx; i++) - rte_free(maps[i].path); ....snip.... } I removed above code from BSD, because 'maps[i].path' will not be allocated in BSD code. > - 'path' member of 'struct mapped_pci_resource' should not be removed because it will be used in BSD code. > Fixed in below patch: > [PATCH 5/5] eal: Fix uio mapping differences between linuxapp and bsdapp struct mapped_pci_resource { .....snip..... char path[PATH_MAX]; .....snip..... }; I left 'path' member like above. It will be used by BSD code even after BSD support port hotplug function. Regards, Tetsuya > > PATCH v3 changes: > - Squash patches related with pci_map_resource(). > - Free maps[].path to easy to understand. > (Thanks to Iremonger, Bernard) > - Close fds opened in this function. > - Remove unused path variable from mapped_pci_resource structure. > > PATCH v2 changes: > - Move 'if-condition' to later patch series. > - Fix memory leaks of path. > - Fix typos. > (Thanks to David Marchand) > - Fix commit title and body. > - Fix pci_map_resource() to handle MAP_FAILED. > (Thanks to Iremonger, Bernard) > > Changes: > - This patch set is derived from below. > "[PATCH v2] eal: Port Hotplug support for BSD" > - Set cfg_fd as -1, when cfg_fd is closed. > (Thanks to Iremonger, Bernard) > - Remove needless coding style fixings. > - Fix coding style of if-else condition. > (Thanks to Richardson, Bruce) > > > Tetsuya Mukawa (5): > eal: Fix coding style of eal_pci.c and eal_pci_uio.c > eal: Close file descriptor of uio configuration > eal: Fix memory leaks and needless increment of pci_map_addr > eal/bsdapp: Change names of pci related data structure > eal: Fix uio mapping differences between linuxapp and bsdapp > > lib/librte_eal/bsdapp/eal/eal_pci.c | 164 ++++++++++++++++++------------ > lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 88 +++++++++------- > 2 files changed, 153 insertions(+), 99 deletions(-) >