dpdk.git
4 years agodoc: fix copyright notice in AVP guide
Allain Legacy [Thu, 7 Nov 2019 20:37:44 +0000 (14:37 -0600)]
doc: fix copyright notice in AVP guide

Aligning the Wind River copyright notices to be consistent with the
other files which bare the Wind River copyright notice.

Fixes: 32113d352d3b ("doc: replace license text with SPDX tag in AVP guide")

Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
4 years agotest/cfgfile: replace license text with SPDX tag
Allain Legacy [Thu, 7 Nov 2019 20:37:43 +0000 (14:37 -0600)]
test/cfgfile: replace license text with SPDX tag

Replacing full license text with SPDX tag.

Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
4 years agotest/thash: replace license text with SPDX tag
Vladimir Medvedkin [Sun, 11 Aug 2019 19:01:17 +0000 (22:01 +0300)]
test/thash: replace license text with SPDX tag

Signed-off-by: Vladimir Medvedkin <medvedkinv@gmail.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
4 years agoport: replace license text with SPDX tag
Xiaolong Ye [Fri, 26 Jul 2019 16:43:41 +0000 (00:43 +0800)]
port: replace license text with SPDX tag

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Ethan Zhuang <zhuangwj@gmail.com>
4 years agonet/nfp: replace license text with SPDX tag
Hemant Agrawal [Fri, 27 Sep 2019 08:33:41 +0000 (14:03 +0530)]
net/nfp: replace license text with SPDX tag

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Heinrich Kuhn <heinrich.kuhn@netronome.com>
4 years agodoc: add tested Marvell integrated NIC platforms
Jerin Jacob [Wed, 27 Nov 2019 10:58:47 +0000 (16:28 +0530)]
doc: add tested Marvell integrated NIC platforms

Add tested Marvell integrated NIC platforms to v19.11 release notes.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
4 years agodoc: add tested Intel platforms with Intel NICs
Wenjie Li [Wed, 27 Nov 2019 13:21:11 +0000 (21:21 +0800)]
doc: add tested Intel platforms with Intel NICs

Add tested Intel platforms with Intel NICs to v19.11 release notes.

Signed-off-by: Wenjie Li <wenjiex.a.li@intel.com>
4 years agodoc: add codespell config in contributing guide
Kevin Traynor [Wed, 20 Nov 2019 13:27:13 +0000 (13:27 +0000)]
doc: add codespell config in contributing guide

Document the config to use codespell with checkpatches.sh.

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
4 years agomaintainers: update armv8 crypto PMD
Ruifeng Wang [Wed, 27 Nov 2019 08:47:08 +0000 (16:47 +0800)]
maintainers: update armv8 crypto PMD

It is expected to update this PMD to be in line with Arm's crypto library.
Update the maintainership to refect the change.

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
4 years agomaintainers: update for NFP
Heinrich Kuhn [Wed, 27 Nov 2019 11:36:15 +0000 (13:36 +0200)]
maintainers: update for NFP

As Alejandro is no longer with Netronome we appointed two new
maintainers for the Netronome PMD

Signed-off-by: Heinrich Kuhn <heinrich.kuhn@netronome.com>
4 years agodevtools: check coverity and bugzilla tags
David Marchand [Tue, 8 Oct 2019 15:52:29 +0000 (17:52 +0200)]
devtools: check coverity and bugzilla tags

Let's try to check for discrepancies in coverity and bugzilla tags.
The contributing guide specifies that:
- for coverity issues, the tag is 'Coverity issue:'
- for bugzilla issues, the tag is 'Bugzilla ID:'

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
4 years agodevtools: reset compilation flags for each target
David Marchand [Wed, 2 Oct 2019 16:55:47 +0000 (18:55 +0200)]
devtools: reset compilation flags for each target

Same idea than overriding PATH and PKG_CONFIG_PATH, it can be quite
useful to override compilation flags like CFLAGS, CPPFLAGS and LDFLAGS
for cross compilation or libraries that won't provide a pkg-config file.

Fixes: 272236741258 ("devtools: load target-specific compilation environment")

Signed-off-by: David Marchand <david.marchand@redhat.com>
4 years agogit: ignore more build directories
Thomas Monjalon [Sat, 14 Sep 2019 15:05:09 +0000 (17:05 +0200)]
git: ignore more build directories

Build directories commonly have compiler in their names.
In order to filter build directories not starting with "build-"
(common with make), patterns for gcc and clang are added to .gitignore.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agotest/service: fix wait for service core
Harry van Haaren [Wed, 27 Nov 2019 13:20:27 +0000 (13:20 +0000)]
test/service: fix wait for service core

This commit fixes a sporadic failure of the service_autotest
unit test, as seen in the DPDK CI. The failure occurs as the main test
thread did not wait on the service-thread to return, and allowing it
to read a flag before the service was able to write to it.

The fix changes the wait API call to specific the service-core ID,
and this waits for cores with both ROLE_RTE and ROLE_SERVICE.

The rte_eal_mp_wait_lcore() call does not (and should not) wait
for service cores, so must not be used to wait on service-cores.

Fixes: f038a81e1c56 ("service: add unit tests")
Cc: stable@dpdk.org
Reported-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agoevent/octeontx: fix partial Rx packet handling
Pavan Nikhilesh [Wed, 27 Nov 2019 12:36:47 +0000 (18:06 +0530)]
event/octeontx: fix partial Rx packet handling

When net/octeontx is connected to event/octeontx as an event Rx adapter,
PKI aka 'net/octeontx' can forward packets directly to SSO aka
'event/octeontx'.
When pumping traffic to PKI if flow control is disabled internal FIFOs
might be overrun causing partial l2 packets to be enqueued.
SSO receives <31:0> TAG tag calculated by PKI, in normal cases <31:28>
is always 0 which signifies RTE_EVENT_TYPE_ETHDEV. But in case of
partial received packets PKI sets the <31:0> TAG as 0xFFFFFFFF which
is an invalid event type.

Add a check to see if TAG is 0xFFFFFFFF and free the partial receive
packet.

Fixes: d0d654986018 ("net/octeontx: support event Rx adapter")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
4 years agonet/mlx5: fix legacy inline multi-packet performance
Viacheslav Ovsiienko [Wed, 27 Nov 2019 13:06:16 +0000 (13:06 +0000)]
net/mlx5: fix legacy inline multi-packet performance

