dpdk.git
4 years agocryptodev: add feature flags to disable
Anoob Joseph [Tue, 25 Jun 2019 05:39:24 +0000 (11:09 +0530)]
cryptodev: add feature flags to disable

Adding a new field, ff_disable, to allow applications to control the
features enabled on the crypto device. This would allow for efficient
usage of HW/SW offloads.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
4 years agomaintainers: claim maintainership of bbdev
Nicolas Chautru [Mon, 17 Jun 2019 18:21:28 +0000 (11:21 -0700)]
maintainers: claim maintainership of bbdev

Reorg within Intel teams causing transfer of maintainership

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
4 years agocryptodev: add option to support both IV and J0 for GCM
Arek Kusztal [Wed, 17 Apr 2019 15:57:51 +0000 (17:57 +0200)]
cryptodev: add option to support both IV and J0 for GCM

This patch adds an option to support both IV (of all supported sizes)
and J0 when using Galois Counter Mode of crypto operation.

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
4 years agocrypto/virtio: check PCI config read
Chenbo Xia [Fri, 19 Apr 2019 00:58:34 +0000 (00:58 +0000)]
crypto/virtio: check PCI config read

Fix unchecked return value issue for rte_pci_read_config.

Coverity issue: 302861
Fixes: 25500d4b8076 ("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>
4 years agoapp/compress-perf: print socket id
Fiona Trahe [Tue, 30 Apr 2019 17:10:14 +0000 (17:10 +0000)]
app/compress-perf: print socket id

Added info about socket id used by compression perf
test process and by the driver

Signed-off-by: Tomasz Cel <tomaszx.cel@intel.com>
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Artur Trybula <arturx.trybula@intel.com>
4 years agodoc: clarify data plane error handling in compressdev
Fiona Trahe [Wed, 15 May 2019 11:16:07 +0000 (12:16 +0100)]
doc: clarify data plane error handling in compressdev

Fixed some typos and clarified how errors on ops which
fail to get submitted on the enqueue API should be handled.

Fixes: a584d3bea902 ("doc: add compressdev library guide")
Cc: stable@dpdk.org
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Acked-by: Shally Verma <shallyv@marvell.com>
4 years agoexamples/fips_validation: fix logically dead code
Fan Zhang [Wed, 15 May 2019 15:41:21 +0000 (16:41 +0100)]
examples/fips_validation: fix logically dead code

Coverity issue: 336866, 336841, 336838
Fixes: 41d561cbdd24 ("examples/fips_validation: add power on self test")
Cc: stable@dpdk.org
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
4 years agocrypto/openssl: fix usage of non constant time memcmp
Arek Kusztal [Fri, 31 May 2019 06:59:28 +0000 (08:59 +0200)]
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: d61f70b4c918 ("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>
4 years agocrypto/octeontx: sync mbox changes from kernel driver
Lukasz Bartosik [Wed, 29 May 2019 10:44:03 +0000 (16:14 +0530)]
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>
4 years agoapp/crypto-perf: fix CSV format
Ankur Dwivedi [Wed, 29 May 2019 06:20:58 +0000 (11:50 +0530)]
app/crypto-perf: fix CSV format

The format for printing float is incorrect for the following fields
in pmd-cyclecount test: Cycles/Op,Cycles/Enq,Cycles/Deq.

Currently, the format is %.f3. This format will round off the number to
the nearest integer and append a 3 after that.

This patch changes the format to %.3f. This will print the number as a
floating point with a precision of 3 fractional digits.

Fixes: 96dfeb609be1 ("app/crypto-perf: add new PMD benchmarking mode")
Cc: stable@dpdk.org
Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
4 years agocrypto/qat: set message field to zero in sym SGL case
Gosia Bakota [Wed, 12 Jun 2019 17:31:41 +0000 (18:31 +0100)]
crypto/qat: set message field to zero in sym SGL case

Fixes: e09231eaa2af ("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>
4 years agodrivers: fix typo in NXP comments
Thierry Herbelot [Wed, 22 May 2019 09:44:49 +0000 (11:44 +0200)]
drivers: fix typo in NXP comments

Fix another copy'n'paste typo.

Fixes: 531b17a780dc ("bus/fslmc: add QBMAN driver to bus")
Fixes: 6ef6beca8844 ("crypto/caam_jr: add enqueue/dequeue operations")
Fixes: c3e85bdcc6e6 ("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>
4 years agodoc: fix grammar in prog guides
Thierry Herbelot [Wed, 22 May 2019 09:44:48 +0000 (11:44 +0200)]
doc: fix grammar in prog guides

A copy'n'paste typo was present in three guides.

Fixes: a584d3bea902 ("doc: add compressdev library guide")
Fixes: 4935e1e9f76e ("bbdev: introduce wireless base band device lib")
Fixes: 0318c02b57cf ("doc: add cryptodev chapter in prog guide")
Cc: stable@dpdk.org
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
Acked-by: Rami Rosen <ramirose@gmail.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
4 years agodoc: fix triplicated typo in prog guides
Thierry Herbelot [Wed, 22 May 2019 09:44:47 +0000 (11:44 +0200)]
doc: fix triplicated typo in prog guides

A bad formula was copied and pasted.

Fixes: 4935e1e9f76e ("bbdev: introduce wireless base band device lib")
Fixes: 0318c02b57cf ("doc: add cryptodev chapter in prog guide")
Fixes: a9bb0c44c775 ("doc: add rawdev library guide and doxygen page")
Cc: stable@dpdk.org
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
4 years agocrypto/mvsam: fix typo in comment
Thierry Herbelot [Wed, 22 May 2019 09:44:46 +0000 (11:44 +0200)]
crypto/mvsam: fix typo in comment

Inverted letters.

Fixes: 8a61c83af2fa ("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>
4 years agodoc: cleanup test removal in armv8 and openssl guides
Thierry Herbelot [Wed, 22 May 2019 09:44:45 +0000 (11:44 +0200)]
doc: cleanup test removal in armv8 and openssl guides

The perf tests were removed in a previous commit.

Fixes: 2ac67c32837a ("test/crypto: remove crypto perf tests")
Cc: stable@dpdk.org
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
4 years agoapp/compress-perf: fix improper use of negative value
Tomasz Jozwiak [Mon, 20 May 2019 13:26:03 +0000 (15:26 +0200)]
app/compress-perf: fix improper use of negative value

test_data->input_data_sz is passed to a parameter that
cannot be negative.

Coverity issue: 328504
Fixes: b68a82425da4 ("app/compress-perf: add performance measurement")
Cc: stable@dpdk.org
Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
4 years agocompress/isal: fix use after free
Stephen Hemminger [Tue, 21 May 2019 14:47:13 +0000 (07:47 -0700)]
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: dc49e6aa4879 ("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>
4 years agodoc: update bnxt guide
Lance Richardson [Wed, 3 Jul 2019 11:42:47 +0000 (07:42 -0400)]
doc: update bnxt guide

- Include list of supported adapters.
- Include list of supported features.
- Document requirements for vector mode PMD.
- Remove obsolete limitation (scatter rx has been supported for
  some time).
- Fixed broken links.

Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
4 years agoapp/testpmd: fix queue offload configuration
Wei Zhao [Thu, 4 Jul 2019 05:35:37 +0000 (13:35 +0800)]
app/testpmd: fix queue offload configuration

When adding offloads from commandline, not only port
related configuration bits should be set, but also queue
related offloads configuration bits, or it will cause error.
For example, test in this process for ixgbe:
(1)./x86_64-native-linuxapp-gcc/app/testpmd -c 0x6 -n 4
-- -i --portmask=0x1 --port-topology=loop --disable-crc-strip
(2)port stop all
(3)port config all crc-strip on
(4)port start all
we will see "Fail to configure port 0 rx queues" of warning info.

Fixes: 0074d02fca21 ("app/testpmd: convert to new Rx offloads API")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
4 years agoapp/testpmd: fix parsing RSS queue rule
Haiyue Wang [Tue, 25 Jun 2019 10:38:03 +0000 (18:38 +0800)]
app/testpmd: fix parsing RSS queue rule

Declare a local variable 'arg' to hold the pointer to ARGS_ENTRY_ARB,
otherwise, the pop 'arg' in 'parse_int' holds wrong data like 'arg->
offset = 5912737, arg->size = 0', this caused the parse failure.

If calling like 'push_args(ctx, ARGS_ENTRY_ARB..)', the below code for
assigning 'offset & size' will be missed for some gcc optimization.

parse_vc_action_rss_queue
    29c5: c5 f9 ef c0           vpxor  %xmm0,%xmm0,%xmm0
    29c9: 43 8d 44 24 68        lea    0x68(%r12,%r12,1),%eax
    29ce: 48 c7 44 24 20 00 00  movq   $0x0,0x20(%rsp)
    29d5: 00 00
    29d7: c5 f8 29 44 24 10     vmovaps %xmm0,0x10(%rsp)
    29dd: 89 44 24 18           mov    %eax,0x18(%rsp)
    29e1: 48 63 83 0c 01 00 00  movslq 0x10c(%rbx),%rax
    29e8: c7 44 24 1c 02 00 00  movl   $0x2,0x1c(%rsp)
    29ef: 00
    29f0: c5 f8 29 04 24        vmovaps %xmm0,(%rsp)

The above assembly code is from this modification with:
    gcc version 9.1.1 20190503 (Red Hat 9.1.1-1) (GCC)
    Fedora release 30 (Thirty)
    5.1.11-300.fc30.x86_64

Fixes: d0ad8648b1c5 ("app/testpmd: fix RSS flow action configuration")
Cc: stable@dpdk.org
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
4 years agonet/mlx5: check memory allocation in flow creation
Asaf Penso [Wed, 19 Jun 2019 09:46:24 +0000 (09:46 +0000)]
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: 84c406e74524 ("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>
4 years agonet/mlx5: fix condition for link update fallback
Asaf Penso [Wed, 19 Jun 2019 09:52:45 +0000 (09:52 +0000)]
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: 7d2e32f76cfc ("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>
4 years agonet/mlx5: remove TCF support
Moti Haimovsky [Mon, 1 Jul 2019 09:34:22 +0000 (12:34 +0300)]
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>
4 years agonet/mlx5: fix crash on null operation
Moti Haimovsky [Mon, 1 Jul 2019 09:34:21 +0000 (12:34 +0300)]
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: 0c76d1c9a18d ("net/mlx5: add abstraction for multiple flow drivers")
Fixes: 684dafe795d0 ("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>
4 years agonet/octeontx2: add link status operations
Vamsi Attunuru [Wed, 3 Jul 2019 08:31:50 +0000 (14:01 +0530)]
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>
4 years agonet/octeontx2: support Rx interrupts
Harman Kalra [Sun, 30 Jun 2019 09:22:50 +0000 (14:52 +0530)]
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>
4 years agonet/octeontx2: add MTU set operation
Vamsi Attunuru [Sun, 2 Jun 2019 11:57:54 +0000 (17:27 +0530)]
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>
4 years agonet/octeontx2: add device stop and close operations
Nithin Dabilpuram [Sun, 30 Jun 2019 09:29:49 +0000 (14:59 +0530)]
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>
4 years agonet/octeontx2: add device start operation
Nithin Dabilpuram [Sun, 2 Jun 2019 11:49:04 +0000 (17:19 +0530)]
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>
4 years agonet/octeontx2: add Tx vector version
Nithin Dabilpuram [Sun, 2 Jun 2019 11:37:08 +0000 (17:07 +0530)]
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>
4 years agonet/octeontx2: add Tx multi segment version
Nithin Dabilpuram [Sun, 2 Jun 2019 11:34:21 +0000 (17:04 +0530)]
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>
4 years agonet/octeontx2: support Tx
Jerin Jacob [Sun, 2 Jun 2019 11:15:37 +0000 (16:45 +0530)]
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>
4 years agonet/octeontx2: add Rx vector version
Jerin Jacob [Sun, 2 Jun 2019 10:21:06 +0000 (15:51 +0530)]
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>
4 years agonet/octeontx2: add Rx multi segment version
Nithin Dabilpuram [Sun, 2 Jun 2019 09:51:32 +0000 (15:21 +0530)]
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>
4 years agonet/octeontx2: support Rx
Jerin Jacob [Sun, 2 Jun 2019 09:32:02 +0000 (15:02 +0530)]
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>
4 years agonet/octeontx2: add FW version get operation
Vamsi Attunuru [Sat, 1 Jun 2019 18:47:13 +0000 (00:17 +0530)]
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>
4 years agonet/octeontx2: support VLAN TPID and PVID for Tx
Vivek Sharma [Sun, 30 Jun 2019 03:49:05 +0000 (09:19 +0530)]
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>
4 years agonet/octeontx2: support VLAN filters
Vivek Sharma [Sun, 30 Jun 2019 03:34:41 +0000 (09:04 +0530)]
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>
4 years agonet/octeontx2: support VLAN offloads
Vivek Sharma [Sun, 30 Jun 2019 02:25:19 +0000 (07:55 +0530)]
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>
4 years agonet/octeontx2: implement VLAN utility functions
Vivek Sharma [Sun, 30 Jun 2019 01:25:08 +0000 (06:55 +0530)]
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>
4 years agonet/octeontx2: connect flow API to ethdev ops
Vivek Sharma [Sat, 29 Jun 2019 11:08:49 +0000 (16:38 +0530)]
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>
4 years agonet/octeontx2: add flow init and fini
Kiran Kumar K [Wed, 26 Jun 2019 10:43:40 +0000 (16:13 +0530)]
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>
4 years agonet/octeontx2: support flow destroy ops
Kiran Kumar K [Wed, 26 Jun 2019 10:42:14 +0000 (16:12 +0530)]
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>
4 years agonet/octeontx2: add flow operations
Kiran Kumar K [Sat, 29 Jun 2019 10:48:16 +0000 (16:18 +0530)]
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>
4 years agonet/octeontx2: support flow parse actions
Kiran Kumar K [Sat, 29 Jun 2019 10:45:13 +0000 (16:15 +0530)]
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>
4 years agonet/octeontx2: add flow parsing for inner layers
Kiran Kumar K [Wed, 26 Jun 2019 10:35:46 +0000 (16:05 +0530)]
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>
4 years agonet/octeontx2: add flow parsing for outer layers
Kiran Kumar K [Wed, 26 Jun 2019 10:34:22 +0000 (16:04 +0530)]
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>
4 years agonet/octeontx2: add flow MCAM utility functions
Kiran Kumar K [Wed, 26 Jun 2019 10:32:05 +0000 (16:02 +0530)]
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>
4 years agonet/octeontx2: add flow mbox utility functions
Kiran Kumar K [Wed, 26 Jun 2019 10:26:25 +0000 (15:56 +0530)]
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>
4 years agonet/octeontx2: add flow utility functions
Kiran Kumar K [Wed, 26 Jun 2019 10:25:03 +0000 (15:55 +0530)]
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>
4 years agonet/octeontx2: introduce flow driver
Kiran Kumar K [Wed, 26 Jun 2019 10:23:09 +0000 (15:53 +0530)]
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>
4 years agonet/octeontx2: add remaining PTP operations
Harman Kalra [Fri, 31 May 2019 08:47:15 +0000 (14:17 +0530)]
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>
4 years agonet/octeontx2: support base PTP
Harman Kalra [Fri, 31 May 2019 08:24:42 +0000 (13:54 +0530)]
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>
4 years agonet/octeontx2: support flow control
Vamsi Attunuru [Fri, 31 May 2019 07:15:10 +0000 (12:45 +0530)]
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>
4 years agonet/octeontx2: add module EEPROM dump
Vamsi Attunuru [Fri, 31 May 2019 07:01:49 +0000 (12:31 +0530)]
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>
4 years agonet/octeontx2: add Rx and Tx descriptor operations
Jerin Jacob [Fri, 31 May 2019 06:41:22 +0000 (12:11 +0530)]
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>
4 years agonet/octeontx2: add queue info and pool supported ops
Nithin Dabilpuram [Fri, 31 May 2019 06:16:55 +0000 (11:46 +0530)]
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>
4 years agonet/octeontx2: support packet type
Jerin Jacob [Thu, 30 May 2019 06:54:11 +0000 (12:24 +0530)]
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>
4 years agonet/octeontx2: enable Tx through traffic manager
Krzysztof Kanas [Sun, 26 May 2019 17:34:42 +0000 (23:04 +0530)]
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>
4 years agonet/octeontx2: configure TM HW resources
Nithin Dabilpuram [Sun, 26 May 2019 16:49:40 +0000 (22:19 +0530)]
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>
4 years agonet/octeontx2: alloc and free TM HW resources
Krzysztof Kanas [Sun, 26 May 2019 06:56:36 +0000 (12:26 +0530)]
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>
4 years agonet/octeontx2: introduce traffic manager
Nithin Dabilpuram [Wed, 29 May 2019 17:19:53 +0000 (22:49 +0530)]
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>
4 years agonet/octeontx2: add queue start and stop operations
Nithin Dabilpuram [Wed, 29 May 2019 17:04:51 +0000 (22:34 +0530)]
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>
4 years agonet/octeontx2: handle port reconfigure
Vamsi Attunuru [Wed, 29 May 2019 16:45:32 +0000 (22:15 +0530)]
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>
4 years agonet/octeontx2: add Tx queue setup and release
Jerin Jacob [Wed, 29 May 2019 13:00:23 +0000 (18:30 +0530)]
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>
4 years agonet/octeontx2: add Rx queue setup and release
Jerin Jacob [Wed, 29 May 2019 12:44:20 +0000 (18:14 +0530)]
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>
4 years agonet/octeontx2: support RSS
Vamsi Attunuru [Wed, 29 May 2019 11:36:05 +0000 (17:06 +0530)]
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>
4 years agonet/octeontx2: add unicast MAC filter
Sunil Kumar Kori [Wed, 29 May 2019 11:21:55 +0000 (16:51 +0530)]
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>
4 years agonet/octeontx2: add promiscuous and allmulticast mode
Vamsi Attunuru [Wed, 29 May 2019 10:27:54 +0000 (15:57 +0530)]
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>
4 years agonet/octeontx2: add extended stats operations
Kiran Kumar K [Wed, 29 May 2019 09:29:27 +0000 (14:59 +0530)]
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>
4 years agonet/octeontx2: add basic stats operation
Kiran Kumar K [Wed, 29 May 2019 08:59:29 +0000 (14:29 +0530)]
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>
4 years agonet/octeontx2: add link stats operations
Vamsi Attunuru [Wed, 29 May 2019 08:05:08 +0000 (13:35 +0530)]
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>
4 years agonet/octeontx2: support register dump
Kiran Kumar K [Wed, 29 May 2019 06:29:17 +0000 (11:59 +0530)]
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>
4 years agonet/octeontx2: add context debug utils
Jerin Jacob [Wed, 29 May 2019 05:19:41 +0000 (10:49 +0530)]
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>
4 years agonet/octeontx2: handle queue specific error interrupts
Jerin Jacob [Wed, 29 May 2019 05:00:14 +0000 (10:30 +0530)]
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>
4 years agonet/octeontx2: add device configure operation
Jerin Jacob [Wed, 29 May 2019 03:38:14 +0000 (09:08 +0530)]
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>
4 years agonet/octeontx2: add info get operation
Jerin Jacob [Tue, 28 May 2019 15:55:50 +0000 (21:25 +0530)]
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>
4 years agonet/octeontx2: handle device error interrupts
Jerin Jacob [Tue, 28 May 2019 14:20:07 +0000 (19:50 +0530)]
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>
4 years agonet/octeontx2: add devargs parsing functions
Jerin Jacob [Tue, 28 May 2019 14:02:32 +0000 (19:32 +0530)]
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>
4 years agonet/octeontx2: add device init and uninit
Jerin Jacob [Tue, 28 May 2019 12:38:35 +0000 (18:08 +0530)]
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>
4 years agonet/octeontx2: add ethdev probe and remove
Jerin Jacob [Tue, 28 May 2019 11:13:13 +0000 (16:43 +0530)]
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>
4 years agonet/octeontx2: add build and doc infrastructure
Jerin Jacob [Tue, 28 May 2019 08:55:22 +0000 (14:25 +0530)]
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>
4 years agonet/i40e: fix crash when TxQ/RxQ set to 0 in VF
Andy Pei [Thu, 4 Jul 2019 01:38:39 +0000 (09:38 +0800)]
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: d6b19729093e ("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>
4 years agonet/netvsc: fix definition of offload values
Stephen Hemminger [Wed, 3 Jul 2019 15:50:01 +0000 (08:50 -0700)]
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: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
4 years agomaintainers: update for Mellanox
Shahaf Shuler [Thu, 4 Jul 2019 10:01:04 +0000 (10:01 +0000)]
maintainers: update for Mellanox

Due to position change, cannot be a full time maintainer anymore.
The git tree dpdk-next-net-mlx will be managed by Raslan,
as approved by the DPDK Technical Board.
For mlx5 PMD, Slava is added as additional maintainer.

Will continue to be involved in the DPDK community in different ways.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agoapp/testpmd: fix MPLS IPv4 encapsulation fields
Saleh Alsouqi [Thu, 4 Jul 2019 07:33:22 +0000 (07:33 +0000)]
app/testpmd: fix MPLS IPv4 encapsulation fields

Having version and ihl set to 0 would result in a
corrupted/incorrect encapsulating packet for MPLS,
this commit sets these fields to 4 and 5 respectively
as defined in librte_net/rte_ip.h.

Fixes: 3e77031be855 ("app/testpmd: add MPLSoGRE encapsulation")
Fixes: a1191d39cb57 ("app/testpmd: add MPLSoUDP encapsulation")
Cc: stable@dpdk.org
Signed-off-by: Saleh Alsouqi <salehals@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet: define IPv4 IHL and VHL
Saleh Alsouqi [Thu, 4 Jul 2019 07:33:19 +0000 (07:33 +0000)]
net: define IPv4 IHL and VHL

Define IPv4 Minimum IHL and VHL according to rfc791 (see [1])

    "The Version field indicates the format of the
    internet header."

    "Internet Header Length (ihl) is the length of the
    internet header in 32 bit words, and thus points
    to the beginning of the data. Note that
    the minimum value for a correct header is 5."

[1] https://tools.ietf.org/html/rfc791

Signed-off-by: Saleh Alsouqi <salehals@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agoethdev: support dynamic configuration of QinQ strip
Vivek Sharma [Tue, 2 Jul 2019 03:37:07 +0000 (09:07 +0530)]
ethdev: support dynamic configuration of QinQ strip

Enable missing support for runtime configuration (setting/getting)
of QinQ strip rx offload for a given ethdev.

Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
4 years agoethdev: allow action with any config object type
Dekel Peled [Tue, 2 Jul 2019 14:17:26 +0000 (17:17 +0300)]
ethdev: allow action with any config object type

In current implementation, an action which requires parameters
must accept them enclosed in a structure.
Some actions require a single, trivial type parameter, but it still
must be enclosed in a structure.
This obligation results in multiple, action-specific structures, each
containing a single trivial type parameter.

This patch introduces a new approach, allowing an action configuration
object of any type, trivial or a structure.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
4 years agonet/af_packet: set default block size to page size
Krzysztof Kanas [Mon, 24 Jun 2019 14:32:00 +0000 (16:32 +0200)]
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>
4 years agonet/mlx5: modify TCP header using Direct Verbs
Dekel Peled [Tue, 2 Jul 2019 14:44:28 +0000 (17:44 +0300)]
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>
4 years agoapp/testpmd: add actions to modify TCP header fields
Dekel Peled [Tue, 2 Jul 2019 14:44:27 +0000 (17:44 +0300)]
app/testpmd: add actions to modify TCP header fields

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.

This patch uses the new approach introduced by [1], using a new
macro ARG_ENTRY_HTON to pass a single integer argument to each of
the new actions.

[1] http://patches.dpdk.org/patch/55882/

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
4 years agoethdev: add actions to modify TCP header fields
Dekel Peled [Tue, 2 Jul 2019 14:44:26 +0000 (17:44 +0300)]
ethdev: add actions to modify TCP header fields

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.

This patch uses the new approach introduced by [1], using a simple
integer instead of using an action-specific structure for each of
the new actions.

[1] http://patches.dpdk.org/patch/55882/

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
4 years agodoc: announce infinite Rx pcap
Cian Ferriter [Wed, 3 Jul 2019 11:04:16 +0000 (12:04 +0100)]
doc: announce infinite Rx pcap

This feature was added in the following commit:
commit a3f5252e5cbd ("net/pcap: enable infinitely Rx a pcap file")

Signed-off-by: Cian Ferriter <cian.ferriter@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/sfc: release port upon close
Andrew Rybchenko [Fri, 21 Jun 2019 09:40:41 +0000 (10:40 +0100)]
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>
4 years agonet/sfc: ensure that device is closed on removal
Andrew Rybchenko [Fri, 21 Jun 2019 09:40:40 +0000 (10:40 +0100)]
net/sfc: ensure that device is closed on removal

PCI device may be unplugged when ethdev is not closed yet.

Fixes: aaa3f5f0f79d ("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>
4 years agoethdev: avoid error on PCI unplug of closed port
Andrew Rybchenko [Fri, 21 Jun 2019 09:40:39 +0000 (10:40 +0100)]
ethdev: avoid error on PCI unplug of closed port

If PCI Ethernet device driver removes it on close
(RTE_ETH_DEV_CLOSE_REMOVE) and later PCI device itself is unplugged,
it should not fail because of Ethernet device is already removed.

Fixes: 23ea57a2a0ce ("ethdev: complete closing of port")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reported-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agodoc: fix build with latest meson
Bruce Richardson [Fri, 5 Jul 2019 15:56:55 +0000 (16:56 +0100)]
doc: fix build with latest meson

The latest versions of meson don't build targets when build_by_default is
false but install is true, unlike older versions. We can fix this by having
both build_by_default and install settings come from the build-time option.

Bugzilla ID: 303
Fixes: d02a2dab2dfb ("doc: support building HTML guides with meson")
Fixes: 720b14db3ae2 ("build: generate API documentation with meson")
Cc: stable@dpdk.org
Reported-by: Ali Alnubani <alialnu@mellanox.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
4 years agotimer: fix resource leak in finalize
Anatoly Burakov [Fri, 5 Jul 2019 17:22:44 +0000 (18:22 +0100)]
timer: fix resource leak in finalize

Currently, whenever timer library is initialized, the memory
is leaked because there is no telling when primary or secondary
processes get to use the state, and there is no way to
initialize/deinitialize timer library state without race
conditions [1] because the data itself must live in shared memory.

Add a spinlock to the shared mem config to have a way to
exclusively initialize/deinitialize the timer library without
any races, and implement the synchronization mechanism based
on this lock in the timer library.

Also, update the API doc. Note that the behavior of the API
itself did not change - the requirement to call init in every
process was simply not documented explicitly.

[1] See the following email thread:
https://mails.dpdk.org/archives/dev/2019-May/131498.html

Fixes: c0749f7096c7 ("timer: allow management in shared memory")
Cc: stable@dpdk.org
Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>