[dpdk-dev] [PATCH v3 02/20] thunderx/nicvf: add pmd skeleton
Introduce driver initialization and enable build infrastructure for nicvf pmd driver. By default, It is enabled only for defconfig_arm64-thunderx-* config as it is an inbuilt NIC device. Signed-off-by: Jerin Jacob Signed-off-by: Maciej Czekaj Signed-off-by: Kamil Rytarowski Signed-off-by: Zyta Szpak Signed-off-by: Slawomir Rosek Signed-off-by: Radoslaw Biernacki --- config/common_base | 10 + config/defconfig_arm64-thunderx-linuxapp-gcc | 10 + drivers/net/Makefile | 1 + drivers/net/thunderx/Makefile | 63 ++ drivers/net/thunderx/nicvf_ethdev.c| 251 + drivers/net/thunderx/nicvf_ethdev.h| 48 drivers/net/thunderx/nicvf_logs.h | 83 +++ drivers/net/thunderx/nicvf_struct.h| 124 ++ .../thunderx/rte_pmd_thunderx_nicvf_version.map| 4 + mk/rte.app.mk | 2 + 10 files changed, 596 insertions(+) create mode 100644 drivers/net/thunderx/Makefile create mode 100644 drivers/net/thunderx/nicvf_ethdev.c create mode 100644 drivers/net/thunderx/nicvf_ethdev.h create mode 100644 drivers/net/thunderx/nicvf_logs.h create mode 100644 drivers/net/thunderx/nicvf_struct.h create mode 100644 drivers/net/thunderx/rte_pmd_thunderx_nicvf_version.map diff --git a/config/common_base b/config/common_base index 47c26f6..ad5686b 100644 --- a/config/common_base +++ b/config/common_base @@ -259,6 +259,16 @@ CONFIG_RTE_LIBRTE_PMD_SZEDATA2=n CONFIG_RTE_LIBRTE_PMD_SZEDATA2_AS=0 # +# Compile burst-oriented Cavium Thunderx NICVF PMD driver +# +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD=n +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_RX=n +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_TX=n +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_MBOX=n + +# # Compile burst-oriented VIRTIO PMD driver # CONFIG_RTE_LIBRTE_VIRTIO_PMD=y diff --git a/config/defconfig_arm64-thunderx-linuxapp-gcc b/config/defconfig_arm64-thunderx-linuxapp-gcc index fe5e987..7940bbd 100644 --- a/config/defconfig_arm64-thunderx-linuxapp-gcc +++ b/config/defconfig_arm64-thunderx-linuxapp-gcc @@ -34,3 +34,13 @@ CONFIG_RTE_MACHINE="thunderx" CONFIG_RTE_CACHE_LINE_SIZE=128 + +# +# Compile Cavium Thunderx NICVF PMD driver +# +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD=y +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_RX=n +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_TX=n +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_MBOX=n diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 6ba7658..0e29a33 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -50,6 +50,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += pcap DIRS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede DIRS-$(CONFIG_RTE_LIBRTE_PMD_RING) += ring DIRS-$(CONFIG_RTE_LIBRTE_PMD_SZEDATA2) += szedata2 +DIRS-$(CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD) += thunderx DIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio DIRS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD) += vmxnet3 DIRS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) += xenvirt diff --git a/drivers/net/thunderx/Makefile b/drivers/net/thunderx/Makefile new file mode 100644 index 000..eb9f100 --- /dev/null +++ b/drivers/net/thunderx/Makefile @@ -0,0 +1,63 @@ +# BSD LICENSE +# +# Copyright(c) 2016 Cavium Networks. 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 Cavium Networks 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
[dpdk-dev] [PATCH v3 02/20] thunderx/nicvf: add pmd skeleton
On 6/7/2016 5:40 PM, Jerin Jacob wrote: > Introduce driver initialization and enable build infrastructure for > nicvf pmd driver. > > By default, It is enabled only for defconfig_arm64-thunderx-* > config as it is an inbuilt NIC device. > > Signed-off-by: Jerin Jacob > Signed-off-by: Maciej Czekaj > Signed-off-by: Kamil Rytarowski > Signed-off-by: Zyta Szpak > Signed-off-by: Slawomir Rosek > Signed-off-by: Radoslaw Biernacki > --- > config/common_base | 10 + > config/defconfig_arm64-thunderx-linuxapp-gcc | 10 + > drivers/net/Makefile | 1 + > drivers/net/thunderx/Makefile | 63 ++ > drivers/net/thunderx/nicvf_ethdev.c| 251 > + > drivers/net/thunderx/nicvf_ethdev.h| 48 > drivers/net/thunderx/nicvf_logs.h | 83 +++ > drivers/net/thunderx/nicvf_struct.h| 124 ++ > .../thunderx/rte_pmd_thunderx_nicvf_version.map| 4 + > mk/rte.app.mk | 2 + > 10 files changed, 596 insertions(+) > create mode 100644 drivers/net/thunderx/Makefile > create mode 100644 drivers/net/thunderx/nicvf_ethdev.c > create mode 100644 drivers/net/thunderx/nicvf_ethdev.h > create mode 100644 drivers/net/thunderx/nicvf_logs.h > create mode 100644 drivers/net/thunderx/nicvf_struct.h > create mode 100644 drivers/net/thunderx/rte_pmd_thunderx_nicvf_version.map > ... > + > + if (nic->sqs_mode) { > + PMD_INIT_LOG(INFO, "Unsupported SQS VF detected, Detaching..."); > + /* Detach port by returning Postive error number */ s/Postive/Positive ? ...
[dpdk-dev] [PATCH v3 02/20] thunderx/nicvf: add pmd skeleton
On 6/7/2016 5:40 PM, Jerin Jacob wrote: > Introduce driver initialization and enable build infrastructure for > nicvf pmd driver. > > By default, It is enabled only for defconfig_arm64-thunderx-* > config as it is an inbuilt NIC device. > > Signed-off-by: Jerin Jacob > Signed-off-by: Maciej Czekaj > Signed-off-by: Kamil Rytarowski > Signed-off-by: Zyta Szpak > Signed-off-by: Slawomir Rosek > Signed-off-by: Radoslaw Biernacki > --- > config/common_base | 10 + > config/defconfig_arm64-thunderx-linuxapp-gcc | 10 + > drivers/net/Makefile | 1 + > drivers/net/thunderx/Makefile | 63 ++ > drivers/net/thunderx/nicvf_ethdev.c| 251 > + > drivers/net/thunderx/nicvf_ethdev.h| 48 > drivers/net/thunderx/nicvf_logs.h | 83 +++ > drivers/net/thunderx/nicvf_struct.h| 124 ++ > .../thunderx/rte_pmd_thunderx_nicvf_version.map| 4 + > mk/rte.app.mk | 2 + > 10 files changed, 596 insertions(+) > create mode 100644 drivers/net/thunderx/Makefile > create mode 100644 drivers/net/thunderx/nicvf_ethdev.c > create mode 100644 drivers/net/thunderx/nicvf_ethdev.h > create mode 100644 drivers/net/thunderx/nicvf_logs.h > create mode 100644 drivers/net/thunderx/nicvf_struct.h > create mode 100644 drivers/net/thunderx/rte_pmd_thunderx_nicvf_version.map > > diff --git a/config/common_base b/config/common_base > index 47c26f6..ad5686b 100644 > --- a/config/common_base > +++ b/config/common_base > @@ -259,6 +259,16 @@ CONFIG_RTE_LIBRTE_PMD_SZEDATA2=n > CONFIG_RTE_LIBRTE_PMD_SZEDATA2_AS=0 > > # > +# Compile burst-oriented Cavium Thunderx NICVF PMD driver > +# > +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD=n > +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_INIT=n > +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_RX=n > +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_TX=n > +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_DRIVER=n > +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_MBOX=n > + > +# > # Compile burst-oriented VIRTIO PMD driver > # > CONFIG_RTE_LIBRTE_VIRTIO_PMD=y > diff --git a/config/defconfig_arm64-thunderx-linuxapp-gcc > b/config/defconfig_arm64-thunderx-linuxapp-gcc > index fe5e987..7940bbd 100644 > --- a/config/defconfig_arm64-thunderx-linuxapp-gcc > +++ b/config/defconfig_arm64-thunderx-linuxapp-gcc > @@ -34,3 +34,13 @@ > CONFIG_RTE_MACHINE="thunderx" > > CONFIG_RTE_CACHE_LINE_SIZE=128 > + > +# > +# Compile Cavium Thunderx NICVF PMD driver > +# > +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD=y > +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_INIT=n > +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_RX=n > +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_TX=n > +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_DRIVER=n > +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_MBOX=n > diff --git a/drivers/net/Makefile b/drivers/net/Makefile > index 6ba7658..0e29a33 100644 > --- a/drivers/net/Makefile > +++ b/drivers/net/Makefile > @@ -50,6 +50,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += pcap > DIRS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede > DIRS-$(CONFIG_RTE_LIBRTE_PMD_RING) += ring > DIRS-$(CONFIG_RTE_LIBRTE_PMD_SZEDATA2) += szedata2 > +DIRS-$(CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD) += thunderx > DIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio > DIRS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD) += vmxnet3 > DIRS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) += xenvirt > diff --git a/drivers/net/thunderx/Makefile b/drivers/net/thunderx/Makefile > new file mode 100644 > index 000..eb9f100 > --- /dev/null > +++ b/drivers/net/thunderx/Makefile > @@ -0,0 +1,63 @@ > +# BSD LICENSE > +# > +# Copyright(c) 2016 Cavium Networks. 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 Cavium Networks 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 (INCLUDIN