The legacy multi-packet write is the feature allowing to
put multiple packets into one transmitting descriptor,
this feature is supported by only NIC ConnectX-4LX.
The number of packets should be limited to provide
optimal size descriptor and better performance.

Fixes: 18a1c20044c0 ("net/mlx5: implement Tx burst template")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/mlx5: fix legacy non-inline multi-packet performance
Viacheslav Ovsiienko [Wed, 27 Nov 2019 12:33:12 +0000 (12:33 +0000)]
net/mlx5: fix legacy non-inline multi-packet performance

The legacy multi-packet write is the feature allowing to
put multiple packets into one transmitting descriptor,
this feature is supported by only NIC ConnectX-4LX.
The number of packets should be limited to provide
optimal size descriptor and better performance.

Fixes: 18a1c20044c0 ("net/mlx5: implement Tx burst template")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/mlx5: fix default mark copy flow
Viacheslav Ovsiienko [Wed, 27 Nov 2019 13:36:43 +0000 (13:36 +0000)]
net/mlx5: fix default mark copy flow

In extensive metadata mode the MARK copy table is engaged,
if the application creates the flow with zero MARK ID action:

flow create 1 ingress pattern eth / ... / end actions mark id 0 / .. end

And then destroys that, the traffic to the port stops. This happens
due to default flow for the copy table has the zero ID and is removed
with the application rule. The patch extends internal ID variable
to 64 bits and provide the UINT64_MAX ID for the copy table default
rule.

Fixes: dd3c774f6ffb ("net/mlx5: add metadata register copy table")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
4 years agoethdev: limit maximum number of queues
Thomas Monjalon [Wed, 27 Nov 2019 12:22:56 +0000 (13:22 +0100)]
ethdev: limit maximum number of queues

A buffer overflow happens in testpmd with some drivers
since the queue arrays are limited to RTE_MAX_QUEUES_PER_PORT.

The advertised capabilities of mlx4, mlx5 and softnic
for the number of queues were the maximum number: UINT16_MAX.
They must be limited by the configured RTE_MAX_QUEUES_PER_PORT
that applications expect to be respected.

The limitation is applied at ethdev level (function rte_eth_dev_info_get),
in order to force the configured limit for all drivers.

Fixes: 14b53e27b30e ("ethdev: fix crash with multiprocess")
Cc: stable@dpdk.org
Reported-by: Raslan Darawsheh <rasland@mellanox.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
4 years agoversion: 19.11-rc4
Thomas Monjalon [Tue, 26 Nov 2019 23:43:18 +0000 (00:43 +0100)]
version: 19.11-rc4

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agomaintainers: claim maintainership of ptpclient example
Kirill Rybalchenko [Tue, 15 Oct 2019 13:45:35 +0000 (14:45 +0100)]
maintainers: claim maintainership of ptpclient example

Claim maintainership of examples/ptpclient/

Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
4 years agomaintainers: replace for AVP
Allain Legacy [Thu, 7 Nov 2019 20:48:34 +0000 (14:48 -0600)]
maintainers: replace for AVP

Resigning my maintainership of the AVP driver and adding Steve Webster
as a new maintainer.

Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
4 years agomaintainers: update for ifpga
Xiaolong Ye [Mon, 28 Oct 2019 05:47:16 +0000 (13:47 +0800)]
maintainers: update for ifpga

Add raw/ifpga to next-net-intel tree.

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
4 years agodoc: update release notes for 19.11
John McNamara [Mon, 25 Nov 2019 12:38:13 +0000 (12:38 +0000)]
doc: update release notes for 19.11

Fix grammar, spelling and formatting of DPDK 19.11 release notes.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
4 years agodoc: sort features in 19.11 release notes
Thomas Monjalon [Tue, 26 Nov 2019 22:11:36 +0000 (23:11 +0100)]
doc: sort features in 19.11 release notes

Move cryptodev feature near other crypto features.

Group ethdev features together.
Sort drivers/net features with new PMDs first.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agodoc: add ABI policy changes to release notes
Ray Kinsella [Mon, 18 Nov 2019 13:15:28 +0000 (13:15 +0000)]
doc: add ABI policy changes to release notes

Add some pointers to the releases notes on the changes to the abi policy,
the introduction of project-level ABI management and the deprecation of
library-level management.

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Acked-by: John McNamara <john.mcnamara@intel.com>
4 years agousertools: fix device binding module detection
Pavan Nikhilesh [Sat, 2 Nov 2019 14:23:15 +0000 (19:53 +0530)]
usertools: fix device binding module detection

Some kernel modules use '-' in their name when registering through
`pci_register_driver` and the same name  is populated in
'/sys/bus/pci/drivers/'.
But the kernel always populates modules names replacing '-' with '_'
in '/sys/module/'.

Example:
# ./usertools/dpdk-devbind.py -b octeontx2-nicpf 0002:03:00.0
Error: Driver 'octeontx2-nicpf' is not loaded.

# ls /sys/bus/pci/drivers/octeontx2-nicpf
bind  module  new_id  remove_id  uevent  unbind
# ls /sys/module/octeontx2_nicpf/
drivers  uevent  version

The patch addresses it by always replacing '-' with '_' when looking in
'/sys/module/'

Signed-off-by: Phanendra Vukkisala <pvukkisala@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
4 years agoci: add minimal check on testpmd
David Marchand [Fri, 22 Nov 2019 15:54:29 +0000 (16:54 +0100)]
ci: add minimal check on testpmd

Try to start testpmd with two vdevs without hugepages.
This is a really basic check, but better than nothing.

Signed-off-by: David Marchand <david.marchand@redhat.com>
4 years agonet/mlx5: fix crash on GRE flow rule parsing
Suanming Mou [Tue, 26 Nov 2019 14:08:35 +0000 (16:08 +0200)]
net/mlx5: fix crash on GRE flow rule parsing

When set the GRE item, GRE key should follow after GRE header, or the
header gre_item pointer used by the key will be invalid.

Currently in the mlx5_flow_validate_item_gre_key() function, the header
gre_item pointer is access before checking if the key is after the
header or not. Once the key item is before the header, invalid gre_item
pointer access happens.

