dpdk.git
7 years agocrypto/aesni_mb: add missing supported algos in guide
Pablo de Lara [Mon, 19 Dec 2016 17:29:03 +0000 (17:29 +0000)]
crypto/aesni_mb: add missing supported algos in guide

AESNI MB PMD supports SHA224-HMAC and SHA384-HMAC,
but the documentation was not updated with this.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
7 years agocrypto/aesni_mb: add single operation functionality
Pablo de Lara [Mon, 19 Dec 2016 17:29:02 +0000 (17:29 +0000)]
crypto/aesni_mb: add single operation functionality

Update driver to use new AESNI Multibuffer IPSec library single
operation functionality (cipher only and authentication only).
This patch also adds tests for this new feature.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
7 years agocrypto/aesni_mb: update dependency in guide
Pablo de Lara [Mon, 19 Dec 2016 17:29:01 +0000 (17:29 +0000)]
crypto/aesni_mb: update dependency in guide

The Intel(R) Multi Buffer Crypto library used in the AESNI MB PMD
has been moved to a new repository, in github.
This patch updates the link where it can be downloaded.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
7 years agocrypto/aesni_mb: fix incorrect crypto session
Pablo de Lara [Mon, 19 Dec 2016 17:29:00 +0000 (17:29 +0000)]
crypto/aesni_mb: fix incorrect crypto session

When using sessionless crypto operations, crypto session
is obtained from a pool of sessions, when processing the
operation. Once the operation is processed, the session
is put back in the pool, but for the AESNI MB PMD, this
session was not being saved in the operation and therefore,
it did not return to the session pool.

Fixes: 924e84f87306 ("aesni_mb: add driver for multi buffer based crypto")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
7 years agoapp/test: check SGL on QAT
Arek Kusztal [Fri, 23 Dec 2016 12:51:10 +0000 (12:51 +0000)]
app/test: check SGL on QAT

This commit adds GCM tests to use within scatter-gather list.
Test use direct chained mbufs created based on the input parameter
for max size for in place operations and out of place operations.

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
7 years agocrypto/qat: add SGL capability
Arek Kusztal [Fri, 23 Dec 2016 12:51:09 +0000 (12:51 +0000)]
crypto/qat: add SGL capability

This commit adds scatter-gather list capability to Intel QuickAssist
Technology driver.

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
7 years agoapp/test: check DES on QAT
Arek Kusztal [Fri, 2 Dec 2016 14:16:02 +0000 (14:16 +0000)]
app/test: check DES on QAT

This commit adds tests of Data Encryption Standard (DES)
algorithm to Intel QuickAssist technology crypto test suites

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
7 years agocrypto/qat: add DES capability
Arek Kusztal [Fri, 2 Dec 2016 14:16:01 +0000 (14:16 +0000)]
crypto/qat: add DES capability

This commit adds DES capability to Intel QuickAssist
Technology Driver

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
7 years agocryptodev: add DES CBC cipher algorithm
Arek Kusztal [Fri, 2 Dec 2016 14:16:00 +0000 (14:16 +0000)]
cryptodev: add DES CBC cipher algorithm

This commit adds DES CBC ciper algorithm to available algorithms

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
7 years agocrypto/openssl: fix extra bytes written at end of data
Piotr Azarewicz [Wed, 7 Dec 2016 10:45:54 +0000 (11:45 +0100)]
crypto/openssl: fix extra bytes written at end of data

Extra bytes are being written at end of data while process standard
openssl cipher encryption. This behaviour is unexpected.

This patch disable the padding feature in openssl library, which is
causing the problem.

Fixes: d61f70b4c918 ("crypto/libcrypto: add driver for OpenSSL library")

Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
7 years agocrypto/qat: fix buffer overwrite in OOP case
Fiona Trahe [Fri, 9 Dec 2016 15:39:05 +0000 (15:39 +0000)]
crypto/qat: fix buffer overwrite in OOP case

In out-of-place operation, data is DMAed from source mbuf
to destination mbuf. To avoid header data in dest mbuf being
overwritten, the minimal data-set should be DMAed.

Fixes: 39e0bee48e81 ("crypto/qat: rework request builder for performance")

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: John Griffin <john.griffin@intel.com>
7 years agocryptodev: fix crash on null dereference
Jerin Jacob [Sat, 3 Dec 2016 18:34:01 +0000 (00:04 +0530)]
cryptodev: fix crash on null dereference

crypodev->data->name will be null when
rte_cryptodev_get_dev_id() invoked without a valid
crypto device instance.

Fixes: d11b0f30df88 ("cryptodev: introduce API and framework for crypto devices")

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
7 years agoapp/test: check AES cipher-only on QAT
Fiona Trahe [Thu, 24 Nov 2016 18:29:24 +0000 (18:29 +0000)]
app/test: check AES cipher-only on QAT

