Skip to contentSkip to conversation

enicpmd: Cisco Systems Inc. VIC Ethernet PMD

PATCH In review Sujith Sankar 12 participants 36 messages Nov 25, 2014 – Jul 31, 2015 12 messages not in the archive Library code

lore
Share & tools
lore
#0 lore raw

v6 cover enicpmd: Cisco Systems Inc. VIC Ethernet PMD

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

Sujith Sankar (6):
enicpmd: License text
enicpmd: Makefile
enicpmd: VNIC common code partially shared with ENIC kernel mode
driver
enicpmd: pmd specific code
enicpmd: DPDK-ENIC PMD interface
enicpmd: DPDK changes for accommodating ENIC PMD

 config/common_linuxapp                   |    5 +
 lib/Makefile                             |    1 +
 lib/librte_pmd_enic/LICENSE              |   27 +
 lib/librte_pmd_enic/Makefile             |   67 ++
 lib/librte_pmd_enic/enic.h               |  157 ++++
 lib/librte_pmd_enic/enic_clsf.c          |  244 ++++++
 lib/librte_pmd_enic/enic_compat.h        |  142 ++++
 lib/librte_pmd_enic/enic_etherdev.c      |  613 +++++++++++++++
 lib/librte_pmd_enic/enic_main.c          | 1266 ++++++++++++++++++++++++++++++
 lib/librte_pmd_enic/enic_res.c           |  221 ++++++
 lib/librte_pmd_enic/enic_res.h           |  168 ++++
 lib/librte_pmd_enic/vnic/cq_desc.h       |  126 +++
 lib/librte_pmd_enic/vnic/cq_enet_desc.h  |  261 ++++++
 lib/librte_pmd_enic/vnic/rq_enet_desc.h  |   76 ++
 lib/librte_pmd_enic/vnic/vnic_cq.c       |  117 +++
 lib/librte_pmd_enic/vnic/vnic_cq.h       |  152 ++++
 lib/librte_pmd_enic/vnic/vnic_dev.c      | 1063 +++++++++++++++++++++++++
 lib/librte_pmd_enic/vnic/vnic_dev.h      |  203 +++++
 lib/librte_pmd_enic/vnic/vnic_devcmd.h   |  774 ++++++++++++++++++
 lib/librte_pmd_enic/vnic/vnic_enet.h     |   78 ++
 lib/librte_pmd_enic/vnic/vnic_intr.c     |   83 ++
 lib/librte_pmd_enic/vnic/vnic_intr.h     |  126 +++
 lib/librte_pmd_enic/vnic/vnic_nic.h      |   88 +++
 lib/librte_pmd_enic/vnic/vnic_resource.h |   97 +++
 lib/librte_pmd_enic/vnic/vnic_rq.c       |  246 ++++++
 lib/librte_pmd_enic/vnic/vnic_rq.h       |  282 +++++++
 lib/librte_pmd_enic/vnic/vnic_rss.c      |   85 ++
 lib/librte_pmd_enic/vnic/vnic_rss.h      |   61 ++
 lib/librte_pmd_enic/vnic/vnic_stats.h    |   86 ++
 lib/librte_pmd_enic/vnic/vnic_wq.c       |  245 ++++++
 lib/librte_pmd_enic/vnic/vnic_wq.h       |  283 +++++++
 lib/librte_pmd_enic/vnic/wq_enet_desc.h  |  114 +++
 mk/rte.app.mk                            |    4 +
 33 files changed, 7561 insertions(+)
 create mode 100644 lib/librte_pmd_enic/LICENSE
 create mode 100644 lib/librte_pmd_enic/Makefile
 create mode 100644 lib/librte_pmd_enic/enic.h
 create mode 100644 lib/librte_pmd_enic/enic_clsf.c
 create mode 100644 lib/librte_pmd_enic/enic_compat.h
 create mode 100644 lib/librte_pmd_enic/enic_etherdev.c
 create mode 100644 lib/librte_pmd_enic/enic_main.c
 create mode 100644 lib/librte_pmd_enic/enic_res.c
 create mode 100644 lib/librte_pmd_enic/enic_res.h
 create mode 100644 lib/librte_pmd_enic/vnic/cq_desc.h
 create mode 100644 lib/librte_pmd_enic/vnic/cq_enet_desc.h
 create mode 100644 lib/librte_pmd_enic/vnic/rq_enet_desc.h
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_cq.c
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_cq.h
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_dev.c
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_dev.h
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_devcmd.h
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_enet.h
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_intr.c
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_intr.h
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_nic.h
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_resource.h
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_rq.c
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_rq.h
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_rss.c
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_rss.h
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_stats.h
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_wq.c
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_wq.h
 create mode 100644 lib/librte_pmd_enic/vnic/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): 1416936405-25333-1-git-send-email-ssujith-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org

#2 lore raw

PATCH v6 1/6 enicpmd: License text

---
 lib/librte_pmd_enic/LICENSE | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 lib/librte_pmd_enic/LICENSE
lib/librte_pmd_enic/LICENSE new file +27 -0
new file mode 100644
index 0000000..46a27a4
@@ -0,0 +1,27 @@
+ * 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:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. 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
#3 lore raw

PATCH v6 2/6 enicpmd: Makefile

In reply to a message not in the archive
---
 lib/librte_pmd_enic/Makefile | 67 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 67 insertions(+)
 create mode 100644 lib/librte_pmd_enic/Makefile
lib/librte_pmd_enic/Makefile new file +67 -0
new file mode 100644
index 0000000..e7bb11b
@@ -0,0 +1,67 @@
+#
+# 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:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# 2. 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.
+
+include $(RTE_SDK)/mk/rte.vars.mk
+
+#
+# library name
+#
+LIB = librte_pmd_enic.a
+
+CFLAGS += -I$(RTE_SDK)/lib/librte_hash/ -I$(RTE_SDK)/lib/librte_pmd_enic/vnic/
+CFLAGS += -I$(RTE_SDK)/lib/librte_pmd_enic/
+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/vnic_cq.c
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += vnic/vnic_wq.c
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += vnic/vnic_dev.c
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += vnic/vnic_intr.c
+SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += vnic/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/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
#4 lore raw

PATCH v6 3/6 enicpmd: VNIC common code partially shared with ENIC kernel mode driver

In reply to a message not in the archive
---
 lib/librte_pmd_enic/vnic/cq_desc.h       |  126 ++++
 lib/librte_pmd_enic/vnic/cq_enet_desc.h  |  261 ++++++++
 lib/librte_pmd_enic/vnic/rq_enet_desc.h  |   76 +++
 lib/librte_pmd_enic/vnic/vnic_cq.c       |  117 ++++
 lib/librte_pmd_enic/vnic/vnic_cq.h       |  152 +++++
 lib/librte_pmd_enic/vnic/vnic_dev.c      | 1063 ++++++++++++++++++++++++++++++
 lib/librte_pmd_enic/vnic/vnic_dev.h      |  203 ++++++
 lib/librte_pmd_enic/vnic/vnic_devcmd.h   |  774 ++++++++++++++++++++++
 lib/librte_pmd_enic/vnic/vnic_enet.h     |   78 +++
 lib/librte_pmd_enic/vnic/vnic_intr.c     |   83 +++
 lib/librte_pmd_enic/vnic/vnic_intr.h     |  126 ++++
 lib/librte_pmd_enic/vnic/vnic_nic.h      |   88 +++
 lib/librte_pmd_enic/vnic/vnic_resource.h |   97 +++
 lib/librte_pmd_enic/vnic/vnic_rq.c       |  246 +++++++
 lib/librte_pmd_enic/vnic/vnic_rq.h       |  282 ++++++++
 lib/librte_pmd_enic/vnic/vnic_rss.c      |   85 +++
 lib/librte_pmd_enic/vnic/vnic_rss.h      |   61 ++
 lib/librte_pmd_enic/vnic/vnic_stats.h    |   86 +++
 lib/librte_pmd_enic/vnic/vnic_wq.c       |  245 +++++++
 lib/librte_pmd_enic/vnic/vnic_wq.h       |  283 ++++++++
 lib/librte_pmd_enic/vnic/wq_enet_desc.h  |  114 ++++
 21 files changed, 4646 insertions(+)
 create mode 100644 lib/librte_pmd_enic/vnic/cq_desc.h
 create mode 100644 lib/librte_pmd_enic/vnic/cq_enet_desc.h
 create mode 100644 lib/librte_pmd_enic/vnic/rq_enet_desc.h
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_cq.c
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_cq.h
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_dev.c
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_dev.h
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_devcmd.h
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_enet.h
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_intr.c
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_intr.h
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_nic.h
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_resource.h
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_rq.c
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_rq.h
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_rss.c
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_rss.h
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_stats.h
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_wq.c
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_wq.h
 create mode 100644 lib/librte_pmd_enic/vnic/wq_enet_desc.h