Move the gre_item pointer access after the GRE header check to avoid the
crash issue.

Fixes: a7a0365565a4 ("net/mlx5: match GRE key and present bits")
Cc: stable@dpdk.org
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
4 years agonet/mlx5: add GENEVE in tunnel offloads capabilities
Suanming Mou [Tue, 26 Nov 2019 14:06:05 +0000 (16:06 +0200)]
net/mlx5: add GENEVE in tunnel offloads capabilities

GENEVE is available in tunnel offloads. Add it as the default support
option.

Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
4 years agonet/mlx5: fix build with dlopen linkage
Ali Alnubani [Tue, 26 Nov 2019 08:35:24 +0000 (08:35 +0000)]
net/mlx5: fix build with dlopen linkage

The header mlx5_glue.h includes rte_byteorder.h, which isn't
pulled by global_inc. This patch adds the missing include directory
and fixes the build error:

  In file included from drivers/net/mlx5/mlx5_glue.c:31:
  drivers/net/mlx5/mlx5_glue.h:12:10: fatal error:
  rte_byteorder.h: No such file or directory

The build failure can be triggered with:
  meson -Dibverbs_link=dlopen build && ninja -C build

Fixes: 400d985eb586 ("net/mlx5: add VLAN push/pop DR commands to glue")

Signed-off-by: Ali Alnubani <alialnu@mellanox.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
4 years agonet/mlx5: fix legacy multi-packet Tx descriptors
Viacheslav Ovsiienko [Tue, 26 Nov 2019 10:45:03 +0000 (10:45 +0000)]
net/mlx5: fix legacy multi-packet Tx descriptors

ConnectX-4LX supports multiple packets within the single Tx
descriptor. This feature is named as "Legacy Multi-Packet Write"
and imposes a lot of limitations:

  - no ACLs, it means no NIC Tx Flows are supported and Tx metadata
    become meaningless
  - the required minimal inline data must be zero
  - no SR-IOV, it means no support in E-Switch configurations,
  - no priority and dscp forcing
  - no VLAN insertion
  - no TSO
  - all packets within MPW session must have the same size

This legacy MPW feature is mainly intended for test purposes.
To explicitly engage the feature on ConnectX-4LX the devargs
should be specified:

  - txq_mpw_en=1

This feature was dropped in 19.08, this patch reverts it back.

Fixes: 18a1c20044c0 ("net/mlx5: implement Tx burst template")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/kni: fix crash caused by double stop
Ferruh Yigit [Tue, 26 Nov 2019 10:50:07 +0000 (10:50 +0000)]
net/kni: fix crash caused by double stop

'close()' calls 'stop()' and 'stop()' cancels pthread without any check.
Calling 'stop()' & 'close()' sequentially tries to cancel pthread twice
which will cause a crash.

Adding a state check in 'stop()' before canceling the pthread to prevent
multiple stop.

Fixes: 696fbc7bb4fc ("net/kni: remove resources when port is closed")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Yinan Wang <yinan.wang@intel.com>
4 years agoethdev: fix item expansion for RSS flow
Matan Azrad [Tue, 26 Nov 2019 09:04:10 +0000 (09:04 +0000)]
ethdev: fix item expansion for RSS flow

When the last item in flow pattern includes "next protocol" field which
is relevant for RSS flow expansion, a new item is added to the pattern
according to the "next protocol" field. This field is called missed
field.

The missed field wrongly was not initialized what caused to some of the
flow item fields to contain garbage values.

As a result, the PMDs internal flow engine may crash.

For example, the spec value may include garbage pointer and to cause
crash.

Initialize the missed field with zeroes.

Fixes: fc2dd8dd492f ("ethdev: fix expand RSS flows")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
4 years agonet/ifc: check VFIO query error
Xiao Wang [Tue, 26 Nov 2019 14:59:31 +0000 (09:59 -0500)]
net/ifc: check VFIO query error

It's possible that we fail to get the IOMMU group of ifcvf device, this
patch adds a check on the return value.

Coverity issue: 349894
Fixes: a3f8150eac6d ("net/ifcvf: add ifcvf vDPA driver")
Cc: stable@dpdk.org
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/mlx5: fix flow engine choice
Dekel Peled [Tue, 26 Nov 2019 08:34:22 +0000 (10:34 +0200)]
net/mlx5: fix flow engine choice

Commit in fixes line sets the DV (Direct Verbs) flow engine as default.
Newer versions of DV flow engine use the DR (Direct Rules) features.
DR is supported from RDMA Core library version rdma-core-24.0.
This cause failure to start port when using older rdma-core version,
without DR support.

This patch selects DV flow engine if rdma-core version is v24.0 or
higher. Verbs flow engine is selected otherwise.

Fixes: cd4569d2bf3c ("net/mlx5: change default flow engine to DV")

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
4 years agonet/octeontx2: fix loopback config return for VF
Sunil Kumar Kori [Tue, 26 Nov 2019 07:03:58 +0000 (12:33 +0530)]
net/octeontx2: fix loopback config return for VF

loopback mode is not supported for VFs so returning error if
VF is being configured with loopback mode.

Fixes: 920717e4d8ba ("net/octeontx2: add device start operation")
Cc: stable@dpdk.org
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
4 years agonet/e1000: fix link status
Lunyuan Cui [Wed, 13 Nov 2019 12:46:59 +0000 (12:46 +0000)]
net/e1000: fix link status

The link status got from link status register was not correct,
because register has been reset when ports reset.
After port reset, set the link status down.

Fixes: c431ec66c54c ("net/igb: support setting link up or down")
Cc: stable@dpdk.org
Signed-off-by: Lunyuan Cui <lunyuanx.cui@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
4 years agonet/ixgbe: fix link status
Lunyuan Cui [Mon, 18 Nov 2019 15:37:44 +0000 (15:37 +0000)]
net/ixgbe: fix link status

The link status for 82599eb got from link status register was not
correct. Check the enable/disable flag of tx laser, set the link
status down if tx laser disabled. Then, we can get correct status.
But after port reset, tx laser register will be reset enable.
Link status will always be up. So set tx laser disable when port resets.

When hw->mac.autotry_restart is true, whether tx laser is disable or
enable, it will be set enable in ixgbe_flap_tx_laser_multispeed_fiber().
hw->mac.autotry_restart can be set true in both port init and port start.
Because we don't need this treatment before port starts, set
hw->mac.autotry_restart false when port init.

