diff mbox

[dpdk-dev,v4,6/6] DPDK changes for accommodating ENIC PMD

Message ID D09A5A39.28A10%ssujith@cisco.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Sujith Sankar Nov. 25, 2014, 10:46 a.m. UTC
David,

I tested it now, and it looks like the length is proper in
dev->men_resource[0].len without this change.
Not sure what changed in my workspace as I clearly remember seeing it
wrong and hence added the extra statement in the lib.

I shall remove it in v5.
Thanks for pointing it out, David.

Regards,
-Sujith  

From:  David Marchand <david.marchand@6wind.com>
Date:  Tuesday, 25 November 2014 3:32 pm
To:  "Sujith Sankar (ssujith)" <ssujith@cisco.com>
Cc:  "dev@dpdk.org" <dev@dpdk.org>, "Prasad Rao (prrao)" <prrao@cisco.com>
Subject:  Re: [dpdk-dev] [PATCH v4 6/6] DPDK changes for accommodating
ENIC PMD


Hello Sujith, 

On Tue, Nov 25, 2014 at 5:30 PM, Sujith Sankar
<ssujith@cisco.com> wrote:




I still think this part is wrong.
The length should have been populated by pci_parse_sysfs_resource().
Are you sure this length is 0 ?

Can you do give me the result of cat
/sys/bus/pci/devices/$your_device_pci_address/resource ?

Thanks.

Comments

David Marchand Nov. 25, 2014, 11:47 a.m. UTC | #1
On Tue, Nov 25, 2014 at 11:46 AM, Sujith Sankar (ssujith) <ssujith@cisco.com
> wrote:

> David,
>
> I tested it now, and it looks like the length is proper in
> dev->men_resource[0].len without this change.
> Not sure what changed in my workspace as I clearly remember seeing it
> wrong and hence added the extra statement in the lib.
>
> I shall remove it in v5.
>

Ok, thank you Sujith.
diff mbox

Patch

diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c
b/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c
index c776ddc..87e7862 100644
--- a/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c
+++ b/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c
@@ -736,6 +736,7 @@  pci_vfio_map_resource(struct rte_pci_device *dev)
                maps[i].offset = reg.offset;
                maps[i].size = reg.size;
                dev->mem_resource[i].addr = bar_addr;
+               dev->mem_resource[i].len = reg.size;
        }

        /* if secondary process, do not set up interrupts */