lib/librte_pmd_enic/vnic/cq_desc.h new file +126 -0
new file mode 100644
index 0000000..c418967
@@ -0,0 +1,126 @@
+/*
+ * 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:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. 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/vnic/cq_enet_desc.h new file +261 -0

261 lines not on this page · raw message

lib/librte_pmd_enic/vnic/rq_enet_desc.h new file +76 -0

76 lines not on this page · raw message

lib/librte_pmd_enic/vnic/vnic_cq.c new file +117 -0

117 lines not on this page · raw message

lib/librte_pmd_enic/vnic/vnic_cq.h new file +152 -0

152 lines not on this page · raw message

lib/librte_pmd_enic/vnic/vnic_dev.c new file +1063 -0

1,063 lines not on this page · raw message

lib/librte_pmd_enic/vnic/vnic_dev.h new file +203 -0

203 lines not on this page · raw message

lib/librte_pmd_enic/vnic/vnic_devcmd.h new file +774 -0

774 lines not on this page · raw message

lib/librte_pmd_enic/vnic/vnic_enet.h new file +78 -0

78 lines not on this page · raw message

lib/librte_pmd_enic/vnic/vnic_intr.c new file +83 -0

83 lines not on this page · raw message

lib/librte_pmd_enic/vnic/vnic_intr.h new file +126 -0

67 lines not on this page · raw message

lib/librte_pmd_enic/vnic/vnic_nic.h new file +88 -0

88 lines not on this page · raw message

lib/librte_pmd_enic/vnic/vnic_resource.h new file +97 -0

97 lines not on this page · raw message

lib/librte_pmd_enic/vnic/vnic_rq.c new file +246 -0

246 lines not on this page · raw message

lib/librte_pmd_enic/vnic/vnic_rq.h new file +282 -0

282 lines not on this page · raw message

lib/librte_pmd_enic/vnic/vnic_rss.c new file +85 -0

85 lines not on this page · raw message

lib/librte_pmd_enic/vnic/vnic_rss.h new file +61 -0

61 lines not on this page · raw message

lib/librte_pmd_enic/vnic/vnic_stats.h new file +86 -0

86 lines not on this page · raw message

lib/librte_pmd_enic/vnic/vnic_wq.c new file +245 -0

245 lines not on this page · raw message

lib/librte_pmd_enic/vnic/vnic_wq.h new file +283 -0

283 lines not on this page · raw message

lib/librte_pmd_enic/vnic/wq_enet_desc.h new file +114 -0

114 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.

#5 lore raw

PATCH v6 4/6 enicpmd: pmd specific code

In reply to a message not in the archive
---
 lib/librte_pmd_enic/enic.h        |  157 +++++
 lib/librte_pmd_enic/enic_clsf.c   |  244 +++++++
 lib/librte_pmd_enic/enic_compat.h |  142 +++++
 lib/librte_pmd_enic/enic_main.c   | 1266 +++++++++++++++++++++++++++++++++++++
 lib/librte_pmd_enic/enic_res.c    |  221 +++++++
 lib/librte_pmd_enic/enic_res.h    |  168 +++++
 6 files changed, 2198 insertions(+)
 create mode 100644 lib/librte_pmd_enic/enic.h
 create mode 100644 lib/librte_pmd_enic/enic_clsf.c
 create mode 100644 lib/librte_pmd_enic/enic_compat.h
 create mode 100644 lib/librte_pmd_enic/enic_main.c
 create mode 100644 lib/librte_pmd_enic/enic_res.c
 create mode 100644 lib/librte_pmd_enic/enic_res.h
lib/librte_pmd_enic/enic.h new file +157 -0
new file mode 100644
index 0000000..9f80fc0
@@ -0,0 +1,157 @@
+/*
+ * 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:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. 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.4"
+#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 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/enic_clsf.c new file +244 -0

244 lines not on this page · raw message

lib/librte_pmd_enic/enic_compat.h new file +142 -0

142 lines not on this page · raw message

lib/librte_pmd_enic/enic_main.c new file +1266 -0

1,266 lines not on this page · raw message

lib/librte_pmd_enic/enic_res.c new file +221 -0

221 lines not on this page · raw message

lib/librte_pmd_enic/enic_res.h new file +168 -0

168 lines not on this page · raw message

Signature · 1 line
1.9.1

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

#7 lore raw

Re: [PATCH v6 4/6] enicpmd: pmd specific code

Quoted 12 lines
lib/librte_pmd_enic/enic_main.c new file +4 -0
new file mode 100644
index 0000000..c047cc8
@@ -0,0 +1,1266 @@
+/*
+ * Copyright 2008-2014 Cisco Systems, Inc.  All rights reserved.
 
 
+#ident "$Id$"
+

lib/librte_pmd_enic/enic_main.c line 45

Quoted 10 lines
lib/librte_pmd_enic/enic_main.c new file +10 -0
+#include <stdio.h>
+
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <fcntl.h>
+#include <libgen.h>
+#ifdef RTE_EAL_VFIO
+#include <linux/vfio.h>
+#endif
+

This gives compilation error: lib/librte_pmd_enic/enic_main.c:43:24: fatal error: linux/vfio.h: No such file or directory

Ubuntu 12.04
Linux grizzly 3.11.0-26-generic #45~precise1-Ubuntu SMP Tue Jul 15 04:02:35 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

lib/librte_eal/linuxapp/eal/eal_vfio.h gives some tips how vfio might be included.

Pawel

#8 lore raw

PATCH v6 5/6 enicpmd: DPDK-ENIC PMD interface

In reply to a message not in the archive
---
 lib/librte_pmd_enic/enic_etherdev.c | 613 ++++++++++++++++++++++++++++++++++++
 1 file changed, 613 insertions(+)
 create mode 100644 lib/librte_pmd_enic/enic_etherdev.c
lib/librte_pmd_enic/enic_etherdev.c new file +613 -0
new file mode 100644
index 0000000..d0577aa
@@ -0,0 +1,613 @@
+/*
+ * 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:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. 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"
+
+#define ENICPMD_FUNC_TRACE() \
+	RTE_LOG(DEBUG, PMD, "ENICPMD trace: %s\n", __func__)
+
+/*
+ * 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 */},
+};
+
+static 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);
+}
+
+static 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);
+}
+
+static 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;
+}
+
+static 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;
+}
+
+static 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);
+}
+
+static 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;
+}
+
+static 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;
+}
+
+static 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;
+}
+
+static 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;
+}
+
+static void enicpmd_dev_rx_queue_release(void *rxq)
+{
+	ENICPMD_FUNC_TRACE();
+	enic_free_rq(rxq);
+}
+
+static 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);
+}
+
+
+static 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;
+
+	for (index = 0; index < nb_pkts; index++) {
+		tx_pkt = *tx_pkts++;
+		inc_len = 0;
+		nb_segs = tx_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_len;
+		vlan_id = tx_pkt->vlan_tci;
+		ol_flags = tx_pkt->ol_flags;
+		for (frags = 0; inc_len < pkt_len; frags++) {
+			if (!tx_pkt)
+				break;
+			seg_len = tx_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->next;
+		}
+	}
+
+	enic_cleanup_wq(enic, wq);
+	return index;
+}
+
+static 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;
+
+	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

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

#10 lore raw

Re: [PATCH v6 5/6] enicpmd: DPDK-ENIC PMD interface

Hi, ssujith

Quoted 8 lines
lib/librte_pmd_enic/enic_etherdev.c new file +8 -0
+	.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,

lib/librte_pmd_enic/enic_etherdev.c line 554

Quoted 10 lines
lib/librte_pmd_enic/enic_etherdev.c new file +10 -0
+	.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,
+};
+

I found that in perfect fdir is also supported in enic driver.

During the R1.8 development, we defined a new dev_ops call filter_ctrl, which can be used to control kinds of filters, flow director is included too. Which is mentioned in http://www.dpdk.org/ml/archives/dev/2014-September/005179.html . In R1.8, filter_ctrl is only used by i40e driver. And we also planned use it in the existing ixgbe/e1000 driver in the next days. The old APIs such as fdir_add_perfect_filter, fdir_remove_perfect_filter can be replaced then.

So, do you have any plan to migrate the fdir in enic to the filter_ctrl API?

Jingjing

Thanks!

Quoted 61 lines
lib/librte_pmd_enic/enic_etherdev.c new file +24 -0
+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",

lib/librte_pmd_enic/enic_etherdev.c new file +34 -1
+		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);
+
--

1.9.1

A message that is not in the archive (sent off-list or not yet received): 9BB6961774997848B5B42BEC655768F8B6647D-0J0gbvR4kTg/[email protected]

#12 lore raw

Re: [PATCH v6 5/6] enicpmd: DPDK-ENIC PMD interface

Quoted 23 lines · Jingjing

Hi, ssujith

Quoted 8 lines
lib/librte_pmd_enic/enic_etherdev.c new file +8 -0
+	.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,

lib/librte_pmd_enic/enic_etherdev.c line 554

Quoted 10 lines
lib/librte_pmd_enic/enic_etherdev.c new file +10 -0
+	.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,
+};
+

I found that in perfect fdir is also supported in enic driver.

Quoted 8 lines

During the R1.8 development, we defined a new dev_ops call filter_ctrl, which can be used to control kinds of filters, flow director is included too. Which is mentioned in
http://www.dpdk.org/ml/archives/dev/2014-September/005179.html . In R1.8, filter_ctrl is only used by i40e driver. And we also planned use it in the existing ixgbe/e1000 driver in the next days. The old APIs such as fdir_add_perfect_filter, fdir_remove_perfect_filter can be replaced then.

Hi Jingjing,
Thanks for the info and the link. I shall take a look at it. It looks like bringing in one interface for all filter related operations.
I believe ENIC should also move to it.

Thanks,
-Sujith

Quoted 70 lines

So, do you have any plan to migrate the fdir in enic to the filter_ctrl API?

Jingjing

Thanks!

Quoted 61 lines
lib/librte_pmd_enic/enic_etherdev.c new file +24 -0
+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",

lib/librte_pmd_enic/enic_etherdev.c new file +34 -1
+		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);
+
--

1.9.1

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

#14 lore raw

Re: [PATCH v6 5/6] enicpmd: DPDK-ENIC PMD interface

2014-12-30 04:45, Sujith Sankar:

Quoted 12 lines · Jingjing
Quoted 10 lines

I found that in perfect fdir is also supported in enic driver.

During the R1.8 development, we defined a new dev_ops call filter_ctrl, which can be used to control kinds of filters, flow director is included too. Which is mentioned in
http://www.dpdk.org/ml/archives/dev/2014-September/005179.html . In R1.8, filter_ctrl is only used by i40e driver. And we also planned use it in the existing ixgbe/e1000 driver in the next days. The old APIs such as fdir_add_perfect_filter, fdir_remove_perfect_filter can be replaced then.

Quoted 4 lines

Hi Jingjing,
Thanks for the info and the link. I shall take a look at it. It looks like bringing in one interface for all filter related operations.
I believe ENIC should also move to it.

Yes please.
It is planned to remove or deprecate old flow director API.

Signature · 1 line
Thomas
#15 lore raw

Re: [PATCH v6 5/6] enicpmd: DPDK-ENIC PMD interface

In reply to a message not in the archive

Hi, ssujith

Quoted 44 lines

