Commit Graph

5710 Commits

Author SHA1 Message Date
Jay Zhou
82adb12a1f crypto/virtio: support burst enqueue/dequeue
This patch implements the functions of virtio_crypto_pkt_tx_burst()
and virtio_crypto_pkt_rx_burst(). The encryption and decryption requests
are placed in the data queue and are ultimately handled by
the backend crypto accelerators.

Signed-off-by: Jay Zhou <jianjay.zhou@huawei.com>
Reviewed-by: Fan Zhang <roy.fan.zhang@intel.com>
2018-04-23 18:20:10 +01:00
Jay Zhou
b7fa78c7d3 crypto/virtio: support session related ops
This patch implements session related operations, which includes creating
and destroying the session. For now, it only supports the session-oriented
API implementation. The control queue used to create or destroy sessions
for symmetric algorithms.

Signed-off-by: Jay Zhou <jianjay.zhou@huawei.com>
Reviewed-by: Fan Zhang <roy.fan.zhang@intel.com>
2018-04-23 18:20:10 +01:00
Jay Zhou
6f0175ff53 crypto/virtio: support basic PMD ops
This patch implements the basic operations of virtio crypto PMD, which
includes start, stop, close, information getting, queue setup and
release of the device.
The virtio crypto device has two types of queues, data queue and
control queue. It has one data queue at least and has one and only one
control queue. For example, if a virtio crypto device has N queues,
then [0, N-2] is the data queue index, N-1 is the control
queue index.

Signed-off-by: Jay Zhou <jianjay.zhou@huawei.com>
Reviewed-by: Fan Zhang <roy.fan.zhang@intel.com>
2018-04-23 18:20:10 +01:00
Jay Zhou
25500d4b80 crypto/virtio: support device init
This patch implements the initialization of the virtio crypto device.
The virtio crypto device conforms to virtio-1.0, so this patch only
supports modern mode operation.
The cryptodev is created at the virtio crypto pci device probing stage.
The function of virtio_crypto_pkt_tx_burst() is used to burst transfer
packets and virtio_crypto_pkt_rx_burst() is used to burst receive packets.

Signed-off-by: Jay Zhou <jianjay.zhou@huawei.com>
Reviewed-by: Fan Zhang <roy.fan.zhang@intel.com>
2018-04-23 18:20:10 +01:00
Jay Zhou
8769079ae0 crypto/virtio: add virtio crypto PMD
The virtio crypto device is a virtual cryptography device
as well as a kind of virtual hardware accelerator for
virtual machines. The linux kernel virtio-crypto driver
has been merged, and this patch introduces virtio crypto
PMD to achieve better performance.

Signed-off-by: Jay Zhou <jianjay.zhou@huawei.com>
Reviewed-by: Fan Zhang <roy.fan.zhang@intel.com>
2018-04-23 18:20:10 +01:00
Fiona Trahe
9a063cf41c crypto/qat: use SPDX license
Use SPDK license for dual-licensed files
and update license date in all files

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
2018-04-23 18:20:09 +01:00
Sunil Kumar Kori
c3b894155f crypto/dpaa2_sec: improve error handling
Fixed as reported by NXP's internal coverity.
Also part of dpdk coverity.

Coverity issue: 268331
Coverity issue: 268333

Fixes: 8d1f3a5d75 ("crypto/dpaa2_sec: support crypto operation")
Cc: stable@dpdk.org

Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-04-23 18:20:09 +01:00
Sunil Kumar Kori
22788c2c6a crypto/dpaa_sec: improve the error checking
Reported by NXP's internal coverity

Fixes: c3e85bdcc6 ("crypto/dpaa_sec: add crypto driver for NXP DPAA platform")
Cc: stable@dpdk.org

Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-04-23 18:20:09 +01:00
Hemant Agrawal
228e20866a crypto/dpaa2_sec: fix OP storage for physical IOVA mode
op storage in fle is just for reference for post dq.
So, don't convert it to iova mode.

Fixes: 37f96eb01b ("crypto/dpaa2_sec: support scatter gather")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-04-23 18:20:09 +01:00
Akhil Goyal
7e3e2954e0 crypto/dpaa_sec: move mempool allocation to config
Currently, the context mempools are allocated during device probe. Thus,
even if the DPAA SEC devices are not used, any application would still
allocate the memory required for working with the contexts.

This patch moves the allocation to configuration time so that when the
CAAM devices are configured, this allocation would be done.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Signed-off-by: Ashish Jain <ashish.jain@nxp.com>
Tested-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2018-04-23 18:20:09 +01:00
Shreyansh Jain
debef417a0 crypto/dpaa_sec: fix null check in uninit
Fixes: c3e85bdcc6 ("crypto/dpaa_sec: add crypto driver for NXP DPAA platform")
Cc: akhil.goyal@nxp.com
Cc: stable@dpdk.org

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2018-04-23 18:20:09 +01:00
Ashish Jain
5b0f1bd36a crypto/dpaa_sec: add portal presence check
Adding a check to do portal configuration if not already
configured before packet enqueue. This check is only done
during dpaa_sec_attach_sess_q for initial packets,
so this change wont affect the data path and hence performance.

Fixes: e79416d10f ("crypto/dpaa_sec: support multiple sessions per queue pair")
Cc: stable@dpdk.org

Signed-off-by: Ashish Jain <ashish.jain@nxp.com>
2018-04-23 18:20:09 +01:00
Ashish Jain
69cb2eebd1 crypto/dpaa_sec: add macro for device name
Fixes: c3e85bdcc6 ("crypto/dpaa_sec: add crypto driver for NXP DPAA platform")
Cc: stable@dpdk.org