Fixes: 0408f47ba4d6 ("net/ixgbe: fix busy polling while fiber link update")
Cc: stable@dpdk.org
Signed-off-by: Lunyuan Cui <lunyuanx.cui@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
4 years agonet/e1000: fix link status update
Lunyuan Cui [Wed, 20 Nov 2019 09:22:03 +0000 (09:22 +0000)]
net/e1000: fix link status update

Meaningless to judge the link state according to the memset'ed
link variable, this patch fixes this logical issue.

In addition, this patch changes the variable from link_check to link_up
according to its real meaning.

Fixes: 80ba61115e77 ("net/e1000: use link status helper functions")
Cc: stable@dpdk.org
Signed-off-by: Lunyuan Cui <lunyuanx.cui@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
4 years agoethdev: remove deprecation notice about RSS hash flag
Andrew Rybchenko [Tue, 19 Nov 2019 12:12:15 +0000 (12:12 +0000)]
ethdev: remove deprecation notice about RSS hash flag

The offload flag was added, but the deprecation notice was not removed.

Fixes: 5d308972954c ("ethdev: add mbuf RSS update as an offload")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agoethdev: remove deprecation notice for packet type set
Andrew Rybchenko [Tue, 19 Nov 2019 12:12:14 +0000 (12:12 +0000)]
ethdev: remove deprecation notice for packet type set

The functionality is added, but the deprecation notice is not
removed.

Fixes: 5d4813acda2c ("ethdev: add packet type range function")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/hns3: fix checking enough Tx BDs
Wei Hu (Xavier) [Mon, 25 Nov 2019 09:00:53 +0000 (17:00 +0800)]
net/hns3: fix checking enough Tx BDs

In .tx_pkt_burst ops implementation function of hns3 PMD driver,
there is one check whether there are enough BDs in the TX queue.
If not, driver will stop sending the packets.

Currently in the 'for' process loop, the next_to_use member of
TX queue is not updated in time after processing BDs of one packet,
which results in the invalid action of checking whether there are
enough BDs and failure in sending packets.

This patch fixes it by moving the assignment statment of the
next_to_use member of TX queue to the place after porcessing TX BDs
in the 'for' loop.

Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations")
Cc: stable@dpdk.org
Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
4 years agodoc: update qede guide
Rasesh Mody [Fri, 22 Nov 2019 23:31:18 +0000 (15:31 -0800)]
doc: update qede guide

- Add note for sharing an adapter between DPDK and Linux drivers.
- Update the firmware version in example.
- Add Config note for potential error due to lack of memzone descriptor
  count.

Signed-off-by: Rasesh Mody <rmody@marvell.com>
4 years agonet/octeontx2: fix packet type parsing disabled by default
Pavan Nikhilesh [Sat, 23 Nov 2019 08:58:31 +0000 (14:28 +0530)]
net/octeontx2: fix packet type parsing disabled by default

Enable packet type parsing by default, only disable when
`rte_eth_dev_set_ptypes()` is called with ptype_mask as 0.
This would enable applications that are dependent on packet type parsing
like l3fwd.

Also this patch preserves configuration set by `rte_eth_dev_set_ptypes`
across multiple calls of `rte_eth_dev_configure()`

Fixes: d2706e15e6fb ("net/octeontx2: support reduced set of packet types")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
4 years agodoc: update metadata feature in mlx5 guide
Viacheslav Ovsiienko [Mon, 18 Nov 2019 11:20:34 +0000 (11:20 +0000)]
doc: update metadata feature in mlx5 guide

Legacy Verbs supports MARK and FLAG metadata actions only.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agonet/mlx5: fix getting metadata register for E-Switch domain
Viacheslav Ovsiienko [Thu, 21 Nov 2019 17:59:42 +0000 (17:59 +0000)]
net/mlx5: fix getting metadata register for E-Switch domain

The metadata register used for META item/action within E-Switch
steering domain should be altered depending on dv_xmeta_en
devarg value.

Fixes: 3e8edd0ef848 ("net/mlx5: update metadata register ID query")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/mlx5: fix chosen L3/L4 layer with tunnel
Suanming Mou [Thu, 21 Nov 2019 12:09:30 +0000 (14:09 +0200)]
net/mlx5: fix chosen L3/L4 layer with tunnel

For tunnel mode, there may be two L3/L4 layer match pattern items, one
for inner and one for outer layers. The L3 TTL and L4 port header
modify actions should handle the outermost layer items.

Currently flow_dv_attr_init() doesn't distinguish between outer and
inner layers, since inner layer comes later than the outer layer, this
may cause inner layer values also set to the flow attributes and may
lead actions to use inner L3/L4 pattern items.

Adding a check in flow_dv_attr_init() to prevent inner layer to set the
flow attribute if the previous L3/L4 outer pattern exist.

Fixes: 4bb14c83df95 ("net/mlx5: support modify header using Direct Verbs")
Cc: stable@dpdk.org
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agoapp/testpmd: use better randomness for Tx split
Pavan Nikhilesh [Thu, 21 Nov 2019 19:34:06 +0000 (01:04 +0530)]
app/testpmd: use better randomness for Tx split

Use rte_rand() instead of random() for better randomness.

Coverity issue: 337666
Fixes: 79bec05b32b7 ("app/testpmd: add ability to split outgoing packets")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/hns3: fix duplicated VLAN entry
Min Hu (Connor) [Fri, 22 Nov 2019 12:06:24 +0000 (20:06 +0800)]
net/hns3: fix duplicated VLAN entry

When setting vlan, hns3 driver will add vlan entry to vlan linked list
each time, and this is unreasonable.

This patch adds a check whether the VLAN to be added already exists
in the linked list and prevents adding duplicated vlan.

Fixes: 411d23b9eafb ("net/hns3: support VLAN")
Cc: stable@dpdk.org
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
4 years agonet/hns3: fix VF link status
Huisong Li [Fri, 22 Nov 2019 12:06:23 +0000 (20:06 +0800)]
net/hns3: fix VF link status

Currently, port link status is "up" in VF driver after user calling the
rte_eth_dev_stop API. This is unreasonable.