-----Original Message-----
From: Sujith Sankar (ssujith) [mailto:[email protected]]
Sent: Tuesday, December 30, 2014 12:46 PM
To: Wu, Jingjing; [email protected]
Cc: Prasad Rao (prrao)
Subject: Re: [dpdk-dev] [PATCH v6 5/6] enicpmd: DPDK-ENIC PMD interface

Quoted 23 lines · Jingjing

Hi, ssujith

Quoted 8 lines
lib/librte_pmd_enic/enic_etherdev.c new file +8 -0
+	.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,

lib/librte_pmd_enic/enic_etherdev.c line 554

Quoted 10 lines
lib/librte_pmd_enic/enic_etherdev.c new file +10 -0
+	.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,
+};
+

I found that in perfect fdir is also supported in enic driver.

Quoted 8 lines

During the R1.8 development, we defined a new dev_ops call filter_ctrl, which can be used to control kinds of filters, flow director is included too. Which is mentioned in
http://www.dpdk.org/ml/archives/dev/2014-September/005179.html . In R1.8, filter_ctrl is only used by i40e driver. And we also planned use it in the existing ixgbe/e1000 driver in the next days. The old APIs such as fdir_add_perfect_filter, fdir_remove_perfect_filter can be replaced then.

Quoted 8 lines

Hi Jingjing,
Thanks for the info and the link. I shall take a look at it. It looks like bringing in one interface for all filter related operations.
I believe ENIC should also move to it.

Thanks,
-Sujith

Just let you know that, I already sent the patch to migrate the flow director in ixgbe driver to new filter_ctrl API.
http://www.dpdk.org/ml/archives/dev/2015-January/011830.html
To avoid compile error and influence to enic driver. I didn't remove the old APIs and structures in rte_ethdev. I think they can be removed when the migration in enic driver is done. Do you have any plan for this?

Thank u!
Jingjing

Quoted 70 lines
Quoted 70 lines

So, do you have any plan to migrate the fdir in enic to the filter_ctrl API?

Jingjing

Thanks!

Quoted 61 lines
lib/librte_pmd_enic/enic_etherdev.c new file +24 -0
+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",

lib/librte_pmd_enic/enic_etherdev.c new file +34 -1
+		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);
+
--

1.9.1

#16 lore raw

PATCH v6 6/6 enicpmd: DPDK changes for accommodating ENIC PMD

In reply to a message not in the archive
---
 config/common_linuxapp | 5 +++++
 lib/Makefile           | 1 +
 mk/rte.app.mk          | 4 ++++
 3 files changed, 10 insertions(+)
config/common_linuxapp +5 -0
index 6243d4b..51edbd9 100644
@@ -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
lib/Makefile +1 -0
index 204ef11..53e55d9 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_ENIC_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
mk/rte.app.mk +4 -0
index 59468b0..bef823b 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
#17 lore raw
In reply to a message not in the archive
Quoted 12 lines · Sujith Sankar

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

Sujith Sankar (6):
enicpmd: License text
enicpmd: Makefile
enicpmd: VNIC common code partially shared with ENIC kernel mode
driver
enicpmd: pmd specific code
enicpmd: DPDK-ENIC PMD interface
enicpmd: DPDK changes for accommodating ENIC PMD

Thanks Sujith.

Signature · 1 line
David Marchand

A message that is not in the archive (sent off-list or not yet received): CALwxeUuHA7snfB6wfRXH5fGghGF_b1Sgje=j5Pr_kD9nm7kpyw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#19 lore raw
Quoted 13 lines
Quoted 12 lines

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

Sujith Sankar (6):
enicpmd: License text
enicpmd: Makefile
enicpmd: VNIC common code partially shared with ENIC kernel mode
driver
enicpmd: pmd specific code
enicpmd: DPDK-ENIC PMD interface
enicpmd: DPDK changes for accommodating ENIC PMD

Quoted 3 lines

Thanks Sujith.

Applied and enabled in BSD configuration (not tested).

It would be nice to have some documentation for this driver now.

Thanks

Signature · 1 line
Thomas
#20 lore raw

Thanks Thomas, David and Neil !

I shall work on finishing the documentation.
About that, you had mentioned that you wanted it in doc/drivers/ path. Could I send a patch with documentation in the path doc/drivers/enicpmd/ ?

Thanks,
-Sujith

Quoted 24 lines · Thomas Monjalon
Quoted 13 lines
Quoted 12 lines

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

Sujith Sankar (6):
enicpmd: License text
enicpmd: Makefile
enicpmd: VNIC common code partially shared with ENIC kernel mode
driver
enicpmd: pmd specific code
enicpmd: DPDK-ENIC PMD interface
enicpmd: DPDK changes for accommodating ENIC PMD

Quoted 3 lines

Thanks Sujith.

Applied and enabled in BSD configuration (not tested).

It would be nice to have some documentation for this driver now.

Thanks

Signature · 1 line
Thomas

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

#22 lore raw

2014-11-27 04:27, Sujith Sankar:

Quoted 5 lines

Thanks Thomas, David and Neil !

I shall work on finishing the documentation.
About that, you had mentioned that you wanted it in doc/drivers/ path. Could I send a patch with documentation in the path doc/drivers/enicpmd/ ?

Yes.
I'd prefer doc/drivers/enic/ but it's a detail ;) The format must be sphinx rst to allow web publishing.

It would be great to have some design documentation of every drivers in doc/drivers.

Thanks

Signature · 1 line
Thomas
#23 lore raw

Hello Sujith,

Any news on the documentation and the performance numbers you said you would send ?

Thanks.

Signature · 3 lines
David Marchand

On Thu, Nov 27, 2014 at 4:31 PM, Thomas Monjalon <[email protected]>
Quoted 19 lines · wrote:

2014-11-27 04:27, Sujith Sankar:

Quoted 5 lines

Thanks Thomas, David and Neil !

I shall work on finishing the documentation.
About that, you had mentioned that you wanted it in doc/drivers/ path. Could I send a patch with documentation in the path doc/drivers/enicpmd/

?

Yes.
I'd prefer doc/drivers/enic/ but it's a detail ;) The format must be sphinx rst to allow web publishing.

It would be great to have some design documentation of every drivers in doc/drivers.

Thanks
--
Thomas

A message that is not in the archive (sent off-list or not yet received): CALwxeUtn7N0q+_21JnUqsQ4NtxgtH_HsK7iDL117Yef9n+m_tw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#25 lore raw

Hi David,

Apologies for the delay. I was not able to find quality time to finish it as a few other things have been keeping me busy. But I shall work on it and provide the doc and the perf details soon. In the mean time, it would be great if you could point me to some resources on running pktgen-dpdk as I was stuck on it.

Thanks,
-Sujith

From: David Marchand <[email protected]<mailto:[email protected]>>
Date: Tuesday, 20 January 2015 4:55 pm
To: "Sujith Sankar (ssujith)" <[email protected]<mailto:[email protected]>>
Cc: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>, "Prasad Rao (prrao)" <[email protected]<mailto:[email protected]>>, Neil Horman <[email protected]<mailto:[email protected]>>, Thomas Monjalon <[email protected]<mailto:[email protected]>>
Subject: Re: [dpdk-dev] [PATCH v6 0/6] enicpmd: Cisco Systems Inc. VIC Ethernet PMD

Hello Sujith,

Any news on the documentation and the performance numbers you said you would send ?

Thanks.

--
David Marchand

On Thu, Nov 27, 2014 at 4:31 PM, Thomas Monjalon <[email protected]<mailto:[email protected]>> wrote:
2014-11-27 04:27, Sujith Sankar:

Quoted 5 lines

Thanks Thomas, David and Neil !

I shall work on finishing the documentation.
About that, you had mentioned that you wanted it in doc/drivers/ path. Could I send a patch with documentation in the path doc/drivers/enicpmd/ ?

Yes.
I'd prefer doc/drivers/enic/ but it's a detail ;) The format must be sphinx rst to allow web publishing.

It would be great to have some design documentation of every drivers in doc/drivers.

Thanks
--
Thomas

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

#27 lore raw

Hi Sujith,

Do you have news about doc for enic?

In case you didn't find the doc for pktgen-dpdk, it's available here:
http://pktgen.readthedocs.org

2015-01-21 05:03, Sujith Sankar:

Quoted 44 lines

Hi David,

Apologies for the delay. I was not able to find quality time to finish it as a few other things have been keeping me busy. But I shall work on it and provide the doc and the perf details soon.
In the mean time, it would be great if you could point me to some resources on running pktgen-dpdk as I was stuck on it.

Thanks,
-Sujith

From: David Marchand <[email protected]<mailto:[email protected]>>
Date: Tuesday, 20 January 2015 4:55 pm

Quoted 31 lines

Hello Sujith,

Any news on the documentation and the performance numbers you said you would send ?

Thanks.

--
David Marchand

Quoted 19 lines · On Thu, Nov 27, 2014 at 4:31 PM, Thomas Monjalon…

2014-11-27 04:27, Sujith Sankar:

Quoted 7 lines

Thanks Thomas, David and Neil !

I shall work on finishing the documentation.
About that, you had mentioned that you wanted it in doc/drivers/ path. Could I send a patch with documentation in the path doc/drivers/enicpmd/
?

Yes.
I'd prefer doc/drivers/enic/ but it's a detail ;) The format must be sphinx rst to allow web publishing.

It would be great to have some design documentation of every drivers in doc/drivers.

Thanks
--
Thomas

#28 lore raw
Quoted 6 lines · Thomas Monjalon

Hi Sujith,

Do you have news about doc for enic?

In case you didn't find the doc for pktgen-dpdk, it's available here:
http://pktgen.readthedocs.org

Hi Sujith,

If you can not find the answer your questions in the doc please me an email.

Regards,

++Keith

Quoted 50 lines

2015-01-21 05:03, Sujith Sankar:

Quoted 48 lines

Hi David,

Apologies for the delay. I was not able to find quality time to finish it
as a few other things have been keeping me busy. But I shall work on it and provide the doc and the perf details soon.
In the mean time, it would be great if you could point me to some resources
on running pktgen-dpdk as I was stuck on it.

