Commit Graph

8814 Commits

Author SHA1 Message Date
Nicolas Chautru
efd453698c baseband/fpga_lte_fec: add driver for FEC on FPGA
Supports for FEC 4G PMD Driver on FPGA card PAC N3000

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
2019-07-05 15:28:14 +02:00
Nicolas Chautru
a489f5dbf4 baseband/turbo_sw: support meson build
Turbo_sw PMD driver now building with meson/ninja
with or without SDK libraries.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-07-05 15:28:14 +02:00
Nicolas Chautru
4ac878cf7e baseband/turbo_sw: allow to build without SDK dependency
Adding compile flag to allow to build the turbo_sw PMD
without dependency to have the SDK libraries installed.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-07-05 15:28:14 +02:00
Fan Zhang
11678a1471 crypto/aesni_mb: fix out-of-bounds access
This patch fixes the out-of-bounds coverity issue by adding
missed algorithms to the array.

Coverity issue: 337683
Fixes: c68d7aa354 ("crypto/aesni_mb: use architecture independent macros")
Cc: stable@dpdk.org

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
2019-07-05 15:28:14 +02:00
Chenbo Xia
691733e72b crypto/virtio: check PCI config read
Fix unchecked return value issue for rte_pci_read_config.

Coverity issue: 302861
Fixes: 25500d4b80 ("crypto/virtio: support device init")
Cc: stable@dpdk.org

Signed-off-by: Chenbo Xia <chenbo.xia@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2019-07-05 14:52:25 +02:00
Arek Kusztal
a3f9fededf crypto/openssl: fix usage of non constant time memcmp
ANSI C memcmp is not constant time function per spec so it should
be avoided in cryptography usage.

Fixes: d61f70b4c9 ("crypto/libcrypto: add driver for OpenSSL library")
Cc: stable@dpdk.org

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2019-07-05 14:52:25 +02:00
Lukasz Bartosik
c6fa0d2f6c crypto/octeontx: sync mbox changes from kernel driver
Synchronize mbox with latest changes in kernel driver

Signed-off-by: Lukasz Bartosik <lbartosik@marvell.com>
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
2019-07-05 14:52:25 +02:00
Gosia Bakota
22606a96e9 crypto/qat: set message field to zero in sym SGL case
Fixes: e09231eaa2 ("crypto/qat: add SGL capability")
Cc: stable@dpdk.org

Signed-off-by: Gosia Bakota <gosia.bakota@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2019-07-05 14:52:25 +02:00
Thierry Herbelot
a1f42a9dd7 drivers: fix typo in NXP comments
Fix another copy'n'paste typo.

Fixes: 531b17a780 ("bus/fslmc: add QBMAN driver to bus")
Fixes: 6ef6beca88 ("crypto/caam_jr: add enqueue/dequeue operations")
Fixes: c3e85bdcc6 ("crypto/dpaa_sec: add crypto driver for NXP DPAA platform")
Cc: stable@dpdk.org

Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2019-07-05 14:52:25 +02:00
Thierry Herbelot
90ea7e6dd5 crypto/mvsam: fix typo in comment
Inverted letters.

Fixes: 8a61c83af2 ("crypto/mrvl: add mrvl crypto driver")
Cc: stable@dpdk.org

Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
Acked-by: Tomasz Duszynski <tdu@semihalf.com>
2019-07-05 14:52:25 +02:00
Stephen Hemminger
abdb798ae2 compress/isal: fix use after free
The release function was using qp->stream after already
releasing it and the null pointer checking was missing.

Also since rte_free(NULL) is a no-op, remove unnecessary
checks for NULL.

Coverity issure: 340860
Fixes: dc49e6aa48 ("compress/isal: add ISA-L compression functionality")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Lee Daly <lee.daly@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2019-07-05 14:52:25 +02:00
Asaf Penso
3f22e3153f net/mlx5: check memory allocation in flow creation
rte_calloc functions returns a non-null pointer in case of
success and null pointer in case of failure.

The return value should be checked and the function flow
should take that into consideration.

This patch adds a check for rte_calloc return value in function
flow_list_create.

Fixes: 84c406e745 ("net/mlx5: add flow translate function")
Cc: stable@dpdk.org