Therefore, this patch adjusts the strategy of getting link status from
PF driver for VF. VF driver should stop getting link status from PF by
canceling the alarm that VF driver send mailbox message to PF driver,
when the rte_eth_dev_stop API is called. And VF driver should restore
the alarm when the rte_eth_dev_start API is called.

Fixes: a5475d61fa34 ("net/hns3: support VF")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
4 years agonet/hns3: fix mailbox response length
Chengchang Tang [Fri, 22 Nov 2019 12:06:22 +0000 (20:06 +0800)]
net/hns3: fix mailbox response length

Remove the macro 'HNS3_REG_MSG_DATA_OFFSET' which is used to prevent
access violation for response array by limiting the response data length
to 4.
But the limit value is too short to get some longer information such as
6 byte MAC address.

This patch modifies the length of response data from mailbox to allow
the response data length to be 8. So that the VF driver could get more
data from PF driver by mailbox.

Fixes: 463e748964f5 ("net/hns3: support mailbox")
Cc: stable@dpdk.org
Signed-off-by: Chengchang Tang <tangchengchang@hisilicon.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
4 years agonet/hns3: fix sending packets less than 60 bytes
Wei Hu (Xavier) [Fri, 22 Nov 2019 12:06:21 +0000 (20:06 +0800)]
net/hns3: fix sending packets less than 60 bytes

Ethernet minimum packet length is 64 bytes. If upper application
sends packets with less than 60 bytes in length(no CRC), driver
adds padding processing to avoid failure.

Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
4 years agonet/hns3: fix VF configuration after abnormal exit
Wei Hu (Xavier) [Fri, 22 Nov 2019 12:06:20 +0000 (20:06 +0800)]
net/hns3: fix VF configuration after abnormal exit

When the application using VF device exits abnormally, for example,
when it is killed by 'kill -9', kernel PF netdev driver also stores
the corresponding configuration table entries of VF device.

This patch fixes it by adding message of deleting VF configuration
table entry corresponds to the revision of kernel hns3 netdev
driver, the new message is added to notify the kernel PF netdev
driver to clean up the VF configuration initialization during VF
initialization.

This revision is compatible with the old version of kernel hns3
netdev driver. The old version of kernel pf netdev driver will
ignore this message.

Fixes: a5475d61fa34 ("net/hns3: support VF")
Cc: stable@dpdk.org
Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
4 years agonet/hns3: fix RSS hardware configuration restore
Hao Chen [Fri, 22 Nov 2019 12:06:19 +0000 (20:06 +0800)]
net/hns3: fix RSS hardware configuration restore

This patch fixes the bug that hardware configuration called
tc_size doesn't restore to the initial value when starting
the app, configuring PFC and then restarting the app,
because of the tc_mode didn't initial when rss is disabled.

Fixes: c37ca66f2b27 ("net/hns3: support RSS")
Cc: stable@dpdk.org
Signed-off-by: Hao Chen <chenhao164@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
4 years agoapp/testpmd: reduce memory consumption
David Marchand [Fri, 22 Nov 2019 10:43:23 +0000 (11:43 +0100)]
app/testpmd: reduce memory consumption

Following [1], testpmd memory consumption has skyrocketted.
The rte_port structure has gotten quite fat.

struct rte_port {
[...]
  struct rte_eth_rxconf rx_conf[65536];            /* 266280 3145728 */
  /* --- cacheline 53312 boundary (3411968 bytes) was 40 bytes ago --- */
  struct rte_eth_txconf tx_conf[65536];            /* 3412008 3670016 */
  /* --- cacheline 110656 boundary (7081984 bytes) was 40 bytes ago --- */
[...]
  /* size: 8654936, cachelines: 135234, members: 31 */
[...]

testpmd handles RTE_MAX_ETHPORTS ports (32 by default) which means that it
needs ~256MB just for this internal representation.

The reason is that a testpmd rte_port (the name is quite confusing, as
it is a local type) maintains configurations for all queues of a port.
But where you would expect testpmd to use RTE_MAX_QUEUES_PER_PORT as the
maximum queue count, the rte_port uses MAX_QUEUE_ID set to 64k.

Prefer the ethdev maximum value.

After this patch:
struct rte_port {
[...]
  struct rte_eth_rxconf      rx_conf[1025];        /*  8240 49200 */
  /* --- cacheline 897 boundary (57408 bytes) was 32 bytes ago --- */
  struct rte_eth_txconf      tx_conf[1025];        /* 57440 57400 */
  /* --- cacheline 1794 boundary (114816 bytes) was 24 bytes ago --- */
[...]
  /* size: 139488, cachelines: 2180, members: 31 */
[...]

With this, we can ask for less memory in test-null.sh.

[1]: https://git.dpdk.org/dpdk/commit/?id=436b3a6b6e62

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
4 years agonet/bnxt: fix freeing all VNICs during port stop
Somnath Kotur [Thu, 21 Nov 2019 07:57:40 +0000 (13:27 +0530)]
net/bnxt: fix freeing all VNICs during port stop

Now that vnics are created only as part of the flow creation cmds
and not during init, we cannot rely on iterating only through
'nr_vnics'. We need to sweep all the vnics by using 'max_vnics'
otherwise a vnic with a stale 'rx_queue_cnt' might be left lingering
post a port stop/start operation. This could lead to a segfault.
This change is required because of the recent fix made by commit to
"fix flow creation with non-consecutive group ids".

Fixes: fcdd7210aa1f ("net/bnxt: fix flow creation with non-consecutive group ids")

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agodoc: update release notes for bnxt
Ajit Khaparde [Tue, 19 Nov 2019 01:18:37 +0000 (17:18 -0800)]
doc: update release notes for bnxt

Update release doc briefly describing updates to bnxt PMD for
19.11 release.

The support for these was added in the following commits:
1) b150a7e7ee66 ("net/bnxt: support LRO on Thor adapters")
2) be14720def9c ("net/bnxt: support FW reset")
3) df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW")
4) 698aa7e95325 ("net/bnxt: add code to determine the Tx COS queue")
5) 04102f2ffc8c ("net/bnxt: update HWRM API to version 1.10.1.6")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agodoc: update bnxt feature list
Ajit Khaparde [Tue, 19 Nov 2019 23:32:30 +0000 (15:32 -0800)]
doc: update bnxt feature list