Extended functional AES-CBC and AES-CTR cipher-only
tests to run on QAT PMD.
Added AES_CBC cipher-only performance tests on QAT PMD.
No driver changes, but as now tested, QAT documentation
is updated to remove constraint.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
7 years agocryptodev: remove unused digest-appended feature
Fiona Trahe [Thu, 17 Nov 2016 17:33:17 +0000 (17:33 +0000)]
cryptodev: remove unused digest-appended feature

The cryptodev API had specified that if the digest address field was
left empty on an authentication operation, then the PMD would assume
the digest was appended to the source or destination data.
This case was not handled at all by most PMDs and incorrectly handled
by the QAT PMD.
As no bugs were raised, it is assumed to be not needed, so this patch
removes it, rather than add handling for the case on all PMDs.
The digest can still be appended to the data, but its
address must now be provided in the op.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: John Griffin <john.griffin@intel.com>
7 years agodoc: add flow distributor example guide
Pablo de Lara [Tue, 17 Jan 2017 22:23:56 +0000 (22:23 +0000)]
doc: add flow distributor example guide

Signed-off-by: Sameh Gobriel <sameh.gobriel@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Christian Maciocco <christian.maciocco@intel.com>
7 years agodoc: add EFD library section in programmers guide
Pablo de Lara [Tue, 17 Jan 2017 22:23:55 +0000 (22:23 +0000)]
doc: add EFD library section in programmers guide

Signed-off-by: Sameh Gobriel <sameh.gobriel@intel.com>
Acked-by: Christian Maciocco <christian.maciocco@intel.com>
7 years agoexamples/flow_distributor: new example to demonstrate EFD
Pablo de Lara [Tue, 17 Jan 2017 22:23:54 +0000 (22:23 +0000)]
examples/flow_distributor: new example to demonstrate EFD

This new sample app, based on the client/server sample app,
shows the user an scenario using the EFD library.
It consists of:

- A front-end server which has an EFD table that stores the
  node id for each flow key, which will distribute the incoming
  packets to the different nodes

- A back-end node, which has a hash table where node checks,
  after reading packets coming from the server, whether the packet
  is meant to be used in such node, in which case it will be TXed,
  or not, in which case, packet will be dropped.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
Acked-by: Christian Maciocco <christian.maciocco@intel.com>
7 years agoapp/test: add EFD functional and perf tests
Pablo de Lara [Tue, 17 Jan 2017 22:23:53 +0000 (22:23 +0000)]
app/test: add EFD functional and perf tests

Signed-off-by: Byron Marohn <byron.marohn@intel.com>
Signed-off-by: Karla Saur <karla.saur@intel.com>
Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Christian Maciocco <christian.maciocco@intel.com>
7 years agoefd: add AVX2 vector lookup function
Pablo de Lara [Tue, 17 Jan 2017 22:23:52 +0000 (22:23 +0000)]
efd: add AVX2 vector lookup function

Signed-off-by: Byron Marohn <byron.marohn@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
Acked-by: Christian Maciocco <christian.maciocco@intel.com>
7 years agoefd: new Elastic Flow Distributor library
Pablo de Lara [Tue, 17 Jan 2017 22:23:51 +0000 (22:23 +0000)]
efd: new Elastic Flow Distributor library

Elastic Flow Distributor (EFD) is a distributor library that uses
perfect hashing to determine a target/value for a given incoming flow key.
It has the following advantages:

- First, because it uses perfect hashing, it does not store
  the key itself and hence lookup performance is not dependent
  on the key size.

- Second, the target/value can be any arbitrary value hence
  the system designer and/or operator can better optimize service rates
  and inter-cluster network traffic locating.

- Third, since the storage requirement is much smaller than a hash-based
  flow table (i.e. better fit for CPU cache), EFD can scale to
  millions of flow keys.
  Finally, with current optimized library implementation performance
  is fully scalable with number of CPU cores.

Signed-off-by: Byron Marohn <byron.marohn@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
Acked-by: Christian Maciocco <christian.maciocco@intel.com>
7 years agocrypto/qat: use I/O device memory read/write API
Santosh Shukla [Wed, 18 Jan 2017 01:21:28 +0000 (06:51 +0530)]
crypto/qat: use I/O device memory read/write API

Replace the raw I/O device memory read/write access with eal
abstraction for I/O device memory read/write access to fix portability
issues across different architectures.

CC: John Griffin <john.griffin@intel.com>
CC: Fiona Trahe <fiona.trahe@intel.com>
CC: Deepak Kumar Jain <deepak.k.jain@intel.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agonet/vmxnet3: use I/O device memory read/write API
Santosh Shukla [Wed, 18 Jan 2017 01:21:42 +0000 (06:51 +0530)]
net/vmxnet3: use I/O device memory read/write API

Replace the raw I/O device memory read/write access with eal
abstraction for I/O device memory read/write access to fix
portability issues across different architectures.

CC: Yong Wang <yongwang@vmware.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agonet/virtio: use I/O device memory read/write API
Santosh Shukla [Wed, 18 Jan 2017 01:21:41 +0000 (06:51 +0530)]
net/virtio: use I/O device memory read/write API