Thanks,
-Sujith

From: David Marchand <[email protected]<mailto:[email protected]>>
Date: Tuesday, 20 January 2015 4:55 pm

Quoted 5 lines

Hello Sujith,

Any news on the documentation and the performance numbers you said you would send ?

Quoted 12 lines

Thanks.

--
David Marchand

Quoted 5 lines · On Thu, Nov 27, 2014 at 4:31 PM, Thomas Monjalon…

2014-11-27 04:27, Sujith Sankar:

Quoted 4 lines

Thanks Thomas, David and Neil !

I shall work on finishing the documentation.
About that, you had mentioned that you wanted it in doc/drivers/

path.

Quoted 14 lines
Quoted 14 lines
Quoted 3 lines

Could I send a patch with documentation in the path doc/drivers/enicpmd/
?

Yes.
I'd prefer doc/drivers/enic/ but it's a detail ;) The format must be sphinx rst to allow web publishing.

It would be great to have some design documentation of every drivers in doc/drivers.

Thanks
--
Thomas

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

#30 lore raw

Hi Thomas,

No update on it from my side :-(
It would take some more time for me to start working on it (and flow director api) as a few other things are keeping me busy.

Keith, Thanks ! I shall get back in case of questions.

Regards,
-Sujith

Quoted 72 lines · Keith
Quoted 6 lines · Thomas Monjalon

Hi Sujith,

Do you have news about doc for enic?

In case you didn't find the doc for pktgen-dpdk, it's available here:
http://pktgen.readthedocs.org

Hi Sujith,

If you can not find the answer your questions in the doc please me an email.

Regards,

++Keith

Quoted 53 lines

2015-01-21 05:03, Sujith Sankar:

Quoted 51 lines

Hi David,

Apologies for the delay. I was not able to find quality time to finish it
as a few other things have been keeping me busy. But I shall work on it
and provide the doc and the perf details soon.
In the mean time, it would be great if you could point me to some resources
on running pktgen-dpdk as I was stuck on it.

Thanks,
-Sujith

From: David Marchand <[email protected]<mailto:[email protected]>>
Date: Tuesday, 20 January 2015 4:55 pm

Quoted 3 lines

Hello Sujith,

Any news on the documentation and the performance numbers you said

you

Quoted 14 lines

would send ?

Thanks.

--
David Marchand

Quoted 5 lines · On Thu, Nov 27, 2014 at 4:31 PM, Thomas Monjalon…

2014-11-27 04:27, Sujith Sankar:

Quoted 4 lines

Thanks Thomas, David and Neil !

I shall work on finishing the documentation.
About that, you had mentioned that you wanted it in doc/drivers/

path.

Quoted 9 lines
Quoted 9 lines
Quoted 3 lines

Could I send a patch with documentation in the path doc/drivers/enicpmd/
?

Yes.
I'd prefer doc/drivers/enic/ but it's a detail ;) The format must be sphinx rst to allow web publishing.

It would be great to have some design documentation of every

drivers

Quoted 5 lines
Quoted 5 lines

in doc/drivers.

Thanks
--
Thomas

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

#32 lore raw

Why only rx queue "0" can receive network packet by i40e NIC

Hi All,

We use 4 cores loop 4 rx queues on one i40e port, but only rx queue "0" can receive network packet, do anyone kindly know why? BTW, all of network packet has same destination ip address but has more than 200 different source ip address.

In addition, by our test, all of rx queues can receive network packet with 10G ixgbe NIC with similar code.

Thanks and Regards,
Haifeng

#33 lore raw

Re: Why only rx queue "0" can receive network packet by i40e NIC

Hi,

BTW, I try on both 1.7.1 and 1.8.0.

Thanks and Regards,
Haifeng

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of lhffjzh
Sent: Friday, February 27, 2015 4:47 PM
To: 'Sujith Sankar (ssujith)'; 'Wiles, Keith'; 'Thomas Monjalon'
Cc: [email protected]; 'Prasad Rao (prrao)'
Subject: [dpdk-dev] Why only rx queue "0" can receive network packet by i40e
NIC

Hi All,

We use 4 cores loop 4 rx queues on one i40e port, but only rx queue "0" can receive network packet, do anyone kindly know why? BTW, all of network packet has same destination ip address but has more than 200 different source ip address.

In addition, by our test, all of rx queues can receive network packet with 10G ixgbe NIC with similar code.

Thanks and Regards,
Haifeng

#34 lore raw

Re: Why only rx queue "0" can receive network packet by i40e NIC

In reply to lhffjzh

2015-02-27 16:47, lhffjzh:

Quoted 6 lines

Hi All,

We use 4 cores loop 4 rx queues on one i40e port, but only rx queue "0" can receive network packet, do anyone kindly know why? BTW, all of network packet has same destination ip address but has more than 200 different source ip address.

It's possible that you don't have any answer for 2 reasons:
- you replied in a thread dedicated to Cisco enic questions
- you didn't describe your usage enough to understand your problem

I suggest to use the button "new email" instead of "reply all" to start a new question with enough details.

Did you noticed you put some Cisco guys in CC instead of putting the Intel responsible for i40e (see MAINTAINERS file)?

#35 lore raw

Re: Why only rx queue "0" can receive network packet by i40e NIC

Hi Thomas,

Thanks very much for your reminder, you give me many help in this mail list.

The issue with detailed information just as below. but I don't know who is the dpdk i40e maintainers? is [email protected]?

Hardware list:

    2 i40e 40G NICs
    Xeon E5-2670 v2(10 cores)
    32G memory

I loopback 2 i40e NICs by QSFP cable, one NIC send UDP network packet by DPDK,
and another for receiving. I bind 4 processor's logical cores with 4 rx queue
"0,1,2,3" on receiving NIC, when I start to send packet, only rx queue "0" can receive
the UDP packet, the others queue always receive nothing. but it is work well on ixgbe
10G NICs, I can receive network packet from all rx queues. does anyone kindly know why?

Regards,
Haifeng

-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Friday, February 27, 2015 6:55 PM
To: lhffjzh
Cc: [email protected]
Subject: Re: Why only rx queue "0" can receive network packet by i40e NIC

2015-02-27 16:47, lhffjzh:

Quoted 3 lines

Hi All,

We use 4 cores loop 4 rx queues on one i40e port, but only rx queue "0"

can

Quoted 3 lines

receive network packet, do anyone kindly know why? BTW, all of network packet has same destination ip address but has more than 200 different source ip address.

It's possible that you don't have any answer for 2 reasons:
- you replied in a thread dedicated to Cisco enic questions
- you didn't describe your usage enough to understand your problem

I suggest to use the button "new email" instead of "reply all" to start a new question with enough details.

Did you noticed you put some Cisco guys in CC instead of putting the Intel responsible for i40e (see MAINTAINERS file)?

#36 lore raw

Re: Why only rx queue "0" can receive network packet by i40e NIC

Hi Haifeng

Quoted 20 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of lhffjzh
Sent: Saturday, February 28, 2015 9:48 AM
To: 'Thomas Monjalon'
Cc: [email protected]; [email protected]
Subject: Re: [dpdk-dev] Why only rx queue "0" can receive network packet by i40e NIC

Hi Thomas,

Thanks very much for your reminder, you give me many help in this mail list.

The issue with detailed information just as below. but I don't know who is the dpdk i40e maintainers? is [email protected]?

Hardware list:

    2 i40e 40G NICs
    Xeon E5-2670 v2(10 cores)
    32G memory
Quoted 8 lines

I loopback 2 i40e NICs by QSFP cable, one NIC send UDP network packet by DPDK, and another for receiving. I bind 4 processor's logical cores with 4 rx queue "0,1,2,3" on receiving NIC, when I start to send packet, only rx queue "0"
can receive
the UDP packet, the others queue always receive nothing. but it is work well on ixgbe 10G NICs, I can receive network packet from all rx queues. does anyone kindly know why?

Could you help to list the DPDK version you are using now?
Two possible reasons:
1. UDP rss is not enabled on your board correctly.
I40e has different rss flags from ixgbe, so I am wondering if you use it correctly. In addition, this will be unified from 2.0. So I care about the DPDK version.
2. The UDP stream is occasionally hit the hash key of queue 0.
You'd better to try to send your UDP stream with random 5-tuples, to get the hash value hit different queues randomly.

Regards,
Helin

Quoted 31 lines

Regards,
Haifeng

-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Friday, February 27, 2015 6:55 PM
To: lhffjzh
Cc: [email protected]
Subject: Re: Why only rx queue "0" can receive network packet by i40e NIC

2015-02-27 16:47, lhffjzh:

Quoted 3 lines

Hi All,

We use 4 cores loop 4 rx queues on one i40e port, but only rx queue "0"

can

Quoted 3 lines

receive network packet, do anyone kindly know why? BTW, all of network packet has same destination ip address but has more than 200 different source ip address.

It's possible that you don't have any answer for 2 reasons:
- you replied in a thread dedicated to Cisco enic questions
- you didn't describe your usage enough to understand your problem

I suggest to use the button "new email" instead of "reply all" to start a new question with enough details.

Did you noticed you put some Cisco guys in CC instead of putting the Intel responsible for i40e (see MAINTAINERS file)?

A message that is not in the archive (sent off-list or not yet received): F35DEAC7BCE34641BA9FAC6BCA4A12E70A80D82C-0J0gbvR4kTg/[email protected]

#38 lore raw

Re: Why only rx queue "0" can receive network packet by i40e NIC

Hi Helin,

Thanks a lot for your great help, all of rx queue
received network packet after I update rss_hf
from "ETH_RSS_IP" to " ETH_RSS_PROTO_MASK ".

static struct rte_eth_conf port_conf = {
.rxmode = {
.mq_mode = ETH_MQ_RX_RSS,
.max_rx_pkt_len = ETHER_MAX_LEN, .split_hdr_size = 0,
.header_split = 0, /**< Header Split disabled */
.hw_ip_checksum = 1, /**< IP checksum offload enabled */ .hw_vlan_filter = 0, /**< VLAN filtering disabled */
.jumbo_frame = 0, /**< Jumbo Frame Support disabled */
.hw_strip_crc = 0, /**< CRC stripped by hardware */
},
.rx_adv_conf = {
.rss_conf = {
.rss_key = NULL,
.rss_hf = ETH_RSS_PROTO_MASK,
},
},
.txmode = {
.mq_mode = ETH_MQ_TX_NONE,
},
.fdir_conf.mode = RTE_FDIR_MODE_SIGNATURE,
};

