diff mbox

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

Message ID 1416933018-23415-7-git-send-email-ssujith@cisco.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Sujith Sankar Nov. 25, 2014, 4:30 p.m. UTC
Signed-off-by: Sujith Sankar <ssujith@cisco.com>
---
 config/common_linuxapp                     | 5 +++++
 lib/Makefile                               | 1 +
 lib/librte_eal/linuxapp/eal/eal_pci_vfio.c | 1 +
 mk/rte.app.mk                              | 4 ++++
 4 files changed, 11 insertions(+)

Comments

David Marchand Nov. 25, 2014, 10:02 a.m. UTC | #1
Hello Sujith,

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

> 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 */
>

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.
diff mbox

Patch

diff --git a/config/common_linuxapp b/config/common_linuxapp
index 86a0d15..542fff2 100644
--- a/config/common_linuxapp
+++ b/config/common_linuxapp
@@ -210,6 +210,11 @@  CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM=4
 CONFIG_RTE_LIBRTE_I40E_ITR_INTERVAL=-1
 
 #
+# Compile burst-oriented Cisco ENIC PMD driver
+#
+CONFIG_RTE_LIBRTE_ENIC_PMD=y
+
+#
 # Compile burst-oriented VIRTIO PMD driver
 #
 CONFIG_RTE_LIBRTE_VIRTIO_PMD=y
diff --git a/lib/Makefile b/lib/Makefile
index 204ef11..df17d78 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -43,6 +43,7 @@  DIRS-$(CONFIG_RTE_LIBRTE_CMDLINE) += librte_cmdline
 DIRS-$(CONFIG_RTE_LIBRTE_ETHER) += librte_ether
 DIRS-$(CONFIG_RTE_LIBRTE_E1000_PMD) += librte_pmd_e1000
 DIRS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += librte_pmd_ixgbe
+DIRS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += librte_pmd_enic
 DIRS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += librte_pmd_i40e
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_BOND) += librte_pmd_bond
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_RING) += librte_pmd_ring
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 */
diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index 59468b0..bef823b 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -186,6 +186,10 @@  ifeq ($(CONFIG_RTE_LIBRTE_VMXNET3_PMD),y)
 LDLIBS += -lrte_pmd_vmxnet3_uio
 endif
 
+ifeq ($(CONFIG_RTE_LIBRTE_ENIC_PMD),y)
+LDLIBS += -lrte_pmd_enic
+endif
+
 ifeq ($(CONFIG_RTE_LIBRTE_VIRTIO_PMD),y)
 LDLIBS += -lrte_pmd_virtio_uio
 endif