Signed-off-by: Asaf Penso <asafp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-05 01:52:02 +02:00
Asaf Penso
cb1d2cce95 net/mlx5: fix condition for link update fallback
mlx5_link_update uses the newer ethtool command
ETHTOOL_GLINKSETTINGS to determine interface capabilities but falls
back to the older (deprecated) ETHTOOL_GSET command if the new
method fails for any reason.
The older method only supports reporting of capabilities up to 40G.

However, mlx5_link_update_unlocked_gs can return a failure for a
number of reasons (including the link being down).
Using the older method in cases of transient failure of the method
can result in reporting of reduced capabilities to the application.

The older method (mlx5_link_update_unlocked_gset) should only be
invoked if the newer method returns EOPNOTSUPP.

Fixes: 7d2e32f76c ("net/mlx5: fix ethtool link setting call order")
Cc: stable@dpdk.org

Reported-by: Srinivas Narayan <srinivas.narayan@att.com>
Signed-off-by: Asaf Penso <asafp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-05 01:52:02 +02:00
Moti Haimovsky
5291c601bb net/mlx5: remove TCF support
This commit removes the support of configuring the device E-switch
using TCF since it is now possible to configure it via DR (direct
verbs rules), and by that to also remove the PMD dependency in libmnl.

Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-05 01:52:02 +02:00
Moti Haimovsky
8f0fa0c0ad net/mlx5: fix crash on null operation
mlx5 implements mlx5_flow_null_drv_ops to be used when a specific
flow typei/driver is not available or invalid.
This routines return error without modifying the rte_flow_error
parameter passed to them which causes testpmd, for example, to crash.
This commit addresses the issue by modifying the rte_flow_error
parameter in theses routines.

Fixes: 0c76d1c9a1 ("net/mlx5: add abstraction for multiple flow drivers")
Fixes: 684dafe795 ("net/mlx5: add flow query abstraction interface")
Cc: stable@dpdk.org

Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-05 01:52:02 +02:00
Vamsi Attunuru
2e0b193da8 net/octeontx2: add link status operations
Add support for setting the link up and down.

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2019-07-05 01:52:02 +02:00
Harman Kalra
3398e9baf0 net/octeontx2: support Rx interrupts
This patch implements rx interrupts feature required for power
saving. These interrupts can be enabled/disabled on demand.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-07-05 01:52:02 +02:00
Vamsi Attunuru
0e2efd02db net/octeontx2: add MTU set operation
Add MTU set operation and MTU update feature.

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-07-05 01:52:02 +02:00
Nithin Dabilpuram
734abb464f net/octeontx2: add device stop and close operations
Add device stop, close and reset operations.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
2019-07-05 01:52:02 +02:00
Nithin Dabilpuram
920717e4d8 net/octeontx2: add device start operation
Add device start operation and update the correct
function pointers for Rx and Tx burst functions.

