[dpdk-dev] [PATCH v9 1/9] nfp: basic initialization

2015-11-27 Thread Thomas Monjalon
2015-11-27 07:51, Alejandro Lucero:
> I converted (almost) all the Linux typedefs. This one went under the radar.
> 
> We do not have such thing like ixgbe/base but maybe it makes sense.
> 
> Should I send a new patchset version for fixing this "minor nit"?

If you send a new version, please fix the MAINTAINERS file update
(and squash the change with the doc patch).

PS: please answer below instead of top post.


> On Thu, Nov 26, 2015 at 6:14 PM, Stephen Hemminger <
> stephen at networkplumber.org> wrote:
> 
> > On Thu, 26 Nov 2015 09:49:21 +
> > Alejandro Lucero  wrote:
> >
> > > +static inline void
> > > +nfp_qcp_ptr_add(__u8 *q, enum nfp_qcp_ptr ptr, uint32_t val)
> > > +{
> > > + uint32_t off;
> >
> > Minor nit. why mix use of Linux specific basic size typedefs (__u8)
> > with Posix standard values (uint32_t). The DPDK style is to use
> > the Posix types except in kernel drivers or code that is coming
> > from unified drivers (ie ixgbe/base)
> >




[dpdk-dev] [PATCH v9 1/9] nfp: basic initialization

2015-11-27 Thread Alejandro Lucero
I converted (almost) all the Linux typedefs. This one went under the radar.

We do not have such thing like ixgbe/base but maybe it makes sense.

Should I send a new patchset version for fixing this "minor nit"?

Thanks

On Thu, Nov 26, 2015 at 6:14 PM, Stephen Hemminger <
stephen at networkplumber.org> wrote:

> On Thu, 26 Nov 2015 09:49:21 +
> Alejandro Lucero  wrote:
>
> > +static inline void
> > +nfp_qcp_ptr_add(__u8 *q, enum nfp_qcp_ptr ptr, uint32_t val)
> > +{
> > + uint32_t off;
>
> Minor nit. why mix use of Linux specific basic size typedefs (__u8)
> with Posix standard values (uint32_t). The DPDK style is to use
> the Posix types except in kernel drivers or code that is coming
> from unified drivers (ie ixgbe/base)
>


[dpdk-dev] [PATCH v9 1/9] nfp: basic initialization

2015-11-26 Thread Stephen Hemminger
On Thu, 26 Nov 2015 09:49:21 +
Alejandro Lucero  wrote:

> +static inline void
> +nfp_qcp_ptr_add(__u8 *q, enum nfp_qcp_ptr ptr, uint32_t val)
> +{
> + uint32_t off;

Minor nit. why mix use of Linux specific basic size typedefs (__u8)
with Posix standard values (uint32_t). The DPDK style is to use
the Posix types except in kernel drivers or code that is coming
from unified drivers (ie ixgbe/base)


[dpdk-dev] [PATCH v9 1/9] nfp: basic initialization

2015-11-26 Thread Alejandro Lucero
Signed-off-by: Alejandro Lucero 
Signed-off-by: Rolf Neugebauer 
---
 MAINTAINERS |3 +
 config/common_linuxapp  |6 +
 doc/guides/rel_notes/release_2_2.rst|4 +
 drivers/net/Makefile|1 +
 drivers/net/nfp/Makefile|   56 +++
 drivers/net/nfp/nfp_net.c   |  699 +++
 drivers/net/nfp/nfp_net_ctrl.h  |  324 ++
 drivers/net/nfp/nfp_net_logs.h  |   75 
 drivers/net/nfp/nfp_net_pmd.h   |  453 
 drivers/net/nfp/rte_pmd_nfp_version.map |3 +
 mk/rte.app.mk   |1 +
 11 files changed, 1625 insertions(+)
 create mode 100644 drivers/net/nfp/Makefile
 create mode 100644 drivers/net/nfp/nfp_net.c
 create mode 100644 drivers/net/nfp/nfp_net_ctrl.h
 create mode 100644 drivers/net/nfp/nfp_net_logs.h
 create mode 100644 drivers/net/nfp/nfp_net_pmd.h
 create mode 100644 drivers/net/nfp/rte_pmd_nfp_version.map

diff --git a/MAINTAINERS b/MAINTAINERS
index 840faeb..df5b962 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -318,6 +318,9 @@ Null PMD
 M: Tetsuya Mukawa 
 F: drivers/net/null/

+Netronome nfp
+M: Alejandro Lucero 
+F: drivers/net/nfp/

 Packet processing
 -
diff --git a/config/common_linuxapp b/config/common_linuxapp
index 4a68da4..1d77db7 100644
--- a/config/common_linuxapp
+++ b/config/common_linuxapp
@@ -279,6 +279,12 @@ CONFIG_RTE_LIBRTE_VMXNET3_DEBUG_TX_FREE=n
 CONFIG_RTE_LIBRTE_VMXNET3_DEBUG_DRIVER=n

 #
+# Compile burst-oriented Netronome NFP PMD driver
+#
+CONFIG_RTE_LIBRTE_NFP_PMD=n
+CONFIG_RTE_LIBRTE_NFP_DEBUG=n
+
+#
 # Compile example software rings based PMD
 #
 CONFIG_RTE_LIBRTE_PMD_RING=y
diff --git a/doc/guides/rel_notes/release_2_2.rst 
b/doc/guides/rel_notes/release_2_2.rst
index 8c77768..8154db7 100644
--- a/doc/guides/rel_notes/release_2_2.rst
+++ b/doc/guides/rel_notes/release_2_2.rst
@@ -195,6 +195,10 @@ Drivers

   Fixed issue when releasing null control queue.

+* **nfp: adding new PMD for Netronome nfp-6xxx card.**
+
+  Support for using Netronome nfp-6xxx with PCI VFs.
+

 Libraries
 ~
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index cddcd57..6e4497e 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -43,6 +43,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += ixgbe
 DIRS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += mlx4
 DIRS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += mlx5
 DIRS-$(CONFIG_RTE_LIBRTE_MPIPE_PMD) += mpipe
+DIRS-$(CONFIG_RTE_LIBRTE_NFP_PMD) += nfp
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += null
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += pcap
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_RING) += ring
diff --git a/drivers/net/nfp/Makefile b/drivers/net/nfp/Makefile
new file mode 100644
index 000..ef7a13d
--- /dev/null
+++ b/drivers/net/nfp/Makefile
@@ -0,0 +1,56 @@
+#   BSD LICENSE
+#
+#   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+#   All rights reserved.
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+#
+# * Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+#   notice, this list of conditions and the following disclaimer in
+#   the documentation and/or other materials provided with the
+#   distribution.
+# * Neither the name of Intel Corporation nor the names of its
+#   contributors may be used to endorse or promote products derived
+#   from this software without specific prior written permission.
+#
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+include $(RTE_SDK)/mk/rte.vars.mk
+
+#
+# library name
+#
+LIB = librte_pmd_nfp.a
+
+CFLAGS += -O3
+CFLAGS += $(WERROR_FLAGS)
+
+EXPORT_MAP := rte_pmd_nfp_version.map
+
+LIBABIVER := 1
+
+#
+# all source are stored in SRCS-y
+#
+SRCS-$(CONFIG_RTE_LIBRTE_NFP_PMD) += nfp_net.c
+
+# this lib depends upon:
+DEPDIRS-$(CONFIG_RTE_LIBRTE_NFP_PMD) += lib/librte_eal lib/librte_ether
+DEPDIRS-$(CONFIG_RTE_LIBRTE_NFP_PMD) += lib/librte_mempool