Replace the raw I/O device memory read/write access with eal
abstraction for I/O device memory read/write access to fix
portability issues across different architectures.

Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
7 years agonet/thunderx: use I/O device memory read/write API
Jerin Jacob [Wed, 18 Jan 2017 01:21:40 +0000 (06:51 +0530)]
net/thunderx: use I/O device memory read/write API

Replace the raw I/O device memory read/write access with eal
abstraction for I/O device memory read/write access to fix portability
issues across different architectures.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agonet/ena: use I/O device memory read/write API
Jerin Jacob [Wed, 18 Jan 2017 01:21:34 +0000 (06:51 +0530)]
net/ena: use I/O device memory read/write API

Replace the raw I/O device memory read/write access with eal
abstraction for I/O device memory read/write access to fix
portability issues across different architectures.

Suggested-by: Jan Medala <jan@semihalf.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Jan Medala <jan@semihalf.com>
7 years agonet/qede: use I/O device memory read/write API
Santosh Shukla [Wed, 18 Jan 2017 01:21:39 +0000 (06:51 +0530)]
net/qede: use I/O device memory read/write API

Replace the raw I/O device memory read/write access with eal
abstraction for I/O device memory read/write access to fix
portability issues across different architectures.

CC: Harish Patil <harish.patil@cavium.com>
CC: Rasesh Mody <rasesh.mody@cavium.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agonet/bnxt: use I/O device memory read/write API
Santosh Shukla [Wed, 18 Jan 2017 01:21:29 +0000 (06:51 +0530)]
net/bnxt: use I/O device memory read/write API

Replace the raw I/O device memory read/write access with eal abstraction
for I/O device memory read/write access to fix portability issues across
different architectures.

CC: Stephen Hurd <stephen.hurd@broadcom.com>
CC: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agonet/bnx2x: use I/O device memory read/write API
Santosh Shukla [Wed, 18 Jan 2017 01:21:30 +0000 (06:51 +0530)]
net/bnx2x: use I/O device memory read/write API

Replace the raw I/O device memory read/write access with eal abstraction
for I/O device memory read/write access to fix portability issues across
different architectures.

CC: Harish Patil <harish.patil@cavium.com>
CC: Rasesh Mody <rasesh.mody@cavium.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agonet/cxgbe: use I/O device memory read/write API
Santosh Shukla [Wed, 18 Jan 2017 01:21:31 +0000 (06:51 +0530)]
net/cxgbe: use I/O device memory read/write API

Replace the raw I/O device memory read/write access with eal
abstraction for I/O device memory read/write access to fix
portability issues across different architectures.

CC: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agonet/nfp: use I/O device memory read/write API
Santosh Shukla [Wed, 18 Jan 2017 01:21:38 +0000 (06:51 +0530)]
net/nfp: use I/O device memory read/write API

Replace the raw I/O device memory read/write access with eal
abstraction for I/O device memory read/write access to fix
portability issues across different architectures.

CC: Alejandro Lucero <alejandro.lucero@netronome.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Alejandro Lucero <alejandro.lucero@netronome.com>
7 years agonet/enic: use I/O device memory read/write API
Santosh Shukla [Wed, 18 Jan 2017 01:21:33 +0000 (06:51 +0530)]
net/enic: use I/O device memory read/write API

Replace the raw I/O device memory read/write access with eal
abstraction for I/O device memory read/write access to fix portability
issues across different architectures.

CC: John Daley <johndale@cisco.com>
CC: Nelson Escobar <neescoba@cisco.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agonet/fm10k: use I/O device memory read/write API
Santosh Shukla [Wed, 18 Jan 2017 01:21:35 +0000 (06:51 +0530)]
net/fm10k: use I/O device memory read/write API

Replace the raw I/O device memory read/write access with eal
abstraction for I/O device memory read/write access to fix
portability issues across different architectures.

CC: Jing Chen <jing.d.chen@intel.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agonet/i40e: use I/O device memory read/write API
Santosh Shukla [Wed, 18 Jan 2017 01:21:36 +0000 (06:51 +0530)]
net/i40e: use I/O device memory read/write API

Replace the raw I/O device memory read/write access with eal abstraction
for I/O device memory read/write access to fix portability issues across
different architectures.

CC: Helin Zhang <helin.zhang@intel.com>
CC: Jingjing Wu <jingjing.wu@intel.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Signed-off-by: Satha Rao <skoteshwar@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agonet/ixgbe: use I/O device memory read/write API
Santosh Shukla [Wed, 18 Jan 2017 01:21:37 +0000 (06:51 +0530)]
net/ixgbe: use I/O device memory read/write API

Replace the raw I/O device memory read/write access with eal
abstraction for I/O device memory read/write access to fix
portability issues across different architectures.

CC: Helin Zhang <helin.zhang@intel.com>
CC: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agonet/e1000: use I/O device memory read/write API
Santosh Shukla [Wed, 18 Jan 2017 01:21:32 +0000 (06:51 +0530)]
net/e1000: use I/O device memory read/write API

Replace the raw I/O device memory read/write access with eal
abstraction for I/O device memory read/write access to fix
portability issues across different architectures.

