Skip to contentSkip to conversation

Cisco Systems Inc. VIC Ethernet PMD - ENIC PMD

PATCH Superseded Sujith Sankar 3 participants 25 messages Nov 7, 2014 – Nov 10, 2014 10 messages not in the archive Library code

v1 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

cover Cisco Systems Inc. VIC Ethernet PMD - ENIC PMD

ENIC PMD is the poll-mode driver for the Cisco Systems Inc. VIC to be used with DPDK suite.

Further details are provided in the ReleaseNotes.txt in the path lib/librte_pmd_enic/

Sujith Sankar (7):
DPDK changes for accommodating ENIC PMD
ENIC PMD License
ENIC PMD Makefile
VNIC common code
ENIC PMD specific code
DPDK-ENIC PMD interface
Release notes for ENIC PMD 1.0.0.3

 app/test-pmd/testpmd.c                             |    1 +
 config/common_linuxapp                             |    6 +
 lib/Makefile                                       |    1 +
 lib/librte_eal/linuxapp/eal/eal_pci_vfio.c         |    7 +
 lib/librte_eal/linuxapp/eal/include/eal_pci_init.h |    1 +
 lib/librte_pmd_enic/LICENSE                        |   23 +
 lib/librte_pmd_enic/Makefile                       |   66 +
 lib/librte_pmd_enic/ReleaseNotes.txt               |  196 +++
 lib/librte_pmd_enic/src/cq_desc.h                  |  122 ++
 lib/librte_pmd_enic/src/cq_enet_desc.h             |  257 ++++
 lib/librte_pmd_enic/src/enic.h                     |  154 +++
 lib/librte_pmd_enic/src/enic_clsf.c                |  240 ++++
 lib/librte_pmd_enic/src/enic_compat.h              |  138 ++
 lib/librte_pmd_enic/src/enic_etherdev.c            |  616 +++++++++
 lib/librte_pmd_enic/src/enic_main.c                | 1325 ++++++++++++++++++++
 lib/librte_pmd_enic/src/enic_res.c                 |  217 ++++
 lib/librte_pmd_enic/src/enic_res.h                 |  164 +++
 lib/librte_pmd_enic/src/rq_enet_desc.h             |   72 ++
 lib/librte_pmd_enic/src/vnic_cq.c                  |  113 ++
 lib/librte_pmd_enic/src/vnic_cq.h                  |  148 +++
 lib/librte_pmd_enic/src/vnic_dev.c                 | 1077 ++++++++++++++++
 lib/librte_pmd_enic/src/vnic_dev.h                 |  198 +++
 lib/librte_pmd_enic/src/vnic_devcmd.h              |  770 ++++++++++++
 lib/librte_pmd_enic/src/vnic_enet.h                |   74 ++
 lib/librte_pmd_enic/src/vnic_intr.c                |   79 ++
 lib/librte_pmd_enic/src/vnic_intr.h                |  122 ++
 lib/librte_pmd_enic/src/vnic_nic.h                 |   84 ++
 lib/librte_pmd_enic/src/vnic_resource.h            |   93 ++
 lib/librte_pmd_enic/src/vnic_rq.c                  |  242 ++++
 lib/librte_pmd_enic/src/vnic_rq.h                  |  278 ++++
 lib/librte_pmd_enic/src/vnic_rss.c                 |   81 ++
 lib/librte_pmd_enic/src/vnic_rss.h                 |   57 +
 lib/librte_pmd_enic/src/vnic_stats.h               |   82 ++
 lib/librte_pmd_enic/src/vnic_wq.c                  |  241 ++++
 lib/librte_pmd_enic/src/vnic_wq.h                  |  279 +++++
 lib/librte_pmd_enic/src/wq_enet_desc.h             |  110 ++
 mk/rte.app.mk                                      |    4 +
 37 files changed, 7738 insertions(+)
 create mode 100644 lib/librte_pmd_enic/LICENSE
 create mode 100644 lib/librte_pmd_enic/Makefile
 create mode 100644 lib/librte_pmd_enic/ReleaseNotes.txt
 create mode 100644 lib/librte_pmd_enic/src/cq_desc.h
 create mode 100644 lib/librte_pmd_enic/src/cq_enet_desc.h
 create mode 100644 lib/librte_pmd_enic/src/enic.h
 create mode 100644 lib/librte_pmd_enic/src/enic_clsf.c
 create mode 100644 lib/librte_pmd_enic/src/enic_compat.h
 create mode 100644 lib/librte_pmd_enic/src/enic_etherdev.c
 create mode 100644 lib/librte_pmd_enic/src/enic_main.c
 create mode 100644 lib/librte_pmd_enic/src/enic_res.c
 create mode 100644 lib/librte_pmd_enic/src/enic_res.h
 create mode 100644 lib/librte_pmd_enic/src/rq_enet_desc.h
 create mode 100644 lib/librte_pmd_enic/src/vnic_cq.c
 create mode 100644 lib/librte_pmd_enic/src/vnic_cq.h
 create mode 100644 lib/librte_pmd_enic/src/vnic_dev.c
 create mode 100644 lib/librte_pmd_enic/src/vnic_dev.h
 create mode 100644 lib/librte_pmd_enic/src/vnic_devcmd.h
 create mode 100644 lib/librte_pmd_enic/src/vnic_enet.h
 create mode 100644 lib/librte_pmd_enic/src/vnic_intr.c
 create mode 100644 lib/librte_pmd_enic/src/vnic_intr.h
 create mode 100644 lib/librte_pmd_enic/src/vnic_nic.h
 create mode 100644 lib/librte_pmd_enic/src/vnic_resource.h
 create mode 100644 lib/librte_pmd_enic/src/vnic_rq.c
 create mode 100644 lib/librte_pmd_enic/src/vnic_rq.h
 create mode 100644 lib/librte_pmd_enic/src/vnic_rss.c
 create mode 100644 lib/librte_pmd_enic/src/vnic_rss.h
 create mode 100644 lib/librte_pmd_enic/src/vnic_stats.h
 create mode 100644 lib/librte_pmd_enic/src/vnic_wq.c
 create mode 100644 lib/librte_pmd_enic/src/vnic_wq.h
 create mode 100644 lib/librte_pmd_enic/src/wq_enet_desc.h
Signature · 1 line
1.9.1

A message that is not in the archive (sent off-list or not yet received): 1415390747-9532-1-git-send-email-ssujith-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org

#2 lore raw

2014-11-08 01:35, Sujith Sankar:

Quoted 2 lines

ENIC PMD is the poll-mode driver for the Cisco Systems Inc. VIC to be used with DPDK suite.

Great to see you on board!

Thank you to contribute a new driver.

Signature · 1 line
Thomas
#3 lore raw

Thomas,
It is our pleasure to be part of the community and to be contributing to it.
Looking forward to a healthy and fruitful association.

Thanks and Regards,
-Sujith

Quoted 10 lines · Thomas Monjalon

2014-11-08 01:35, Sujith Sankar:

Quoted 2 lines

ENIC PMD is the poll-mode driver for the Cisco Systems Inc. VIC to be used with DPDK suite.

Great to see you on board!

Thank you to contribute a new driver.

Signature · 1 line
Thomas
#4 lore raw

PATCH 1/7 DPDK changes for accommodating ENIC PMD

In reply to a message not in the archive
---
 app/test-pmd/testpmd.c                             | 1 +
 config/common_linuxapp                             | 6 ++++++
 lib/Makefile                                       | 1 +
 lib/librte_eal/linuxapp/eal/eal_pci_vfio.c         | 7 +++++++
 lib/librte_eal/linuxapp/eal/include/eal_pci_init.h | 1 +
 mk/rte.app.mk                                      | 4 ++++
 6 files changed, 20 insertions(+)
app/test-pmd/testpmd.c +1 -0
index f76406f..4857d56 100644
@@ -1874,6 +1874,7 @@ main(int argc, char** argv)
 							"check that "
 			  "CONFIG_RTE_LIBRTE_IGB_PMD=y and that "
 			  "CONFIG_RTE_LIBRTE_EM_PMD=y and that "
+			  "CONFIG_RTE_LIBRTE_ENIC_PMD=y and that "
 			  "CONFIG_RTE_LIBRTE_IXGBE_PMD=y in your "
 			  "configuration file\n");
 
config/common_linuxapp +6 -0
index 57b61c9..6b5bac6 100644
@@ -210,6 +210,12 @@ 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
+CONFIG_RTE_LIBRTE_ENIC_PMD_DEBUG_TRACE=n
+
+#
 # Compile burst-oriented VIRTIO PMD driver
 #
 CONFIG_RTE_LIBRTE_VIRTIO_PMD=y
lib/Makefile +1 -0
index e3237ff..1911790 100644
@@ -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
lib/librte_eal/linuxapp/eal/eal_pci_vfio.c +7 -0
index c776ddc..6bf8f2e 100644
@@ -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 */
@@ -791,4 +792,10 @@ pci_vfio_is_enabled(void)
 {
 	return vfio_cfg.vfio_enabled;
 }
+
+int
+pci_vfio_container_fd(void)
+{
+	return vfio_cfg.vfio_container_fd;
+}
 #endif
lib/librte_eal/linuxapp/eal/include/eal_pci_init.h +1 -0
index d758bee..c9e9e40 100644
@@ -71,6 +71,7 @@ int pci_uio_map_resource(struct rte_pci_device *dev);
 
 int pci_vfio_enable(void);
 int pci_vfio_is_enabled(void);
+int pci_vfio_container_fd(void);
 int pci_vfio_mp_sync_setup(void);
 
 /* map VFIO resource prototype */
mk/rte.app.mk +4 -0
index 285b65c..95c652f 100644
@@ -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
Signature · 1 line
1.9.1

A message that is not in the archive (sent off-list or not yet received): 1415390747-9532-2-git-send-email-ssujith-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org

#6 lore raw

Re: [PATCH 1/7] DPDK changes for accommodating ENIC PMD

Quoted 44 lines · Sujith Sankar
---
 app/test-pmd/testpmd.c                             | 1 +
 config/common_linuxapp                             | 6 ++++++
 lib/Makefile                                       | 1 +
 lib/librte_eal/linuxapp/eal/eal_pci_vfio.c         | 7 +++++++
 lib/librte_eal/linuxapp/eal/include/eal_pci_init.h | 1 +
 mk/rte.app.mk                                      | 4 ++++
 6 files changed, 20 insertions(+)