Regards,
Haifeng

-----Original Message-----
From: Zhang, Helin [mailto:[email protected]]
Sent: Saturday, February 28, 2015 11:18 AM
To: lhffjzh; 'Thomas Monjalon'
Cc: [email protected]; [email protected]
Subject: RE: [dpdk-dev] Why only rx queue "0" can receive network packet by i40e NIC

Hi Haifeng

Quoted 6 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of lhffjzh
Sent: Saturday, February 28, 2015 9:48 AM
To: 'Thomas Monjalon'
Cc: [email protected]; [email protected]
Subject: Re: [dpdk-dev] Why only rx queue "0" can receive network packet

by

Quoted 5 lines

i40e NIC

Hi Thomas,

Thanks very much for your reminder, you give me many help in this mail

list.

Quoted 2 lines

The issue with detailed information just as below. but I don't know who is

the

Quoted 9 lines

dpdk i40e maintainers? is [email protected]?

Hardware list:

    2 i40e 40G NICs
    Xeon E5-2670 v2(10 cores)
    32G memory

I loopback 2 i40e NICs by QSFP cable, one NIC send UDP network packet by DPDK, and another for receiving. I bind 4 processor's logical cores with 4

rx

Quoted 1 line

queue "0,1,2,3" on receiving NIC, when I start to send packet, only rx

queue

Quoted 3 lines

"0"
can receive
the UDP packet, the others queue always receive nothing. but it is work

well on

Quoted 1 line

ixgbe 10G NICs, I can receive network packet from all rx queues. does

anyone

Quoted 1 line

kindly know why?

Could you help to list the DPDK version you are using now?
Two possible reasons:
1. UDP rss is not enabled on your board correctly.
I40e has different rss flags from ixgbe, so I am wondering if you
use it correctly.
In addition, this will be unified from 2.0. So I care about the DPDK
version.
2. The UDP stream is occasionally hit the hash key of queue 0. You'd better to try to send your UDP stream with random 5-tuples, to
get the
hash value hit different queues randomly.

Regards,
Helin

Quoted 31 lines

Regards,
Haifeng

-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Friday, February 27, 2015 6:55 PM
To: lhffjzh
Cc: [email protected]
Subject: Re: Why only rx queue "0" can receive network packet by i40e NIC

2015-02-27 16:47, lhffjzh:

Quoted 3 lines

Hi All,

We use 4 cores loop 4 rx queues on one i40e port, but only rx queue "0"

can

Quoted 3 lines

receive network packet, do anyone kindly know why? BTW, all of network packet has same destination ip address but has more than 200 different source ip address.

It's possible that you don't have any answer for 2 reasons:
- you replied in a thread dedicated to Cisco enic questions
- you didn't describe your usage enough to understand your problem

I suggest to use the button "new email" instead of "reply all" to start a new question with enough details.

Did you noticed you put some Cisco guys in CC instead of putting the Intel responsible for i40e (see MAINTAINERS file)?

#39 lore raw

Re: Why only rx queue "0" can receive network packet by i40e NIC

Good to know that!

Quoted 135 lines

-----Original Message-----
From: lhffjzh [mailto:[email protected]]
Sent: Saturday, February 28, 2015 12:34 PM
To: Zhang, Helin; 'Thomas Monjalon'
Cc: [email protected]; [email protected]
Subject: RE: [dpdk-dev] Why only rx queue "0" can receive network packet by i40e NIC

Hi Helin,

Thanks a lot for your great help, all of rx queue received network packet after I update rss_hf from "ETH_RSS_IP" to " ETH_RSS_PROTO_MASK ".

static struct rte_eth_conf port_conf = {
    .rxmode = {
        .mq_mode        = ETH_MQ_RX_RSS,
        .max_rx_pkt_len = ETHER_MAX_LEN,
        .split_hdr_size = 0,
        .header_split   = 0, /**< Header Split disabled */
        .hw_ip_checksum = 1, /**< IP checksum offload enabled */
        .hw_vlan_filter = 0, /**< VLAN filtering disabled */
        .jumbo_frame    = 0, /**< Jumbo Frame Support disabled */
        .hw_strip_crc   = 0, /**< CRC stripped by hardware */
    },
    .rx_adv_conf = {
        .rss_conf = {
            .rss_key = NULL,
            .rss_hf = ETH_RSS_PROTO_MASK,
        },
    },
    .txmode = {
        .mq_mode = ETH_MQ_TX_NONE,
    },
    .fdir_conf.mode = RTE_FDIR_MODE_SIGNATURE, };

Regards,
Haifeng

-----Original Message-----
From: Zhang, Helin [mailto:[email protected]]
Sent: Saturday, February 28, 2015 11:18 AM
To: lhffjzh; 'Thomas Monjalon'
Cc: [email protected]; [email protected]
Subject: RE: [dpdk-dev] Why only rx queue "0" can receive network packet by i40e NIC

Hi Haifeng

Quoted 7 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of lhffjzh
Sent: Saturday, February 28, 2015 9:48 AM
To: 'Thomas Monjalon'
Cc: [email protected]; [email protected]
Subject: Re: [dpdk-dev] Why only rx queue "0" can receive network packet

by

Quoted 5 lines

i40e NIC

Hi Thomas,

Thanks very much for your reminder, you give me many help in this mail

list.

Quoted 3 lines

The issue with detailed information just as below. but I don't know who is

the

Quoted 10 lines

dpdk i40e maintainers? is [email protected]?

Hardware list:

    2 i40e 40G NICs
    Xeon E5-2670 v2(10 cores)
    32G memory

I loopback 2 i40e NICs by QSFP cable, one NIC send UDP network packet by DPDK, and another for receiving. I bind 4 processor's logical cores with 4

rx

Quoted 1 line

queue "0,1,2,3" on receiving NIC, when I start to send packet, only rx

queue

Quoted 4 lines

"0"
can receive
the UDP packet, the others queue always receive nothing. but it is work

well on

Quoted 1 line

ixgbe 10G NICs, I can receive network packet from all rx queues. does

anyone

Quoted 1 line

kindly know why?

Could you help to list the DPDK version you are using now?
Two possible reasons:
1. UDP rss is not enabled on your board correctly.
I40e has different rss flags from ixgbe, so I am wondering if you use it
correctly.
In addition, this will be unified from 2.0. So I care about the DPDK version.
2. The UDP stream is occasionally hit the hash key of queue 0.
You'd better to try to send your UDP stream with random 5-tuples, to get
the
hash value hit different queues randomly.

Regards,
Helin

Quoted 32 lines

Regards,
Haifeng

-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Friday, February 27, 2015 6:55 PM
To: lhffjzh
Cc: [email protected]
Subject: Re: Why only rx queue "0" can receive network packet by i40e NIC

2015-02-27 16:47, lhffjzh:

Quoted 3 lines

Hi All,

We use 4 cores loop 4 rx queues on one i40e port, but only rx queue "0"

can

Quoted 3 lines

receive network packet, do anyone kindly know why? BTW, all of network packet has same destination ip address but has more than 200 different source ip address.

It's possible that you don't have any answer for 2 reasons:
- you replied in a thread dedicated to Cisco enic questions
- you didn't describe your usage enough to understand your problem

I suggest to use the button "new email" instead of "reply all" to start a new question with enough details.

Did you noticed you put some Cisco guys in CC instead of putting the Intel responsible for i40e (see MAINTAINERS file)?

#40 lore raw

Re: Why only rx queue "0" can receive network packet by i40e NIC

Is the I40E incapable of operating RSS with ETH_RSS_IP (i.e. hashing without L4 ports)?

Thanks,

Jeff

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Zhang, Helin
Sent: Saturday, February 28, 2015 6:34 AM
To: lhffjzh; 'Thomas Monjalon'
Cc: [email protected]; [email protected]
Subject: Re: [dpdk-dev] Why only rx queue "0" can receive network packet by i40e NIC

Good to know that!

Quoted 138 lines

-----Original Message-----
From: lhffjzh [mailto:[email protected]]
Sent: Saturday, February 28, 2015 12:34 PM
To: Zhang, Helin; 'Thomas Monjalon'
Cc: [email protected]; [email protected]
Subject: RE: [dpdk-dev] Why only rx queue "0" can receive network packet by i40e NIC

Hi Helin,

Thanks a lot for your great help, all of rx queue received network packet after I update rss_hf from "ETH_RSS_IP" to " ETH_RSS_PROTO_MASK ".

static struct rte_eth_conf port_conf = {
    .rxmode = {
        .mq_mode        = ETH_MQ_RX_RSS,
        .max_rx_pkt_len = ETHER_MAX_LEN,
        .split_hdr_size = 0,
        .header_split   = 0, /**< Header Split disabled */
        .hw_ip_checksum = 1, /**< IP checksum offload enabled */
        .hw_vlan_filter = 0, /**< VLAN filtering disabled */
        .jumbo_frame    = 0, /**< Jumbo Frame Support disabled */
        .hw_strip_crc   = 0, /**< CRC stripped by hardware */
    },
    .rx_adv_conf = {
        .rss_conf = {
            .rss_key = NULL,
            .rss_hf = ETH_RSS_PROTO_MASK,
        },
    },
    .txmode = {
        .mq_mode = ETH_MQ_TX_NONE,
    },
    .fdir_conf.mode = RTE_FDIR_MODE_SIGNATURE, };

Regards,
Haifeng

-----Original Message-----
From: Zhang, Helin [mailto:[email protected]]
Sent: Saturday, February 28, 2015 11:18 AM
To: lhffjzh; 'Thomas Monjalon'
Cc: [email protected]; [email protected]
Subject: RE: [dpdk-dev] Why only rx queue "0" can receive network packet by i40e NIC

Hi Haifeng