This patch also update the octeontx2 NIC specific documentation.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
2019-07-05 01:52:02 +02:00
Nithin Dabilpuram
ddc1bc26e9 net/octeontx2: add Tx vector version
Add vector version of packet transmit function.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2019-07-05 01:52:02 +02:00
Nithin Dabilpuram
cbd5710db4 net/octeontx2: add Tx multi segment version
Add multi segment version of packet Transmit function.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2019-07-05 01:52:02 +02:00
Jerin Jacob
fb3ae0951a net/octeontx2: support Tx
Add Tx burst support.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Harman Kalra <hkalra@marvell.com>
2019-07-05 01:52:02 +02:00
Jerin Jacob
f1eff76ab6 net/octeontx2: add Rx vector version
Add vector version of packet Receive function.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2019-07-05 01:52:02 +02:00
Nithin Dabilpuram
12e4328ee4 net/octeontx2: add Rx multi segment version
Add multi segment version of packet Receive function.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2019-07-05 01:52:02 +02:00
Jerin Jacob
cc4d7693f2 net/octeontx2: support Rx
Add Rx burst support.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Harman Kalra <hkalra@marvell.com>
2019-07-05 01:52:02 +02:00
Vamsi Attunuru
4d9f5b8adc net/octeontx2: add FW version get operation
Add firmware version get operation.

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-07-05 01:52:02 +02:00
Vivek Sharma
6368f45abb net/octeontx2: support VLAN TPID and PVID for Tx
Implement support for setting VLAN TPID and PVID for Tx packets.

Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-07-05 01:52:02 +02:00
Vivek Sharma
85bcf43f3c net/octeontx2: support VLAN filters
Support setting up VLAN filters so as to allow tagged
packet's reception after VLAN HW Filter offload is enabled.

Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-07-05 01:52:02 +02:00
Vivek Sharma
ba1b3b081e net/octeontx2: support VLAN offloads
Support configuring VLAN offloads for an ethernet device and
dynamic promiscuous mode configuration for VLAN filters where
filters are updated according to promiscuous mode of the device.

Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-07-05 01:52:02 +02:00
Vivek Sharma
02ed031b28 net/octeontx2: implement VLAN utility functions
Implement accessory functions needed for VLAN functionality.
Introduce VLAN related structures as well.

Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-07-05 01:52:02 +02:00
Vivek Sharma
25d6419cec net/octeontx2: connect flow API to ethdev ops
Connect rte_flow driver ops to ethdev via .filter_ctrl op.

Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
2019-07-05 01:52:02 +02:00
Kiran Kumar K
092b383418 net/octeontx2: add flow init and fini
Adding the flow init and fini functionality. These will be called from
dev init and will initialize and de-initialize the flow related memory.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
2019-07-05 01:52:02 +02:00
Kiran Kumar K
e4a635a654 net/octeontx2: support flow destroy ops
Adding few more flow operations like flow_destroy, flow_isolate
and flow_flush.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
2019-07-05 01:52:02 +02:00
Kiran Kumar K
4092e4845d net/octeontx2: add flow operations
Adding the initial flow ops like flow_create and flow_validate.
These will be used to alloc and write flow rule to device and
validate the flow rule.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
2019-07-05 01:52:02 +02:00
Kiran Kumar K
32e6aaa97c net/octeontx2: support flow parse actions
Adding support to parse flow actions like drop, count, mark, rss, queue.
On egress side, only drop and count actions were supported.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
2019-07-05 01:52:02 +02:00
Kiran Kumar K
0f07b9513c net/octeontx2: add flow parsing for inner layers
Adding functionality to parse inner layers from la to lc.
These will be used to parse inner layers L2, L3, L4 types.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
2019-07-05 01:52:02 +02:00
Kiran Kumar K
b245db0e2b net/octeontx2: add flow parsing for outer layers
Adding functionality to parse outer layers from ld to lh.
These will be used parse outer layers L2, L3, L4 and tunnel types.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
2019-07-05 01:52:02 +02:00
Kiran Kumar K
168c59cfe4 net/octeontx2: add flow MCAM utility functions
Adding MCAM utility functions to alloc and write the entries.
These will be used to arrange the flow rules based on priority.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
2019-07-05 01:52:02 +02:00
Kiran Kumar K
29a2017c70 net/octeontx2: add flow mbox utility functions
Adding mailbox utility functions for rte_flow. These will be used
to alloc, reserve and write the entries to the device on request.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
2019-07-05 01:52:02 +02:00
Kiran Kumar K
57b316742d net/octeontx2: add flow utility functions
First pass rte_flow utility functions for octeontx2.
These will be used to communicate with AF driver.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
2019-07-05 01:52:02 +02:00
Kiran Kumar K
dfe70e7116 net/octeontx2: introduce flow driver
Introducing flow infra for octeontx2.
This will be used to maintain rte_flow rules.