app/test-pmd/testpmd.c +1 -0
index f76406f..4857d56 100644
@@ -1874,6 +1874,7 @@ main(int argc, char** argv)
 							"check that "
 			  "CONFIG_RTE_LIBRTE_IGB_PMD=y and that "
 			  "CONFIG_RTE_LIBRTE_EM_PMD=y and that "
+			  "CONFIG_RTE_LIBRTE_ENIC_PMD=y and that "
 			  "CONFIG_RTE_LIBRTE_IXGBE_PMD=y in your "
 			  "configuration file\n");
 
config/common_linuxapp +6 -0
index 57b61c9..6b5bac6 100644
@@ -210,6 +210,12 @@ 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
+CONFIG_RTE_LIBRTE_ENIC_PMD_DEBUG_TRACE=n
+
+#
 # Compile burst-oriented VIRTIO PMD driver
 #
 CONFIG_RTE_LIBRTE_VIRTIO_PMD=y
lib/Makefile +0 -0
index e3237ff..1911790 100644

lib/Makefile DIRS-$(CONFIG_RTE_LIBRTE_CMDLINE) += librte_cmdline · line 46

Quoted 4 lines
lib/Makefile +1 -0
@@ -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

Don't include this change until last in the series, as you haven't patched in this directory yet. Otherwise you'll get a failed to build problem.

#7 lore raw

PATCH 2/7 ENIC PMD License

In reply to a message not in the archive
---
 lib/librte_pmd_enic/LICENSE | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 lib/librte_pmd_enic/LICENSE
lib/librte_pmd_enic/LICENSE new file +23 -0
new file mode 100644
index 0000000..589e36f
@@ -0,0 +1,23 @@
+ * Copyright (c) 2014, Cisco Systems, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
Signature · 1 line
1.9.1

A message that is not in the archive (sent off-list or not yet received): 1415390747-9532-3-git-send-email-ssujith-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org

#9 lore raw

Re: [PATCH 2/7] ENIC PMD License

Quoted 39 lines · Sujith Sankar
---
 lib/librte_pmd_enic/LICENSE | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 lib/librte_pmd_enic/LICENSE
lib/librte_pmd_enic/LICENSE new file +23 -0
new file mode 100644
index 0000000..589e36f
@@ -0,0 +1,23 @@
+ * Copyright (c) 2014, Cisco Systems, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
Signature · 1 line
1.9.1

It looks like you're trying to use the BSD 2 clause license from here. Can you please grab the properly formatted copy from someplace like here:
http://opensource.org/licenses/BSD-2-Clause

So that its clear. I think it should just call out the clauses more clearly.

Thanks
Neil

#10 lore raw

PATCH 3/7 ENIC PMD Makefile

In reply to a message not in the archive
---
 lib/librte_pmd_enic/Makefile | 66 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)
 create mode 100644 lib/librte_pmd_enic/Makefile
lib/librte_pmd_enic/Makefile new file +66 -0
new file mode 100644
index 0000000..7605a8f
@@ -0,0 +1,66 @@
+#   BSD LICENSE
+# 
+#   Copyright(c) 2010-2013 Intel Corporation. All rights reserved.
+#   All rights reserved.
+# 
+#   Redistribution and use in source and binary forms, with or without 
+#   modification, are permitted provided that the following conditions 
+#   are met:
+# 
+#     * Redistributions of source code must retain the above copyright 
+#       notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above copyright 
+#       notice, this list of conditions and the following disclaimer in 
+#       the documentation and/or other materials provided with the 
+#       distribution.
+#     * Neither the name of Intel Corporation nor the names of its 
+#       contributors may be used to endorse or promote products derived 
+#       from this software without specific prior written permission.
+# 
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
+#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
+#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
+#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
+#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
+#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 
+
+include $(RTE_SDK)/mk/rte.vars.mk
+
+#
+# library name
+#
+LIB = librte_pmd_enic.a
+
+CFLAGS += -I$(RTE_SDK)/lib/librte_hash/
+CFLAGS += -O3 -Wno-deprecated
+
+VPATH += $(RTE_SDK)/lib/librte_pmd_enic/src
+
+#
+# all source are stored in SRCS-y
+#
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += enic_main.c 
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += enic_clsf.c 
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += vnic_cq.c 
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += vnic_wq.c 
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += vnic_dev.c 
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += vnic_intr.c 
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += vnic_rq.c 
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += enic_etherdev.c
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += enic_res.c
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += vnic_rss.c
+
+
+# this lib depends upon:
+DEPDIRS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += lib/librte_eal lib/librte_ether
+DEPDIRS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += lib/librte_mempool lib/librte_mbuf
+DEPDIRS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += lib/librte_net lib/librte_malloc
+
+include $(RTE_SDK)/mk/rte.lib.mk
+
Signature · 1 line
1.9.1

A message that is not in the archive (sent off-list or not yet received): 1415390747-9532-4-git-send-email-ssujith-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org

#12 lore raw

Re: [PATCH 3/7] ENIC PMD Makefile

Quoted 82 lines · Sujith Sankar
---
 lib/librte_pmd_enic/Makefile | 66 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)
 create mode 100644 lib/librte_pmd_enic/Makefile
lib/librte_pmd_enic/Makefile new file +66 -0
new file mode 100644
index 0000000..7605a8f
@@ -0,0 +1,66 @@
+#   BSD LICENSE
+# 
+#   Copyright(c) 2010-2013 Intel Corporation. All rights reserved.
+#   All rights reserved.
+# 
+#   Redistribution and use in source and binary forms, with or without 
+#   modification, are permitted provided that the following conditions 
+#   are met:
+# 
+#     * Redistributions of source code must retain the above copyright 
+#       notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above copyright 
+#       notice, this list of conditions and the following disclaimer in 
+#       the documentation and/or other materials provided with the 
+#       distribution.
+#     * Neither the name of Intel Corporation nor the names of its 
+#       contributors may be used to endorse or promote products derived 
+#       from this software without specific prior written permission.
+# 
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
+#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
+#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
+#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
+#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
+#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 
+
+include $(RTE_SDK)/mk/rte.vars.mk
+
+#
+# library name
+#
+LIB = librte_pmd_enic.a
+
+CFLAGS += -I$(RTE_SDK)/lib/librte_hash/
+CFLAGS += -O3 -Wno-deprecated
+
+VPATH += $(RTE_SDK)/lib/librte_pmd_enic/src
+
+#
+# all source are stored in SRCS-y
+#
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += enic_main.c 
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += enic_clsf.c 
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += vnic_cq.c 
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += vnic_wq.c 
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += vnic_dev.c 
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += vnic_intr.c 
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += vnic_rq.c 
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += enic_etherdev.c
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += enic_res.c
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += vnic_rss.c
+
+
+# this lib depends upon:
+DEPDIRS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += lib/librte_eal lib/librte_ether
+DEPDIRS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += lib/librte_mempool lib/librte_mbuf
+DEPDIRS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += lib/librte_net lib/librte_malloc
+
+include $(RTE_SDK)/mk/rte.lib.mk
+
Signature · 1 line
1.9.1

Make this the last patch in your series, and merge it with the chunk from the last patch that adds the enic directory to the lib/Makefile, so that a bisect will build between these commits.

Neil

A message that is not in the archive (sent off-list or not yet received): 20141107113449.GC25469-B26myB8xz7F8NnZeBjwnZQMhkBWG/[email protected]

#14 lore raw

Re: [PATCH 3/7] ENIC PMD Makefile

Hi Neil,

Thanks for the comments. I shall work on the modifications that you have suggested and get back with V2.

Regards,
-Sujith

Quoted 108 lines · Neil Horman
Quoted 98 lines · Sujith Sankar
---
 lib/librte_pmd_enic/Makefile | 66
++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)
 create mode 100644 lib/librte_pmd_enic/Makefile
lib/librte_pmd_enic/Makefile new file +12 -0
new file mode 100644
index 0000000..7605a8f
@@ -0,0 +1,66 @@
+#   BSD LICENSE
+# 
+#   Copyright(c) 2010-2013 Intel Corporation. All rights reserved.
+#   All rights reserved.
+# 
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+# 
+#     * Redistributions of source code must retain the above copyright
+#       notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above

copyright
+# notice, this list of conditions and the following disclaimer
in

lib/librte_pmd_enic/Makefile new file +4 -0
+#       the documentation and/or other materials provided with the
+#       distribution.
+#     * Neither the name of Intel Corporation nor the names of its
+#       contributors may be used to endorse or promote products

derived

lib/librte_pmd_enic/Makefile new file +3 -0
+#       from this software without specific prior written permission.
+# 
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND

CONTRIBUTORS

lib/librte_pmd_enic/Makefile new file +2 -0
+#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS

FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL,

lib/librte_pmd_enic/Makefile new file +2 -0
+#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF

USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.

lib/librte_pmd_enic/Makefile new file +31 -0
+# 
+
+include $(RTE_SDK)/mk/rte.vars.mk
+
+#
+# library name
+#
+LIB = librte_pmd_enic.a
+
+CFLAGS += -I$(RTE_SDK)/lib/librte_hash/
+CFLAGS += -O3 -Wno-deprecated
+
+VPATH += $(RTE_SDK)/lib/librte_pmd_enic/src
+
+#
+# all source are stored in SRCS-y
+#
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += enic_main.c
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += enic_clsf.c
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += vnic_cq.c
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += vnic_wq.c
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += vnic_dev.c
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += vnic_intr.c
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += vnic_rq.c
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += enic_etherdev.c
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += enic_res.c
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += vnic_rss.c
+
+
+# this lib depends upon:
+DEPDIRS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += lib/librte_eal

lib/librte_ether +DEPDIRS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += lib/librte_mempool lib/librte_mbuf +DEPDIRS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += lib/librte_net lib/librte_malloc

lib/librte_pmd_enic/Makefile new file +3 -0
+
+include $(RTE_SDK)/mk/rte.lib.mk
+
Signature · 1 line
1.9.1

Make this the last patch in your series, and merge it with the chunk from the
last patch that adds the enic directory to the lib/Makefile, so that a bisect
will build between these commits.