Quoted 7 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of lhffjzh
Sent: Saturday, February 28, 2015 9:48 AM
To: 'Thomas Monjalon'
Cc: [email protected]; [email protected]
Subject: Re: [dpdk-dev] Why only rx queue "0" can receive network packet

by

Quoted 6 lines

i40e NIC

Hi Thomas,

Thanks very much for your reminder, you give me many help in this mail

list.

Quoted 3 lines

The issue with detailed information just as below. but I don't know who is

the

Quoted 10 lines

dpdk i40e maintainers? is [email protected]?

Hardware list:

    2 i40e 40G NICs
    Xeon E5-2670 v2(10 cores)
    32G memory

I loopback 2 i40e NICs by QSFP cable, one NIC send UDP network packet by DPDK, and another for receiving. I bind 4 processor's logical cores with 4

rx

Quoted 2 lines

queue "0,1,2,3" on receiving NIC, when I start to send packet, only rx

queue

Quoted 4 lines

"0"
can receive
the UDP packet, the others queue always receive nothing. but it is work

well on

Quoted 2 lines

ixgbe 10G NICs, I can receive network packet from all rx queues. does

anyone

Quoted 1 line

kindly know why?

Could you help to list the DPDK version you are using now?
Two possible reasons:
1. UDP rss is not enabled on your board correctly.
I40e has different rss flags from ixgbe, so I am wondering if you use
it correctly.
In addition, this will be unified from 2.0. So I care about the DPDK version.
2. The UDP stream is occasionally hit the hash key of queue 0.
You'd better to try to send your UDP stream with random 5-tuples, to
get the
hash value hit different queues randomly.

Regards,
Helin

Quoted 32 lines

Regards,
Haifeng

-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Friday, February 27, 2015 6:55 PM
To: lhffjzh
Cc: [email protected]
Subject: Re: Why only rx queue "0" can receive network packet by i40e NIC

2015-02-27 16:47, lhffjzh:

Quoted 3 lines

Hi All,

We use 4 cores loop 4 rx queues on one i40e port, but only rx queue "0"

can

Quoted 3 lines

receive network packet, do anyone kindly know why? BTW, all of network packet has same destination ip address but has more than 200 different source ip address.

It's possible that you don't have any answer for 2 reasons:
- you replied in a thread dedicated to Cisco enic questions
- you didn't describe your usage enough to understand your problem

I suggest to use the button "new email" instead of "reply all" to start a new question with enough details.

Did you noticed you put some Cisco guys in CC instead of putting the Intel responsible for i40e (see MAINTAINERS file)?

#41 lore raw

Re: Why only rx queue "0" can receive network packet by i40e NIC

Quoted 10 lines

-----Original Message-----
From: Jeff Venable, Sr. [mailto:[email protected]]
Sent: Wednesday, July 22, 2015 5:47 PM
To: Zhang, Helin; lhffjzh; 'Thomas Monjalon'
Cc: [email protected]
Subject: RE: [dpdk-dev] Why only rx queue "0" can receive network packet by i40e NIC

Quoted 2 lines

Is the I40E incapable of operating RSS with ETH_RSS_IP (i.e. hashing without L4 ports)?

Why do you think like this? Sorry, I am a bit confused.
ETH_RSS_IP is a super set of all IP based rss types. Please see the rss types listed in rte_ethdev.h.
The supports rss types of each NIC can be queried via 'struct rte_eth_dev_info' of field 'flow_type_rss_offloads'.

Regards,
Helin

Quoted 153 lines

Thanks,

Jeff

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Zhang, Helin
Sent: Saturday, February 28, 2015 6:34 AM
To: lhffjzh; 'Thomas Monjalon'
Cc: [email protected]; [email protected]
Subject: Re: [dpdk-dev] Why only rx queue "0" can receive network packet by i40e NIC

Good to know that!

Quoted 138 lines

-----Original Message-----
From: lhffjzh [mailto:[email protected]]
Sent: Saturday, February 28, 2015 12:34 PM
To: Zhang, Helin; 'Thomas Monjalon'
Cc: [email protected]; [email protected]
Subject: RE: [dpdk-dev] Why only rx queue "0" can receive network packet by i40e NIC

Hi Helin,

Thanks a lot for your great help, all of rx queue received network packet after I update rss_hf from "ETH_RSS_IP" to " ETH_RSS_PROTO_MASK ".

static struct rte_eth_conf port_conf = {
    .rxmode = {
        .mq_mode        = ETH_MQ_RX_RSS,
        .max_rx_pkt_len = ETHER_MAX_LEN,
        .split_hdr_size = 0,
        .header_split   = 0, /**< Header Split disabled */
        .hw_ip_checksum = 1, /**< IP checksum offload enabled */
        .hw_vlan_filter = 0, /**< VLAN filtering disabled */
        .jumbo_frame    = 0, /**< Jumbo Frame Support disabled */
        .hw_strip_crc   = 0, /**< CRC stripped by hardware */
    },
    .rx_adv_conf = {
        .rss_conf = {
            .rss_key = NULL,
            .rss_hf = ETH_RSS_PROTO_MASK,
        },
    },
    .txmode = {
        .mq_mode = ETH_MQ_TX_NONE,
    },
    .fdir_conf.mode = RTE_FDIR_MODE_SIGNATURE, };

Regards,
Haifeng

-----Original Message-----
From: Zhang, Helin [mailto:[email protected]]
Sent: Saturday, February 28, 2015 11:18 AM
To: lhffjzh; 'Thomas Monjalon'
Cc: [email protected]; [email protected]
Subject: RE: [dpdk-dev] Why only rx queue "0" can receive network packet by i40e NIC

Hi Haifeng

Quoted 7 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of lhffjzh
Sent: Saturday, February 28, 2015 9:48 AM
To: 'Thomas Monjalon'
Cc: [email protected]; [email protected]
Subject: Re: [dpdk-dev] Why only rx queue "0" can receive network packet

by

Quoted 6 lines

i40e NIC

Hi Thomas,

Thanks very much for your reminder, you give me many help in this mail

list.

Quoted 3 lines

The issue with detailed information just as below. but I don't know who is

the

Quoted 10 lines

dpdk i40e maintainers? is [email protected]?

Hardware list:

    2 i40e 40G NICs
    Xeon E5-2670 v2(10 cores)
    32G memory

I loopback 2 i40e NICs by QSFP cable, one NIC send UDP network packet by DPDK, and another for receiving. I bind 4 processor's logical cores with 4

rx

Quoted 2 lines

queue "0,1,2,3" on receiving NIC, when I start to send packet, only rx

queue

Quoted 4 lines

"0"
can receive
the UDP packet, the others queue always receive nothing. but it is work

well on

Quoted 2 lines

ixgbe 10G NICs, I can receive network packet from all rx queues. does

anyone

Quoted 1 line

kindly know why?

Could you help to list the DPDK version you are using now?
Two possible reasons:
1. UDP rss is not enabled on your board correctly.
I40e has different rss flags from ixgbe, so I am wondering if you use
it correctly.
In addition, this will be unified from 2.0. So I care about the DPDK version.
2. The UDP stream is occasionally hit the hash key of queue 0.
You'd better to try to send your UDP stream with random 5-tuples, to
get the
hash value hit different queues randomly.

Regards,
Helin

Quoted 32 lines

Regards,
Haifeng

-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Friday, February 27, 2015 6:55 PM
To: lhffjzh
Cc: [email protected]
Subject: Re: Why only rx queue "0" can receive network packet by i40e NIC

2015-02-27 16:47, lhffjzh:

Quoted 3 lines

Hi All,

We use 4 cores loop 4 rx queues on one i40e port, but only rx queue "0"

can

Quoted 3 lines

receive network packet, do anyone kindly know why? BTW, all of network packet has same destination ip address but has more than 200 different source ip address.

It's possible that you don't have any answer for 2 reasons:
- you replied in a thread dedicated to Cisco enic questions
- you didn't describe your usage enough to understand your problem

I suggest to use the button "new email" instead of "reply all" to start a new question with enough details.

Did you noticed you put some Cisco guys in CC instead of putting the Intel responsible for i40e (see MAINTAINERS file)?

#42 lore raw

Re: Why only rx queue "0" can receive network packet by i40e NIC

Hi Helin,

We do not want RSS to include L4 ports in the hash because packet fragments would get routed to queue #0 and would be more difficult to work with. We are using the model where multiple CPUs are pulling from the NIC queues independently with no shared state, so each 'pipeline' has private fragment reassembly state for the sessions it is managing.

Getting RSS Toeplitz hash to work on { source_ip, dest_ip } tuples only using a symmetric rss-key is important. This works properly with all other Intel NICs in the DPDK thus far that we have tested until the i40E PMD with the Intel X710-DA4. The Microsoft RSS specification allows for this.

With the i40E PMD, we have been unsuccessful at enabling this RSS configuration. From the source code and XL710 controller datasheet, we cannot find any reference to the flags for this RSS mode. Unless we can achieve feature parity with the other Intel NICs, we don't want to write special case code for this one driver which makes the XL710 controller unusable for us and seems contrary to the intent of the DPDK APIs which are abstracting this behavior.

Do you have any suggestions?

Thanks kindly,

Jeff

-----Original Message-----
From: Zhang, Helin [mailto:[email protected]]
Sent: Wednesday, July 22, 2015 5:56 PM
To: Jeff Venable, Sr. <[email protected]>; lhffjzh <[email protected]>; 'Thomas Monjalon' <[email protected]>
Cc: [email protected]
Subject: RE: [dpdk-dev] Why only rx queue "0" can receive network packet by i40e NIC

Quoted 10 lines

-----Original Message-----
From: Jeff Venable, Sr. [mailto:[email protected]]
Sent: Wednesday, July 22, 2015 5:47 PM
To: Zhang, Helin; lhffjzh; 'Thomas Monjalon'
Cc: [email protected]
Subject: RE: [dpdk-dev] Why only rx queue "0" can receive network packet by i40e NIC

Is the I40E incapable of operating RSS with ETH_RSS_IP (i.e. hashing without L4 ports)?