Updating bnxt.ini file.
These features were added earlier under the following commits.
1) 94d4afd2d167 ("net/bnxt: advertise scatter Rx offload capability")
2) 57d5e5bc86e4 ("net/bnxt: add statistics")
3) 88920136688c ("net/bnxt: support xstats get by id")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agonet/mlx5: fix selection between encap and decap
Ori Kam [Thu, 21 Nov 2019 13:18:31 +0000 (13:18 +0000)]
net/mlx5: fix selection between encap and decap

The current raw_encap function selects if to decap or encap
based on the egress/ingress attribute. This concepts doesn't work
in case of FDB since all flows are considered ingress.

To solve this issue we moved to check the encap size.
if the encap size is larger then eth + ipv4 it means we are
trying to encap.

Fixes: 8ba9eee4ce32 ("net/mlx5: add raw data encap/decap to Direct Verbs")
Cc: stable@dpdk.org
Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agodoc: fix tap guide
Andrzej Ostruszka [Thu, 21 Nov 2019 13:27:01 +0000 (14:27 +0100)]
doc: fix tap guide

Corrected one typo and IP address according RFC5735.

Fixes: de96fe68ae95 ("net/tap: add basic flow API patterns and actions")
Cc: stable@dpdk.org
Signed-off-by: Andrzej Ostruszka <aostruszka@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/ixgbe: fix performance drop caused by MACsec
Shougang Wang [Thu, 21 Nov 2019 07:32:05 +0000 (07:32 +0000)]
net/ixgbe: fix performance drop caused by MACsec

Currently macsec offload will be enabled every time when device starts.
It will cause QoS sample application performance drop issue. This patch
adds check in dev_start ops to make sure macsec is only enabled when
required explicitly.

Fixes: 50556c88104c ("net/ixgbe: fix MACsec setting")
Cc: stable@dpdk.org
Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/mlx5: fix flow tag hash list conversion
Matan Azrad [Thu, 21 Nov 2019 11:27:57 +0000 (11:27 +0000)]
net/mlx5: fix flow tag hash list conversion

When DR is not supported and DV is supported, tag action still can be
used by the metadata feature.

Wrongly, the tag hash list was not created what caused failure in
metadata action creation.

Create the tag hash list for each DV case.

Fixes: 860897d2895a ("net/mlx5: reorganize flow tables with hash list")

Signed-off-by: Matan Azrad <matan@mellanox.com>
4 years agonet/virtio-user: drop attribute unused for memory callback
Tiwei Bie [Tue, 19 Nov 2019 07:12:24 +0000 (15:12 +0800)]
net/virtio-user: drop attribute unused for memory callback

The "addr" param has been used since the event callbacks are enabled
for external memory. So the "__rte_unused" should be dropped.

Besides, slightly refine the coding style by consistently assuming
tabs are 8 characters.

Fixes: f32c7c9de961 ("malloc: enable event callbacks for external memory")
Cc: stable@dpdk.org
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
4 years agoapp/testpmd: fix memory leak on detach
Stephen Hemminger [Wed, 20 Nov 2019 23:26:28 +0000 (15:26 -0800)]
app/testpmd: fix memory leak on detach

The RTE_FOREACH_MATCHING_DEV iterator requires that
if a break is done before the end of the loop,
the function rte_eth_iterator_cleanup() must be called.

Fixes: 55e51c962432 ("app/testpmd: add device related commands")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
4 years agonet/ice: support flow director for normal GTPU
Yahui Cao [Thu, 21 Nov 2019 11:20:15 +0000 (19:20 +0800)]
net/ice: support flow director for normal GTPU

Add FDIR support for normal GTP-U packet, which doesn't contain GTP_PSC
extension header.

Fixes: efc16c621415 ("net/ice: support flow director GTPU tunnel")

Signed-off-by: Yahui Cao <yahui.cao@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/ice: fix pattern name of GTPU with extension header
Yahui Cao [Thu, 21 Nov 2019 11:20:14 +0000 (19:20 +0800)]
net/ice: fix pattern name of GTPU with extension header

Pattern name of GTP-U flow with extension header should be
xxx_gtpu_eh_xxx. So it will not conflict with the pattern name of a
GTP-U flow that does not contains extension header.

Fixes: 3e4eab9c2192 ("net/ice: add pattern manifest")

Signed-off-by: Yahui Cao <yahui.cao@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/ice: fix flow director conflict
Qi Zhang [Thu, 21 Nov 2019 02:57:24 +0000 (10:57 +0800)]
net/ice: fix flow director conflict

Flow type "IPv4 + UDP" or "IPv4 + TCP" is conflict with "IPv4 + any"
flow type. If a rule for IPv4 + any is created, we should reject any
rule for IPv4 + UDP otherwise the first rule may be impacted, same
decision should be made on a reverse order.  For IPv6 and IPv4 GTPU
inner case, we have the same limitation.

Fixes: 109e8e06249e ("net/ice: configure HW flow director rule")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Tested-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agodoc: fix a typo in EAL guide
Anatoly Burakov [Thu, 21 Nov 2019 12:39:23 +0000 (12:39 +0000)]
doc: fix a typo in EAL guide

The correct name for virt2memseg API is `rte_mem_virt2memseg`, not
`rte_virt2memseg`.

Fixes: 950e8fb4e194 ("mem: allow registering external memory areas")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
4 years agodoc: add core queries in power example guide
David Hunt [Fri, 15 Nov 2019 12:51:24 +0000 (12:51 +0000)]
doc: add core queries in power example guide

This patch adds some minor updates for the vm_power_manager and guest_cli
example applications.

Now that the virtio-serial channels between vm_power manager and
the guest_cli has bi-directional capability, there are some new commands.

Firstly, the command in vm_power_manager to enable queries for a given VM:

  * set_query {vm_name} enable|disable

Then, commands to query the frequencies and capabilities of the cores
in the VM:

  * query_cpu_freq {core_num}|all
  * query_cpu_caps {core_num}|all

Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
4 years agoeal: fix header file install with meson
Ali Alnubani [Tue, 26 Nov 2019 15:38:36 +0000 (15:38 +0000)]
eal: fix header file install with meson

The header file 'rte_vfio.h' might be required by some external apps.
This patch adds it to the list of common_headers so that it's
installed by meson.