Signed-off-by: Ashish Jain <ashish.jain@nxp.com>
2018-04-23 18:20:09 +01:00
Ravi Kumar
6c561b03b5 crypto/ccp: support CPU based MD5 and SHA2 family
Auth operations can be performed on CPU without offloading
to CCP if CONFIG_RTE_LIBRTE_PMD_CCP_CPU_AUTH is enabled in
DPDK configuration. CCP PMD skip offloading auth operations
to hardware engines and perform them using openssl APIs.

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
2018-04-23 18:20:09 +01:00
Ravi Kumar
1df800f895 crypto/ccp: support SHA3 family
Add SHA3 family authentication algorithm support for
CCP crypto PMD. This patch defines new macros for SHA3
algorithms in the DPDK crypto framework.

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
2018-04-23 18:20:09 +01:00
Ravi Kumar
ca40ea2471 crypto/ccp: support SHA2 family
Add SHA2 family authentication algorithm support for
CCP crypto PMD.

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
2018-04-23 18:20:09 +01:00
Ravi Kumar
0c6a81eff1 crypto/ccp: support SHA1
Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
2018-04-23 18:20:09 +01:00
Ravi Kumar
afc5345907 crypto/ccp: support AES-GCM
Support AES-GCM-128/192/256 AEAD algorithm for
CCP crypto PMD.

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
2018-04-23 18:20:09 +01:00
Ravi Kumar
687ae11f56 crypto/ccp: support AES-CMAC
Support AES-CMAC-128/192/256 authentication algorithm for
CCP crypto PMD.

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
2018-04-23 18:20:09 +01:00
Ravi Kumar
c05adb0603 crypto/ccp: support 3DES
Support 3DES-CBC cipher algorithm for CCP crypto PMD.

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
2018-04-23 18:20:09 +01:00
Ravi Kumar
d9a9e56192 crypto/ccp: support AES
Added CCP cipher support for following algorithms:
AES-CBC-128/192/256
AES-CTR-128/192/256
AES-ECB-128/192/256

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
2018-04-23 18:20:09 +01:00
Ravi Kumar
585d40375a crypto/ccp: support hwrng
CCP engines support true hardware random generation feature.
This patch implements api to read random number from CCP to be
used within PMD.

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
2018-04-23 18:20:08 +01:00
Ravi Kumar
ba9a6f14c6 crypto/ccp: support stats related ops
Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
2018-04-23 18:20:08 +01:00
Ravi Kumar
ffdace428b crypto/ccp: support sessionless ops
Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
2018-04-23 18:20:08 +01:00
Ravi Kumar
70f0f8a8d7 crypto/ccp: support burst enqueue/dequeue
Added support for burst oriented data path.

CCP PMD selects appropriate CCP engine available
on the platform and schedule the batch of crypto ops to a
selected hardware queue of the respective crypto engine.

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
2018-04-23 18:20:08 +01:00
Ravi Kumar
62feda38aa crypto/ccp: support queue pair related ops
Added crypto queue pair specific crypto ops callback functions
to setup and manage a CCP crypto queue pair object. CCP PMD
exposes only a single crypto queue pair object and handles the
actual hardware queues underneath.

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
2018-04-23 18:20:08 +01:00
Ravi Kumar
29610e41c1 crypto/ccp: support session related ops
Added crypto session specific basic crypto ops callback functions.
Added different crypto engine types and definitions.

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
2018-04-23 18:20:08 +01:00
Ravi Kumar
3c20cf98e2 crypto/ccp: support basic PMD ops
Added device specific basic crypto ops callback functions.

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
2018-04-23 18:20:08 +01:00
Ravi Kumar
ef4b04f87f crypto/ccp: support device init
CCP PMD is a virtual crypto PMD which schedules a number of available
actual CCP hardware engines underneath. The PMD
manages all devices by its own. The PMD supports CCP_5a and
CCP_5b versions of crypto engines and this patch adds support
to initialize and use such devices.

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
2018-04-23 18:19:48 +01:00
Ravi Kumar
0054d84f6e crypto/ccp: add AMD ccp skeleton PMD
Added DPDK crypto PMD for AMD Cryptographic Co-Processors.
This patch adds a basic skeleton for PMD.

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
2018-04-23 18:19:43 +01:00
Marko Kovacevic
6491dbbece crypto/aesni_mb: support AES CMAC
Added support for AES CMAC hash algorithm with 128-bit key,
which has been added in the v0.49 of the IPSec Multi-buffer lib.

Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-04-23 17:01:48 +01:00
Marko Kovacevic
dad3736481 crypto/aesni_gcm: support IPsec Multi-buffer lib v0.49
Adds support for the v0.49 of the IPsec Multi-buffer lib,
which now gets compiled and installed as a shared object.
Therefore, there is no need to pass the AESNI_MULTI_BUFFER_LIB_PATH

Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-04-23 16:57:55 +01:00
Marko Kovacevic
2a1e2da1bb crypto/aesni_mb: support IPsec Multi-buffer lib v0.49
Adds support for the v0.49 of the IPsec Multi-buffer lib,
which now gets compiled and installed as a shared object.
Therefore, there is no need to pass the AESNI_MULTI_BUFFER_LIB_PATH

Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-04-23 16:57:55 +01:00
Lee Roberts
5d3ac0d775 crypto/qat: assign device to correct NUMA node
rte_cryptodev_pmd_init_params should use NUMA node of the QAT device
for its socket_id rather than the socket_id of the initializing process.

Signed-off-by: Lee Roberts <lee.roberts@hpe.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2018-04-23 16:57:55 +01:00
Tomasz Duszynski
fd54d6514e crypto/mrvl: add missing library dependencies
While trying to do a shared build one will get linkage error
since a couple of library dependencies are missing from a makefile.

At some point there was a batch update of all PMDs but mrvl crypto was
missed back then.

Necessary makefile changes were introduced in
commit cbc12b0a96 ("mk: do not generate LDLIBS from directory dependencies")

Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
2018-04-23 16:57:55 +01:00
Fiona Trahe
f737f5cee6 cryptodev: change argument of driver registration
Pass an rte_driver to the RTE_PMD_REGISTER_CRYPTO_DRIVER macro
rather than an unspecified container which holds an rte_driver.
All the macro actually needs is the rte_driver, not the
container holding it.
This paves the way for a later patch in which a driver
will be registered which does not naturally derive from a
container and so avoids having to create an arbitrary container
to pass in the rte_driver.