Why do you think like this? Sorry, I am a bit confused.
ETH_RSS_IP is a super set of all IP based rss types. Please see the rss types listed in rte_ethdev.h. The supports rss types of each NIC can be queried via 'struct rte_eth_dev_info' of field 'flow_type_rss_offloads'.

Regards,
Helin

Quoted 153 lines

Thanks,

Jeff

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Zhang, Helin
Sent: Saturday, February 28, 2015 6:34 AM
To: lhffjzh; 'Thomas Monjalon'
Cc: [email protected]; [email protected]
Subject: Re: [dpdk-dev] Why only rx queue "0" can receive network packet by i40e NIC

Good to know that!

Quoted 138 lines

-----Original Message-----
From: lhffjzh [mailto:[email protected]]
Sent: Saturday, February 28, 2015 12:34 PM
To: Zhang, Helin; 'Thomas Monjalon'
Cc: [email protected]; [email protected]
Subject: RE: [dpdk-dev] Why only rx queue "0" can receive network packet by i40e NIC

Hi Helin,

Thanks a lot for your great help, all of rx queue received network packet after I update rss_hf from "ETH_RSS_IP" to " ETH_RSS_PROTO_MASK ".

static struct rte_eth_conf port_conf = {
    .rxmode = {
        .mq_mode        = ETH_MQ_RX_RSS,
        .max_rx_pkt_len = ETHER_MAX_LEN,
        .split_hdr_size = 0,
        .header_split   = 0, /**< Header Split disabled */
        .hw_ip_checksum = 1, /**< IP checksum offload enabled */
        .hw_vlan_filter = 0, /**< VLAN filtering disabled */
        .jumbo_frame    = 0, /**< Jumbo Frame Support disabled */
        .hw_strip_crc   = 0, /**< CRC stripped by hardware */
    },
    .rx_adv_conf = {
        .rss_conf = {
            .rss_key = NULL,
            .rss_hf = ETH_RSS_PROTO_MASK,
        },
    },
    .txmode = {
        .mq_mode = ETH_MQ_TX_NONE,
    },
    .fdir_conf.mode = RTE_FDIR_MODE_SIGNATURE, };

Regards,
Haifeng

-----Original Message-----
From: Zhang, Helin [mailto:[email protected]]
Sent: Saturday, February 28, 2015 11:18 AM
To: lhffjzh; 'Thomas Monjalon'
Cc: [email protected]; [email protected]
Subject: RE: [dpdk-dev] Why only rx queue "0" can receive network packet by i40e NIC

Hi Haifeng

Quoted 7 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of lhffjzh
Sent: Saturday, February 28, 2015 9:48 AM
To: 'Thomas Monjalon'
Cc: [email protected]; [email protected]
Subject: Re: [dpdk-dev] Why only rx queue "0" can receive network packet

by

Quoted 6 lines

i40e NIC

Hi Thomas,

Thanks very much for your reminder, you give me many help in this mail

list.

Quoted 3 lines

The issue with detailed information just as below. but I don't know who is

the

Quoted 10 lines

dpdk i40e maintainers? is [email protected]?

Hardware list:

    2 i40e 40G NICs
    Xeon E5-2670 v2(10 cores)
    32G memory

I loopback 2 i40e NICs by QSFP cable, one NIC send UDP network packet by DPDK, and another for receiving. I bind 4 processor's logical cores with 4

rx

Quoted 2 lines

queue "0,1,2,3" on receiving NIC, when I start to send packet, only rx

queue

Quoted 4 lines

"0"
can receive
the UDP packet, the others queue always receive nothing. but it is work

well on

Quoted 2 lines

ixgbe 10G NICs, I can receive network packet from all rx queues. does

anyone

Quoted 1 line

kindly know why?

Could you help to list the DPDK version you are using now?
Two possible reasons:
1. UDP rss is not enabled on your board correctly.
I40e has different rss flags from ixgbe, so I am wondering if you
use it correctly.
In addition, this will be unified from 2.0. So I care about the DPDK version.
2. The UDP stream is occasionally hit the hash key of queue 0.
You'd better to try to send your UDP stream with random 5-tuples,
to get the
hash value hit different queues randomly.

Regards,
Helin

Quoted 32 lines

Regards,
Haifeng

-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Friday, February 27, 2015 6:55 PM
To: lhffjzh
Cc: [email protected]
Subject: Re: Why only rx queue "0" can receive network packet by i40e NIC

2015-02-27 16:47, lhffjzh:

Quoted 3 lines

Hi All,

We use 4 cores loop 4 rx queues on one i40e port, but only rx queue "0"

can

Quoted 3 lines

receive network packet, do anyone kindly know why? BTW, all of network packet has same destination ip address but has more than 200 different source ip address.

It's possible that you don't have any answer for 2 reasons:
- you replied in a thread dedicated to Cisco enic questions
- you didn't describe your usage enough to understand your problem

I suggest to use the button "new email" instead of "reply all" to start a new question with enough details.

Did you noticed you put some Cisco guys in CC instead of putting the Intel responsible for i40e (see MAINTAINERS file)?

#43 lore raw

Re: Why only rx queue "0" can receive network packet by i40e NIC

Quoted 18 lines

-----Original Message-----
From: Jeff Venable, Sr. [mailto:[email protected]]
Sent: Wednesday, July 29, 2015 6:59 PM
To: Zhang, Helin
Cc: [email protected]; lhffjzh; 'Thomas Monjalon'
Subject: RE: [dpdk-dev] Why only rx queue "0" can receive network packet by i40e NIC

Hi Helin,

We do not want RSS to include L4 ports in the hash because packet fragments would get routed to queue #0 and would be more difficult to work with. We are using the model where multiple CPUs are pulling from the NIC queues independently with no shared state, so each 'pipeline' has private fragment reassembly state for the sessions it is managing.

Quoted 4 lines

Getting RSS Toeplitz hash to work on { source_ip, dest_ip } tuples only using a symmetric rss-key is important. This works properly with all other Intel NICs in the DPDK thus far that we have tested until the i40E PMD with the Intel X710-DA4. The Microsoft RSS specification allows for this.

This is a bit similar to some complains to flow director. I will check it with somebody else to see if there is anything we can do for this. And I remember there might a bit hard. Will let you know if I have any update.

Thanks,
Helin

Quoted 198 lines

With the i40E PMD, we have been unsuccessful at enabling this RSS configuration. From the source code and XL710 controller datasheet, we cannot find any reference to the flags for this RSS mode. Unless we can achieve feature parity with the other Intel NICs, we don't want to write special case code for this one driver which makes the XL710 controller unusable for us and seems contrary to the intent of the DPDK APIs which are abstracting this behavior.

Do you have any suggestions?

Thanks kindly,

Jeff

-----Original Message-----
From: Zhang, Helin [mailto:[email protected]]
Sent: Wednesday, July 22, 2015 5:56 PM
To: Jeff Venable, Sr. <[email protected]>; lhffjzh <[email protected]>; 'Thomas Monjalon' <[email protected]>
Cc: [email protected]
Subject: RE: [dpdk-dev] Why only rx queue "0" can receive network packet by i40e NIC

Quoted 10 lines

-----Original Message-----
From: Jeff Venable, Sr. [mailto:[email protected]]
Sent: Wednesday, July 22, 2015 5:47 PM
To: Zhang, Helin; lhffjzh; 'Thomas Monjalon'
Cc: [email protected]
Subject: RE: [dpdk-dev] Why only rx queue "0" can receive network packet by i40e NIC

Is the I40E incapable of operating RSS with ETH_RSS_IP (i.e. hashing without L4 ports)?

Why do you think like this? Sorry, I am a bit confused.
ETH_RSS_IP is a super set of all IP based rss types. Please see the rss types listed in rte_ethdev.h.
The supports rss types of each NIC can be queried via 'struct rte_eth_dev_info' of field 'flow_type_rss_offloads'.

Regards,
Helin

Quoted 13 lines

Thanks,

Jeff

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Zhang, Helin
Sent: Saturday, February 28, 2015 6:34 AM
To: lhffjzh; 'Thomas Monjalon'
Cc: [email protected]; [email protected]
Subject: Re: [dpdk-dev] Why only rx queue "0" can receive network packet by i40e NIC

Quoted 14 lines

Good to know that!

Quoted 12 lines

-----Original Message-----
From: lhffjzh [mailto:[email protected]]
Sent: Saturday, February 28, 2015 12:34 PM
To: Zhang, Helin; 'Thomas Monjalon'
Cc: [email protected]; [email protected]
Subject: RE: [dpdk-dev] Why only rx queue "0" can receive network packet by i40e NIC

Hi Helin,

Thanks a lot for your great help, all of rx queue received network packet after I update rss_hf from "ETH_RSS_IP" to " ETH_RSS_PROTO_MASK

".

Quoted 126 lines
Quoted 126 lines
static struct rte_eth_conf port_conf = {
    .rxmode = {
        .mq_mode        = ETH_MQ_RX_RSS,
        .max_rx_pkt_len = ETHER_MAX_LEN,
        .split_hdr_size = 0,
        .header_split   = 0, /**< Header Split disabled */
        .hw_ip_checksum = 1, /**< IP checksum offload enabled */
        .hw_vlan_filter = 0, /**< VLAN filtering disabled */
        .jumbo_frame    = 0, /**< Jumbo Frame Support disabled */
        .hw_strip_crc   = 0, /**< CRC stripped by hardware */
    },
    .rx_adv_conf = {
        .rss_conf = {
            .rss_key = NULL,
            .rss_hf = ETH_RSS_PROTO_MASK,
        },
    },
    .txmode = {
        .mq_mode = ETH_MQ_TX_NONE,
    },
    .fdir_conf.mode = RTE_FDIR_MODE_SIGNATURE, };

Regards,
Haifeng

-----Original Message-----
From: Zhang, Helin [mailto:[email protected]]
Sent: Saturday, February 28, 2015 11:18 AM
To: lhffjzh; 'Thomas Monjalon'
Cc: [email protected]; [email protected]
Subject: RE: [dpdk-dev] Why only rx queue "0" can receive network packet by i40e NIC

Hi Haifeng