Fixes: 610beca42ea4 ("build: remove library special cases")
Cc: stable@dpdk.org
Signed-off-by: Ali Alnubani <alialnu@mellanox.com>
Reviewed-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
4 years agoexamples/ioat: fix possible null dereference
Bruce Richardson [Mon, 25 Nov 2019 16:47:41 +0000 (16:47 +0000)]
examples/ioat: fix possible null dereference

When searching for raw devices with the correct type, we check the driver
name using strcmp, without first checking that the call to info get
succeeded and assigned a value to that pointer.

If the call to get the device info fails, we can treat it as if the device
didn't match, and continue the loop, so the easiest fix is just to skip the
strcmp if the driver_name is null. [A non-null value from a previous failed
match is ok as it too causes the same behaviour of another loop iteration].

Coverity issue: 350353
Fixes: 2328542ed84e ("examples/ioat: add rawdev copy mode")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
4 years agoexamples/ioat: handle error when querying number of stats
Bruce Richardson [Mon, 25 Nov 2019 15:36:20 +0000 (15:36 +0000)]
examples/ioat: handle error when querying number of stats

To get the amount of memory needed for stats, we call the xstats_get_names
function with a NULL parameter, which can return -1 on error. This negative
value was not previously handled correctly, so we adjust things to quit the
stats printing routine if this basic call fails.

Coverity issue: 350346
Fixes: 632bcd9b5d4f ("examples/ioat: print statistics")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
4 years agoexamples/ioat: handle failure case for ioat dequeue
Bruce Richardson [Mon, 25 Nov 2019 15:23:03 +0000 (15:23 +0000)]
examples/ioat: handle failure case for ioat dequeue

On a failure with the ioat dequeue, -1 is returned, which was not properly
handled. This could lead to out-of-bounds reads on a later loop which
assumed a positive return value. Fix this by treating an error as though a
dequeue of 0 had been encountered.

Coverity issue: 350342
Coverity issue: 350349
Fixes: 2328542ed84e ("examples/ioat: add rawdev copy mode")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
4 years agomalloc: fix memory element size in case of padding
Xueming Li [Thu, 21 Nov 2019 14:25:02 +0000 (14:25 +0000)]
malloc: fix memory element size in case of padding

This patch fixes wrong inner memory element size when joining two
elements.

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
4 years agodoc: update QoS scheduler guides
Jasvinder Singh [Tue, 26 Nov 2019 14:28:29 +0000 (14:28 +0000)]
doc: update QoS scheduler guides

Updates documentation to reflect the changes in the QoS scheduler
library and example.

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
4 years agocrypto/ccp: fix digest size capabilities
Amaranath Somalapuram [Fri, 22 Nov 2019 06:47:47 +0000 (12:17 +0530)]
crypto/ccp: fix digest size capabilities

CCP can support varied digest sizes ranging from 1 to some max value
But the current code support only fixed max values.
This patch updates the minimum digest sizes to 1

Fixes: e0d88a394e ("crypto/ccp: support run-time CPU based auth")
Cc: stable@dpdk.org
Signed-off-by: Amaranath Somalapuram <asomalap@amd.com>
4 years agocrypto/ccp: fix scheduling of burst
Amaranath Somalapuram [Fri, 22 Nov 2019 06:47:17 +0000 (12:17 +0530)]
crypto/ccp: fix scheduling of burst

CCP driver was scheduling only one CCP in a single burst(enqueue).
Effective throughput was limited to 1 CCP performance.
Scheduling multiple ccp within one burst will increase the ccp performance.
this changes will divide the enqueue packets equally among the multiple CCP

Fixes: e0d88a394e ("crypto/ccp: support run-time CPU based auth")
Cc: stable@dpdk.org
Signed-off-by: Amaranath Somalapuram <asomalap@amd.com>
4 years agocrypto/ccp: fix CPU authentication crash
Amaranath Somalapuram [Fri, 22 Nov 2019 06:46:47 +0000 (12:16 +0530)]
crypto/ccp: fix CPU authentication crash

when ccp_auth_opt=1 is set and if authentication error occurred,
ccp driver crash. The enqueue referance count nb_ops miss match
with dequeue nb_ops on authentication error.

Fixes: e0d88a394e ("crypto/ccp: support run-time CPU based auth")
Cc: stable@dpdk.org
Signed-off-by: Amaranath Somalapuram <asomalap@amd.com>
4 years agocrypto/ccp: fix maximum queues and burst size
Amaranath Somalapuram [Fri, 22 Nov 2019 06:46:15 +0000 (12:16 +0530)]
crypto/ccp: fix maximum queues and burst size

CCP driver crash when running l2fwd
issue happen when changing MAX_PKT_BURST 32 to 256
increasing the CCP qp to 8 and CCP_MAX_BURST to 256

Fixes: ef4b04f87f ("crypto/ccp: support device init")
Cc: stable@dpdk.org
Signed-off-by: Amaranath Somalapuram <asomalap@amd.com>
4 years agodoc: fix l2fwd-crypto usage in CCP guide
Amaranath Somalapuram [Fri, 22 Nov 2019 06:45:45 +0000 (12:15 +0530)]
doc: fix l2fwd-crypto usage in CCP guide

Update the CCP doc for fixing description of some parameter,
Changing AES_CBC to aes-cbc, SHA1_HMAC to sha1-hmac.

Fixes: 4433ced9aa ("doc: add AMD CCP guide")
Cc: stable@dpdk.org
Signed-off-by: Amaranath Somalapuram <asomalap@amd.com>
4 years agoapp/crypto-perf: fix input of AEAD decrypt
Archana Muniganti [Thu, 21 Nov 2019 11:14:27 +0000 (16:44 +0530)]
app/crypto-perf: fix input of AEAD decrypt

In AEAD decrypt (verify mode), test data should point to
cipher text instead of plain text

Fixes: 5b2b0a740fba ("app/crypto-perf: overwrite mbuf when verifying")
Cc: stable@dpdk.org
Signed-off-by: Archana Muniganti <marchana@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
4 years agotest/event_crypto: fix check for HW support
Hemant Agrawal [Thu, 7 Nov 2019 09:01:21 +0000 (14:31 +0530)]
test/event_crypto: fix check for HW support

When HW is available but the mode mismatches, it is better
to skip the test case.