CC: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agoeal/arm64: change barrier definitions to macros
Jerin Jacob [Wed, 18 Jan 2017 01:21:27 +0000 (06:51 +0530)]
eal/arm64: change barrier definitions to macros

Change rte_*wb definitions to macros in order to
keep consistent with other barrier definitions in
the file.

Suggested-by: Jianbo Liu <jianbo.liu@linaro.org>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agoeal/arm64: override I/O device read/write access
Jerin Jacob [Wed, 18 Jan 2017 01:21:26 +0000 (06:51 +0530)]
eal/arm64: override I/O device read/write access

Override the generic I/O device memory read/write access and implement it
using armv8 instructions for arm64.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agoeal: let all architectures use generic I/O implementation
Jerin Jacob [Wed, 18 Jan 2017 01:21:25 +0000 (06:51 +0530)]
eal: let all architectures use generic I/O implementation

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agoeal: add generic I/O device read/write implementation
Jerin Jacob [Wed, 18 Jan 2017 01:21:24 +0000 (06:51 +0530)]
eal: add generic I/O device read/write implementation

This patch implements the generic version of rte_read[b/w/l/q]_[relaxed]
and rte_write[b/w/l/q]_[relaxed] using rte_io_wmb() and rte_io_rmb()

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agoeal: introduce I/O device memory read/write operations
Jerin Jacob [Wed, 18 Jan 2017 01:21:23 +0000 (06:51 +0530)]
eal: introduce I/O device memory read/write operations

This commit introduces 8-bit, 16-bit, 32bit, 64bit I/O device
memory read/write operations along with the relaxed versions.

The weakly-ordered machine like ARM needs additional I/O barrier for
device memory read/write access over PCI bus.
By introducing the eal abstraction for I/O device memory read/write access,
The drivers can access I/O device memory in architecture agnostic manner.

The relaxed version does not have additional I/O memory barrier, useful in
accessing the device registers of integrated controllers which
implicitly strongly ordered with respect to memory access.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agoeal/arm64: define I/O device memory barriers
Jerin Jacob [Wed, 18 Jan 2017 01:21:22 +0000 (06:51 +0530)]
eal/arm64: define I/O device memory barriers

CC: Jianbo Liu <jianbo.liu@linaro.org>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agoeal/arm64: define SMP barrier
Jerin Jacob [Wed, 18 Jan 2017 01:21:21 +0000 (06:51 +0530)]
eal/arm64: define SMP barrier

dmb instruction based barrier is used for smp version of memory barrier.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agoeal/arm64: fix memory barrier definition
Jerin Jacob [Wed, 18 Jan 2017 01:21:20 +0000 (06:51 +0530)]
eal/arm64: fix memory barrier definition

dsb instruction based barrier is used for non smp
version of memory barrier.

Fixes: d708f01b7102 ("eal/arm: add atomic operations for ARMv8")
Cc: stable@dpdk.org
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Jianbo Liu <jianbo.liu@linaro.org>
7 years agoeal/armv7: define I/O device memory barriers
Jerin Jacob [Wed, 18 Jan 2017 01:21:19 +0000 (06:51 +0530)]
eal/armv7: define I/O device memory barriers

The patch does not provide any functional change for ARMv7.
I/O barriers are mapped to existing smp barriers.

CC: Jan Viktorin <viktorin@rehivetech.com>
CC: Jianbo Liu <jianbo.liu@linaro.org>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agoeal/arm: separate SMP barrier definition for ARMv7 and ARMv8
Jerin Jacob [Wed, 18 Jan 2017 01:21:18 +0000 (06:51 +0530)]
eal/arm: separate SMP barrier definition for ARMv7 and ARMv8

Separate the smp barrier definition for arm and arm64 for fine
control on smp barrier definition for each architecture.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agoeal/ppc64: define I/O device memory barriers
Jerin Jacob [Wed, 18 Jan 2017 01:21:17 +0000 (06:51 +0530)]
eal/ppc64: define I/O device memory barriers

The patch does not provide any functional change for ppc_64.
I/O barriers are mapped to existing smp barriers.

CC: Chao Zhu <chaozhu@linux.vnet.ibm.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agoeal/tile: define I/O device memory barriers
Jerin Jacob [Wed, 18 Jan 2017 01:21:16 +0000 (06:51 +0530)]
eal/tile: define I/O device memory barriers

The patch does not provide any functional change for tile.
I/O barriers are mapped to existing smp barriers.

CC: Zhigang Lu <zlu@ezchip.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agoeal/x86: define I/O device memory barriers
Jerin Jacob [Wed, 18 Jan 2017 01:21:15 +0000 (06:51 +0530)]
eal/x86: define I/O device memory barriers

The patch does not provide any functional change for IA.
I/O barriers are mapped to existing smp barriers.

CC: Bruce Richardson <bruce.richardson@intel.com>
CC: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agoeal: introduce I/O device memory barriers
Jerin Jacob [Wed, 18 Jan 2017 01:21:14 +0000 (06:51 +0530)]
eal: introduce I/O device memory barriers

