[dpdk-dev] [PATCH v3 2/8] eal: Add pci_uio_map_uio_resource_by_index()

Tetsuya Mukawa mukawa at igel.co.jp
Tue Jun 30 04:34:00 CEST 2015


On 2015/06/29 22:36, Iremonger, Bernard wrote:
>
>> -----Original Message-----
>> From: Tetsuya Mukawa [mailto:mukawa at igel.co.jp]
>> Sent: Monday, June 29, 2015 3:57 AM
>> To: dev at dpdk.org
>> Cc: Iremonger, Bernard; david.marchand at 6wind.com; Tetsuya.Mukawa
>> Subject: [PATCH v3 2/8] eal: Add pci_uio_map_uio_resource_by_index()
>>
>> From: "Tetsuya.Mukawa" <mukawa at igel.co.jp>
>>
>> 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 <mukawa at igel.co.jp>
> Hi Tetsuya,
>
> There are two comments inline below.
>
>> ---
>>  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.
>
>> 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


More information about the dev mailing list