Neil

A message that is not in the archive (sent off-list or not yet received): D082E709.27161%[email protected]

#16 lore raw

Re: [PATCH 3/7] ENIC PMD Makefile

Neil,

If I move the DPDK patch that accommodates ENIC PMD (that is the one that patches lib/Makefile) to the last in the series, builds between commits would succeed, wouldn¹t it? Moving that to the last is anyway needed.

Thanks,
-Sujith

Quoted 120 lines · Sujith Sankar (ssujith)

Hi Neil,

Thanks for the comments. I shall work on the modifications that you have suggested and get back with V2.

Regards,
-Sujith

Quoted 109 lines · Neil Horman
Quoted 99 lines · Sujith Sankar
---
 lib/librte_pmd_enic/Makefile | 66
++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)
 create mode 100644 lib/librte_pmd_enic/Makefile
lib/librte_pmd_enic/Makefile new file +12 -0
new file mode 100644
index 0000000..7605a8f
@@ -0,0 +1,66 @@
+#   BSD LICENSE
+# 
+#   Copyright(c) 2010-2013 Intel Corporation. All rights reserved.
+#   All rights reserved.
+# 
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+# 
+#     * Redistributions of source code must retain the above copyright
+#       notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above

copyright
+# notice, this list of conditions and the following disclaimer
in

lib/librte_pmd_enic/Makefile new file +4 -0
+#       the documentation and/or other materials provided with the
+#       distribution.
+#     * Neither the name of Intel Corporation nor the names of its
+#       contributors may be used to endorse or promote products

derived

lib/librte_pmd_enic/Makefile new file +3 -0
+#       from this software without specific prior written permission.
+# 
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND

CONTRIBUTORS

lib/librte_pmd_enic/Makefile new file +2 -0
+#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS

FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL,

lib/librte_pmd_enic/Makefile new file +2 -0
+#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF

USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.

lib/librte_pmd_enic/Makefile new file +31 -0
+# 
+
+include $(RTE_SDK)/mk/rte.vars.mk
+
+#
+# library name
+#
+LIB = librte_pmd_enic.a
+
+CFLAGS += -I$(RTE_SDK)/lib/librte_hash/
+CFLAGS += -O3 -Wno-deprecated
+
+VPATH += $(RTE_SDK)/lib/librte_pmd_enic/src
+
+#
+# all source are stored in SRCS-y
+#
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += enic_main.c
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += enic_clsf.c
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += vnic_cq.c
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += vnic_wq.c
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += vnic_dev.c
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += vnic_intr.c
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += vnic_rq.c
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += enic_etherdev.c
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += enic_res.c
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += vnic_rss.c
+
+
+# this lib depends upon:
+DEPDIRS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += lib/librte_eal

lib/librte_ether +DEPDIRS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += lib/librte_mempool lib/librte_mbuf +DEPDIRS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += lib/librte_net lib/librte_malloc

lib/librte_pmd_enic/Makefile new file +3 -0
+
+include $(RTE_SDK)/mk/rte.lib.mk
+
Signature · 1 line
1.9.1

Make this the last patch in your series, and merge it with the chunk from the
last patch that adds the enic directory to the lib/Makefile, so that a bisect
will build between these commits.

Neil

A message that is not in the archive (sent off-list or not yet received): D0868974.2733D%[email protected]

#18 lore raw

Re: [PATCH 3/7] ENIC PMD Makefile

Quoted 6 lines · Sujith Sankar (ssujith)

Neil,

If I move the DPDK patch that accommodates ENIC PMD (that is the one that patches lib/Makefile) to the last in the series, builds between commits would succeed, wouldn¹t it? Moving that to the last is anyway needed.

correct, yes.
Neil

Quoted 127 lines

Thanks,
-Sujith

Quoted 120 lines · Sujith Sankar (ssujith)

Hi Neil,

Thanks for the comments. I shall work on the modifications that you have suggested and get back with V2.

Regards,
-Sujith

Quoted 109 lines · Neil Horman
Quoted 99 lines · Sujith Sankar
---
 lib/librte_pmd_enic/Makefile | 66
++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)
 create mode 100644 lib/librte_pmd_enic/Makefile
lib/librte_pmd_enic/Makefile new file +12 -0
new file mode 100644
index 0000000..7605a8f
@@ -0,0 +1,66 @@
+#   BSD LICENSE
+# 
+#   Copyright(c) 2010-2013 Intel Corporation. All rights reserved.
+#   All rights reserved.
+# 
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+# 
+#     * Redistributions of source code must retain the above copyright
+#       notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above

copyright
+# notice, this list of conditions and the following disclaimer
in

lib/librte_pmd_enic/Makefile new file +4 -0
+#       the documentation and/or other materials provided with the
+#       distribution.
+#     * Neither the name of Intel Corporation nor the names of its
+#       contributors may be used to endorse or promote products

derived

lib/librte_pmd_enic/Makefile new file +3 -0
+#       from this software without specific prior written permission.
+# 
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND

CONTRIBUTORS

lib/librte_pmd_enic/Makefile new file +2 -0
+#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS

FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL,

lib/librte_pmd_enic/Makefile new file +2 -0
+#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF

USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.

lib/librte_pmd_enic/Makefile new file +31 -0
+# 
+
+include $(RTE_SDK)/mk/rte.vars.mk
+
+#
+# library name
+#
+LIB = librte_pmd_enic.a
+
+CFLAGS += -I$(RTE_SDK)/lib/librte_hash/
+CFLAGS += -O3 -Wno-deprecated
+
+VPATH += $(RTE_SDK)/lib/librte_pmd_enic/src
+
+#
+# all source are stored in SRCS-y
+#
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += enic_main.c
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += enic_clsf.c
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += vnic_cq.c
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += vnic_wq.c
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += vnic_dev.c
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += vnic_intr.c
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += vnic_rq.c
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += enic_etherdev.c
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += enic_res.c
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += vnic_rss.c
+
+
+# this lib depends upon:
+DEPDIRS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += lib/librte_eal

lib/librte_ether +DEPDIRS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += lib/librte_mempool lib/librte_mbuf +DEPDIRS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += lib/librte_net lib/librte_malloc

lib/librte_pmd_enic/Makefile new file +3 -0
+
+include $(RTE_SDK)/mk/rte.lib.mk
+
Signature · 1 line
1.9.1

Make this the last patch in your series, and merge it with the chunk from the
last patch that adds the enic directory to the lib/Makefile, so that a bisect
will build between these commits.

Neil

#19 lore raw

PATCH 4/7 VNIC common code

In reply to a message not in the archive
---
 lib/librte_pmd_enic/src/cq_desc.h       |  122 ++++
 lib/librte_pmd_enic/src/cq_enet_desc.h  |  257 ++++++++
 lib/librte_pmd_enic/src/rq_enet_desc.h  |   72 +++
 lib/librte_pmd_enic/src/vnic_cq.c       |  113 ++++
 lib/librte_pmd_enic/src/vnic_cq.h       |  148 +++++
 lib/librte_pmd_enic/src/vnic_dev.c      | 1077 +++++++++++++++++++++++++++++++
 lib/librte_pmd_enic/src/vnic_dev.h      |  198 ++++++
 lib/librte_pmd_enic/src/vnic_devcmd.h   |  770 ++++++++++++++++++++++
 lib/librte_pmd_enic/src/vnic_enet.h     |   74 +++
 lib/librte_pmd_enic/src/vnic_intr.c     |   79 +++
 lib/librte_pmd_enic/src/vnic_intr.h     |  122 ++++
 lib/librte_pmd_enic/src/vnic_nic.h      |   84 +++
 lib/librte_pmd_enic/src/vnic_resource.h |   93 +++
 lib/librte_pmd_enic/src/vnic_rq.c       |  242 +++++++
 lib/librte_pmd_enic/src/vnic_rq.h       |  278 ++++++++
 lib/librte_pmd_enic/src/vnic_rss.c      |   81 +++
 lib/librte_pmd_enic/src/vnic_rss.h      |   57 ++
 lib/librte_pmd_enic/src/vnic_stats.h    |   82 +++
 lib/librte_pmd_enic/src/vnic_wq.c       |  241 +++++++
 lib/librte_pmd_enic/src/vnic_wq.h       |  279 ++++++++
 lib/librte_pmd_enic/src/wq_enet_desc.h  |  110 ++++
 21 files changed, 4579 insertions(+)
 create mode 100644 lib/librte_pmd_enic/src/cq_desc.h
 create mode 100644 lib/librte_pmd_enic/src/cq_enet_desc.h
 create mode 100644 lib/librte_pmd_enic/src/rq_enet_desc.h
 create mode 100644 lib/librte_pmd_enic/src/vnic_cq.c
 create mode 100644 lib/librte_pmd_enic/src/vnic_cq.h
 create mode 100644 lib/librte_pmd_enic/src/vnic_dev.c
 create mode 100644 lib/librte_pmd_enic/src/vnic_dev.h
 create mode 100644 lib/librte_pmd_enic/src/vnic_devcmd.h
 create mode 100644 lib/librte_pmd_enic/src/vnic_enet.h
 create mode 100644 lib/librte_pmd_enic/src/vnic_intr.c
 create mode 100644 lib/librte_pmd_enic/src/vnic_intr.h
 create mode 100644 lib/librte_pmd_enic/src/vnic_nic.h
 create mode 100644 lib/librte_pmd_enic/src/vnic_resource.h
 create mode 100644 lib/librte_pmd_enic/src/vnic_rq.c
 create mode 100644 lib/librte_pmd_enic/src/vnic_rq.h
 create mode 100644 lib/librte_pmd_enic/src/vnic_rss.c
 create mode 100644 lib/librte_pmd_enic/src/vnic_rss.h
 create mode 100644 lib/librte_pmd_enic/src/vnic_stats.h
 create mode 100644 lib/librte_pmd_enic/src/vnic_wq.c
 create mode 100644 lib/librte_pmd_enic/src/vnic_wq.h
 create mode 100644 lib/librte_pmd_enic/src/wq_enet_desc.h