This commit introduce rte_io_mb(), rte_io_wmb() and rte_io_rmb(), in
order to enable memory barriers between I/O device and CPU.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agodevtools: relax tag checking in fixes
Thomas Monjalon [Tue, 17 Jan 2017 14:35:11 +0000 (15:35 +0100)]
devtools: relax tag checking in fixes

The tag "Cc: stable@dpdk.org" must be set when the commit must be
backported to a stable branch. The reminder is reworded.

It should be located just below the "Fixes:" tag (without blank line)
and followed by a blank line, separated from SoB and review tags below.
However, there is no strong need for checking blank lines.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
7 years agodevtools: fix lookup commit fixing a fix of many commits
Thomas Monjalon [Tue, 17 Jan 2017 14:24:20 +0000 (15:24 +0100)]
devtools: fix lookup commit fixing a fix of many commits

There was a bug when looking at a commit fixing a commit which
itself was fixing many commits:

% devtools/git-log-fixes.sh 12ee45a36~..12ee45a36
devtools/git-log-fixes.sh: 96: local: 5499c1fc9baa: bad variable name

In this case, the list of commits was not quoted in variable assignment.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
7 years agoconfig: enable nfp driver on Linux
Alejandro Lucero [Fri, 13 Jan 2017 11:50:02 +0000 (11:50 +0000)]
config: enable nfp driver on Linux

Because using a NFP PMD requires specific BSP installed, the PMD
support was not the default option before. This was just for making
people aware of such dependency, since there is no need for such a
BSP for just compiling DPDK with NFP PMD support.

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
7 years agonet/mlx5: support extended statistics
Shahaf Shuler [Tue, 17 Jan 2017 14:37:08 +0000 (16:37 +0200)]
net/mlx5: support extended statistics

Implement extended statistics callbacks.

Suggested-by: Hanoch Haim <hhaim@cisco.com>
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Signed-off-by: Elad Persiko <eladpe@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agodoc: update release notes for i40e base driver
Jingjing Wu [Tue, 17 Jan 2017 16:49:46 +0000 (00:49 +0800)]
doc: update release notes for i40e base driver

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e: support Linux VF to configure IRQ link list
Chen Jing D(Mark) [Fri, 13 Jan 2017 03:13:21 +0000 (11:13 +0800)]
net/i40e: support Linux VF to configure IRQ link list

i40e PF host only support to work with DPDK VF driver, Linux
VF driver is not supported. This change will enhance in
configuring IRQ link list.

This Change will identify VF client by number of vector
requested. DPDK VF will ask only single one while Linux VF
will request at least 2. It will have different configuration
for different clients. DPDK VF will be configured to link all
queue together, while Linux VF will be configured per request.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
7 years agonet/i40e: parse more VF parameter and configure
Chen Jing D(Mark) [Fri, 13 Jan 2017 03:13:20 +0000 (11:13 +0800)]
net/i40e: parse more VF parameter and configure

When VF requested to configure TX queue, a few parameters are
missed to be configured in PF host. This change have more
fields parsed and configured for TX context.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
7 years agonet/i40e: return correct VSI id
Chen Jing D(Mark) [Fri, 13 Jan 2017 03:13:19 +0000 (11:13 +0800)]
net/i40e: return correct VSI id

PF host didn't return correct VSI id to VF.
This change fix it.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
7 years agonet/i40e: change version number to support Linux VF
Chen Jing D(Mark) [Fri, 13 Jan 2017 03:13:18 +0000 (11:13 +0800)]
net/i40e: change version number to support Linux VF

i40e PF host only support to work with DPDK VF driver, Linux
VF driver is not supported. This change will enhance in version
number returned.

Current version info returned won't be able to be recognized
by Linux VF driver, change to values that both DPDK VF and Linux
driver can recognize.

The expense is original DPDK host specific feature like
CFG_VLAN_PVID and CONFIG_VSI_QUEUES_EXT will not available.

DPDK VF also can't identify host driver by version number returned.
It always assume talking with Linux PF.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
7 years agodoc: update for VFD experimental API
Wenzhuo Lu [Tue, 17 Jan 2017 08:45:28 +0000 (16:45 +0800)]
doc: update for VFD experimental API

Update the doc and release note.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
7 years agonet/i40e: set/clear VF stats from PF
Qi Zhang [Tue, 17 Jan 2017 08:45:27 +0000 (16:45 +0800)]
net/i40e: set/clear VF stats from PF

This patch add support to get/clear VF statistics
from PF side.
Two APIs are added:
rte_pmd_i40e_get_vf_stats.
rte_pmd_i40e_reset_vf_stats.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
7 years agonet/i40e: enhance sanity check of MAC
Chen Jing D(Mark) [Tue, 17 Jan 2017 08:45:26 +0000 (16:45 +0800)]
net/i40e: enhance sanity check of MAC