Create, destroy, validate, query, flush, isolate flow operations
will be supported.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
2019-07-05 01:52:02 +02:00
Harman Kalra
a78b924672 net/octeontx2: add remaining PTP operations
Add remaining PTP configuration/slowpath operations.
Timesync feature is available only for PF devices.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Signed-off-by: Zyta Szpak <zyta@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-07-05 01:52:01 +02:00
Harman Kalra
b5dc314044 net/octeontx2: support base PTP
Add PTP enable and disable operations.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Signed-off-by: Zyta Szpak <zyta@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-07-05 01:52:01 +02:00
Vamsi Attunuru
609945f1ce net/octeontx2: support flow control
Add flow control operations and exposed
otx2_nix_update_flow_ctrl_mode() to enable on the
configured mode in dev_start().

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2019-07-05 01:52:01 +02:00
Vamsi Attunuru
58f6f93c34 net/octeontx2: add module EEPROM dump
Add module EEPROM dump operation.

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-07-05 01:52:01 +02:00
Jerin Jacob
80f663668e net/octeontx2: add Rx and Tx descriptor operations
Add Rx and Tx queue descriptor related operations.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
2019-07-05 01:52:01 +02:00
Nithin Dabilpuram
4ad55b3376 net/octeontx2: add queue info and pool supported ops
Add Rx and Tx queue info get and pool ops supported operations.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
2019-07-05 01:52:01 +02:00
Jerin Jacob
6e892eabce net/octeontx2: support packet type
The fields from CQE needs to be converted to
ptype and rx ol flags in mbuf. This patch adds
create lookup memory for those items to be
used in Fastpath.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Harman Kalra <hkalra@marvell.com>
2019-07-05 01:52:01 +02:00
Krzysztof Kanas
0b16e2abd6 net/octeontx2: enable Tx through traffic manager
This patch enables pkt transmit through traffic manager
hierarchy by clearing software XOFF on the nodes and linking
tx queues to corresponding leaf nodes.
It also adds support to start and stop tx queue using
traffic manager.

Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
2019-07-05 01:52:01 +02:00
Nithin Dabilpuram
2f6d5220fb net/octeontx2: configure TM HW resources
This patch sets up and configure hierarchy in hw
nodes. Since all the registers are with RVU AF,
register configuration is also done using mbox
communication.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
2019-07-05 01:52:01 +02:00
Krzysztof Kanas
1439b6a999 net/octeontx2: alloc and free TM HW resources
Allocate and free shaper/scheduler hardware resources for
nodes of hierarchy levels in sw.

Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2019-07-05 01:52:01 +02:00
Nithin Dabilpuram
e7b4cc8c47 net/octeontx2: introduce traffic manager
Introduce traffic manager infra and default hierarchy
creation.