This patch changes the cryptodev lib macro and all the
PMDs which use it.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Reviewed-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-04-23 16:57:55 +01:00
Tomasz Duszynski
b7b19a19af crypto/mrvl: convert license headers to SPDX tags
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
2018-04-23 16:57:55 +01:00
Tomasz Duszynski
e1d26e429a crypto/mrvl: add to meson build
Add MRVL CRYPTO PMD to meson build system.

Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2018-04-19 15:35:03 +02:00
Tomasz Duszynski
6f54e56d65 net/mvpp2: add to meson build
Add support for building MRVL MVPP2 PMD with meson.  To avoid cluttering
the build environment and to keep all relevant settings local to a cross
build we get MUSDK library installation path from a meson option.

Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2018-04-19 14:10:44 +02:00
Tomasz Duszynski
495cf86ff5 net/mvpp2: rename version map file to standard
Rename the version file to follow standard naming convention.

Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2018-04-17 16:40:09 +02:00
Bruce Richardson
b67dde5b19 drivers/dpaa: reduce meson dependency lists
Meson build currently tracks the dependencies between libraries, which
can often make things easier, but has the side-effect of slowing down
the initial meson run if too many duplicated dependencies are provided.
Therefore, we remove dependencies from the dpaa items where other
dependencies already depend on those. This provides a noticable speed-up
in meson configuration runs when lots of sample apps are included in the
build.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-04-17 16:09:43 +02:00
Thomas Monjalon
e70e26861e net/mvpp2: fix build
The iterator RTE_ETH_FOREACH_DEV (added in below commit)
requires to enable experimental APIs.

Fixing also the config option rename in the build test.

Fixes: 8728ccf376 ("fix ethdev ports enumeration")
Fixes: fe93968722 ("net/mrvl: rename PMD as mvpp2")

Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-04-20 01:16:46 +02:00
Hemant Agrawal
3ef648aa48 bus/fslmc: fix build with clang 3.4
error: redefinition of typedef 'dma_addr_t' is a C11 feature
[-Werror,-Wtypedef-redefinition]

Fixes: 4bc5ab88db ("net/dpaa2: fix Tx only mode")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Tested-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-04-19 18:26:47 +02:00
Thomas Monjalon
8728ccf376 fix ethdev ports enumeration
Some DPDK applications wrongly assume these requirements:
    - no hotplug, i.e. ports are never detached
    - all allocated ports are available to the application