lib/librte_pmd_enic/src/cq_desc.h new file +122 -0
new file mode 100644
index 0000000..6c14cb3
@@ -0,0 +1,122 @@
+/*
+ * Copyright 2008-2010 Cisco Systems, Inc.  All rights reserved.
+ * Copyright 2007 Nuova Systems, Inc.  All rights reserved.
+ *
+ * Copyright (c) 2014, Cisco Systems, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+#ident "$Id: cq_desc.h 129574 2013-04-26 22:11:14Z rfaucett $"
+
+#ifndef _CQ_DESC_H_
+#define _CQ_DESC_H_
+
+/*
+ * Completion queue descriptor types
+ */
+enum cq_desc_types {
+	CQ_DESC_TYPE_WQ_ENET = 0,
+	CQ_DESC_TYPE_DESC_COPY = 1,
+	CQ_DESC_TYPE_WQ_EXCH = 2,
+	CQ_DESC_TYPE_RQ_ENET = 3,
+	CQ_DESC_TYPE_RQ_FCP = 4,
+	CQ_DESC_TYPE_IOMMU_MISS = 5,
+	CQ_DESC_TYPE_SGL = 6,
+	CQ_DESC_TYPE_CLASSIFIER = 7,
+	CQ_DESC_TYPE_TEST = 127,
+};
+
+/* Completion queue descriptor: 16B
+ *
+ * All completion queues have this basic layout.  The
+ * type_specfic area is unique for each completion
+ * queue type.
+ */
+struct cq_desc {
+	__le16 completed_index;
+	__le16 q_number;
+	u8 type_specfic[11];
+	u8 type_color;
+};
+
+#define CQ_DESC_TYPE_BITS        4
+#define CQ_DESC_TYPE_MASK        ((1 << CQ_DESC_TYPE_BITS) - 1)
+#define CQ_DESC_COLOR_MASK       1
+#define CQ_DESC_COLOR_SHIFT      7
+#define CQ_DESC_Q_NUM_BITS       10
+#define CQ_DESC_Q_NUM_MASK       ((1 << CQ_DESC_Q_NUM_BITS) - 1)
+#define CQ_DESC_COMP_NDX_BITS    12
+#define CQ_DESC_COMP_NDX_MASK    ((1 << CQ_DESC_COMP_NDX_BITS) - 1)
+
+static inline void cq_color_enc(struct cq_desc *desc, const u8 color)
+{
+	if (color)
+		desc->type_color |=  (1 << CQ_DESC_COLOR_SHIFT);
+	else
+		desc->type_color &= ~(1 << CQ_DESC_COLOR_SHIFT);
+}
+
+static inline void cq_desc_enc(struct cq_desc *desc,
+	const u8 type, const u8 color, const u16 q_number,
+	const u16 completed_index)
+{
+	desc->type_color = (type & CQ_DESC_TYPE_MASK) |
+		((color & CQ_DESC_COLOR_MASK) << CQ_DESC_COLOR_SHIFT);
+	desc->q_number = cpu_to_le16(q_number & CQ_DESC_Q_NUM_MASK);
+	desc->completed_index = cpu_to_le16(completed_index &
+		CQ_DESC_COMP_NDX_MASK);
+}
+
+static inline void cq_desc_dec(const struct cq_desc *desc_arg,
+	u8 *type, u8 *color, u16 *q_number, u16 *completed_index)
+{
+	const struct cq_desc *desc = desc_arg;
+	const u8 type_color = desc->type_color;
+
+	*color = (type_color >> CQ_DESC_COLOR_SHIFT) & CQ_DESC_COLOR_MASK;
+
+	/*
+	 * Make sure color bit is read from desc *before* other fields
+	 * are read from desc.  Hardware guarantees color bit is last
+	 * bit (byte) written.  Adding the rmb() prevents the compiler
+	 * and/or CPU from reordering the reads which would potentially
+	 * result in reading stale values.
+	 */
+
+	rmb();
+
+	*type = type_color & CQ_DESC_TYPE_MASK;
+	*q_number = le16_to_cpu(desc->q_number) & CQ_DESC_Q_NUM_MASK;
+	*completed_index = le16_to_cpu(desc->completed_index) &
+		CQ_DESC_COMP_NDX_MASK;
+}
+
+static inline void cq_color_dec(const struct cq_desc *desc_arg, u8 *color)
+{
+	volatile const struct cq_desc *desc = desc_arg;
+
+	*color = (desc->type_color >> CQ_DESC_COLOR_SHIFT) & CQ_DESC_COLOR_MASK;
+}
+
+#endif /* _CQ_DESC_H_ */
lib/librte_pmd_enic/src/cq_enet_desc.h new file +257 -0

257 lines not on this page · raw message

lib/librte_pmd_enic/src/rq_enet_desc.h new file +72 -0

72 lines not on this page · raw message

lib/librte_pmd_enic/src/vnic_cq.c new file +113 -0

113 lines not on this page · raw message

lib/librte_pmd_enic/src/vnic_cq.h new file +148 -0

148 lines not on this page · raw message

lib/librte_pmd_enic/src/vnic_dev.c new file +1077 -0

1,077 lines not on this page · raw message

lib/librte_pmd_enic/src/vnic_dev.h new file +198 -0

198 lines not on this page · raw message

lib/librte_pmd_enic/src/vnic_devcmd.h new file +770 -0

770 lines not on this page · raw message

lib/librte_pmd_enic/src/vnic_enet.h new file +74 -0

74 lines not on this page · raw message

lib/librte_pmd_enic/src/vnic_intr.c new file +79 -0

79 lines not on this page · raw message

lib/librte_pmd_enic/src/vnic_intr.h new file +122 -0

90 lines not on this page · raw message

lib/librte_pmd_enic/src/vnic_nic.h new file +84 -0

84 lines not on this page · raw message

lib/librte_pmd_enic/src/vnic_resource.h new file +93 -0

93 lines not on this page · raw message

lib/librte_pmd_enic/src/vnic_rq.c new file +242 -0

242 lines not on this page · raw message

lib/librte_pmd_enic/src/vnic_rq.h new file +278 -0

278 lines not on this page · raw message

lib/librte_pmd_enic/src/vnic_rss.c new file +81 -0

81 lines not on this page · raw message

lib/librte_pmd_enic/src/vnic_rss.h new file +57 -0

57 lines not on this page · raw message

lib/librte_pmd_enic/src/vnic_stats.h new file +82 -0

82 lines not on this page · raw message

lib/librte_pmd_enic/src/vnic_wq.c new file +241 -0

241 lines not on this page · raw message

lib/librte_pmd_enic/src/vnic_wq.h new file +279 -0

279 lines not on this page · raw message

lib/librte_pmd_enic/src/wq_enet_desc.h new file +110 -0

110 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.9.1

Part of the diff is not shown here. View the raw message.

A message that is not in the archive (sent off-list or not yet received): 1415390747-9532-5-git-send-email-ssujith-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org

#21 lore raw

Re: [PATCH 4/7] VNIC common code

2014-11-08 01:35, Sujith Sankar:

Quoted 14 lines
 lib/librte_pmd_enic/src/cq_desc.h       |  122 ++++
 lib/librte_pmd_enic/src/cq_enet_desc.h  |  257 ++++++++
 lib/librte_pmd_enic/src/rq_enet_desc.h  |   72 +++
 lib/librte_pmd_enic/src/vnic_cq.c       |  113 ++++
 lib/librte_pmd_enic/src/vnic_cq.h       |  148 +++++
 lib/librte_pmd_enic/src/vnic_dev.c      | 1077 +++++++++++++++++++++++++++++++
 lib/librte_pmd_enic/src/vnic_dev.h      |  198 ++++++
 lib/librte_pmd_enic/src/vnic_devcmd.h   |  770 ++++++++++++++++++++++
 lib/librte_pmd_enic/src/vnic_enet.h     |   74 +++
 lib/librte_pmd_enic/src/vnic_intr.c     |   79 +++
 lib/librte_pmd_enic/src/vnic_intr.h     |  122 ++++
 lib/librte_pmd_enic/src/vnic_nic.h      |   84 +++
 lib/librte_pmd_enic/src/vnic_resource.h |   93 +++
 lib/librte_pmd_enic/src/vnic_rq.c       |  242 +++++++
Quoted 8 lines
 lib/librte_pmd_enic/src/vnic_rq.h       |  278 ++++++++
 lib/librte_pmd_enic/src/vnic_rss.c      |   81 +++
 lib/librte_pmd_enic/src/vnic_rss.h      |   57 ++
 lib/librte_pmd_enic/src/vnic_stats.h    |   82 +++
 lib/librte_pmd_enic/src/vnic_wq.c       |  241 +++++++
 lib/librte_pmd_enic/src/vnic_wq.h       |  279 ++++++++
 lib/librte_pmd_enic/src/wq_enet_desc.h  |  110 ++++
 21 files changed, 4579 insertions(+)

What is the status of these files?
Are they copied from somewhere?
Please explain in the commit log.

Could you move them in a subdirectory vnic/ or base/?

Please could you remove the src/ subdirectory level?

Thanks

Signature · 1 line
Thomas
#22 lore raw

Re: [PATCH 4/7] VNIC common code

Thomas,
These are files common to all flavours (user-space as well as kernel mode) of VIC drivers. I shall add this info to the commit logs.
Let me rework the directory structure too.

Thanks,
-Sujith

Quoted 36 lines · Thomas Monjalon

2014-11-08 01:35, Sujith Sankar:

Quoted 15 lines
 lib/librte_pmd_enic/src/cq_desc.h       |  122 ++++
 lib/librte_pmd_enic/src/cq_enet_desc.h  |  257 ++++++++
 lib/librte_pmd_enic/src/rq_enet_desc.h  |   72 +++
 lib/librte_pmd_enic/src/vnic_cq.c       |  113 ++++
 lib/librte_pmd_enic/src/vnic_cq.h       |  148 +++++
 lib/librte_pmd_enic/src/vnic_dev.c      | 1077
+++++++++++++++++++++++++++++++
 lib/librte_pmd_enic/src/vnic_dev.h      |  198 ++++++
 lib/librte_pmd_enic/src/vnic_devcmd.h   |  770 ++++++++++++++++++++++
 lib/librte_pmd_enic/src/vnic_enet.h     |   74 +++
 lib/librte_pmd_enic/src/vnic_intr.c     |   79 +++
 lib/librte_pmd_enic/src/vnic_intr.h     |  122 ++++
 lib/librte_pmd_enic/src/vnic_nic.h      |   84 +++
 lib/librte_pmd_enic/src/vnic_resource.h |   93 +++
 lib/librte_pmd_enic/src/vnic_rq.c       |  242 +++++++