When VF sends request to add a new MAC address, PF host
will check if it's a non-zero or unicast address, or it
will return with error. In fact, VF still can set multicast
address. This change remove to check if it's a unicast
address.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
7 years agoapp/testpmd: handle i40e in VF VLAN filter command
Bernard Iremonger [Tue, 17 Jan 2017 08:45:25 +0000 (16:45 +0800)]
app/testpmd: handle i40e in VF VLAN filter command

modify set_vf_rx_vlan function to handle the i40e PMD.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
7 years agoapp/testpmd: add command for VF VLAN tag on i40e
Bernard Iremonger [Tue, 17 Jan 2017 08:45:24 +0000 (16:45 +0800)]
app/testpmd: add command for VF VLAN tag on i40e

command is: set vf vlan tag port_id vf_id on|off

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
7 years agoapp/testpmd: add command for VF broadcast mode on i40e
Bernard Iremonger [Tue, 17 Jan 2017 08:45:23 +0000 (16:45 +0800)]
app/testpmd: add command for VF broadcast mode on i40e

Add command to call rte_pmd_i40e_set_vf_broadcast.
Add set vf broadcast in testpmd_funcs.rst file.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
7 years agoapp/testpmd: use multicast promiscuous mode on i40e
Wenzhuo Lu [Tue, 17 Jan 2017 08:45:22 +0000 (16:45 +0800)]
app/testpmd: use multicast promiscuous mode on i40e

Add testpmd CLI to set VF multicast promiscuous mode on i40e.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
7 years agoapp/testpmd: use unicast promiscuous mode on i40e
Wenzhuo Lu [Tue, 17 Jan 2017 08:45:21 +0000 (16:45 +0800)]
app/testpmd: use unicast promiscuous mode on i40e

Add testpmd CLI to set VF unicast promiscuous mode on i40e.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
7 years agoapp/testpmd: use VFD APIs on i40e
Wenzhuo Lu [Tue, 17 Jan 2017 08:45:20 +0000 (16:45 +0800)]
app/testpmd: use VFD APIs on i40e

The new VF Daemon (VFD) APIs is implemented on i40e. Change
testpmd code to use them, including VF MAC anti-spoofing,
VF VLAN anti-spoofing, TX loopback, VF VLAN strip, VF VLAN
insert.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
7 years agonet/i40e: set VF VLAN filter from PF
Bernard Iremonger [Tue, 17 Jan 2017 08:45:19 +0000 (16:45 +0800)]
net/i40e: set VF VLAN filter from PF

add rte_pmd_i40e_set_vf_vlan_filter API.
User can call the API on PF to enable/disable
a set of VF's VLAN filters.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
7 years agonet/i40e: set VF VLAN tag from PF
Bernard Iremonger [Tue, 17 Jan 2017 08:45:18 +0000 (16:45 +0800)]
net/i40e: set VF VLAN tag from PF

Add rte_pmd_i40e_set_vf_vlan_tag API.
User can call the API on PF to enable/disable a specific
VF's VLAN tag.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
7 years agonet/i40e: set VF broadcast mode from PF
Bernard Iremonger [Tue, 17 Jan 2017 08:45:17 +0000 (16:45 +0800)]
net/i40e: set VF broadcast mode from PF

Support enabling/disabling VF broadcast mode from PF.
User can call the API on PF to enable/disable a specific
VF's broadcast mode.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
7 years agonet/i40e: set VF VLAN insertion from PF
Bernard Iremonger [Tue, 17 Jan 2017 08:45:16 +0000 (16:45 +0800)]
net/i40e: set VF VLAN insertion from PF

Support inserting VF VLAN id from PF.
User can call the API on PF to insert a VLAN id to a
specific VF.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
7 years agonet/i40e: set VF VLAN strip from PF
Chen Jing D(Mark) [Tue, 17 Jan 2017 08:45:15 +0000 (16:45 +0800)]
net/i40e: set VF VLAN strip from PF

Add a function to configure vlan strip enable/disable for specific
SRIOV VF device.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
7 years agonet/i40e: fix VF MAC address assignment
Ferruh Yigit [Tue, 17 Jan 2017 08:45:14 +0000 (16:45 +0800)]
net/i40e: fix VF MAC address assignment

If PF sets vf->mac_addr, in VF initialization hw->mac.addr will be set
to that same value. It is possible to check if PF set a MAC address or
not through the hw->mac.addr variable.

hw->mac.addr set by i40e_vf_parse_hw_config(), call stack is:

In PF side
i40e_pf_host_process_cmd_get_vf_resources()
    eth_addr_copy(vf->mac_addr, vf_res->vsi_res[0].default_mac_address)

In VF sise
i40evf_init_vf()
    i40evf_get_vf_resources()
            i40e_vf_parse_hw_config()
                    memcpy(hw->mac.addr, vsi_res->default_mac_addr)

Updated code is after i40evf_get_vf_resources() and can benefit from
hw->mac.addr variable.

Fixes: 89e6b86384bb ("i40evf: rework MAC address validation")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
7 years agonet/i40e: set VF MAC from VF
Ferruh Yigit [Tue, 17 Jan 2017 08:45:13 +0000 (16:45 +0800)]
net/i40e: set VF MAC from VF