Fixes: aa026482baf9 ("test/event_crypto: no service core when HW support available")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
4 years agotest/event_crypto: fix to avail mempool entries
Hemant Agrawal [Thu, 7 Nov 2019 09:01:20 +0000 (14:31 +0530)]
test/event_crypto: fix to avail mempool entries

Added the missed code to avail the mempool entries before
pool free.

Fixes: 24054e3640a2 ("test/crypto: use separate session mempools")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
4 years agotest/event_crypto: fix missing IV for AES
Hemant Agrawal [Thu, 7 Nov 2019 09:01:19 +0000 (14:31 +0530)]
test/event_crypto: fix missing IV for AES

The IV was not set, which was causing HW based SEC on DPAA1
to fail.

Fixes: b2196237eb8a ("test/event_crypto: change cipher algo")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
4 years agoapp/eventdev: check function errors
Pavan Nikhilesh [Thu, 21 Nov 2019 19:22:39 +0000 (00:52 +0530)]
app/eventdev: check function errors

Fix unchecked return values reported by coverity.

Coverity Issue: 336861
Coverity Issue: 349906
Fixes: 032a965a8f1d ("app/eventdev: support Tx adapter")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
4 years agoapp/eventdev: fix divide by zero
Pavan Nikhilesh [Thu, 21 Nov 2019 19:22:38 +0000 (00:52 +0530)]
app/eventdev: fix divide by zero

Fix possible divide by zero condition when calculating percentages.

Coverity issue: 277205
Coverity issue: 277234
Fixes: d008f20bce23 ("app/eventdev: add event timer adapter as a producer")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
4 years agodoc: fix command line in l2fwd-event guide
Pavan Nikhilesh [Thu, 21 Nov 2019 18:27:16 +0000 (23:57 +0530)]
doc: fix command line in l2fwd-event guide

Fix incorrect command line argument documented for l2fwd-event.

Bugzilla ID: 367
Bugzilla ID: 368
Fixes: 14d7ea259aeb ("doc: add application usage guide for l2fwd-event")

Reported-by: Vipin Varghese <vipin.varghese@intel.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
4 years agoexamples/l2fwd-event: check function errors
Pavan Nikhilesh [Thu, 21 Nov 2019 18:27:15 +0000 (23:57 +0530)]
examples/l2fwd-event: check function errors

Validate `rte_eth_link_get_nowait`, `rte_service_map_lcore_set` and
`rte_eth_dev_info_get` return values.

Coverity issue: 350600
Coverity issue: 350601
Coverity issue: 350602

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
4 years agoevent/octeontx2: update start timestamp periodically
Pavan Nikhilesh [Fri, 22 Nov 2019 15:44:30 +0000 (21:14 +0530)]
event/octeontx2: update start timestamp periodically

Update start timestamp periodically to prevent drift.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
4 years agoevent/octeontx2: update SSO buffers based on timer count
Pavan Nikhilesh [Fri, 22 Nov 2019 15:44:29 +0000 (21:14 +0530)]
event/octeontx2: update SSO buffers based on timer count

Update SSO internal XAQ buffers based on number of timers in event timer
adapter.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
4 years agoevent/octeontx2: improve chunk pool performance
Pavan Nikhilesh [Fri, 22 Nov 2019 15:44:28 +0000 (21:14 +0530)]
event/octeontx2: improve chunk pool performance

Enable mempool cache for internal mempool to improve alloc performance.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
4 years agoevent/octeontx2: use opposite bucket for current chunk
Pavan Nikhilesh [Fri, 22 Nov 2019 15:44:27 +0000 (21:14 +0530)]
event/octeontx2: use opposite bucket for current chunk

Since TIM buckets are always aligned to 32B and our cache line size being
128B, we will always have a cache miss when reading current_chunk pointer.
Avoid the cache miss by storing the current_chunk pointer in the bucket
opposite to the current bucket.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
4 years agoevent/octeontx2: fix HW timer race condition
Pavan Nikhilesh [Fri, 22 Nov 2019 15:44:26 +0000 (21:14 +0530)]
event/octeontx2: fix HW timer race condition

Fix HW race condition observed when timeout resolution is low (<5us).
When HW traverses a given TIM bucket it will clear chunk_remainder,
but since SW always decreases the chunk_remainder at the start of the
arm routine it might cause a race where SW updates chunk_remainder
after HW has cleared it that lead to nasty side effects.

Fixes: 95e4e4ec7469 ("event/octeontx2: add timer arm timeout burst")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
4 years agonet/octeontx: set queue offload capabilities
Pavan Nikhilesh [Wed, 20 Nov 2019 03:48:07 +0000 (09:18 +0530)]
net/octeontx: set queue offload capabilities

Make Rx queue specific offloads same as device Rx offloads.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
4 years agoevent/octeontx: add appication domain validation
Pavan Nikhilesh [Wed, 20 Nov 2019 03:48:06 +0000 (09:18 +0530)]
event/octeontx: add appication domain validation

Add applicaton domain validation for OCTEON TX TIM vfs aka Event timer.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
4 years agomempool/octeontx: add application domain validation
Pavan Nikhilesh [Wed, 20 Nov 2019 03:48:05 +0000 (09:18 +0530)]
mempool/octeontx: add application domain validation

Add application domain validation for OCTEON TX FPA vfs.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
4 years agonet/octeontx: cleanup redundant mbox structs
Pavan Nikhilesh [Wed, 20 Nov 2019 03:48:04 +0000 (09:18 +0530)]
net/octeontx: cleanup redundant mbox structs

Cleanup redudant mail box structures.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
4 years agonet/octeontx: add application domain validation
Pavan Nikhilesh [Wed, 20 Nov 2019 03:48:03 +0000 (09:18 +0530)]
net/octeontx: add application domain validation

Add domain validation for PKI and PKO vfs

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
4 years agocommon/octeontx: update mbox to version 1.1.3
Pavan Nikhilesh [Wed, 20 Nov 2019 03:48:02 +0000 (09:18 +0530)]
common/octeontx: update mbox to version 1.1.3

Sync mail box data structures to version 1.1.3.
Add mail box version verification and defer initializing octeontx
devices if mail box version mismatches.
Update OCTEON TX limitaion with max mempool size used.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>