From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f46.google.com (mail-pa0-f46.google.com [209.85.220.46]) by dpdk.org (Postfix) with ESMTP id 6E8A22A5E for ; Wed, 8 Jul 2015 12:35:34 +0200 (CEST) Received: by pacgz10 with SMTP id gz10so56090549pac.3 for ; Wed, 08 Jul 2015 03:35:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=0KtfhkYEosuDhj+Ht7niXgt0B/53TVAyUR/yz1oBz4o=; b=f02zxmW2cVUdG05BlKqxoPpuLGYitKAClfhNiVcd6MwrPIx7kt4IIgkC1owqc0IKD/ srNQbvu3NvCyetI84cIhN/T/fcvzsh/htCq1g+ve0yGs+gqJOYOXuuiJcEJTLpfNsiz3 mba7kITYXkJnxe2cE3xOaY1MJvtvCWKfiehAk8ol4cYqrdlrB1uZywvNWKR8Bct5Aq6v bCCdFhxXv/+wSCVq6wjG3fif3AOWq4KjLNkrxFBFb+hii/JMwhFGnbEuP/D+Q9QzZu45 U0n6qfHyLX52Rcr8oBSixHBb+DxxsvnkCgkIMj13UL6TD68FoUTBLGThNOKlC7XIVTrl LZFA== X-Gm-Message-State: ALoCoQkjl4ghLX9zwyqfE0AsUshewCi5wXuCVINuNyUs8V55zbd9rcPm30yg0aDtwhIq4z75tZvR X-Received: by 10.70.48.68 with SMTP id j4mr19068760pdn.111.1436351733858; Wed, 08 Jul 2015 03:35:33 -0700 (PDT) Received: from localhost.localdomain (napt.igel.co.jp. [219.106.231.132]) by smtp.gmail.com with ESMTPSA id xf2sm2043139pab.25.2015.07.08.03.35.31 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Jul 2015 03:35:33 -0700 (PDT) From: Tetsuya Mukawa To: dev@dpdk.org Date: Wed, 8 Jul 2015 19:34:41 +0900 Message-Id: <1436351693-2349-1-git-send-email-mukawa@igel.co.jp> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1435652668-3380-12-git-send-email-mukawa@igel.co.jp> References: <1435652668-3380-12-git-send-email-mukawa@igel.co.jp> Subject: [dpdk-dev] [PATCH v9 00/12] 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: Wed, 08 Jul 2015 10:35:34 -0000 Currently Linux implementation and BSD implementation have almost same code about pci uio. This patch series cleans up it. PATCH v9 changes: - Add lost Acked-by and Tested-by signatures. - Remove NULL checkings before calling rte_free(). - Fix pci_uio_map_secondary() to remove needless close(). - Remove needless parameter checkings of pci_uio_alloc_resource() and pci_uio_map_resource_by_index(). - Remove needless error checking for return value of pci_uio_alloc_resource(). - Introduce pci_uio_free_resource(). - Remove some comments of pci_uio_map_resource(). (Thanks to David Marchand) PATCH v8 changes: - Fix comments of header file. - Fix error handling logic of resource allocation functions. (Thanks to Bruce Richardson) - Add copyright. - Fix patch description. (Thanks to Iremonger, Bernard) PATCH v7 changes: - Add below patches. Also, the order of patches are changed. - eal: Add pci_uio_alloc_resource() - eal: Add pci_uio_map_resource_by_index() - eal: Consolidate pci_map and mapped_pci_resource of linuxapp and bsdapp - eal: Consolidate pci_map/unmap_resource() of linuxapp and bsdapp - eal: Consolidate pci uio functions of linuxapp and bsdapp - eal: Consolidate pci_map/unmap_device() of linuxapp and bsdapp - eal: Consolidate rte_eal_pci_probe/close_one_driver() of linuxapp and bsdapp (Thanks to Bruce Richardson) - While adding above, below patches are not changed at all. - 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 - some function names are changed like below. - pci_uio_alloc_uio_resource() to pci_uio_alloc_resource(). - pci_uio_map_uio_resource_by_index() to pci_uio_map_resource_by_index(). (Thanks to Iremonger, Bernard) PATCH v6 changes: - Free mapped resources in pci_uio_map_resource(). - Fix error handling in pci_uio_map_resource(). (Thanks to David, Marchand) PATCH v5 changes: - Rebase to latest master branch. 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 - '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 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 (12): 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 eal: Add pci_uio_alloc/free_resource() eal: Add pci_uio_map_resource_by_index() eal: Consolidate pci_map and mapped_pci_resource of linuxapp and bsdapp eal: Consolidate pci_map/unmap_resource() of linuxapp and bsdapp eal: Consolidate pci uio functions of linuxapp and bsdapp eal: Consolidate pci_map/unmap_device() of linuxapp and bsdapp eal: Consolidate rte_eal_pci_probe/close_one_driver() of linuxapp and bsdapp lib/librte_eal/bsdapp/eal/Makefile | 2 + lib/librte_eal/bsdapp/eal/eal_pci.c | 283 ++++++-------------- .../bsdapp/eal/include/exec-env/rte_interrupts.h | 2 + lib/librte_eal/common/eal_common_pci.c | 226 ++++++++++++++++ lib/librte_eal/common/eal_common_pci_uio.c | 225 ++++++++++++++++ lib/librte_eal/common/eal_private.h | 73 ++++- lib/librte_eal/common/include/rte_pci.h | 62 +++++ lib/librte_eal/linuxapp/eal/Makefile | 2 + lib/librte_eal/linuxapp/eal/eal_pci.c | 237 +---------------- lib/librte_eal/linuxapp/eal/eal_pci_init.h | 42 +-- lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 296 +++++++-------------- lib/librte_ether/rte_ethdev.c | 2 + 12 files changed, 760 insertions(+), 692 deletions(-) create mode 100644 lib/librte_eal/common/eal_common_pci_uio.c -- 2.1.4