Quoted 7 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of lhffjzh
Sent: Saturday, February 28, 2015 9:48 AM
To: 'Thomas Monjalon'
Cc: [email protected]; [email protected]
Subject: Re: [dpdk-dev] Why only rx queue "0" can receive network packet

by

Quoted 6 lines

i40e NIC

Hi Thomas,

Thanks very much for your reminder, you give me many help in this mail

list.

Quoted 3 lines

The issue with detailed information just as below. but I don't know who is

the

Quoted 10 lines

dpdk i40e maintainers? is [email protected]?

Hardware list:

    2 i40e 40G NICs
    Xeon E5-2670 v2(10 cores)
    32G memory

I loopback 2 i40e NICs by QSFP cable, one NIC send UDP network packet by DPDK, and another for receiving. I bind 4 processor's logical cores with 4

rx

Quoted 2 lines

queue "0,1,2,3" on receiving NIC, when I start to send packet, only rx

queue

Quoted 4 lines

"0"
can receive
the UDP packet, the others queue always receive nothing. but it is work

well on

Quoted 2 lines

ixgbe 10G NICs, I can receive network packet from all rx queues. does

anyone

Quoted 1 line

kindly know why?

Could you help to list the DPDK version you are using now?
Two possible reasons:
1. UDP rss is not enabled on your board correctly.
I40e has different rss flags from ixgbe, so I am wondering if you
use it correctly.
In addition, this will be unified from 2.0. So I care about the DPDK version.
2. The UDP stream is occasionally hit the hash key of queue 0.
You'd better to try to send your UDP stream with random 5-tuples,
to get the
hash value hit different queues randomly.

Regards,
Helin

Quoted 32 lines

Regards,
Haifeng

-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Friday, February 27, 2015 6:55 PM
To: lhffjzh
Cc: [email protected]
Subject: Re: Why only rx queue "0" can receive network packet by i40e NIC

2015-02-27 16:47, lhffjzh:

Quoted 3 lines

Hi All,

We use 4 cores loop 4 rx queues on one i40e port, but only rx queue "0"

can

Quoted 3 lines

receive network packet, do anyone kindly know why? BTW, all of network packet has same destination ip address but has more than 200 different source ip address.

It's possible that you don't have any answer for 2 reasons:
- you replied in a thread dedicated to Cisco enic questions
- you didn't describe your usage enough to understand your problem

I suggest to use the button "new email" instead of "reply all" to start a new question with enough details.

Did you noticed you put some Cisco guys in CC instead of putting the Intel responsible for i40e (see MAINTAINERS file)?

#44 lore raw
In reply to a message not in the archive

2015-02-27 08:09, Sujith Sankar:

Quoted 5 lines

Hi Thomas,

No update on it from my side :-(
It would take some more time for me to start working on it (and flow director api) as a few other things are keeping me busy.

It's unfortunate.
We now have a PMD without documentation and blocking the removal of the old flow director API.
Is there someone else at Cisco able to work on it?
I think the first priority should be on the flow director API as it has a wider impact.

Thanks

#45 lore raw
Quoted 7 lines · Thomas Monjalon

2015-02-27 08:09, Sujith Sankar:

Quoted 5 lines

Hi Thomas,

No update on it from my side :-(
It would take some more time for me to start working on it (and flow director api) as a few other things are keeping me busy.

Quoted 6 lines

It's unfortunate.
We now have a PMD without documentation and blocking the removal of the old flow director API.
Is there someone else at Cisco able to work on it?
I think the first priority should be on the flow director API as it has a wider impact.

Sure Thomas. I shall pick it up as soon as possible.

Thanks.

Quoted 2 lines

Thanks

#46 lore raw
In reply to Sujith Sankar (ssujith)

Hi Sujith,

2015-02-27 08:09, Sujith Sankar:

Quoted 5 lines

Hi Thomas,

No update on it from my side :-(
It would take some more time for me to start working on it (and flow director api) as a few other things are keeping me busy.

[...]

Documentation was split to better welcome new NICs:
http://dpdk.org/doc/guides/nics/index.html
It would be nice to have some insights about features, design and performance numbers for enic.

Thanks

Quoted 54 lines
Quoted 53 lines
Quoted 52 lines

2015-01-21 05:03, Sujith Sankar:

Quoted 51 lines

Hi David,

Apologies for the delay. I was not able to find quality time to finish it
as a few other things have been keeping me busy. But I shall work on it
and provide the doc and the perf details soon.
In the mean time, it would be great if you could point me to some resources
on running pktgen-dpdk as I was stuck on it.

Thanks,
-Sujith

From: David Marchand <[email protected]<mailto:[email protected]>>
Date: Tuesday, 20 January 2015 4:55 pm

Quoted 3 lines

Hello Sujith,

Any news on the documentation and the performance numbers you said

you

Quoted 14 lines

would send ?

Thanks.

--
David Marchand

Quoted 5 lines · On Thu, Nov 27, 2014 at 4:31 PM, Thomas Monjalon…

2014-11-27 04:27, Sujith Sankar:

Quoted 4 lines

Thanks Thomas, David and Neil !

I shall work on finishing the documentation.
About that, you had mentioned that you wanted it in doc/drivers/

path.

Quoted 9 lines
Quoted 9 lines
Quoted 3 lines

Could I send a patch with documentation in the path doc/drivers/enicpmd/
?

Yes.
I'd prefer doc/drivers/enic/ but it's a detail ;) The format must be sphinx rst to allow web publishing.

It would be great to have some design documentation of every

drivers

Quoted 5 lines
Quoted 5 lines

in doc/drivers.

Thanks
--
Thomas

Acked-by
#47 lore raw
In reply to a message not in the archive
Quoted 68 lines · Sujith Sankar

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

Sujith Sankar (6):
enicpmd: License text
enicpmd: Makefile
enicpmd: VNIC common code partially shared with ENIC kernel mode
driver
enicpmd: pmd specific code
enicpmd: DPDK-ENIC PMD interface
enicpmd: DPDK changes for accommodating ENIC PMD

 config/common_linuxapp                   |    5 +
 lib/Makefile                             |    1 +
 lib/librte_pmd_enic/LICENSE              |   27 +
 lib/librte_pmd_enic/Makefile             |   67 ++
 lib/librte_pmd_enic/enic.h               |  157 ++++
 lib/librte_pmd_enic/enic_clsf.c          |  244 ++++++
 lib/librte_pmd_enic/enic_compat.h        |  142 ++++
 lib/librte_pmd_enic/enic_etherdev.c      |  613 +++++++++++++++
 lib/librte_pmd_enic/enic_main.c          | 1266 ++++++++++++++++++++++++++++++
 lib/librte_pmd_enic/enic_res.c           |  221 ++++++
 lib/librte_pmd_enic/enic_res.h           |  168 ++++
 lib/librte_pmd_enic/vnic/cq_desc.h       |  126 +++
 lib/librte_pmd_enic/vnic/cq_enet_desc.h  |  261 ++++++
 lib/librte_pmd_enic/vnic/rq_enet_desc.h  |   76 ++
 lib/librte_pmd_enic/vnic/vnic_cq.c       |  117 +++
 lib/librte_pmd_enic/vnic/vnic_cq.h       |  152 ++++
 lib/librte_pmd_enic/vnic/vnic_dev.c      | 1063 +++++++++++++++++++++++++
 lib/librte_pmd_enic/vnic/vnic_dev.h      |  203 +++++
 lib/librte_pmd_enic/vnic/vnic_devcmd.h   |  774 ++++++++++++++++++
 lib/librte_pmd_enic/vnic/vnic_enet.h     |   78 ++
 lib/librte_pmd_enic/vnic/vnic_intr.c     |   83 ++
 lib/librte_pmd_enic/vnic/vnic_intr.h     |  126 +++
 lib/librte_pmd_enic/vnic/vnic_nic.h      |   88 +++
 lib/librte_pmd_enic/vnic/vnic_resource.h |   97 +++
 lib/librte_pmd_enic/vnic/vnic_rq.c       |  246 ++++++
 lib/librte_pmd_enic/vnic/vnic_rq.h       |  282 +++++++
 lib/librte_pmd_enic/vnic/vnic_rss.c      |   85 ++
 lib/librte_pmd_enic/vnic/vnic_rss.h      |   61 ++
 lib/librte_pmd_enic/vnic/vnic_stats.h    |   86 ++
 lib/librte_pmd_enic/vnic/vnic_wq.c       |  245 ++++++
 lib/librte_pmd_enic/vnic/vnic_wq.h       |  283 +++++++
 lib/librte_pmd_enic/vnic/wq_enet_desc.h  |  114 +++
 mk/rte.app.mk                            |    4 +
 33 files changed, 7561 insertions(+)
 create mode 100644 lib/librte_pmd_enic/LICENSE
 create mode 100644 lib/librte_pmd_enic/Makefile
 create mode 100644 lib/librte_pmd_enic/enic.h
 create mode 100644 lib/librte_pmd_enic/enic_clsf.c
 create mode 100644 lib/librte_pmd_enic/enic_compat.h
 create mode 100644 lib/librte_pmd_enic/enic_etherdev.c
 create mode 100644 lib/librte_pmd_enic/enic_main.c
 create mode 100644 lib/librte_pmd_enic/enic_res.c
 create mode 100644 lib/librte_pmd_enic/enic_res.h
 create mode 100644 lib/librte_pmd_enic/vnic/cq_desc.h
 create mode 100644 lib/librte_pmd_enic/vnic/cq_enet_desc.h
 create mode 100644 lib/librte_pmd_enic/vnic/rq_enet_desc.h
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_cq.c
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_cq.h
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_dev.c
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_dev.h
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_devcmd.h
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_enet.h
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_intr.c
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_intr.h
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_nic.h
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_resource.h
Quoted 13 lines
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_rq.c
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_rq.h
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_rss.c
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_rss.h
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_stats.h
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_wq.c
 create mode 100644 lib/librte_pmd_enic/vnic/vnic_wq.h
 create mode 100644 lib/librte_pmd_enic/vnic/wq_enet_desc.h
Signature · 1 line
1.9.1