Support changing VF default MAC address.
This function is not supported if PF set the MAC
address for the PF.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
7 years agonet/i40e: set VF MAC from PF
Ferruh Yigit [Tue, 17 Jan 2017 08:45:12 +0000 (16:45 +0800)]
net/i40e: set VF MAC from PF

Support setting VF MAC address from PF.
User can call the API on PF to set a specific
VF's MAC address.

PF should set MAC address before VF initialized,
if PF sets the MAC address after VF initialized,
new MAC address won't be effective until VF
reinitialized.

This will remove all existing MAC filters.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
7 years agonet/i40e: fix VF reset flow
Qi Zhang [Tue, 17 Jan 2017 08:45:11 +0000 (16:45 +0800)]
net/i40e: fix VF reset flow

Add missing step during VF reset: PF should
set I40E_VFGEN_RSTAT to ACTIVE at end of the
VF reset operation or VF driver may not able
to detect that reset is already completed.
This patch also remove the unnecessary enum
for vfr state.

Fixes: 4861cde46116 ("i40e: new poll mode driver")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
7 years agonet/i40e: enable VF MTU change
Qi Zhang [Tue, 17 Jan 2017 08:45:10 +0000 (16:45 +0800)]
net/i40e: enable VF MTU change

This patch implement mtu_set ops for i40e VF.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
7 years agonet/i40e: set VF multicast promiscuous mode from PF
Wenzhuo Lu [Tue, 17 Jan 2017 08:45:09 +0000 (16:45 +0800)]
net/i40e: set VF multicast promiscuous mode from PF

Support enabling/disabling VF multicast promiscuous mode from
PF.
User can call the API on PF to enable/disable a specific
VF's multicast promiscuous mode.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
7 years agonet/i40e: set VF unicast promiscuous mode from PF
Wenzhuo Lu [Tue, 17 Jan 2017 08:45:08 +0000 (16:45 +0800)]
net/i40e: set VF unicast promiscuous mode from PF

Support enabling/disabling VF unicast promiscuous mode from
PF.
User can call the API on PF to enable/disable a specific
VF's unicast promiscuous mode.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
7 years agonet/i40e: set Tx loopback from PF
Wenzhuo Lu [Tue, 17 Jan 2017 08:45:07 +0000 (16:45 +0800)]
net/i40e: set Tx loopback from PF

Support enabling/disabling TX loopback from PF.
User can call the API on PF to enable/disable TX loopback
for all the PF and VFs.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
7 years agonet/i40e: set VF VLAN anti-spoofing from PF
Wenzhuo Lu [Tue, 17 Jan 2017 08:45:06 +0000 (16:45 +0800)]
net/i40e: set VF VLAN anti-spoofing from PF

Support enabling/disabling VF VLAN anti-spoofing from
PF.
User can call the API on PF to enable/disable a specific
VF's VLAN anti-spoofing.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
7 years agonet/i40e: set VF MAC anti-spoofing from PF
Wenzhuo Lu [Tue, 17 Jan 2017 08:45:05 +0000 (16:45 +0800)]
net/i40e: set VF MAC anti-spoofing from PF

Support enabling/disabling VF MAC anti-spoofing from
PF.
User can call the API on PF to enable/disable a specific
VF's MAC anti-spoofing.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
7 years agonet/i40e: add user callback for VF to PF message
Wenzhuo Lu [Tue, 17 Jan 2017 08:45:04 +0000 (16:45 +0800)]
net/i40e: add user callback for VF to PF message

The callback asks the user application if it is allowed to
perform the mailbox messages.

If the return value from user is RTE_PMD_I40E_MB_EVENT_PROCEED
then continue. If ACK or NACK, do nothing and send
not_supported to VF.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
7 years agonet/i40e: support link status notification
Wenzhuo Lu [Tue, 17 Jan 2017 08:45:03 +0000 (16:45 +0800)]
net/i40e: support link status notification

Add an API to expose the ability, that PF can notify VF
when link status changes, to APP.
So if PF APP doesn't want to enable interruption but check
link status by itself, PF APP can let VF know link status
changed.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
7 years agonet/mlx: fix IPv4 and IPv6 packet type
Matthieu Ternisien d'Ouville [Wed, 11 Jan 2017 16:44:33 +0000 (17:44 +0100)]
net/mlx: fix IPv4 and IPv6 packet type

Mellanox PMDs do not differentiate IP header with or without options, so
the advertised packet type for an IPv4 should not be RTE_PTYPE_L3_IPV4,
which explicitly means "does not contain any header option".

Change the driver to set
RTE_PTYPE(_INNER)_L3_IPV4_EXT_UNKNOWN or
RTE_PTYPE(_INNER)_L3_IPV6_EXT_UNKNOWN flags for all IPv4/IPv6 packets
received.

Fixes: 429df3803a16 ("mlx4: replace some offload flags with packet type")
Fixes: 67fa62bc672d ("mlx5: support checksum offload")