Quoted 8 lines
 lib/librte_pmd_enic/src/vnic_rq.h       |  278 ++++++++
 lib/librte_pmd_enic/src/vnic_rss.c      |   81 +++
 lib/librte_pmd_enic/src/vnic_rss.h      |   57 ++
 lib/librte_pmd_enic/src/vnic_stats.h    |   82 +++
 lib/librte_pmd_enic/src/vnic_wq.c       |  241 +++++++
 lib/librte_pmd_enic/src/vnic_wq.h       |  279 ++++++++
 lib/librte_pmd_enic/src/wq_enet_desc.h  |  110 ++++
 21 files changed, 4579 insertions(+)

What is the status of these files?
Are they copied from somewhere?
Please explain in the commit log.

Could you move them in a subdirectory vnic/ or base/?

Please could you remove the src/ subdirectory level?

Thanks

Signature · 1 line
Thomas
#24 lore raw

Thomas,
Let me work on that too.

Thanks,
-Sujith

Quoted 8 lines · Thomas Monjalon

Sujith,

It seems that this PMD is based on DPDK 1.7.
Could you rebase it on HEAD?

Thank you

Signature · 1 line
Thomas
#25 lore raw
In reply to Thomas Monjalon

Thomas,

This patch is based on 1.7.1. Thought that is the latest. And I got the diff from origin.
What made you feel that the patch is from 1.7?

Regards,
-Sujith

Quoted 8 lines · Thomas Monjalon

Sujith,

It seems that this PMD is based on DPDK 1.7.
Could you rebase it on HEAD?

Thank you

Signature · 1 line
Thomas

A message that is not in the archive (sent off-list or not yet received): D08682B4.27321%[email protected]

#27 lore raw

2014-11-10 09:27, Sujith Sankar:

Quoted 7 lines · Thomas Monjalon
Quoted 2 lines

It seems that this PMD is based on DPDK 1.7.
Could you rebase it on HEAD?

This patch is based on 1.7.1. Thought that is the latest. And I got the diff from origin.
What made you feel that the patch is from 1.7?

By saying 1.7, I meant 1.7.0 or 1.7.1.
In current HEAD (future 1.8.0), there is a lot of changes which make your PMD incompatible. That's why the rule is to base the patches on the latest HEAD.

Thanks for your efforts.

Signature · 1 line
Thomas
#28 lore raw

Thanks for the clear response. I¹ll take a look at it.

Regards,
-Sujith

Quoted 20 lines · Thomas Monjalon

2014-11-10 09:27, Sujith Sankar:

Quoted 9 lines
Quoted 2 lines · Thomas Monjalon

It seems that this PMD is based on DPDK 1.7.
Could you rebase it on HEAD?

This patch is based on 1.7.1. Thought that is the latest. And I got the
diff from origin.
What made you feel that the patch is from 1.7?

By saying 1.7, I meant 1.7.0 or 1.7.1.
In current HEAD (future 1.8.0), there is a lot of changes which make your PMD
incompatible. That's why the rule is to base the patches on the latest HEAD.

Thanks for your efforts.

Signature · 1 line
Thomas
#29 lore raw

PATCH 5/7 ENIC PMD specific code

In reply to a message not in the archive
---
 lib/librte_pmd_enic/src/enic.h        |  154 ++++
 lib/librte_pmd_enic/src/enic_clsf.c   |  240 ++++++
 lib/librte_pmd_enic/src/enic_compat.h |  138 ++++
 lib/librte_pmd_enic/src/enic_main.c   | 1325 +++++++++++++++++++++++++++++++++
 lib/librte_pmd_enic/src/enic_res.c    |  217 ++++++
 lib/librte_pmd_enic/src/enic_res.h    |  164 ++++
 6 files changed, 2238 insertions(+)
 create mode 100644 lib/librte_pmd_enic/src/enic.h
 create mode 100644 lib/librte_pmd_enic/src/enic_clsf.c
 create mode 100644 lib/librte_pmd_enic/src/enic_compat.h
 create mode 100644 lib/librte_pmd_enic/src/enic_main.c
 create mode 100644 lib/librte_pmd_enic/src/enic_res.c
 create mode 100644 lib/librte_pmd_enic/src/enic_res.h
lib/librte_pmd_enic/src/enic.h new file +154 -0
new file mode 100644
index 0000000..fd9cdd9
@@ -0,0 +1,154 @@
+/*
+ * Copyright 2008-2014 Cisco Systems, Inc.  All rights reserved.
+ * Copyright 2007 Nuova Systems, Inc.  All rights reserved.
+ *
+ * Copyright (c) 2014, Cisco Systems, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+#ident "$Id$"
+
+#ifndef _ENIC_H_
+#define _ENIC_H_
+
+#include "vnic_enet.h"
+#include "vnic_dev.h"
+#include "vnic_wq.h"
+#include "vnic_rq.h"
+#include "vnic_cq.h"
+#include "vnic_intr.h"
+#include "vnic_stats.h"
+#include "vnic_nic.h"
+#include "vnic_rss.h"
+#include "enic_res.h"
+
+#define DRV_NAME		"enic_pmd"
+#define DRV_DESCRIPTION		"Cisco VIC Ethernet NIC Poll-mode Driver"
+#define DRV_VERSION		"1.0.0.3"
+#define DRV_COPYRIGHT		"Copyright 2008-2014 Cisco Systems, Inc"
+
+#define ENIC_WQ_MAX		8
+#define ENIC_RQ_MAX		8
+#define ENIC_CQ_MAX		(ENIC_WQ_MAX + ENIC_RQ_MAX)
+#define ENIC_INTR_MAX		(ENIC_CQ_MAX + 2)
+
+#define VLAN_ETH_HLEN           18
+
+#define ENICPMD_SETTING(enic, f) ((enic->config.flags & VENETF_##f) ? 1 : 0)
+
+#define ENICPMD_BDF_LENGTH      13   /* 0000:00:00.0'\0' */
+#define PKT_TX_TCP_UDP_CKSUM    0x6000
+#define ENIC_CALC_IP_CKSUM      1
+#define ENIC_CALC_TCP_UDP_CKSUM 2
+#define ENIC_MAX_MTU            9000
+#define PAGE_SIZE               4096
+#define PAGE_ROUND_UP(x) \
+	((((unsigned long)(x)) + PAGE_SIZE-1) & (~(PAGE_SIZE-1)))
+
+#define ENICPMD_VFIO_PATH          "/dev/vfio/vfio"
+/*#define ENIC_DESC_COUNT_MAKE_ODD (x) do{if ((~(x)) & 1) { (x)--; } }while(0)*/
+
+#define PCI_DEVICE_ID_CISCO_VIC_ENET         0x0043  /* ethernet vnic */
+#define PCI_DEVICE_ID_CISCO_VIC_ENET_VF      0x0071  /* enet SRIOV VF */
+
+
+#define ENICPMD_FDIR_MAX           64
+
+struct enic_fdir_node {
+	struct rte_fdir_filter filter;
+	u16 fltr_id;
+	u16 rq_index;
+};
+
+struct enic_fdir {
+	struct rte_eth_fdir stats;
+	struct rte_hash *hash;
+	struct enic_fdir_node *nodes[ENICPMD_FDIR_MAX];
+};
+
+/* Per-instance private data structure */
+struct enic {
+	struct enic *next;
+	struct rte_pci_device *pdev;
+	struct vnic_enet_config config;
+	struct vnic_dev_bar bar0;
+	struct vnic_dev *vdev;
+
+	struct rte_eth_dev *rte_dev;
+	struct enic_fdir fdir;
+	char bdf_name[ENICPMD_BDF_LENGTH];
+	int dev_fd;
+	int iommu_group_fd;
+	int vfio_fd;
+	int iommu_groupid;
+	int eventfd;
+	u_int8_t mac_addr[ETH_ALEN];
+	pthread_t err_intr_thread;
+	int promisc;
+	int allmulti;
+	int ig_vlan_strip_en;
+	int link_status;
+	u8 hw_ip_checksum;
+
+	unsigned int flags;
+	unsigned int priv_flags;
+
+	/* work queue */
+	struct vnic_wq wq[ENIC_WQ_MAX];
+	unsigned int wq_count;
+
+	/* receive queue */
+	struct vnic_rq rq[ENIC_RQ_MAX];
+	unsigned int rq_count;
+
+	/* completion queue */
+	struct vnic_cq cq[ENIC_CQ_MAX];
+	unsigned int cq_count;
+
+	/* interrupt resource */
+	struct vnic_intr intr;
+	unsigned int intr_count;
+};
+
+static inline unsigned int enic_cq_rq(struct enic *enic, unsigned int rq)
+{
+	return rq;
+}
+
+static inline unsigned int enic_cq_wq(struct enic *enic, unsigned int wq)
+{
+	return enic->rq_count + wq;
+}
+
+static inline unsigned int enic_msix_err_intr(struct enic *enic)
+{
+	return 0;
+}
+
+static inline struct enic *pmd_priv(struct rte_eth_dev *eth_dev)
+{
+	return (struct enic *)eth_dev->data->dev_private;
+}
+
+#endif /* _ENIC_H_ */
lib/librte_pmd_enic/src/enic_clsf.c new file +240 -0

240 lines not on this page · raw message

lib/librte_pmd_enic/src/enic_compat.h new file +138 -0

138 lines not on this page · raw message

lib/librte_pmd_enic/src/enic_main.c new file +1325 -0

1,325 lines not on this page · raw message

lib/librte_pmd_enic/src/enic_res.c new file +217 -0

217 lines not on this page · raw message

lib/librte_pmd_enic/src/enic_res.h new file +164 -0

164 lines not on this page · raw message

Signature · 1 line
1.9.1
#30 lore raw

PATCH 6/7 DPDK-ENIC PMD interface

In reply to a message not in the archive
---
 lib/librte_pmd_enic/src/enic_etherdev.c | 616 ++++++++++++++++++++++++++++++++
 1 file changed, 616 insertions(+)
 create mode 100644 lib/librte_pmd_enic/src/enic_etherdev.c