Upon ethdev configure, a default hierarchy is
created with one-to-one mapped tm nodes. This topology
will be overridden when user explicitly creates and commits
a new hierarchy using rte_tm interface.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
2019-07-05 01:52:01 +02:00
Nithin Dabilpuram
711baf1c2a net/octeontx2: add queue start and stop operations
Add queue start and stop operations. Tx queue needs
to update the flow control value, Which will be
added in sub subsequent patch.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
2019-07-05 01:52:01 +02:00
Vamsi Attunuru
da138cd47e net/octeontx2: handle port reconfigure
setup tx & rx queues with the previous configuration during
port reconfig, it handles cases like port reconfigure without
reconfiguring tx & rx queues.

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2019-07-05 01:52:01 +02:00
Jerin Jacob
1be5cff1fa net/octeontx2: add Tx queue setup and release
Add Tx queue setup and release.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2019-07-05 01:52:01 +02:00
Jerin Jacob
094fc8a3a1 net/octeontx2: add Rx queue setup and release
Add Rx queue setup and release.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
2019-07-05 01:52:01 +02:00
Vamsi Attunuru
83ce2880e2 net/octeontx2: support RSS
Add RSS support and expose RSS related functions
to implement RSS action for rte_flow driver.

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
2019-07-05 01:52:01 +02:00
Sunil Kumar Kori
c43adf6168 net/octeontx2: add unicast MAC filter
Add unicast MAC filter for PF device and
update the respective feature list.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-07-05 01:52:01 +02:00
Vamsi Attunuru
adf6bb5d73 net/octeontx2: add promiscuous and allmulticast mode
Add promiscuous and allmulticast mode for PF devices and
update the respective feature list.

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-07-05 01:52:01 +02:00
Kiran Kumar K
c870701592 net/octeontx2: add extended stats operations
Add extended operations and updated the feature list.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
2019-07-05 01:52:01 +02:00
Kiran Kumar K
2265e4b4e8 net/octeontx2: add basic stats operation
Add basic stat operation and updated the feature list.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
2019-07-05 01:52:01 +02:00
Vamsi Attunuru
38f566280a net/octeontx2: add link stats operations
Add link stats related operations and mark respective
items in the documentation.

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2019-07-05 01:52:01 +02:00
Kiran Kumar K
3e3b5c6350 net/octeontx2: support register dump
Add register dump support and mark Registers dump in features.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
2019-07-05 01:52:01 +02:00
Jerin Jacob
008e97cb40 net/octeontx2: add context debug utils
Add RQ,SQ,CQ context and CQE structure dump utils.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
2019-07-05 01:52:01 +02:00
Jerin Jacob
dc47ba15f6 net/octeontx2: handle queue specific error interrupts
Handle queue specific error interrupts.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2019-07-05 01:52:01 +02:00
Jerin Jacob
548b5839a3 net/octeontx2: add device configure operation
Add device configure operation. This would call lf_alloc
mailbox to allocate a NIX LF and upon return, AF will
return the attributes for the select LF.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2019-07-05 01:52:01 +02:00
Jerin Jacob
60bb09ad2a net/octeontx2: add info get operation
Add device information get operation.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Harman Kalra <hkalra@marvell.com>
2019-07-05 01:52:01 +02:00
Jerin Jacob
b26d65bee9 net/octeontx2: handle device error interrupts
Handle device specific error and ras interrupts.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Harman Kalra <hkalra@marvell.com>
2019-07-05 01:52:01 +02:00
Jerin Jacob
fb0198b7dc net/octeontx2: add devargs parsing functions
add various devargs command line options supported by this driver.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
2019-07-05 01:52:01 +02:00
Jerin Jacob
1e3da54631 net/octeontx2: add device init and uninit
Add basic init and uninit function which includes
attaching LF device to probed PCIe device.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
2019-07-05 01:52:01 +02:00
Jerin Jacob
f81db0c8c5 net/octeontx2: add ethdev probe and remove
add basic PCIe ethdev probe and remove.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2019-07-05 01:52:01 +02:00
Jerin Jacob
9a8864c8b5 net/octeontx2: add build and doc infrastructure
Adding bare minimum PMD library and doc build infrastructure
and claim the maintainership for octeontx2 PMD.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
2019-07-05 01:52:01 +02:00
Andy Pei
343b8e4ada net/i40e: fix crash when TxQ/RxQ set to 0 in VF
Testpmd would stuck and result in core dump when user specifies an
invalid VF queue number, for example when setting txq or rxq to 0.
When txq or rxq is set to 0, pointer of pointer rxq or txq in
function i40evf_configure_vsi_queues is NULL. The usage of txq[i]
or rxq[0] is valid. This patch fixes this issue.

Fixes: d6b1972909 ("i40evf: support configurable crc stripping")
Cc: stable@dpdk.org

Signed-off-by: Andy Pei <andy.pei@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-07-05 01:52:01 +02:00
Stephen Hemminger
ff155eac93 net/netvsc: fix definition of offload values
The definition of ipsec and rsc offloads was incorrect.
Neither one of these is used by current driver, but the values
should be fixed now for future RSC support.

Fixes: 4e9c73e96e ("net/netvsc: add Hyper-V network device")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2019-07-05 01:52:01 +02:00
Krzysztof Kanas
4f538fa249 net/af_packet: set default block size to page size
Kernel validates block size to be aligned to page size. Code works on
platforms with page size 4k, but on others e.g. Arm64 fails with default
parameters.

Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-07-05 01:52:01 +02:00
Dekel Peled
585b99fb4a net/mlx5: modify TCP header using Direct Verbs
This patch implements additional actions of packet header
modifications.

Add actions:
- INC_TCP_SEQ - Increase sequence number in the outermost TCP header.
- DEC_TCP_SEQ - Decrease sequence number in the outermost TCP header.
- INC_TCP_ACK - Increase acknowledgment number in the outermost TCP
		header.
- DEC_TCP_ACK - Decrease acknowledgment number in the outermost TCP
		header.

Original work by Xiaoyu Min.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2019-07-05 01:52:01 +02:00
Andrew Rybchenko
8fce2224d0 net/sfc: release port upon close
Set RTE_ETH_DEV_CLOSE_REMOVE upon probe so all the resources
for the port can be freed by rte_eth_dev_close() and the ethdev
port freed.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
2019-07-05 01:52:01 +02:00
Andrew Rybchenko
93f993cbbb net/sfc: ensure that device is closed on removal
PCI device may be unplugged when ethdev is not closed yet.