Signed-off-by: Samuel Gauthier <samuel.gauthier@6wind.com>
Signed-off-by: Matthieu Ternisien d'Ouville <matthieu.tdo@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/mlx: remove link update lock
Matthieu Ternisien d'Ouville [Wed, 11 Jan 2017 16:44:01 +0000 (17:44 +0100)]
net/mlx: remove link update lock

Retrieving link status information through the link update callback should
be quick and non-blocking.

Mellanox PMDs retrieve this information through ioctl() calls on the
related kernel netdevice. This appears to take a long time to
complete and may cause significant slowdowns in applications.

While these system calls cannot be accelerated, removing the lock on the
private structure allows applications to perform other control operations
from separate threads in the meantime. This function remains safe without
locking as it does not write the private structure, it is only used to
retrieve the name of the netdevice.

Signed-off-by: Matthieu Ternisien d'Ouville <matthieu.tdo@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/af_packet: support 802.1Q VLAN
Chas Williams [Thu, 5 Jan 2017 13:53:44 +0000 (08:53 -0500)]
net/af_packet: support 802.1Q VLAN

AF_PACKET has some flags to check on the receive side for 802.1Q
information.  If present, we copy into the mbuf.  For transmit, we
insert any 802.1Q information into the packet before copying to the ring.

Signed-off-by: Chas Williams <ciwillia@brocade.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/af_packet: support promiscuous
Chas Williams [Thu, 5 Jan 2017 13:53:43 +0000 (08:53 -0500)]
net/af_packet: support promiscuous

Add promiscuous support to the AF_PACKET PMD.  The underlying Linux
device's IF_PROMISC flag is toggled to enable or disable.

Signed-off-by: Chas Williams <ciwillia@brocade.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/af_packet: support MTU change
Chas Williams [Thu, 5 Jan 2017 13:53:42 +0000 (08:53 -0500)]
net/af_packet: support MTU change

The underlying Linux device's MTU is changed subject to the frame size
limitations during device creation.

Signed-off-by: Chas Williams <ciwillia@brocade.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/af_packet: add interface name to internals
Chas Williams [Thu, 5 Jan 2017 13:53:41 +0000 (08:53 -0500)]
net/af_packet: add interface name to internals

This will be used by later changes to determine the underlying Linux
interface.

Signed-off-by: Chas Williams <ciwillia@brocade.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/bnxt: make ethdev functions struct const
Ferruh Yigit [Thu, 12 Jan 2017 22:19:37 +0000 (22:19 +0000)]
net/bnxt: make ethdev functions struct const

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/ena: make ethdev functions struct const
Ferruh Yigit [Thu, 12 Jan 2017 22:18:55 +0000 (22:18 +0000)]
net/ena: make ethdev functions struct const

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/qede: fix function declaration
Emmanuel Roullit [Sun, 15 Jan 2017 19:51:24 +0000 (20:51 +0100)]
net/qede: fix function declaration

clang reports this error message:
error: this function declaration is not a prototype
[-Werror,-Wstrict-prototypes]

Fixes: 5cdd769a26ec ("qede: add L2 support")

Signed-off-by: Emmanuel Roullit <emmanuel.roullit@gmail.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/cxgbe: fix parenthesis on bitwise operation
Emmanuel Roullit [Sun, 15 Jan 2017 19:50:37 +0000 (20:50 +0100)]
net/cxgbe: fix parenthesis on bitwise operation

clang reports the following error:
error: logical not is only applied to the left hand side of this bitwise
operator. [-Werror,-Wlogical-not-parentheses]

Fixes: 92c8a63223e5 ("cxgbe: add device configuration and Rx support")

Signed-off-by: Emmanuel Roullit <emmanuel.roullit@gmail.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/ixgbe: flush all the filter list
Wei Zhao [Fri, 13 Jan 2017 08:13:12 +0000 (16:13 +0800)]
net/ixgbe: flush all the filter list

This patch adds a function to flush all the filter list
filter on a port.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe: destroy consistent filter
Wei Zhao [Fri, 13 Jan 2017 08:13:11 +0000 (16:13 +0800)]
net/ixgbe: destroy consistent filter

This patch adds a function to destroy the flow filter.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe: create consistent filter
Wei Zhao [Fri, 13 Jan 2017 08:13:10 +0000 (16:13 +0800)]
net/ixgbe: create consistent filter

This patch adds a function to create the flow directory filter.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe: parse flow director filter
Wei Zhao [Fri, 13 Jan 2017 08:13:09 +0000 (16:13 +0800)]
net/ixgbe: parse flow director filter

check if the rule is a flow director rule, and get the flow director info.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe: parse L2 tunnel filter
Wei Zhao [Fri, 13 Jan 2017 08:13:08 +0000 (16:13 +0800)]
net/ixgbe: parse L2 tunnel filter

check if the rule is a L2 tunnel rule, and get the L2 tunnel info.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe: parse TCP SYN filter
Wei Zhao [Fri, 13 Jan 2017 08:13:07 +0000 (16:13 +0800)]
net/ixgbe: parse TCP SYN filter

check if the rule is a TCP SYN rule, and get the SYN info.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>