lib/librte_pmd_enic/src/enic_etherdev.c new file +616 -0
new file mode 100644
index 0000000..e9a64f5
@@ -0,0 +1,616 @@
+/*
+ * Copyright 2008-2014 Cisco Systems, Inc.  All rights reserved.
+ * Copyright 2007 Nuova Systems, Inc.  All rights reserved.
+ *
+ * Copyright (c) 2014, Cisco Systems, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+#ident "$Id$"
+
+#include <stdio.h>
+#include <stdint.h>
+
+#include <rte_dev.h>
+#include <rte_pci.h>
+#include <rte_ethdev.h>
+#include <rte_string_fns.h>
+
+#include "vnic_intr.h"
+#include "vnic_cq.h"
+#include "vnic_wq.h"
+#include "vnic_rq.h"
+#include "vnic_enet.h"
+#include "enic.h"
+
+#ifdef RTE_LIBRTE_ENIC_PMD_DEBUG_TRACE
+#define ENICPMD_FUNC_TRACE()            \
+	do {                                 \
+		dev_trace(enic, "Entering %s\n", __func__);   \
+	} while (0)
+#else
+#define ENICPMD_FUNC_TRACE()
+#endif
+
+
+/*
+ * The set of PCI devices this driver supports
+ */
+static struct rte_pci_id pci_id_enic_map[] = {
+#define RTE_PCI_DEV_ID_DECL_ENIC(vend, dev) {RTE_PCI_DEVICE(vend, dev)},
+#ifndef PCI_VENDOR_ID_CISCO
+#define PCI_VENDOR_ID_CISCO	0x1137
+#endif
+#include "rte_pci_dev_ids.h"
+RTE_PCI_DEV_ID_DECL_ENIC(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET)
+RTE_PCI_DEV_ID_DECL_ENIC(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET_VF)
+{.vendor_id = 0, /* Sentinal */},
+};
+
+int enicpmd_fdir_remove_perfect_filter(struct rte_eth_dev *eth_dev,
+		struct rte_fdir_filter *fdir_filter,
+		uint16_t soft_id)
+{
+	struct enic *enic = pmd_priv(eth_dev);
+
+	ENICPMD_FUNC_TRACE();
+	return enic_fdir_del_fltr(enic, fdir_filter);
+}
+
+int enicpmd_fdir_add_perfect_filter(struct rte_eth_dev *eth_dev,
+	struct rte_fdir_filter *fdir_filter, uint16_t soft_id,
+	uint8_t queue, uint8_t drop)
+{
+	struct enic *enic = pmd_priv(eth_dev);
+
+	ENICPMD_FUNC_TRACE();
+	return enic_fdir_add_fltr(enic, fdir_filter, (uint16_t)queue, drop);
+}
+
+void enicpmd_fdir_info_get(struct rte_eth_dev *eth_dev,
+	struct rte_eth_fdir *fdir)
+{
+	struct enic *enic = pmd_priv(eth_dev);
+
+	ENICPMD_FUNC_TRACE();
+	*fdir = enic->fdir.stats;
+}
+
+void enicpmd_dev_tx_queue_release(void *txq)
+{
+	ENICPMD_FUNC_TRACE();
+	enic_free_wq(txq);
+}
+
+static int enicpmd_dev_setup_intr(struct enic *enic)
+{
+	int ret;
+	int index;
+
+	ENICPMD_FUNC_TRACE();
+
+	/* Are we done with the init of all the queues? */
+	for (index = 0; index < enic->cq_count; index++) {
+		if (!enic->cq[index].ctrl)
+			break;
+	}
+
+	if (enic->cq_count != index)
+		return 0;
+
+	ret = enic_alloc_intr_resources(enic);
+	if (ret) {
+		dev_err(enic, "alloc intr failed\n");
+		return ret;
+	}
+	enic_init_vnic_resources(enic);
+
+	ret = enic_setup_finish(enic);
+	if (ret)
+		dev_err(enic, "setup could not be finished\n");
+
+	return ret;
+}
+
+int enicpmd_dev_tx_queue_setup(struct rte_eth_dev *eth_dev,
+	uint16_t queue_idx,
+	uint16_t nb_desc,
+	unsigned int socket_id,
+	const struct rte_eth_txconf *tx_conf)
+{
+	int ret;
+	struct enic *enic = pmd_priv(eth_dev);
+
+	ENICPMD_FUNC_TRACE();
+	eth_dev->data->tx_queues[queue_idx] = (void *)&enic->wq[queue_idx];
+
+	ret = enic_alloc_wq(enic, queue_idx, socket_id, nb_desc);
+	if (ret) {
+		dev_err(enic, "error in allocating wq\n");
+		return ret;
+	}
+
+	return enicpmd_dev_setup_intr(enic);
+}
+
+int enicpmd_dev_tx_queue_start(struct rte_eth_dev *eth_dev, uint16_t queue_idx)
+{
+	struct enic *enic = pmd_priv(eth_dev);
+
+	ENICPMD_FUNC_TRACE();
+
+	enic_start_wq(enic, queue_idx);
+
+	return 0;
+}
+
+int enicpmd_dev_tx_queue_stop(struct rte_eth_dev *eth_dev, uint16_t queue_idx)
+{
+	int ret;
+	struct enic *enic = pmd_priv(eth_dev);
+
+	ENICPMD_FUNC_TRACE();
+
+	ret = enic_stop_wq(enic, queue_idx);
+	if (ret)
+		dev_err(enic, "error in stopping wq %d\n", queue_idx);
+
+	return ret;
+}
+
+int enicpmd_dev_rx_queue_start(struct rte_eth_dev *eth_dev, uint16_t queue_idx)
+{
+	struct enic *enic = pmd_priv(eth_dev);
+
+	ENICPMD_FUNC_TRACE();
+
+	enic_start_rq(enic, queue_idx);
+
+	return 0;
+}
+
+int enicpmd_dev_rx_queue_stop(struct rte_eth_dev *eth_dev, uint16_t queue_idx)
+{
+	int ret;
+	struct enic *enic = pmd_priv(eth_dev);
+
+	ENICPMD_FUNC_TRACE();
+
+	ret = enic_stop_rq(enic, queue_idx);
+	if (ret)
+		dev_err(enic, "error in stopping rq %d\n", queue_idx);
+
+	return ret;
+}
+
+void enicpmd_dev_rx_queue_release(void *rxq)
+{
+	ENICPMD_FUNC_TRACE();
+	enic_free_rq(rxq);
+}
+
+int enicpmd_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,
+	uint16_t queue_idx,
+	uint16_t nb_desc,
+	unsigned int socket_id,
+	const struct rte_eth_rxconf *rx_conf,
+	struct rte_mempool *mp)
+{
+	int ret;
+	struct enic *enic = pmd_priv(eth_dev);
+
+	ENICPMD_FUNC_TRACE();
+	eth_dev->data->rx_queues[queue_idx] = (void *)&enic->rq[queue_idx];
+
+	ret = enic_alloc_rq(enic, queue_idx, socket_id, mp, nb_desc);
+	if (ret) {
+		dev_err(enic, "error in allocating rq\n");
+		return ret;
+	}
+
+	return enicpmd_dev_setup_intr(enic);
+}
+
+static int enicpmd_vlan_filter_set(struct rte_eth_dev *eth_dev,
+	uint16_t vlan_id, int on)
+{
+	struct enic *enic = pmd_priv(eth_dev);
+
+	ENICPMD_FUNC_TRACE();
+	if (on)
+		enic_add_vlan(enic, vlan_id);
+	else
+		enic_del_vlan(enic, vlan_id);
+	return 0;
+}
+
+static void enicpmd_vlan_offload_set(struct rte_eth_dev *eth_dev, int mask)
+{
+	struct enic *enic = pmd_priv(eth_dev);
+
+	ENICPMD_FUNC_TRACE();
+
+	if (mask & ETH_VLAN_STRIP_MASK) {
+		if (eth_dev->data->dev_conf.rxmode.hw_vlan_strip)
+			enic->ig_vlan_strip_en = 1;
+		else
+			enic->ig_vlan_strip_en = 0;
+	}
+	enic_set_rss_nic_cfg(enic);
+
+
+	if (mask & ETH_VLAN_FILTER_MASK) {
+		dev_warning(enic,
+			"Configuration of VLAN filter is not supported\n");
+	}
+
+	if (mask & ETH_VLAN_EXTEND_MASK) {
+		dev_warning(enic,
+			"Configuration of extended VLAN is not supported\n");
+	}
+}
+
+static int enicpmd_dev_configure(struct rte_eth_dev *eth_dev)
+{
+	int ret;
+	struct enic *enic = pmd_priv(eth_dev);
+
+	ENICPMD_FUNC_TRACE();
+	ret = enic_set_vnic_res(enic);
+	if (ret) {
+		dev_err(enic, "Set vNIC resource num  failed, aborting\n");
+		return ret;
+	}
+
+	if (eth_dev->data->dev_conf.rxmode.split_hdr_size &&
+		eth_dev->data->dev_conf.rxmode.header_split) {
+		/* Enable header-data-split */
+		enic_set_hdr_split_size(enic,
+			eth_dev->data->dev_conf.rxmode.split_hdr_size);
+	}
+
+	enic->hw_ip_checksum = eth_dev->data->dev_conf.rxmode.hw_ip_checksum;
+	return 0;
+}
+
+/* Start the device.
+ * It returns 0 on success.
+ */
+static int enicpmd_dev_start(struct rte_eth_dev *eth_dev)
+{
+	struct enic *enic = pmd_priv(eth_dev);
+
+	ENICPMD_FUNC_TRACE();
+	return enic_enable(enic);
+}
+
+/*
+ * Stop device: disable rx and tx functions to allow for reconfiguring.
+ */
+static void enicpmd_dev_stop(struct rte_eth_dev *eth_dev)
+{
+	struct rte_eth_link link;
+	struct enic *enic = pmd_priv(eth_dev);
+
+	ENICPMD_FUNC_TRACE();
+	enic_disable(enic);
+	memset(&link, 0, sizeof(link));
+	rte_atomic64_cmpset((uint64_t *)&eth_dev->data->dev_link,
+		*(uint64_t *)&eth_dev->data->dev_link,
+		*(uint64_t *)&link);
+}
+
+/*
+ * Stop device.
+ */
+static void enicpmd_dev_close(struct rte_eth_dev *eth_dev)
+{
+	struct enic *enic = pmd_priv(eth_dev);
+
+	ENICPMD_FUNC_TRACE();
+	enic_remove(enic);
+}
+
+static int enicpmd_dev_link_update(struct rte_eth_dev *eth_dev,
+	int wait_to_complete)
+{
+	struct enic *enic = pmd_priv(eth_dev);
+	int ret;
+	int link_status = 0;
+
+	ENICPMD_FUNC_TRACE();
+	link_status = enic_get_link_status(enic);
+	ret = (link_status == enic->link_status);
+	enic->link_status = link_status;
+	eth_dev->data->dev_link.link_status = link_status;
+	eth_dev->data->dev_link.link_duplex = ETH_LINK_FULL_DUPLEX;
+	eth_dev->data->dev_link.link_speed = vnic_dev_port_speed(enic->vdev);
+	return ret;
+}
+
+static void enicpmd_dev_stats_get(struct rte_eth_dev *eth_dev,
+	struct rte_eth_stats *stats)
+{
+	struct enic *enic = pmd_priv(eth_dev);
+
+	ENICPMD_FUNC_TRACE();
+	enic_dev_stats_get(enic, stats);
+}
+
+static void enicpmd_dev_stats_reset(struct rte_eth_dev *eth_dev)
+{
+	struct enic *enic = pmd_priv(eth_dev);
+
+	ENICPMD_FUNC_TRACE();
+	enic_dev_stats_clear(enic);
+}
+
+static void enicpmd_dev_info_get(struct rte_eth_dev *eth_dev,
+	struct rte_eth_dev_info *device_info)
+{
+	struct enic *enic = pmd_priv(eth_dev);
+
+	ENICPMD_FUNC_TRACE();
+	device_info->max_rx_queues = enic->rq_count;
+	device_info->max_tx_queues = enic->wq_count;
+	device_info->min_rx_bufsize = ENIC_MIN_MTU;
+	device_info->max_rx_pktlen = enic->config.mtu;
+	device_info->max_mac_addrs = 1;
+	device_info->rx_offload_capa =
+		DEV_RX_OFFLOAD_VLAN_STRIP |
+		DEV_RX_OFFLOAD_IPV4_CKSUM |
+		DEV_RX_OFFLOAD_UDP_CKSUM  |
+		DEV_RX_OFFLOAD_TCP_CKSUM;
+	device_info->tx_offload_capa =
+		DEV_TX_OFFLOAD_VLAN_INSERT |
+		DEV_TX_OFFLOAD_IPV4_CKSUM  |
+		DEV_TX_OFFLOAD_UDP_CKSUM   |
+		DEV_TX_OFFLOAD_TCP_CKSUM;
+}
+
+static void enicpmd_dev_promiscuous_enable(struct rte_eth_dev *eth_dev)
+{
+	struct enic *enic = pmd_priv(eth_dev);
+
+	ENICPMD_FUNC_TRACE();
+	enic->promisc = 1;
+	enic_add_packet_filter(enic);
+}
+
+static void enicpmd_dev_promiscuous_disable(struct rte_eth_dev *eth_dev)
+{
+	struct enic *enic = pmd_priv(eth_dev);
+
+	ENICPMD_FUNC_TRACE();
+	enic->promisc = 0;
+	enic_add_packet_filter(enic);
+}
+
+static void enicpmd_dev_allmulticast_enable(struct rte_eth_dev *eth_dev)
+{
+	struct enic *enic = pmd_priv(eth_dev);
+
+	ENICPMD_FUNC_TRACE();
+	enic->allmulti = 1;
+	enic_add_packet_filter(enic);
+}
+
+static void enicpmd_dev_allmulticast_disable(struct rte_eth_dev *eth_dev)
+{
+	struct enic *enic = pmd_priv(eth_dev);
+
+	ENICPMD_FUNC_TRACE();
+	enic->allmulti = 0;
+	enic_add_packet_filter(enic);
+}
+
+static void enicpmd_add_mac_addr(struct rte_eth_dev *eth_dev,
+	struct ether_addr *mac_addr,
+	uint32_t index, uint32_t pool)
+{
+	struct enic *enic = pmd_priv(eth_dev);
+
+	ENICPMD_FUNC_TRACE();
+	enic_set_mac_address(enic, mac_addr->addr_bytes);
+}
+
+static void enicpmd_remove_mac_addr(struct rte_eth_dev *eth_dev, uint32_t index)
+{
+	struct enic *enic = pmd_priv(eth_dev);
+
+	ENICPMD_FUNC_TRACE();
+	enic_del_mac_address(enic);
+}
+
+
+uint16_t enicpmd_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+	uint16_t nb_pkts)
+{
+	unsigned int index;
+	unsigned int frags;
+	unsigned int pkt_len;
+	unsigned int seg_len;
+	unsigned int inc_len;
+	unsigned int nb_segs;
+	struct rte_mbuf *tx_pkt;
+	struct vnic_wq *wq = (struct vnic_wq *)tx_queue;
+	struct enic *enic = vnic_dev_priv(wq->vdev);
+	unsigned char *buf;
+	unsigned short vlan_id;
+	unsigned short ol_flags;
+
+	ENICPMD_FUNC_TRACE();
+
+	for (index = 0; index < nb_pkts; index++) {
+		tx_pkt = *tx_pkts++;
+		inc_len = 0;
+		nb_segs = tx_pkt->pkt.nb_segs;
+		if (nb_segs > vnic_wq_desc_avail(wq)) {
+			/* wq cleanup and try again */
+			if (!enic_cleanup_wq(enic, wq) ||
+				(nb_segs > vnic_wq_desc_avail(wq)))
+				return index;
+		}
+		pkt_len = tx_pkt->pkt.pkt_len;
+		vlan_id = tx_pkt->pkt.vlan_macip.f.vlan_tci;
+		ol_flags = tx_pkt->ol_flags;
+		for (frags = 0; inc_len < pkt_len; frags++) {
+			if (!tx_pkt)
+				break;
+			seg_len = tx_pkt->pkt.data_len;
+			inc_len += seg_len;
+			if (enic_send_pkt(enic, wq, tx_pkt,
+				    (unsigned short)seg_len, !frags,
+				    (pkt_len == inc_len), ol_flags, vlan_id)) {
+				break;
+			}
+			tx_pkt = tx_pkt->pkt.next;
+		}
+	}
+
+	enic_cleanup_wq(enic, wq);
+	return index;
+}
+
+uint16_t enicpmd_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
+	uint16_t nb_pkts)
+{
+	struct vnic_rq *rq = (struct vnic_rq *)rx_queue;
+	unsigned int work_done;
+
+	ENICPMD_FUNC_TRACE();
+
+	if (enic_poll(rq, rx_pkts, (unsigned int)nb_pkts, &work_done))
+		dev_err(enic, "error in enicpmd poll\n");
+
+	return work_done;
+}
+
+static struct eth_dev_ops enicpmd_eth_dev_ops = {
+	.dev_configure        = enicpmd_dev_configure,
+	.dev_start            = enicpmd_dev_start,
+	.dev_stop             = enicpmd_dev_stop,
+	.dev_set_link_up      = NULL,
+	.dev_set_link_down    = NULL,
+	.dev_close            = enicpmd_dev_close,
+	.promiscuous_enable   = enicpmd_dev_promiscuous_enable,
+	.promiscuous_disable  = enicpmd_dev_promiscuous_disable,
+	.allmulticast_enable  = enicpmd_dev_allmulticast_enable,
+	.allmulticast_disable = enicpmd_dev_allmulticast_disable,
+	.link_update          = enicpmd_dev_link_update,
+	.stats_get            = enicpmd_dev_stats_get,
+	.stats_reset          = enicpmd_dev_stats_reset,
+	.queue_stats_mapping_set = NULL,
+	.dev_infos_get        = enicpmd_dev_info_get,
+	.mtu_set              = NULL,
+	.vlan_filter_set      = enicpmd_vlan_filter_set,
+	.vlan_tpid_set        = NULL,
+	.vlan_offload_set     = enicpmd_vlan_offload_set,
+	.vlan_strip_queue_set = NULL,
+	.rx_queue_start       = enicpmd_dev_rx_queue_start,
+	.rx_queue_stop        = enicpmd_dev_rx_queue_stop,
+	.tx_queue_start       = enicpmd_dev_tx_queue_start,
+	.tx_queue_stop        = enicpmd_dev_tx_queue_stop,
+	.rx_queue_setup       = enicpmd_dev_rx_queue_setup,
+	.rx_queue_release     = enicpmd_dev_rx_queue_release,
+	.rx_queue_count       = NULL,
+	.rx_descriptor_done   = NULL,
+	.tx_queue_setup       = enicpmd_dev_tx_queue_setup,
+	.tx_queue_release     = enicpmd_dev_tx_queue_release,
+	.dev_led_on           = NULL,
+	.dev_led_off          = NULL,
+	.flow_ctrl_get        = NULL,
+	.flow_ctrl_set        = NULL,
+	.priority_flow_ctrl_set = NULL,
+	.mac_addr_add         = enicpmd_add_mac_addr,
+	.mac_addr_remove      = enicpmd_remove_mac_addr,
+	.fdir_add_signature_filter    = NULL,
+	.fdir_update_signature_filter = NULL,
+	.fdir_remove_signature_filter = NULL,
+	.fdir_infos_get               = enicpmd_fdir_info_get,
+	.fdir_add_perfect_filter      = enicpmd_fdir_add_perfect_filter,
+	.fdir_update_perfect_filter   = enicpmd_fdir_add_perfect_filter,
+	.fdir_remove_perfect_filter   = enicpmd_fdir_remove_perfect_filter,
+	.fdir_set_masks               = NULL,
+};
+
+struct enic *enicpmd_list_head = NULL;
+/* Initialize the driver
+ * It returns 0 on success.
+ */
+static int eth_enicpmd_dev_init(
+	__attribute__((unused))struct eth_driver *eth_drv,
+	struct rte_eth_dev *eth_dev)
+{
+	struct rte_pci_device *pdev;
+	struct rte_pci_addr *addr;
+	struct enic *enic = pmd_priv(eth_dev);
+
+	ENICPMD_FUNC_TRACE();
+
+	enic->rte_dev = eth_dev;
+	eth_dev->dev_ops = &enicpmd_eth_dev_ops;
+	eth_dev->rx_pkt_burst = &enicpmd_recv_pkts;
+	eth_dev->tx_pkt_burst = &enicpmd_xmit_pkts;
+
+	pdev = eth_dev->pci_dev;
+	enic->pdev = pdev;
+	addr = &pdev->addr;
+
+	snprintf(enic->bdf_name, ENICPMD_BDF_LENGTH, "%04x:%02x:%02x.%x",
+		addr->domain, addr->bus, addr->devid, addr->function);
+
+	return enic_probe(enic);
+}
+
+static struct eth_driver rte_enic_pmd = {
+	{
+		.name = "rte_enic_pmd",
+		.id_table = pci_id_enic_map,
+		.drv_flags = RTE_PCI_DRV_NEED_MAPPING,
+	},
+	.eth_dev_init = eth_enicpmd_dev_init,
+	.dev_private_size = sizeof(struct enic),
+};
+
+/* Driver initialization routine.
+ * Invoked once at EAL init time.
+ * Register as the [Poll Mode] Driver of Cisco ENIC device.
+ */
+int rte_enic_pmd_init(const char *name __rte_unused,
+	const char *params __rte_unused)
+{
+	ENICPMD_FUNC_TRACE();
+
+	rte_eth_driver_register(&rte_enic_pmd);
+	return 0;
+}
+
+static struct rte_driver rte_enic_driver = {
+	.type = PMD_PDEV,
+	.init = rte_enic_pmd_init,
+};
+
+PMD_REGISTER_DRIVER(rte_enic_driver);
+
Signature · 1 line
1.9.1
#31 lore raw

