Thread (46 messages) 46 messages, 5 authors, 2015-07-08

Re: [PATCH v3 2/8] eal: Add pci_uio_map_uio_resource_by_index()

From: Tetsuya Mukawa <hidden>
Date: 2015-06-30 02:34:04

On 2015/06/29 22:36, Iremonger, Bernard wrote:
quoted
-----Original Message-----
From: Tetsuya Mukawa [mailto:mukawa@igel.co.jp]
Sent: Monday, June 29, 2015 3:57 AM
To: dev@dpdk.org
Cc: Iremonger, Bernard; david.marchand@6wind.com; Tetsuya.Mukawa
Subject: [PATCH v3 2/8] eal: Add pci_uio_map_uio_resource_by_index()

From: "Tetsuya.Mukawa" <redacted>

This patch adds a new function called pci_uio_map_resource_by_index().
The function hides how to map uio resource in linuxapp and bsdapp.
With the function, pci_uio_map_resource() will be more abstracted.

Signed-off-by: Tetsuya Mukawa <redacted>
Hi Tetsuya,

There are two comments inline below.
quoted
---
 lib/librte_eal/bsdapp/eal/eal_pci.c       | 107 +++++++++++++++-----------
 lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 124 +++++++++++++++++---------
----
 2 files changed, 133 insertions(+), 98 deletions(-)
diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c
b/lib/librte_eal/bsdapp/eal/eal_pci.c
index 2d9f3a5..61d1fe5 100644
--- a/lib/librte_eal/bsdapp/eal/eal_pci.c
+++ b/lib/librte_eal/bsdapp/eal/eal_pci.c
@@ -240,20 +240,73 @@ close_fd:
 	return -1;
 }

+static int
+pci_uio_map_uio_resource_by_index(struct rte_pci_device *dev, int
res_idx,
+		struct mapped_pci_resource *uio_res, int map_idx) {
The name of this function is a bit long winded, pci_uio_map_resource_by_index() might be better.
quoted
a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c
b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c
index 9e0b617..7da4543 100644
--- a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c
+++ b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c
@@ -333,19 +333,82 @@ close_fd:
 	return -1;
 }

+static int
+pci_uio_map_uio_resource_by_index(struct rte_pci_device *dev, int
res_idx,
+		struct mapped_pci_resource *uio_res, int map_idx) {
The name of this function is a bit long winded, pci_uio_map_resource_by_index() might be better.
I will fix above 2 issues.

Regards,
Tetsuya
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help