Such application iterates over ports by its own mean.
The most common pattern is to request the port count and
assume ports with index in the range [0..count[ can be used.

There are three consequences when using such wrong design:
    - new ports having an index higher than the port count won't be seen
    - old ports being detached (RTE_ETH_DEV_UNUSED) can be seen as ghosts
    - failsafe sub-devices (RTE_ETH_DEV_DEFERRED) will be seen by the application

Such mistake will be less common with growing hotplug awareness.
All applications and examples inside this repository - except testpmd -
must be fixed to use the iterator RTE_ETH_FOREACH_DEV.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-04-18 00:25:27 +02:00
Ferruh Yigit
e8a5e886d3 net/sfc: fix meson build warning with gcc
icc flag is causing build error with gcc, build error:
cc1: warning: unrecognized gcc debugging option: i
cc1: warning: unrecognized gcc debugging option: g
cc1: warning: unrecognized gcc debugging option: -
cc1: warning: unrecognized gcc debugging option: d
cc1: warning: unrecognized gcc debugging option: i
cc1: warning: unrecognized gcc debugging option: s
cc1: warning: unrecognized gcc debugging option: b
cc1: warning: unrecognized gcc debugging option: l
cc1: warning: unrecognized gcc debugging option: e
cc1: warning: unrecognized gcc debugging option:
cc1: warning: unrecognized gcc debugging option: 3
cc1: warning: unrecognized gcc debugging option: 6
cc1: warning: unrecognized gcc debugging option: 5
cc1: warning: unrecognized gcc debugging option: 6
cc1: warning: unrecognized command line option
‘-Wno-address-of-packed-member’

Removing icc flag completely since it is not supported right now.

Fixes: f16d0b36f8 ("drivers/net: fix icc deprecated parameter warning")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-04-16 19:33:46 +02:00
Bruce Richardson
5bb7e9dbca net/ixgbe: fix build when vector driver disabled
The new functions for Rx and Tx offloads should not be inside the
conditional block for the vector driver, otherwise compile errors occur
when vector driver is disabled. For example:

  ixgbe_ethdev.c:3636:36: error:
	implicit declaration of function ‘ixgbe_get_rx_queue_offloads’;

This shows up as an error when doing ARM builds using meson as the vector
driver is not (yet) enabled for those builds.

Fixes: 51215925a3 ("net/ixgbe: convert to new Tx offloads API")
Fixes: ec3b1124d1 ("net/ixgbe: convert to new Rx offloads API")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2018-04-16 18:57:03 +02:00
Gowrishankar Muthukrishnan
100915c0a5 event/dpaa: fix integer overflow of max ports
dev_info->max_event_ports is uint8_t. dpaa_event_dev_info_get assigns
DPAA_EVENT_MAX_EVENT_PORT (which is RTE_MAX_LCORE, upto 256 in ppc64le)
into this variable, which breaks compile in ppc64le.

drivers/event/dpaa/dpaa_eventdev.c: In function ‘dpaa_event_dev_info_get’:
   rte_config.h:23:23: error:
   large integer implicitly truncated to unsigned type [-Werror=overflow]
      #define RTE_MAX_LCORE 256

Fixes: 9caac5dd1e ("event/dpaa: introduce PMD")
Cc: stable@dpdk.org

Signed-off-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
Acked-by: Sunil Kumar Kori <sunil.kori@nxp.com>
2018-04-16 16:45:11 +02:00
Pavan Nikhilesh
3e249bc559 event/octeontx: add option to use fpavf as chunk pool
Add compile-time configurable option to force TIMvf to use Octeontx
FPAvf pool manager as its chunk pool.
When FPAvf is used as pool manager the TIMvf automatically frees the
chunks to FPAvf through gpool-id.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
2018-04-16 11:27:15 +02:00
Pavan Nikhilesh
4cec5aae58 event/octeontx: optimize timer adapter resolution parameters
When application sets `RTE_EVENT_TIMER_ADAPTER_F_ADJUST_RES` flag
while creating adapter underlying driver is free to optimize the
resolution for best possible configuration.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-04-16 11:27:15 +02:00
Pavan Nikhilesh
0896f7e080 event/octeontx: add burst mode for timer arm
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
2018-04-16 11:27:15 +02:00
Pavan Nikhilesh
7684fcf1f4 event/octeontx: add single producer timer arm variant
When application creates the timer adapter by passing
`RTE_EVENT_TIMER_ADAPTER_F_SP_PUT` flag, we can optimize the arm sequence
by removing the locking overhead.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
2018-04-16 11:27:15 +02:00
Pavan Nikhilesh
b6d814d846 event/octeontx: add multiproducer timer arm and cancel
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-04-16 11:27:15 +02:00
Pavan Nikhilesh
d1925c87d0 event/octeontx: add event timer stats get and reset
Add functions to get and reset event timer adapter stats.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
2018-04-16 11:27:15 +02:00
Pavan Nikhilesh
ea73fed2a6 event/octeontx: start and stop timer device
When application requests to start the timer adapter through
`rte_event_timer_adapter_start`, Octeontx TIMvf ring does the
following:
- Uses mbox to communicate TIMpf driver about,
  * SCLK frequency used to convert ns<->cycles.
  * program the ring control parameters and start the ring.
  * get the exact cycle at which the TIMvf ring has started which can be
  used to estimate the bucket position.

On `rte_event_timer_adapter_stop` i.e stop, Octeontx TIMvf ring does the
following:
- Use mbox to communicate TIMpf driver about,
  * reset the ring control parameters and stop the ring.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
2018-04-16 11:27:15 +02:00
Pavan Nikhilesh
f874c1eb15 event/octeontx: create and free timer adapter
When the application requests to create a timer device, Octeontx TIM
create does the following:
- Get the requested TIMvf ring based on adapter_id.
- Verify the config parameters supplied.
- Allocate memory required for
  * Buckets based on min and max timeout supplied.
  * Allocate the chunk pool based on the number of timers.
- Clear the interrupts.

On Free:
- Free the allocated bucket and chunk memory.
- Free private data used by TIMvf.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
2018-04-16 11:27:15 +02:00
Pavan Nikhilesh
fd5baf09cd event/octeontx: probe timvf PCIe devices
On Octeontx HW, each event timer device is enumerated as separate SRIOV VF
PCIe device.

In order to expose as a event timer device:
On PCIe probe, the driver stores the information associated with the
PCIe device and later when application requests for a event timer device
through `rte_event_timer_adapter_create` the driver infrastructure creates
the timer adapter with earlier probed PCIe VF devices.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-04-16 11:27:15 +02:00
Erik Gabriel Carrillo
47d05b2928 eventdev: add timer adapter common code
This commit adds the logic that is shared by all event timer adapter
drivers; the common code handles instance allocation and some
initialization.

Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
2018-04-16 11:04:46 +02:00
Jerin Jacob
8384f0e039 event/octeontx: support device stop flush callback
Add support for stop flush callback along with unit test.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Gage Eads <gage.eads@intel.com>
2018-04-16 10:10:23 +02:00
Gage Eads
d593a8177f eventdev: add device stop flush callback
When an event device is stopped, it drains all event queues and ports.
These events may contain pointers, so to prevent memory leaks eventdev now
supports a user-provided flush callback that is called during the queue
drain process. This callback is stored in process memory, so the callback
must be registered by any process that may call rte_event_dev_stop().

This commit also clarifies the behavior of rte_event_dev_stop().

This follows this mailing list discussion:
http://dpdk.org/ml/archives/dev/2018-January/087484.html

Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-04-16 10:10:12 +02:00
Liang Ma
b770f952de event/opdl: fix atomic queue race condition
If application link one atomic queue to multiple ports,
and each worker core update flow_id, there will have a
chance to hit race condition issue and lead to double processing
same event. This fix solve the problem and eliminate
the race condition issue.

Fixes: 4236ce9bf5 ("event/opdl: add OPDL ring infrastructure library")
Cc: stable@dpdk.org

Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Signed-off-by: Peter Mccarthy <peter.mccarthy@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-04-16 10:10:03 +02:00
Gage Eads
4deeb214ac event/sw: perform partial burst enqueues
Previously, the sw PMD would enqueue either all or no events, depending on
if enough inflight credits were available for the new events in the burst.
If a port is enqueueing a large burst (i.e. a multiple of the credit update
quanta), this can result in suboptimal performance, and requires an
understanding of the sw PMD implementation (in particular, its credit
scheme) to tune an application's burst size.

This affects software that enqueues large bursts of new events, such as the
ethernet event adapter which uses a 128-deep event buffer, when the input
packet rate is sufficiently high.

This change makes the sw PMD enqueue as many events as it has credits, if
there are any new events in the burst.

Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-04-16 10:09:53 +02:00
Vipin Varghese
e4dff5503a event/sw: simplify counter assignment
Counter variable 'out_pkts' had been set to 0, then updated. Current
code change elimates double assignment to direct assignment.

Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
2018-04-16 10:07:50 +02:00
Vipin Varghese
642bc2a33c event/sw: move stats code for better cache access
variables 'out_pkts_total' and 'out_pkts_total' will be in registers.
Hence shifting the code after the loop, helps the update from registers.

Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
2018-04-16 10:07:03 +02:00
Vipin Varghese
63ddc00239 event/sw: add unlikely branch predict
For most run cases 'sw->started' holds true. Adding a branch prediction
suggestion to compiler helps as this is first conditional check just
after entering the function.

Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
2018-04-16 10:06:55 +02:00
Jon DeVree
91f6191999 net/vmxnet3: fill imissed stat
This counter comes from a "hardware" register of the vmxnet3 device and
seems to behave like the MPC (Missed Packet Count) register of the Intel
NICs. So I think this data belongs in the imissed field rather than the
rx_nombuf field.

Signed-off-by: Jon DeVree <nuxi@vault24.org>
Acked-by: Yong Wang <yongwang@vmware.com>
2018-04-14 01:17:23 +02:00
Scott Branden
df16bcc9d2 net/bnxt: introduce Broadcom Stingray
Add support for Stingray PF devices ids:
BCM58802 = 0xd802
BCM58804 = 0xd804
BCM58808 = 0x16f0

Add Broadcom Stingray machine support based on armv8.

For product brief see:
https://www.broadcom.com/products/ethernet-connectivity/controllers/bcm58800

Signed-off-by: Scott Branden <scott.branden@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2018-04-14 00:59:41 +02:00
Ferruh Yigit
91cf42f6c4 drivers/net: remove redundant icc flag
ICC warning #188 already disabled globally via commit [1], no
need individual arguments in PMDs.

[1]
Fixes: 1b80b9c854 ("mk: disable icc warning 188")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-04-14 00:43:30 +02:00
Ferruh Yigit
f16d0b36f8 drivers/net: fix icc deprecated parameter warning
With icc (ICC) 18.0.1 20171018, -wd usage generates following warning:

icc: command line remark #10010: option '-wd3656' is deprecated and will
be removed in a future release. See '-help deprecated'

"icc -help deprecated" output is:
-wd                      use -diag-disable

Based on above information "-wd" converted to "-diag-disable"

Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-04-14 00:43:30 +02:00
Tonghao Zhang
f87ce336a8 net/bonding: fix typo in log comment
Fixes: 68451eb669 ("net/bonding: call through EAL on create/free")
Cc: stable@dpdk.org

Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-04-14 00:43:30 +02:00
Tonghao Zhang
b9c0dea24b net/bonding: free mempool used in mode 6
When creating bond device with mode6, dpdk will create
mempool for arp packets. If free the bond device and
create it with same name, there will be an error. Because
the mempool is not freed when destroying bond device.

Fixes: 06fe78b98c ("bond: add mode 6")
Fixes: ea0c20ea95 ("apps: use helper to create mbuf pools")
Cc: stable@dpdk.org

Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-04-14 00:43:30 +02:00
Junjie Chen
3f8ff12821 vhost: support interrupt mode
In some cases we want vhost dequeue work in interrupt mode to
release cpus to others when no data to transmit. So we install
interrupt handler of vhost device and interrupt vectors for each
rx queue when creating new backend according to vhost interrupt
configuration. Thus, applications could register a epoll event fd
to associate rx queues with interrupt vectors.

Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
2018-04-14 00:43:30 +02:00
Matej Vido
896c87e8fe net/szedata2: add new kernel module dependency
New kernel module dependency is required to support NFB-200G2QL card.

Signed-off-by: Matej Vido <vido@cesnet.cz>
2018-04-14 00:43:30 +02:00
Matej Vido
d08c99baf0 net/szedata2: support new NIC
This patch adds support for new NIC NFB-200G2QL.

At the probing stage numa nodes for the DMA queues are identified
and the appropriate number of ports is allocated.
DMA queues residing on the same numa node are grouped in the same
port.

Signed-off-by: Matej Vido <vido@cesnet.cz>
2018-04-14 00:43:30 +02:00
Matej Vido
a5e1231f09 net/szedata2: do not affect Ethernet interfaces
NFB cards employ multiple Ethernet ports.
Until now, Ethernet port-related operations were performed on all of them
(since the whole card was represented as a single port).
With new NFB-200G2QL card, this is no longer viable.

Since there is no fixed mapping between the queues and Ethernet ports,
and since a single card can be represented as two ports in DPDK,
there is no way of telling which (if any) physical ports should be
associated with individual ports in DPDK.

This is also described in documentation in more detail.

Signed-off-by: Matej Vido <vido@cesnet.cz>
Signed-off-by: Jan Remes <remes@netcope.com>
2018-04-14 00:43:30 +02:00
Alejandro Lucero
0e7970c21a net/nfp: support hardware RSS v2
Chained metadata instead of prepend metadata was added in
firmware version 4. However, it could be old firmwares evolving
but not supporting chained metadata.

This patch adds support for an old firmware being updated and
getting a firmware version number higher than 4, but it still not
implementing chained metadata.

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2018-04-14 00:43:30 +02:00
Alejandro Lucero
d14c082f86 net/nfp: support LSO offload version 2
This new LSO offload version facilitates how firmware implements
this functionality and helps improving the performance.

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2018-04-14 00:43:30 +02:00
Sunil Kumar Kori
0ebce6129b net/dpaa2: support new ethdev offload APIs
Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
2018-04-14 00:43:30 +02:00
Sunil Kumar Kori
16e2c27f4f net/dpaa: support new ethdev offload APIs
Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
2018-04-14 00:43:30 +02:00
Andrew Rybchenko
0b19aec12a net/sfc: use default FEC mode
All FEC modes are supported and allowed, but none are explicitly
requested.

This effectively means that FEC mode is determined solely form cable
requirements and link partner capabilities / requirements.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-04-14 00:43:30 +02:00
Wei Zhao
9ef8ebe790 net/i40e: fix using error set function
There is a specific function to set error for flow configuration,
so change to use that function.

Fixes: ecad87d223 ("net/i40e: move RSS to flow API")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-04-14 00:43:30 +02:00
Wei Zhao
17d5c9234b net/i40e: add comment and clean code for flow RSS
This patch add comment for flow rss parse function in order
to explain some important info. This patch also delete some
useless code for queue index check for RSS queue region
configuration.

Fixes: ecad87d223 ("net/i40e: move RSS to flow API")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-04-14 00:43:30 +02:00
Junjie Chen
e6722dee53 net/vhost: fix invalid state
dev_start sets *dev_attached* after setup queues, this sets device to
invalid state since no frontend is attached. Also destroy_device set
*started* to zero which makes *allow_queuing* always zero until dev_start
get called again. Actually, we should not determine queues existence by
*dev_attached* but by queues pointers or other separated variable(s).

Fixes: 30a701a537 ("net/vhost: fix crash when creating vdev dynamically")
Cc: stable@dpdk.org

Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
Tested-by: Jens Freimann <jfreimann@redhat.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-04-14 00:43:30 +02:00
Jan Blunck
f63d356ee9 net/vhost: insert/strip VLAN header in software
This lets the vhost driver handle the VLAN header like the virtio driver
in software.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-04-14 00:43:30 +02:00
Olivier Matz
caccf8b318 ethdev: return diagnostic when setting MAC address
Change the prototype and the behavior of dev_ops->eth_mac_addr_set(): a
return code is added to notify the caller (librte_ether) if an error
occurred in the PMD.

The new default MAC address is now copied in dev->data->mac_addrs[0]
only if the operation is successful.

The patch also updates all the PMDs accordingly.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2018-04-14 00:43:30 +02:00
Shahaf Shuler
a85a606ca5 net/mlx5: fix link status initialization
Following commit 7ba5320baa ("net/mlx5: fix link status behavior")
The initial link status is no longer set as part of the port start.

When LSC interrupts are enabled, ethdev layer reads the link status
directly from the device data instead of using the PMD callback.
This may cause application to query the link as down while in fact it was
already up before the DPDK application start (and no interrupt to fix
it).

Fixes: 7ba5320baa ("net/mlx5: fix link status behavior")
Cc: stable@dpdk.org

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2018-04-14 00:43:30 +02:00
Ophir Munk
de1df14e6e net/mlx4: support CRC strip toggling
Previous to this commit mlx4 CRC stripping was executed by default and
there was no verbs API to disable it.

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2018-04-14 00:43:30 +02:00
Martin Weiser
c8e2540832 net/ixgbe: allow setting 2.5G and 5G speeds on X550
This patch adds support for explicitly selecting 2.5G and 5G speeds on
X550.

Signed-off-by: Martin Weiser <martin.weiser@allegro-packets.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2018-04-14 00:43:30 +02:00
Beilei Xing
0585f5c3d2 net/i40e: fix DDP profile DEL operation
Customized info will be updated when processing DDP package,
including PCYPE/PTYPE/protocol. Previously, the customized info
is updated without any check for package operation - ADD or DEL,
but only covers ADD operation. In this situation, even if a package
is being removed, new PCTYPE/PTYPE/protocol will still be created,
it will cause wrong parsing for SW. This patch cleans new
PCTYPE/PTYPE/protocol created when a package is being removed.

Fixes: e163c18a15 ("net/i40e: update ptype and pctype info")
Cc: stable@dpdk.org

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2018-04-14 00:43:30 +02:00
Zhiyong Yang
bd8f50a45d net/virtio-user: support server mode
In a container environment if the vhost-user backend restarts, there's
no way for it to reconnect to virtio-user. To address this, support for
server mode is added. In this mode the socket file is created by virtio-
user, which the backend then connects to. This means that if the backend
restarts, it can reconnect to virtio-user and continue communications.

With current implementation, LSC is enabled at virtio-user side to
support to accept the coming connection.

Server mode virtio-user only supports to work with vhost-user.

Release note is updated in this patch.

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
2018-04-14 00:43:30 +02:00
Remy Horton
0ba52a330f net/i40e: add Tx/Rx tuning parameters
The optimal values of several transmission & reception related
parameters, such as burst sizes, descriptor ring sizes, and number
of queues, varies between different network interface devices. This
patch allows individual PMDs to specify preferred parameter values.

Signed-off-by: Remy Horton <remy.horton@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-04-14 00:43:30 +02:00
Remy Horton
88bcfa9706 net/e1000: add Tx/Rx tuning parameters
The optimal values of several transmission & reception related
parameters, such as burst sizes, descriptor ring sizes, and number
of queues, varies between different network interface devices. This
patch allows individual PMDs to specify preferred parameter values.

Signed-off-by: Remy Horton <remy.horton@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-04-14 00:43:30 +02:00
Ferruh Yigit
cd8c7c7ce2 ethdev: replace bus specific struct with generic dev
Public struct rte_eth_dev_info has a "struct rte_pci_device" field in it
although it is common for all ethdev in all buses.

Replacing pci specific struct with generic device struct and updating
places that are using pci device in a way to get this information from
generic device.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2018-04-14 00:41:44 +02:00
Andrew Rybchenko
b16cf4b27f net/sfc: support loopback mode configuration
All loopback modes are listed in efx_loopback_type_t.
Available loopback modes are listed per link speed in
the enc_loopback_types member of the efx_nic_cfg_t.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
2018-04-14 00:41:44 +02:00
Andrew Rybchenko
06619ede18 net/sfc/base: fix comparison always true warning
Loopback type used as bit index has efx_loopback_type_t type
which is enum. clang complains that it is always true when it
is compared with qword (64 bit) bits number boundary.

Fixes: 9ee64bd404 ("net/sfc/base: import loopback control")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-04-14 00:41:44 +02:00
Harish Patil
bd768ccfb1 net/bnx2x: convert to new Rx offloads API
Ethdev RX offloads API has changed since:
commit ce17eddefc ("ethdev: introduce Rx queue offloads API")

This patch makes use of DEV_RX_OFFLOAD_JUMBO_FRAME offload flag
to advertise jumbo frame support.

Signed-off-by: Harish Patil <harish.patil@cavium.com>
2018-04-14 00:41:44 +02:00
Rasesh Mody
46fb16327b net/qede: update PMD version to 2.8.0.1
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-04-14 00:41:44 +02:00
Rasesh Mody
76d37490cd net/qede/base: support packet pacing
Add packet pacing support for PFs.
ecore client can request for enabling packet pacing at init time,
if requested then ecore is going to skip MCoS and SRIOV configurations.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-04-14 00:41:44 +02:00
Rasesh Mody
36f45bce25 net/qede/base: fix to support OVLAN mode
This fix allows driver to program NIC configuration to support OVLAN
mode in multi-function scenario

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-04-14 00:41:44 +02:00
Rasesh Mody
bdc40630a8 net/qede/base: add APIs for xcvr
Add API to query transceiver info and to retrieve link speed.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-04-14 00:41:44 +02:00
Rasesh Mody
803a4cf0e0 net/qede/base: add stats counter for link state
Add link_change_count counter to track number of link state transitions

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-04-14 00:41:44 +02:00
Rasesh Mody
98abf84ee0 net/qede/base: refine error handling
Adjust the verbosity of the log messages and add preventive checks for
errors.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-04-14 00:41:44 +02:00
Rasesh Mody
2d52085e4d net/qede/base: support MFW for driver load timeout
Add SPQ timeout base driver parameter support management FW timeout values
other than default and none. Have fallback mechanism for old MFWs.
Reduce the default timeout to 1 sec.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-04-14 00:41:44 +02:00
Rasesh Mody
d5050d4d3f net/qede/base: allow changing VF MAC address
This patch allows VF to change its own MAC address regardless of MAC set
by PF

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-04-14 00:41:44 +02:00
Rasesh Mody
fe7572b6b6 net/qede/base: add new chain API
Add new API ecore_chain_set_cons() and fix page index setting in
ecore_chain_set_prod(). The new API is for future use.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-04-14 00:41:44 +02:00
Rasesh Mody
1fc24374a7 net/qede/base: semantic changes
The changes included in this patch are for
 - formatting
 - comment rework/additions
 - relocate FW info, version related code
 - convert:
    __le16 to u16
    __le32 to u32 etc.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-04-14 00:41:44 +02:00
Rasesh Mody
c2817ba40a net/qede/base: upgrade FW to 8.33.12.0
This patch adds changes to support new firmware 8.33.12.0. The changes
consist of FW bug fixes and enhancements.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-04-14 00:41:44 +02:00
Rasesh Mody
1d86cc99be net/qede/base: add DMAE sanity check
Add DMA engine sanity check during the engine initialization and before
PF initialization

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-04-14 00:41:44 +02:00
Rasesh Mody
78e7fcef7c net/qede/base: protect DMAE transactions
Protect DMAE transactions with a spinlock instead of a mutex

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-04-14 00:41:44 +02:00
Rasesh Mody
03be03cce4 net/qede/base: use path ID for HW init
Use the path ID as the phase ID when running the engine phase of the
HW init

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-04-14 00:41:44 +02:00
Ajit Khaparde
9c1507d96a net/bnxt: switch to the new offload API
Update bnxt PMD to new ethdev offloads API.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2018-04-14 00:41:44 +02:00
Ajit Khaparde
d4cd95c645 net/bnxt: fix Rx drop setting
If Rx descriptors are not available, pkts are dropped by default.
Fix rx_drop_en setting in bnxt_dev_info_get_op to reflect it.

Fixes: 0a6d2a7200 ("net/bnxt: get device infos")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2018-04-14 00:41:44 +02:00
Nélio Laranjeiro
db209cc32a net/mlx5: add parameter for Netlink support in VF
All Netlink request the PMD will do can also be done by a iproute2 command
line interface, enabling VF behavior configuration without having to modify
the application nor reaching PMD limits (e.g. MAC address number limit).

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2018-04-14 00:41:44 +02:00
Nélio Laranjeiro
dd4bb90bc3 net/mlx5: use Netlink to enable promisc/allmulti mode
VF devices are not able to receive promisc or allmulti traffic unless it
fully requests it though Netlink.  This will cause the request to be
processed by the PF which will handle the request and enable it.

This requires the VF to be trusted by the PF.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2018-04-14 00:41:44 +02:00
Nélio Laranjeiro
ccdcba53a3 net/mlx5: use Netlink to add/remove MAC addresses
VF devices are not able to receive traffic unless it fully requests it
though Netlink.  This will cause the request to be processed by the PF
which will add/remove the MAC address to the VF table if the VF is trusted.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2018-04-14 00:41:44 +02:00
Chas Williams
a708276865 net/ixgbe: update link status on start
dev->data->eth_link isn't updated until the first interrupt. If a
link is carrier down, then this interrupt may never happen. Before we
finished starting the PMD, call ixgbe_dev_link_update() to ensure we
have a valid status.

Signed-off-by: Chas Williams <chas3@att.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-04-14 00:41:44 +02:00
Chas Williams
22da9548cc net/ixgbe: fix busy wait during checking link status
If we haven't set wait_to_complete, there is no need to busy wait
until we have a link status.  Applications, like bonding, use the
wait_to_complete flag to indicate that they will be doing their own
busy wait and will likely be polling again shortly.

Fixes: dc66e5fd01 ("net/ixgbe: improve link state check on VF")
Cc: stable@dpdk.org

Signed-off-by: Chas Williams <chas3@att.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
2018-04-14 00:41:44 +02:00
Wei Zhao
9486d60b94 net/i40e: fix flow RSS queue index check
There need a queue index check for RSS queue region
in order to aviod error from configuration.

Fixes: ecad87d223 ("net/i40e: move RSS to flow API")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-04-14 00:41:44 +02:00
Wei Zhao
55bde0b880 net/i40e: fix flow RSS queue region
Queue region comparison error in configuration parameters.

Fixes: ecad87d223 ("net/i40e: move RSS to flow API")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-04-14 00:41:44 +02:00
Chas Williams
1b8287b622 net/e1000: add MAC address set to em
Based on the equivalent code in the igb driver.

Signed-off-by: Chas Williams <chas3@att.com>
Reviewed-by: David Marchand <david.marchand@6wind.com>
Acked-by: Wei Zhao <wei.zhao1@intel.com>
2018-04-14 00:41:44 +02:00
Andrew Rybchenko
2f44752cad net/sfc: support choice of FW subvariant without Tx checksum
If running FW variant supports subvariant without checksumming
on transmit and all transmit queues do not use checksumming,
it may be disabled.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-04-14 00:41:44 +02:00
Andrew Rybchenko
480a13044b net/sfc/base: support FW subvariant choice
If DPDK application or OS does not need checksumming on transmit,
it may be disabled in firmware to achieve higher packet rates.
Choice must be done before VIS allocation and is allowed if
no other non-preboot and firmware subvariant-unaware drivers are
attached.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
2018-04-14 00:41:44 +02:00
Andrew Rybchenko
26c71cfe11 net/sfc/base: report no Tx checksum FW subvariant support
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
2018-04-14 00:41:44 +02:00
Andrew Rybchenko
c857ca7abf net/sfc/base: add firmware subvariant aware driver option
FW subvariants allow to tweak NIC global features. For example,
if no drivers require checksumming on transmit, it may be disabled
in FW to increase packet rate.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
2018-04-14 00:41:44 +02:00
Andrew Rybchenko
a5053140d2 net/sfc/base: update MCDI headers
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-04-14 00:41:44 +02:00
Vipin Varghese
58f7db4396 net/tap: add tun log and documentation
The changes add TUN|TAP specific logs and documentation support.

Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
2018-04-14 00:41:44 +02:00
Vipin Varghese
204d026a39 net/tap: support tun
The change adds functional TUN PMD logic to the existing TAP PMD.
TUN PMD can be initialized with 'net_tunX' where 'X' represents unique id.
PMD supports argument interface, while MAC address and remote are not
supported.

Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
2018-04-14 00:41:44 +02:00
Hyong Youb Kim
036c545da1 net/enic: support drop flow action
1330 and 1400 series adapters support the drop action. Check for its
availability and set the necessary flag when creating NIC filters.

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
2018-04-14 00:41:44 +02:00
John Daley
33a2d65949 net/enic: fix crash on MTU update with non-setup queues
The enic code called from rte_eth_dev_set_mtu() was assuming that the
Rx queues are already set up via a call to rte_eth_tx_queue_setup().
OVS calls rte_eth_dev_set_mtu() before rte_eth_rx_queue_setup() and
a null pointer was dereferenced.

Fixes: c3e09182bc ("net/enic: support scatter Rx in MTU update")
Cc: stable@dpdk.org

Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Hyong Youb Kim <hyonkim@cisco.com>
2018-04-14 00:41:44 +02:00
John Daley
9bd04182bb net/enic: support UDP RSS on 1400 series adapters
Recent models support IPv4/IPv6 UDP RSS. There is no control bit to
enable UDP RSS alone. Instead, the NIC enables/disables TCP and UDP
RSS together.

Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Hyong Youb Kim <hyonkim@cisco.com>
2018-04-14 00:41:44 +02:00
Hyong Youb Kim
fe26a3bb33 net/enic: do not flush descriptor cache when opening vNIC
The firmware on new hardware models flushes the global descriptor
cache by default. Use CMD_OPENF_IG_DESCCACHE to avoid cache
flushing. This flag has no effect on older models.

Suggested-by: Govindarajulu Varadarajan <gvaradar@cisco.com>
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
2018-04-14 00:41:44 +02:00
Ravi Kumar
6c443d2273 net/axgbe: support meson build
Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
2018-04-14 00:41:44 +02:00
Ravi Kumar
00072056a9 net/axgbe: add workaround for ethernet training
Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
2018-04-14 00:41:44 +02:00
Ravi Kumar
7784d0d3d0 net/axgbe: support 32-bit build mode
Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
2018-04-14 00:41:44 +02:00
Ravi Kumar
3e7305118c net/axgbe: support generic Rx/Tx stats
This patch adds support for port statistics api defined
for ethernet PMDs.

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
2018-04-14 00:41:44 +02:00
Ravi Kumar
fa3e0440be net/axgbe: support promiscuous mode
This patch enables promiscuous and multicast support for AXGBE PMD.

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
2018-04-14 00:41:44 +02:00
Ravi Kumar
f078a9f647 net/axgbe: add configure flow control while link adjustment
Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
2018-04-14 00:41:44 +02:00
Ravi Kumar
44d45ffe6a net/axgbe: add link status update
Added support to update device link status atomically.

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
2018-04-14 00:41:44 +02:00
Ravi Kumar
8590b93da1 net/axgbe: add Rx/Tx data path
Supported scalar implementation for RX data path.
Supported scalar and vector implementation for TX data path.

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
2018-04-14 00:41:44 +02:00
Ravi Kumar
7c4158a5b5 net/axgbe: add DMA programming and start/stop
This patch adds support to program DMA and DPDK device start
and stop apis.

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
2018-04-14 00:41:44 +02:00
Ravi Kumar
9e89010326 net/axgbe: add Rx/Tx setup
Add support for data path setup apis defined for PMDs.

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
2018-04-14 00:41:44 +02:00
Ravi Kumar
456ff1596c net/axgbe: add interrupt handler for autonegotiation
Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
2018-04-14 00:41:44 +02:00
Ravi Kumar
a5c7273771 net/axgbe: add phy programming APIs
Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
2018-04-14 00:41:44 +02:00
Ravi Kumar
4ac7516b8b net/axgbe: add phy init and related APIs
Added device phy initialization, read/write and other
maintenance apis to be used within PMD.

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
2018-04-14 00:41:44 +02:00
Ravi Kumar
572890ef66 net/axgbe: add structs for MAC init and reset
Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
2018-04-14 00:41:44 +02:00
Ravi Kumar
562825a034 net/axgbe: add phy register map and helper macros
Added phy related register definitions.

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
2018-04-14 00:41:44 +02:00
Ravi Kumar
69e209be54 net/axgbe: add register map and related macros
Added DMA and MAC related register definitions.

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
2018-04-14 00:41:44 +02:00
Ravi Kumar
8691632f92 net/axgbe: add minimal init and uninit support
Add ethernet poll mode driver for AMD 10G devices embedded in
AMD EPYC™ EMBEDDED 3000 family processors.

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
2018-04-14 00:41:44 +02:00
Pavan Nikhilesh
28aa16db4a net/tap: fix memcpy with incorrect size
Fix incorrect sizeof operation being used for getting mac addr size.

Found while compiling with arm64 clang.
drivers/net/tap/rte_eth_tap.c:1410:40: error: argument to 'sizeof' in
    'memcpy' call is the same pointer type 'struct ether_addr *' as the
    destination; expected 'struct ether_addr' or an explicit length
    [-Werror,-Wsizeof-pointer-memaccess]
       rte_memcpy(&pmd->eth_addr, mac_addr, sizeof(mac_addr));
                  ~~~~~~~~~~~~~~            ^~~~~~~~~~~~~~~~

Fixes: bcab6c1d27 ("net/tap: allow user MAC to be passed as args")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Zhiyong Yang <zhiyong.yang@intel.com>
2018-04-14 00:40:21 +02:00
Alejandro Lucero
a922c6a789 net/nfp: support new HW offloads API
In next 18.05 the old hw offload API will be removed. This patch adds
support for just the new hw offload API.

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2018-04-14 00:40:21 +02:00
Alejandro Lucero
70217f1d8d net/nfp: remove files
New CPP interface makes NSPU interface obsolete. These files are
not needed anymore.

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2018-04-14 00:40:21 +02:00