PATCH 7/7 Release notes for ENIC PMD 1.0.0.3

In reply to a message not in the archive
---
 lib/librte_pmd_enic/ReleaseNotes.txt | 196 +++++++++++++++++++++++++++++++++++
 1 file changed, 196 insertions(+)
 create mode 100644 lib/librte_pmd_enic/ReleaseNotes.txt
lib/librte_pmd_enic/ReleaseNotes.txt new file +196 -0
new file mode 100644
index 0000000..9d9ef3b
@@ -0,0 +1,196 @@
+================================================================================
+         DPDK Poll-mode Driver for Cisco Systems Inc. VIC Ethernet NIC
+                                 Release Notes
+                                Version 1.0.0.3
+================================================================================
+  ENIC PMD is the poll-mode driver for the Cisco System Inc. VIC Ethernet NIC
+  to be used with DPDK suite.
+
+  If you are running/would like to run your applications on Intel DPDK software 
+  suite on Cisco UCS servers that use Cisco VIC adapters, please read the 
+  information provided in this document.
+
+How to obtain ENIC PMD integrated DPDK?
+---------------------------------------
+  The source tarball of the whole DPDK suite, dpdk-<version>.tar.gz could be 
+  downloaded from www.dpdk.org
+
+  Alternatively, the same could be downloaded from www.cisco.com.  
+
+
+Software License
+----------------
+  Please read the file LICENSE in lib/librte_pmd_enic/ directory in DPDK 
+  source tree.
+
+  The License terms are also present at the top of the source files.
+
+
+Configuration information
+-------------------------
+  In order to ensure that ENIC PMD will also be built by DPDK build scripts, 
+  ensure that CONFIG_RTE_LIBRTE_ENIC_PMD=y is there in the following file in 
+  DPDK suite.
+
+  - config/common_linuxapp
+
+  If CONFIG_RTE_EAL_VFIO is y in config/common/linuxapp in the DPDK source
+  tree, ENIC PMD will try to get initialized using VFIO.  If
+  CONFIG_RTE_EAL_VFIO is n, it will try to use UIO framework.
+
+  No matter how many receive/transmit queues are configured in the service
+  profile, only one interrupt per vNIC interface needs to be configured.
+  ENIC PMD uses this interrupt to get information about errors in the fast path.
+
+
+How to build the suite?
+-----------------------
+  The build instruction of DPDK suite should be followed and that would build
+  ENIC PMD library as well.
+
+  Typically, a user would execute the following commands to build the suite
+   - tar -xzf dpdk-<version>.tar.gz
+   - cd dpdk-<version>
+   - make install T=x86_64-native-linuxapp-gcc
+
+
+Version Information
+-------------------
+  The version of ENIC driver will be printed by ENIC PMD during the 
+  intialization.
+
+  This release notes is a part of version number 1.0.0.3
+
+Directory Structure
+-------------------
+librte_pmd_enic
+|-- LICENSE
+|      License terms
+|
+|-- Makefile
+|      Makefile to build ENIC PMD as a part of building DPDK
+|
+|-- scripts
+|   |-- bind_to_vfio
+|   |       Script which binds a vNIC to VFIO
+|   |
+|   `-- unbind_from_vfio
+|           Script which unbinds a vNIC from VFIO
+|
+`-- src
+       Source code of ENIC PMD
+
+
+Dependencies
+------------
+ - If the user wants to use DPDK with VFIO, the Linux kernel used 
+   should have support for Linux VFIO.  Linux kernels post 3.6.0 supports VFIO
+
+   The header file vfio.h should be present in /usr/include/linux/
+
+   For kernels post 3.6.0, this file should be present in 
+   <kernel_src_dir>/usr/include/linux/
+
+   In the case of Ubuntu, if the file is not present, install the 
+   package linux_libc_dev
+
+ - This version of ENIC PMD has been tested with DPDK suite version 1.7.1
+
+ - For using UIO framework, please refer the documentation that comes with
+   DPDK suite
+
+
+Supported Cisco VIC adapters 
+----------------------------
+ - ENIC PMD could be used with all the generations of Cisco VIC adapters.
+ - Flow director feature is not supported on generation 1 Cisco VIC adapters
+   (M81KR and P81E)
+
+
+Supported Operating Systems
+---------------------------
+Any Linux distribution fulfilling the conditions described in Dependencies 
+section of this document.
+
+Supported features in this release
+------------------------------------
+ - Unicast, multicast and broadcast transmission and reception
+ - Receive queue polling
+ - Statistics
+ - Hardware VLAN acceleration
+ - IP checksum offload
+ - Receive side header-split
+ - Receive side VLAN stripping
+ - Multiple receive and transmit queues
+ - Perfect filters for flow direction (supported on all adapters except M81KR
+   and P81E)
+ - Promiscuous mode
+ - Setting RX VLAN (supported via UCSM/CIMC only)
+ - VLAN filtering (supported via UCSM/CIMC only)
+ - Execution of application by unprivileged system users
+ 
+
+Known bugs and Unsupported features in this release
+---------------------------------------------------
+ - Signature filters
+ - Drop feature of perfect filters
+ - VLAN based flow direction
+ - Flexbytes based flow direction
+ - Setting of extended VLAN
+
+
+Prerequisites
+-------------
+ - Prepare the system as recommended by DPDK suite.  This includes environment
+   variables, hugepages configuration, tool-chains and configuration
+ - Insert vfio-pci kernel module using the command 'modprobe vfio-pci' if the
+   user wants to use VFIO framework
+ - Insert uio kernel module using the command 'modprobe uio' if the user wants
+   to use UIO framework
+ - DPDK suite should be configured based on the user's decision to use VFIO or
+   UIO framework
+ - Bind the intended vNIC to vfio-pci using librte_pmd_enic/scripts/bind_to_vfio
+   in case the user wants ENIC PMD to use VFIO framework
+ - Bind the intended vNIC to igb_uio in case the user wants ENIC PMD to use
+   UIO framework
+
+ Now, the system is ready to run the application.  Once the application runs to 
+ completion, if it is required, the vNIC could be detached from vfio-pci or igb_uio.
+ vNICs could be detached from vfio-pci using the script
+ librte_pmd_enic/scripts/unbind_from_vfio
+
+ Root privilege is required to bind and unbind vNICs to/from VFIO/UIO.
+
+ VFIO framework helps an unprivileged user to run the applications.
+
+ For an unprivileged user to run the applications on DPDK and ENIC PMD,
+ it might be required to increase the maximum locked memory of the user.
+ The following command could be used to do this.
+
+ sudo sh -c "ulimit -l <value in Kilo Bytes>"
+
+ The value depends on the memory configuration of the application, DPDK and
+ PMD.  Typically, the limit has to be raised to higher than 2GB. 
+ e.g., 2621440
+
+ The compilation of any unused drivers could be turned off using the
+ configuration file in config/ directory (e.g., config/common_linuxapp).  
+ This would help in bringing down the time taken for building the 
+ libraries and the initialization time of the application.  
+
+Additional Reference
+--------------------
+ - www.dpdk.org
+ - Intel® Data Plane Development Kit: Release Notes
+ - Intel® Data Plane Development Kit: Programmer's Guide
+ - Intel® Data Plane Development Kit Testpmd Application: Guide
+
+
+Contact Information
+-------------------
+  Any questions or bugs should be reported to DPDK community or to the following
+  email addresses.
+
+  Sujith Sankar <[email protected]>
+  Prasad Rao <[email protected]>
+
Signature · 1 line
1.9.1

A message that is not in the archive (sent off-list or not yet received): 1415390747-9532-8-git-send-email-ssujith-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org

#33 lore raw

Re: [PATCH 7/7] Release notes for ENIC PMD 1.0.0.3

Many informations in the release notes are not well adapted to an integration. Please could you rework it?
I'd like to create a doc directory for drivers (doc/drivers) as doc/guides. So this doc should be in rst format in order to be processed by sphinx and published on the web site (like guides).
Could you also include a performance test report based on testpmd?

Thanks a lot

Signature · 1 line
Thomas
#34 lore raw

Re: [PATCH 7/7] Release notes for ENIC PMD 1.0.0.3

Hi Thomas,

Thank you for the comments.
I¹ll work on moving the release notes to rst and add performance numbers with testpmd. Once I fix these and Neil¹s comments, I shall get back with version 2.

Thanks,
-Sujith

Quoted 12 lines · Thomas Monjalon

Many informations in the release notes are not well adapted to an integration.
Please could you rework it?
I'd like to create a doc directory for drivers (doc/drivers) as doc/guides.
So this doc should be in rst format in order to be processed by sphinx and published on the web site (like guides).
Could you also include a performance test report based on testpmd?

Thanks a lot

Signature · 1 line
Thomas