Fixes: aaa3f5f0f7 ("net/sfc: add configure and close stubs")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
2019-07-05 01:52:01 +02:00
Anatoly Burakov
028669bc9f eal: hide shared memory config
Now that everything that has ever accessed the shared memory
config is doing so through the public API's, we can make it
internal. Since we're removing quite a few headers from
rte_eal_memconfig.h, we need to add them back in places
where this header is used.

This bumps the ABI, so also change all build files and make
update documentation.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: David Marchand <david.marchand@redhat.com>
2019-07-06 10:32:34 +02:00
Anatoly Burakov
76f80881ef mem: add API to lock/unlock memory hotplug
Currently, the memory hotplug is locked automatically by all
memory-related _walk() functions, but sometimes locking the
memory subsystem outside of them is needed. There is no
public API to do that, so it creates a dependency on shared
memory config to be public. Fix this by introducing a new
API to lock/unlock the memory hotplug subsystem.

Create a new common file for all things mem config, and a
new API namespace rte_mcfg_*, and search-and-replace all
usages of the locks with the new API.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: David Marchand <david.marchand@redhat.com>
2019-07-05 22:12:40 +02:00
Ben Walker
703458e19c bus/pci: consider only usable devices for IOVA mode
When selecting the preferred IOVA mode of the pci bus, the current
heuristic ("are devices bound?", "are devices bound to UIO?", "are pmd
drivers supporting IOVA as VA?" etc..) should honor the device
white/blacklist so that an unwanted device does not impact the decision.

There is no reason to consider a device which has no driver available.

This applies to all OS, so implements this in common code then call a
OS specific callback.

On Linux side:
- the VFIO special considerations should be evaluated only if VFIO
  support is built,
- there is no strong requirement on using VA rather than PA if a driver
  supports VA, so defaulting to DC in such a case.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
2019-07-05 16:56:00 +02:00
Bruce Richardson
34921a6fa0 raw/ioat: fix icc build
When using _mm_set_epi64() rather than _mm_set_epi64x() intrinsic, ICC
tries to use the x87 floating point registers, leading to warnings about
not properly clearing value when switching between x87 and SSE/AVX modes.

	error #13203: No EMMS instruction before call to function

Fix this by using the set64x() intrinsic.

Fixes: 0a92e63fc4 ("raw/ioat: add local API to perform copies")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Tested-by: Anatoly Burakov <anatoly.burakov@intel.com>
2019-07-05 15:01:59 +02:00
Xiaoyun Li
c5eebf85ba examples/ntb: add example for NTB
Enable an example for rawdev ntb. Support interactive mode to send
file on one host and receive file from another host. The command line
would be 'send [filepath]' and 'receive [filepath]'.

But since the FIFO is not enabled right now, use rte_memcpy as the enqueue
and dequeue functions and only support transmitting file no more than 4M.

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
2019-07-05 12:50:19 +02:00
Xiaoyun Li
62012a7681 raw/ntb: add handshake process
Add handshake process using doorbell so that two hosts can
communicate to start and stop.

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
2019-07-05 12:50:19 +02:00
Xiaoyun Li
034c328eb0 raw/ntb: support Intel NTB
Add in the list of registers for the device.
And enable NTB device ops for Intel Skylake platform.

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
2019-07-05 12:50:19 +02:00
Xiaoyun Li
2773100279 raw/ntb: introduce NTB raw device driver
Introduce rawdev driver support for NTB (Non-transparent Bridge) which
can help to connect two separate hosts with each other.

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
2019-07-05 12:49:33 +02:00
Satha Rao
b225073dda raw/octeontx2_dma: add driver self test
Sample test to verify DMA functionality, this test covers
internal transfer mode.

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
2019-07-05 12:43:52 +02:00
Satha Rao
78ca17f594 raw/octeontx2_dma: add dequeue and device control operations
Add dequeue, device start, stop, close and reset operations.

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
2019-07-05 12:43:49 +02:00
Satha Rao
59d345dad3 raw/octeontx2_dma: add enqueue operation
Add enqueue operation.

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
2019-07-05 12:43:48 +02:00
Satha Rao
f613c52f7f raw/octeontx2_dma: add device close operation
Send message to PF to stop DMA queue when device close is
called from application.
Defined the required data structures to support enqueue and
dequeue APIs.

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
2019-07-05 12:43:46 +02:00
Satha Rao
04b7dde74c raw/octeontx2_dma: add device configuration
Register dev_configure API to configure DPI PCI devices.
After successful initialization send message to PF to open
corresponding DPI DMA queue. At present hardware doesn't
support mail box for DPI, so PMD to PF communication uses
pre build kernel devfs.

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
2019-07-05 12:43:45 +02:00
Satha Rao
cce02d4d78 raw/octeontx2_dma: update probe function
Probe function enhanced to allocate and initialize PMD private data.

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
2019-07-05 12:43:41 +02:00
Jerin Jacob
185656e7c9 raw/octeontx2_dma: add build infra and device probe
Add the make and meson based build infrastructure along
with the DMA device probe with documentation infrastructure.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Satha Rao <skoteshwar@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
2019-07-05 12:43:30 +02:00
Pavan Nikhilesh
29893042c2 mempool/octeontx2: fix clang build for arm64
The ARMv8.1 CASP instruction works with even register pairs and since
there no register constraint in older versions of GCC/Clang, use
explicit register allocation to satisfy CASP requirements.
Remove function level optimization specification as Clang doesn't have
support for it and explicit register allocation removes the need for it.

Fixes build issue with arm64-armv8a-linux-clang.

Fixes: ee338015e7 ("mempool/octeontx2: add optimized dequeue operation for arm64")

Reported-by: Gavin Hu <gavin.hu@arm.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-07-05 10:55:46 +02:00
Li Qiang
d37f5f279b mempool/dpaa: fix leak in pool creation failure
When 'rte_zmalloc' failed dpaa_mbuf_create_pool() forgets freeing
'bp' thus leading resource leak. This patch avoids this.

Coverity issue: 337679

Signed-off-by: Li Qiang <liq3ea@163.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2019-07-04 17:20:33 +02:00
Pavan Nikhilesh
cea66312b4 event/octeontx2: add libatomic dependency for 32-bit clang
When compiling with clang on 32-bit platforms, we are missing
copies of 64-bit atomic functions. We can solve this by linking
against libatomic for the drivers and libs which need those
atomic ops.

Fixes: f0b9982cb3 ("event/octeontx2: add TIM bucket operations")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2019-07-04 17:12:55 +02:00
Amit Gupta
e66a5a8270 drivers/octeontx2: fix icc build for i686
Fix the following ICC specific compilation issue with i686 build.

dpdk/drivers/common/octeontx2/otx2_mbox.c(47): error #2259:
non-pointer conversion from "unsigned long long" to "struct mbox_hdr *"
may lose significant bits
(struct mbox_hdr *)((uintptr_t)mdev->mbase + mbox->tx_start);

Fixes: 732377a679 ("mempool/octeontx2: add build infra and device probe")
Fixes: 371d3212cb ("common/octeontx2: add build infrastructure and HW definition")

Signed-off-by: Amit Gupta <agupta3@marvell.com>
2019-07-04 16:46:33 +02:00
Andy Pei
79f52bff01 raw/ifpga: fix unintentional integer overflow
cast unsigned int ports_per_retimer, unsigned int nums_retimer,
unsigned int nums_fvl and unsigned int ports_per_fvl to uint64_t
before multiply operation, to avoid Unintentional integer overflow.

Coverity issue: 337924, 337926
Fixes: d1cd4eb2d4 ("raw/ifpga: support ipn3ke")
Cc: stable@dpdk.org

Signed-off-by: Andy Pei <andy.pei@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
2019-07-04 15:49:59 +02:00
Tianfei Zhang
12f92a513a raw/ifpga/base: fix retimer link status
Fix the readout retimer link status incorrectly when we
remove the linux intel-fpga-driver and run the DPDK application.
The linux driver will stop the retimer when remove the kernel
modules.

Fixes: 8a256bef ("raw/ifpga/base: add eth group driver")
Cc: stable@dpdk.org

Reported-by: Amrutha Sampath <amrutha.sampath@intel.com>
Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
2019-07-04 15:36:12 +02:00