dpdk.git
4 years agoregex/mlx5: support info query
Ori Kam [Mon, 20 Jul 2020 06:26:08 +0000 (06:26 +0000)]
regex/mlx5: support info query

This commit adds the get info function.

Signed-off-by: Ori Kam <orika@mellanox.com>
4 years agoregex/mlx5: support probing
Ori Kam [Mon, 20 Jul 2020 06:26:07 +0000 (06:26 +0000)]
regex/mlx5: support probing

This commit adds the probe function to the RegEx PMD.

Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Ori Kam <orika@mellanox.com>
4 years agoregex/mlx5: add log macros
Yuval Avnery [Mon, 20 Jul 2020 06:26:06 +0000 (06:26 +0000)]
regex/mlx5: add log macros

Add the MLX5_REGEX_LOG macro which should be used for error prints.

Signed-off-by: Yuval Avnery <yuvalav@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
4 years agoregex/mlx5: introduce driver for BlueField 2
Yuval Avnery [Mon, 20 Jul 2020 06:26:05 +0000 (06:26 +0000)]
regex/mlx5: introduce driver for BlueField 2

This commit introduce the RegEx poll mode drivers class, and
adds Mellanox RegEx PMD.

Signed-off-by: Yuval Avnery <yuvalav@mellanox.com>
Signed-off-by: Ori Kam <orika@mellanox.com>
4 years agodoc: announce removal of mbuf legacy refcnt field
Phil Yang [Fri, 17 Jul 2020 04:36:51 +0000 (12:36 +0800)]
doc: announce removal of mbuf legacy refcnt field

refcnt_atomic member in structures rte_mbuf and rte_mbuf_ext_shared_info
will be removed in 20.11 release.

Suggested-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Signed-off-by: Phil Yang <phil.yang@arm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agombuf: use C11 atomic builtins for refcnt
Phil Yang [Fri, 17 Jul 2020 04:36:50 +0000 (12:36 +0800)]
mbuf: use C11 atomic builtins for refcnt

Use C11 atomic builtins with explicit ordering instead of rte_atomic
ops which enforce unnecessary barriers on aarch64.

Suggested-by: Olivier Matz <olivier.matz@6wind.com>
Suggested-by: Dodji Seketeli <dodji@redhat.com>
Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
4 years agotest/crypto: skip unsupported cases
Akhil Goyal [Thu, 16 Jul 2020 19:07:13 +0000 (00:37 +0530)]
test/crypto: skip unsupported cases

blockcipher cases are either returning TEST_SUCCESS
or TEST_FAILED as status, but the test may not be
supported by the PMD which is also a success case
for the PMD. Hence checking for status == TEST_FAILED
for setting the overall status as failed.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ankur Dwivedi <adwivedi@marvell.com>
4 years agoexamples/ipsec-secgw: enable flow based distribution
Anoob Joseph [Fri, 17 Jul 2020 12:31:10 +0000 (18:01 +0530)]
examples/ipsec-secgw: enable flow based distribution

RTE_FLOW API allows hardware parsing and steering of packets to specific
queues which helps in distributing ingress traffic across various cores.
Adding 'flow' rules allows user to specify the distribution required.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
4 years agoapp/testpmd: fix typos
Viacheslav Ovsiienko [Wed, 15 Jul 2020 10:30:35 +0000 (10:30 +0000)]
app/testpmd: fix typos

Fix minor typos.

Fixes: 4940344dab1d ("app/testpmd: add Tx scheduling command")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/virtio-user: fix uninitialized reply-ack variable
Chenbo Xia [Tue, 14 Jul 2020 11:03:05 +0000 (11:03 +0000)]
net/virtio-user: fix uninitialized reply-ack variable

This patch fixes an issue that uninitialized has_reply_ack
is used for setting message flags.

Coverity issue: 360834
Fixes: c60208dd6384 ("net/virtio-user: support reply-ack")

Signed-off-by: Chenbo Xia <chenbo.xia@intel.com>
Acked-by: Adrian Moreno <amorenoz@redhat.com>
4 years agonet/ice: fix IPv6 NAT-T ESP
Jeff Guo [Thu, 16 Jul 2020 07:29:00 +0000 (15:29 +0800)]
net/ice: fix IPv6 NAT-T ESP

The hash for ipv6 nat-t esp should be enable as ipv4 nat-t esp.

Fixes: dadf70e5c30a ("net/ice: enable additional input set for RSS hash")

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/i40e: fix queue pairs configuration in VF
Alvin Zhang [Thu, 16 Jul 2020 06:33:36 +0000 (14:33 +0800)]
net/i40e: fix queue pairs configuration in VF

If a VF request PF to allocate more number of queue pairs, the PF will
free the queue pairs which have been allocated and reset the VF. So,
VF should stop to work until all the process is done. This patch modify
the process of the request queue pairs. To improve efficiency and
eliminate code redundancy, the promiscuous ops were also updated.

Fixes: c48eb308ed13 ("net/i40e: support VF request more queues")
Cc: stable@dpdk.org
Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
4 years agonet/ice/base: fix GTPU IP hash
Jeff Guo [Thu, 16 Jul 2020 07:30:41 +0000 (15:30 +0800)]
net/ice/base: fix GTPU IP hash

Enable GTPU SESSION flag usage to fix GTPU IP hash issue.

Fixes: 8fb908838516 ("net/ice/base: improve GTPU extend header handle")
Cc: stable@dpdk.org
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/ice: fix RSS type
Simei Su [Thu, 16 Jul 2020 03:24:54 +0000 (11:24 +0800)]
net/ice: fix RSS type

When a RSS rule with only SRC/DST_ONLY or IPV6 prefix RSS type,
it should return failure. Besides, when a RSS rule with symmetric
hash function, the RSS type shouldn't carry with SRC/DST_ONLY.
This patch adds invalid RSS type check for the two cases.

Fixes: 0b952714e9c1 ("net/ice: refactor PF hash flow")

Signed-off-by: Simei Su <simei.su@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/ice: fix tunnel type get
Wei Zhao [Thu, 16 Jul 2020 01:42:12 +0000 (09:42 +0800)]
net/ice: fix tunnel type get

When function ice_get_tun_type_for_recipe() get tunnel type,
for ICE_NON_TUN we need to include gtp-c and some gtp-u ptype
with no payload, as they do not have tunnel packet as paylod.

Fixes: 418d2563d10b ("net/ice/base: get tunnel type for recipe")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Tested-by: Nannan Lu <nannan.lu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/bonding: fix MAC address when one port resets
Wei Hu (Xavier) [Fri, 17 Apr 2020 08:19:18 +0000 (16:19 +0800)]
net/bonding: fix MAC address when one port resets

The current bonding PMD driver call mac_address_slaves_update function
to modify the MAC address of all slaves devices. In
mac_address_slaves_update function, the rte_eth_dev_default_mac_addr_set
API function is called to set the MAC address of the slave devices in
turn in the for loop statement.

When one port reset, calling rte_eth_dev_default_mac_addr_set API fails
because the firmware will not respond to the commands from the driver,
and exit the loop, so other slave devices cannot continue to update the
MAC address.

This patch fixes the issue by avoid exiting the loop when calling
rte_eth_dev_default_mac_addr_set fails.

Fixes: 2efb58cbab6e ("bond: new link bonding library")
Cc: stable@dpdk.org
Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Chunsong Feng <fengchunsong@huawei.com>
Signed-off-by: Xuan Li <lixuan47@hisilicon.com>
4 years agonet/bonding: fix MAC address when switching active port
Wei Hu (Xavier) [Fri, 17 Apr 2020 08:19:17 +0000 (16:19 +0800)]
net/bonding: fix MAC address when switching active port

Currently, based on a active-backup bond device, when the link status of
the primary port changes from up to down, one slave port changes to the
primary port, but the new primary port's MAC address cannot change to
the bond device's MAC address. And we can't continue receive packets
whose destination MAC addresses are the same as the bond devices's MAC
address.

The current bonding PMD driver call mac_address_slaves_update function
to modify the MAC address of all slaves devices: the primary port using
bond device's MAC address, and other slaves devices using the respective
MAC address. We found that one error using primary_port instead of
current_primary_port in mac_address_slaves_update function.

On the other hand, The current bonding PMD driver sets slave devices's
MAC address according to the variable named current_primary_port. The
variable named current_primary_port changes in the following scenario:
1. Add the slave devices to bond, the first slave port will be regarded
   as the current_primary_port. If changing the order of adding the
   slave devices, the value of the variable named current_primary_port
   will be different.
2. The upper application specifies primary_port via calling the
   rte_eth_bond_primary_set API function.
3. Delete the primary slave device.
4. The link status of the primary port changes from up to down.

We have tested the above 4 cases and found that there are problems that
the new primary port's MAC address didn't change to the bond device's
MAC address when running case 3 and 4. When current_primary_port
changes, the new primary port's MAC address should change at the same
time. We also need to call mac_address_slaves_update function to update
MAC addresses in case
3 and 4.

Bugzilla ID: 256
Fixes: 2efb58cbab6e ("bond: new link bonding library")
Cc: stable@dpdk.org
Signed-off-by: Chunsong Feng <fengchunsong@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
4 years agonet/bnxt: fix crash during Tx
Ajit Khaparde [Mon, 13 Jul 2020 05:17:59 +0000 (10:47 +0530)]
net/bnxt: fix crash during Tx

When TRUFLOW is not enabled ulp_ctx is not allocated.
In non-vector Tx datapath we are accessing this invalid pointer
resulting in a segfault. Check if TRUFLOW is enabled before
accessing ulp_ctx to avoid this.

Fixes: 1e46b3962620 ("net/bnxt: fill cfa action in Tx descriptor")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
4 years agonet/af_packet: fix munmap on init failure
Yunjian Wang [Mon, 6 Jul 2020 12:28:02 +0000 (20:28 +0800)]
net/af_packet: fix munmap on init failure

Add a missing available check and fix the wrong address passed
to munmap on init failure.

Fixes: dd6590fe2fd7 ("af_packet: fix possible memory leak")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/af_packet: fix memory leak on init failure
Yunjian Wang [Mon, 6 Jul 2020 12:27:51 +0000 (20:27 +0800)]
net/af_packet: fix memory leak on init failure

Add missing code to free memory when the device initialization fails.

Fixes: ccd37d341e8d ("net/af_packet: remove queue number limitation")
Fixes: 5f19dee604ed ("drivers/net: do not use private ethdev data")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/af_packet: fix check of file descriptors
Yunjian Wang [Mon, 6 Jul 2020 12:27:32 +0000 (20:27 +0800)]
net/af_packet: fix check of file descriptors

Zero is a valid fd. It will fail to check the fd if the fd is zero.

Fixes: 527740ccfaec ("af_packet: fix some leaks")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/bonding: fix error code on device creation
Wei Hu (Xavier) [Tue, 14 Jul 2020 08:19:43 +0000 (16:19 +0800)]
net/bonding: fix error code on device creation

Because the return value of rte_vdev_init() has multiple non-zero
values, when rte_vdev_init() return non-zero in the
rte_eth_bond_create() function, it should return the actual error code
rather than -ENOMEM.

Fixes: 68451eb6698c ("net/bonding: call through EAL on create/free")
Cc: stable@dpdk.org
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
4 years agoapp/testpmd: fix output format in flow query
Chenxu Di [Tue, 14 Jul 2020 01:37:21 +0000 (01:37 +0000)]
app/testpmd: fix output format in flow query

This patch fix the error line break in the output format of flow query

Fixes: bdb1d61690f7 ("app/testpmd: support RSS config in flow query")

Signed-off-by: Chenxu Di <chenxux.di@intel.com>
Tested-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/hns3: fix RSS configuration on empty RSS type
Lijun Ou [Tue, 14 Jul 2020 06:16:09 +0000 (14:16 +0800)]
net/hns3: fix RSS configuration on empty RSS type

According to the definition of RSS types of action attributes from
testpmd, the driver will not disable RSS but instead requests the
unspecified "best-effort" settings when upper application call
rte_flow_create API function to create flow using empty RSS types.

As a result, here use the default RSS types when RSS types is empty.

Fixes: c37ca66f2b27 ("net/hns3: support RSS")
Cc: stable@dpdk.org
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
4 years agonet/hns3: support keeping CRC
Min Hu (Connor) [Tue, 14 Jul 2020 06:16:08 +0000 (14:16 +0800)]
net/hns3: support keeping CRC

CRC is the end of frame, which occupies 4 bytes. Keeping CRC is a
feature of MAC, which will not strip CRC field when receiving frames.
The feature can be enabled using DEV_RX_OFFLOAD_KEEP_CRC offload by
upper level application. And the feature is only supported for hns3 PF
PMD driver, not supported for hns3 VF PMD driver

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
4 years agonet/hns3: support 200G speed rate
Wei Hu (Xavier) [Tue, 14 Jul 2020 06:16:07 +0000 (14:16 +0800)]
net/hns3: support 200G speed rate

The 200G device has a new device id 0xA228, so adds this device id
to pci table for pci driver can probe it. Similar to the network port
with other speed, the hns3 PMD driver gets 200G speed information
from firmware, and passes them to DPDK framework.

Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
4 years agonet/hns3: support copper media type
Wei Hu (Xavier) [Tue, 14 Jul 2020 06:16:06 +0000 (14:16 +0800)]
net/hns3: support copper media type

The hns3 network engine is built-in multiple SoCs, such as kunpeng 920,
kunpeng 930, etc. The PCI revision id is 0x21 in kunpeng 920, and the
PCI revision id is 0x30 in kunpeng 930.

Copper media type is supported for hns3 PF device in kunpeng 930 and
later SoCs. The configuration operation for PHY is implemented by
firmware.

Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
4 years agonet/ice/base: fix RSS removal for GTP-U
Junfeng Guo [Mon, 13 Jul 2020 11:05:40 +0000 (19:05 +0800)]
net/ice/base: fix RSS removal for GTP-U

Previous logic in removing RSS for GTPU was added in incorrect lines.
The adjustment in this patch will correct the code order so that RSS
for GTPU can be removed successfully.

We also delete the redundant print statement and cleanup the coding
style in this patch.

Fixes: bed9bb3139ef ("net/ice/base: fix GTP-U inner RSS IPv4 IPv6 co-exist")
Cc: stable@dpdk.org
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agodoc: update QAT driver version for D15xx
Adam Dybkowski [Thu, 16 Jul 2020 11:40:44 +0000 (13:40 +0200)]
doc: update QAT driver version for D15xx

This patch updates the minimum driver version that supports
Intel QuickAssist device D15xx.

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
4 years agocrypto/qat: fix ambiguous variable names for CRC
David Coyle [Thu, 16 Jul 2020 15:34:36 +0000 (16:34 +0100)]
crypto/qat: fix ambiguous variable names for CRC

The variable names crc_length and crc_offset have been changed to
crc_data_len and crc_data_ofs respectively, to make it clearer as to
their use i.e. the length and offset of the data over which the CRC is
calculated.

Fixes: 6f0ef237404b ("crypto/qat: support DOCSIS protocol")

Signed-off-by: David Coyle <david.coyle@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
4 years agocrypto/qat: check multi-segment buffers for DOCSIS
David Coyle [Thu, 16 Jul 2020 15:33:31 +0000 (16:33 +0100)]
crypto/qat: check multi-segment buffers for DOCSIS

Multi-segment mbufs are not supported for DOCSIS security protocol.
This patch adds an explicit check for this and returns an op error if
this case is found. This limitation is also added to the QAT cryptodev
documentation.

Fixes: 6f0ef237404b ("crypto/qat: support DOCSIS protocol")

Signed-off-by: David Coyle <david.coyle@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
4 years agocrypto/aesni_mb: fix memory leak in DOCSIS session
David Coyle [Thu, 16 Jul 2020 15:32:18 +0000 (16:32 +0100)]
crypto/aesni_mb: fix memory leak in DOCSIS session

This patch improves the DOCSIS session creation as follows:
- it validates the security action type as well as the protocol before
  creating a session and now does this validation before allocating the
  session from the mempool

Fixes: fda5216fba55 ("crypto/aesni_mb: support DOCSIS protocol")

Signed-off-by: David Coyle <david.coyle@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
4 years agocrypto/qat: improve DOCSIS session creation
David Coyle [Thu, 16 Jul 2020 15:32:17 +0000 (16:32 +0100)]
crypto/qat: improve DOCSIS session creation

This patch improves the DOCSIS session creation as follows:
- it validates the security action type as well as the protocol before
  creating a session and now does this validation before allocating the
  session from the mempool
- it clears the entire private session struct before populating it with
  DOCSIS session info, in case any data was left over from the last time
  it was used
- it simplifies the DOCSIS parameter setting, which was overly
  complicated

Fixes: 6f0ef237404b ("crypto/qat: support DOCSIS protocol")

Signed-off-by: David Coyle <david.coyle@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
4 years agoapp/crypto-perf: enable feature flag for security
David Coyle [Thu, 16 Jul 2020 15:29:52 +0000 (16:29 +0100)]
app/crypto-perf: enable feature flag for security

The RTE_CRYPTODEV_FF_SECURITY feature was disabled through the
ff_disable device configuration option for all crypto performance tests,
including security related tests. This patch updates the crypto
performance tool to not disable RTE_CRYPTODEV_FF_SECURITY for DOCSIS and
PDCP security tests.

Fixes: d4a131a9498d ("test/crypto-perf: support DOCSIS protocol")

Signed-off-by: David Coyle <david.coyle@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
4 years agotest/crypto: enable feature flag for security
David Coyle [Thu, 16 Jul 2020 15:29:51 +0000 (16:29 +0100)]
test/crypto: enable feature flag for security

The RTE_CRYPTODEV_FF_SECURITY feature was disabled through the
ff_disable device configuration option for all cryptodev tests,
including security related tests. This patch updates the cryptodev unit
tests to not disable RTE_CRYPTODEV_FF_SECURITY for DOCSIS and PDCP
security tests.

Fixes: ea31f2b4f547 ("test/crypto: add DOCSIS security cases")

Signed-off-by: David Coyle <david.coyle@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
4 years agotest/crypto: fix AESNI-MB CPU tests
David Coyle [Thu, 16 Jul 2020 15:28:31 +0000 (16:28 +0100)]
test/crypto: fix AESNI-MB CPU tests

The AESNI-MB CPU test cases, which are executed via the
cryptodev_cpu_aesni_mb_autotest command, aborted when it tried to run
the DOCSIS security tests as these are not CPU type tests. The abort
happened at the following line in process_crypto_request():

RTE_VERIFY(gbl_action_type != RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO);

The tests have been updated not to run the DOCSIS (or PDCP) security
tests during cryptodev_cpu_aesni_mb_autotest, with the decision based on
improved PMD security capability checks.

Fixes: ea31f2b4f547 ("test/crypto: add DOCSIS security cases")

Signed-off-by: David Coyle <david.coyle@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
4 years agocrypto/octeontx2: support security session data path
Vamsi Attunuru [Thu, 16 Jul 2020 08:39:31 +0000 (14:09 +0530)]
crypto/octeontx2: support security session data path

This patch adds lookaside IPsec enqueue and dequeue routines.

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
4 years agocrypto/octeontx2: support security session create
Vamsi Attunuru [Thu, 16 Jul 2020 08:39:30 +0000 (14:09 +0530)]
crypto/octeontx2: support security session create

This patch creates session for lookaside IPsec.

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
4 years agocrypto/octeontx2: add security misc callbacks
Vamsi Attunuru [Thu, 16 Jul 2020 08:39:29 +0000 (14:09 +0530)]
crypto/octeontx2: add security misc callbacks

This patch adds lookaside IPsec callback functions.

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
4 years agocrypto/octeontx2: add security capabilities
Tejasree Kondoj [Thu, 16 Jul 2020 08:39:28 +0000 (14:09 +0530)]
crypto/octeontx2: add security capabilities

This patch adds lookaside IPsec capabilities for
rte_security

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
4 years agocrypto/octeontx2: register security operations
Tejasree Kondoj [Thu, 16 Jul 2020 08:39:27 +0000 (14:09 +0530)]
crypto/octeontx2: register security operations

This patch registers security operations with cryptodev.

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
4 years agocrypto/octeontx2: add lookaside SA context definitions
Tejasree Kondoj [Thu, 16 Jul 2020 08:39:26 +0000 (14:09 +0530)]
crypto/octeontx2: add lookaside SA context definitions

This patch adds lookaside IPsec SA context definitions.

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
4 years agonet/octeontx2: move security session struct to crypto PMD
Tejasree Kondoj [Thu, 16 Jul 2020 08:39:25 +0000 (14:09 +0530)]
net/octeontx2: move security session struct to crypto PMD

This patch moves otx2_sec_session structure to otx2_security.h
to make it common for inline and lookaside protocol modes of
rte_security

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
4 years agocrypto/octeontx2: move capabilities init into probe
Tejasree Kondoj [Thu, 16 Jul 2020 08:39:24 +0000 (14:09 +0530)]
crypto/octeontx2: move capabilities init into probe

This patch moves capabilities initialization into probe.

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
4 years agocompress/qat: revert change in GEN3 marketing name
Adam Dybkowski [Mon, 13 Jul 2020 11:25:17 +0000 (13:25 +0200)]
compress/qat: revert change in GEN3 marketing name

The patch reverts the commit that updated Intel QuickAssist GEN3
marketing name. The change was not backported and has to be withdrawn.

This reverts commit 9cd9d3e702fba4700539c1a2eddac13dd14ecf70

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
4 years agocompress/qat: fix lacking memzone lookup
Arek Kusztal [Wed, 8 Jul 2020 09:44:01 +0000 (11:44 +0200)]
compress/qat: fix lacking memzone lookup

Because capability memzone of compression does not have lookup
call, second and subsequent devices cannot be created.

Fixes: 7788dceccb80 ("common/qat: add multi-process handling of capabilities")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Tested-by: Yu Jiang <yux.jiang@intel.com>
4 years agoexamples/fips_validation: fix count overwrite for TDES
Archana Muniganti [Thu, 11 Jun 2020 13:44:17 +0000 (19:14 +0530)]
examples/fips_validation: fix count overwrite for TDES

Application updates first line of each test vector with
COUNT = i(where i = 1,2,3..) assuming first line contains
COUNT string. But few of the TDES input test vectors don't
contain COUNT string and thus COUNT is getting overwritten on
other data.

Fixes: 527cbf3d5ee3 ("examples/fips_validation: support TDES parsing")
Cc: stable@dpdk.org
Signed-off-by: Archana Muniganti <marchana@marvell.com>
Signed-off-by: Kanaka Durga Kotamarthy <kkotamarthy@marvell.com>
4 years agoexamples/fips_validation: fix parsing of TDES vectors
Ayuj Verma [Thu, 11 Jun 2020 13:44:16 +0000 (19:14 +0530)]
examples/fips_validation: fix parsing of TDES vectors

Processing of test vector for COUNT = 0 is getting skipped, as
some of the NIST TDES files doesn't have an empty line after
[ENCRYPT]/[DECRYPT] and thus treated as an interim block.

Parse function now identifies such blocks, separates out interim
and test vector data, and then parses each with their respective
callbacks.

Fixes: 3d0fad56b74a ("examples/fips_validation: add crypto FIPS application")
Cc: stable@dpdk.org
Signed-off-by: Archana Muniganti <marchana@marvell.com>
Signed-off-by: Ayuj Verma <ayverma@marvell.com>
4 years agoexamples/fips_validation: fix TDES interim callback
Archana Muniganti [Thu, 11 Jun 2020 13:44:15 +0000 (19:14 +0530)]
examples/fips_validation: fix TDES interim callback

Fix missing callback registration and the incorrect
callback definition for interim NK_STR. The callback
should compare input key against the interim.

Fixes: 527cbf3d5ee3 ("examples/fips_validation: support TDES parsing")
Cc: stable@dpdk.org
Signed-off-by: Archana Muniganti <marchana@marvell.com>
4 years agotest/crypto: change cipher offset for ESN vector
Ankur Dwivedi [Fri, 5 Jun 2020 08:30:33 +0000 (14:00 +0530)]
test/crypto: change cipher offset for ESN vector

In the IPSEC ESN test vector the cipher offset for encryption
should be 8 bytes which is the size of esp header.
This patch also changes the ciphertext and the digest reference
data against which the operation result is validated.

Fixes: 699741912d71 ("test/crypto: add case for auth only trailer")
Cc: stable@dpdk.org
Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
4 years agocrypto/scheduler: use ring peek API
Konstantin Ananyev [Fri, 22 May 2020 11:57:36 +0000 (12:57 +0100)]
crypto/scheduler: use ring peek API

scheduler PMD uses its own hand-made peek functions
that directly access rte_ring internals.
As now rte_ring has an API for that type of functionality -
change scheduler PMD to use API provided by rte_ring.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
4 years agotelemetry: add upper limit on connections
Ciara Power [Wed, 15 Jul 2020 15:03:00 +0000 (16:03 +0100)]
telemetry: add upper limit on connections

This patch limits the number of client connections to the new telemetry
socket. The limit is set to 10.

Signed-off-by: Ciara Power <ciara.power@intel.com>
4 years agoapp/flow-perf: fix typo in usage help
Wisam Jaddo [Mon, 6 Jul 2020 07:58:45 +0000 (07:58 +0000)]
app/flow-perf: fix typo in usage help

From hairping-rss into hairpin-rss.

Fixes: bf3688f1e816 ("app/flow-perf: add insertion rate calculation")

Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
4 years agoapp/flow-perf: fix hairpin queues setup
Wisam Jaddo [Thu, 16 Jul 2020 14:16:56 +0000 (14:16 +0000)]
app/flow-perf: fix hairpin queues setup

The hairpin queue is the one that start from normal rxq,
and will be less than nr_queues where nr_queues is the
sum of normal and hairpin.

Fixes: bf3688f1e816 ("app/flow-perf: add insertion rate calculation")

Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
Reviewed-by: Asaf Penso <asafp@mellanox.com>
4 years agodevtools: prevent use of legacy atomic API
Phil Yang [Fri, 17 Jul 2020 10:14:37 +0000 (18:14 +0800)]
devtools: prevent use of legacy atomic API

In order to deprecate the rte_atomic and rte_smp barrier APIs [1], prevent
the patches from using these APIs and __sync builtins in new code.
Please use __atomic builtins instead of __sync builtins, rte_atomicNN_xxx
and rte_smp_[r/w]mb APIs.

On x86 the __atomic_thread_fence(__ATOMIC_SEQ_CST) is quite expensive for
SMP case. Flag the new code which use __atomic_thread_fence API.
Please use rte_thread_fence API instead of __atomic_thread_fence builtins.

1: Refer to the locks-and-atomic-operations section in
https://doc.dpdk.org/guides/prog_guide/writing_efficient_code.html

Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
4 years agoeal: add wrapper for C11 atomic thread fence
Phil Yang [Fri, 17 Jul 2020 10:14:36 +0000 (18:14 +0800)]
eal: add wrapper for C11 atomic thread fence

Provide a wrapper for __atomic_thread_fence builtins to support
optimized code for __ATOMIC_SEQ_CST memory order for x86 platforms.

Suggested-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
4 years agodoc: describe optimizations using C11 atomic builtins
Phil Yang [Fri, 17 Jul 2020 10:14:35 +0000 (18:14 +0800)]
doc: describe optimizations using C11 atomic builtins

Add information about possible optimizations using C11 atomic builtins.

Signed-off-by: Phil Yang <phil.yang@arm.com>
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
4 years agometrics: fix header installation with meson
Ciara Power [Tue, 14 Jul 2020 12:39:12 +0000 (13:39 +0100)]
metrics: fix header installation with meson

If Jansson was found, the headers list is overwritten when including
rte_metrics_telemetry.h, which prevents rte_metrics.h from being
installed. This is now fixed to add to headers, rather than overwrite,
to allow both headers be installed when Jansson is present.

Fixes: c5b7197f662e ("telemetry: move some functions to metrics library")
Cc: stable@dpdk.org
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agoexamples/vm_power: allow managing idle cores
Rory Sexton [Tue, 14 Jul 2020 16:01:59 +0000 (17:01 +0100)]
examples/vm_power: allow managing idle cores

This change is required to allow the branch ratio algorithm to
power manage cores with no workload running on them. This is
useful both when idle cores don't use C-states and for a number of
hyperthreading scenarios.

Signed-off-by: Rory Sexton <rory.sexton@intel.com>
Reviewed-by: David Hunt <david.hunt@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
4 years agoexamples/vm_power: make branch ratio threshold per core
Rory Sexton [Tue, 14 Jul 2020 16:01:58 +0000 (17:01 +0100)]
examples/vm_power: make branch ratio threshold per core

This modification allows for the branch ratio threshold to be set
per core rather than system wide. This gives greater flexibility to
the branch ratio monitoring allowing it to manage different
workloads with different characteristics on the same system.

Signed-off-by: Rory Sexton <rory.sexton@intel.com>
Reviewed-by: David Hunt <david.hunt@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
4 years agoeal: change the log level for test asserts
Honnappa Nagarahalli [Thu, 16 Jul 2020 18:39:27 +0000 (13:39 -0500)]
eal: change the log level for test asserts

Change the log level for RTE_TEST_ASSERT macro to error to help
log errors while running test cases.

Suggested-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Acked-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
4 years agodevtools: give some hints for ABI errors
David Marchand [Wed, 8 Jul 2020 09:40:46 +0000 (11:40 +0200)]
devtools: give some hints for ABI errors

abidiff can provide some more information about the ABI difference it
detected.
In all cases, a discussion on the mailing must happen but we can give
some hints to know if this is a problem with the script calling abidiff,
a potential ABI breakage or an unambiguous ABI breakage.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Aaron Conole <aconole@redhat.com>
4 years agolpm: fix build dependency on RCU library
Ferruh Yigit [Mon, 13 Jul 2020 13:51:20 +0000 (14:51 +0100)]
lpm: fix build dependency on RCU library

'librte_rcu' is now dependency to 'librte_lpm' library, this dependency
should be reflected to build system.

Fixes: 8a9f8564e9f9 ("lpm: implement RCU rule reclamation")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
4 years agoversion: 20.08-rc1
Thomas Monjalon [Mon, 13 Jul 2020 00:50:06 +0000 (02:50 +0200)]
version: 20.08-rc1

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agoapp/testpmd: add eCPRI in flow creation patterns
Bing Zhao [Sun, 12 Jul 2020 13:35:03 +0000 (21:35 +0800)]
app/testpmd: add eCPRI in flow creation patterns

In order to verify offloading of eCPRI protocol via flow rules, the
command line of flow creation should support the parsing of the eCPRI
pattern.

Based on the specification, one eCPRI message will have the common
header and payload. Payload format is various based on the type field
of the common header. Fixed strings will be used instead of integer
to make the CLI easy for auto-completion.

The testpmd command line examples of flow to match eCPRI item are
listed below:
  1. flow create 0 ... pattern eth / ecpri / end actions ...
    This is to match all eCPRI messages.
  2. flow create 0 ... pattern eth / ecpri common type rtc_ctrl / end actions ...
    This is to match all eCPRI messages with the type #2 - "Real-Time
    Control Data".
  3. flow create 0 ... pattern eth / ecpri common type iq_data pc_id is [U16Int] / end actions ...
    This is to match eCPRI messages with the type #0 - "IQ Data", and
    the physical channel ID 'pc_id' of the messages is a specific
    value. Since the sequence ID is changeable, there is no need to
    match that field in the flow.
Currently, only type #0, #2 and #5 will be supported.

Since eCPRI could be over Ethernet layer (or after .1Q) and UDP
layer, it is the PMD driver's responsibility to check whether eCPRI
is supported and which protocol stack is supported. Network byte
order should be used for eCPRI header, the same as other headers.

Signed-off-by: Bing Zhao <bingz@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
4 years agoethdev: add eCPRI key fields to flow API
Bing Zhao [Sun, 12 Jul 2020 13:35:02 +0000 (21:35 +0800)]
ethdev: add eCPRI key fields to flow API

Add a new item "rte_flow_item_ecpri" in order to match eCRPI header.

eCPRI is a packet based protocol used in the fronthaul interface of
5G networks. Header format definition could be found in the
specification via the link below:
https://www.gigalight.com/downloads/standards/ecpri-specification.pdf

eCPRI message can be over Ethernet layer (.1Q supported also) or over
UDP layer. Message header formats are the same in these two variants.

Signed-off-by: Bing Zhao <bingz@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
4 years agonet/bnxt: fix freeing filters on flow creation failure
Kalesh AP [Thu, 9 Jul 2020 09:38:32 +0000 (15:08 +0530)]
net/bnxt: fix freeing filters on flow creation failure

This patch does following things:
1. Added a wrapper function bnxt_clear_one_vnic_filter()
   for destroying the filters in hw. This will avoid duplicate
   code in many places.
2. When flow create fails due to an already existing mark id
   for the new flow id created, fixed to destroy the hw
   filter created.
3. Re-arranged code to move a log and list update to right place.

Fixes: 9db66782bd06 ("net/bnxt: fix supporting zero mark ID with RSS action")
Fixes: 5ef3b79fdfe6 ("net/bnxt: support flow filter ops")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agonet/bnxt: fix flow error on filter creation
Kalesh AP [Thu, 9 Jul 2020 09:38:31 +0000 (15:08 +0530)]
net/bnxt: fix flow error on filter creation

If set_em_filter/set_ntuple_filter cmds fails for some reason,
driver is not filling the "rte_flow_error" string buffer.
Same is the case when flow create fails due to an already
existing mark id for the new flow id created.
This leads to a crash in testpmd while trying to print the
error message.

Fixes: 5c1171c97216 ("net/bnxt: refactor filter/flow")
Fixes: 9db66782bd06 ("net/bnxt: fix supporting zero mark ID with RSS action")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agonet/bnxt: fix unnecessary HWRM command
Kalesh AP [Thu, 9 Jul 2020 09:38:30 +0000 (15:08 +0530)]
net/bnxt: fix unnecessary HWRM command

During probe, driver issues HWRM_CFA_ADV_FLOW_MGNT_QCAPS command.
But it is not using the command response anywhere which makes the
fw call redundant.

Remove the unnecessary HWRM_CFA_ADV_FLOW_MGNT_QCAPS call to fw.
Remove the redundant flow_flags in bnxt struct.

Fixes: afef822b2e1b ("net/bnxt: support creating SMAC and inner DMAC filters")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agonet/bnxt: remove unused enum declaration
Kalesh AP [Thu, 9 Jul 2020 09:38:29 +0000 (15:08 +0530)]
net/bnxt: remove unused enum declaration

"enum bnxt_hw_context" is defined in the header file, but is not
used anywhere.

Fixes: 9738793f28ec ("net/bnxt: add VNIC functions and structs")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agonet/bnxt: fix unnecessary memory allocation
Kalesh AP [Thu, 9 Jul 2020 09:38:28 +0000 (15:08 +0530)]
net/bnxt: fix unnecessary memory allocation

VFs are not privileged to issue HWRM_PORT_LED_QCFG/CFG.
There is no need to allocate "bp->leds" memory.

Fixes: 205b74295282 ("net/bnxt: fix allocation of LED config info")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agonet/bonding: fix LACP negotiation
Yicai Lu [Fri, 10 Jul 2020 03:29:35 +0000 (11:29 +0800)]
net/bonding: fix LACP negotiation

When two host is connected directly without any devices like switch,
rx_machine_update would receiving partner LACP negotiation packets,
and partner's port mac is filled with zeros in this packet, which is
different with internal's mode4 mac. So in this situation, it would
never go rx_machine branch and then execute mac swap for negotiation!
Thus bond mode 4 will negotiation failed.

Fixes: 56cbc0817399 ("net/bonding: fix LACP negotiation")
Cc: stable@dpdk.org
Signed-off-by: Yicai Lu <luyicai@huawei.com>
Reviewed-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
4 years agoapp/testpmd: add 5-tuple swap forwarding engine
Shiri Kuzin [Thu, 2 Jul 2020 15:16:14 +0000 (18:16 +0300)]
app/testpmd: add 5-tuple swap forwarding engine

The new 5-tuple swap engine swaps:
source and destination mac address,
source and destination address in ipv4/ipv6,
source and destination port in UDP/TCP.

The forwarding engine will parse each layer
and swap it, and will stop when the next
layer doesn't match.

The mentioned headers of ICMP/ARP/Multicast
packets will be swapped as well according to
matching layers.

usage: --forward-mode=5tswap

Signed-off-by: Shiri Kuzin <shirik@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agodrivers/net: delete HW rings while freeing queues
Renata Saiakhova [Fri, 10 Jul 2020 21:43:43 +0000 (22:43 +0100)]
drivers/net: delete HW rings while freeing queues

Delete memzones for HW rings in igb and ixgbe while freeing queues

Updated igb, ixgbe, i40e, ice & em drivers.

Signed-off-by: Renata Saiakhova <renata.saiakhova@ekinops.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agoethdev: add function to release HW rings
Renata Saiakhova [Fri, 10 Jul 2020 21:43:42 +0000 (22:43 +0100)]
ethdev: add function to release HW rings

Free previously allocated memzone for HW rings

Signed-off-by: Renata Saiakhova <renata.saiakhova@ekinops.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
4 years agodrivers/net: fix exposing internal headers
Ferruh Yigit [Fri, 10 Jul 2020 21:43:41 +0000 (22:43 +0100)]
drivers/net: fix exposing internal headers

Using '__rte_internal' tag in 'rte_ethdev_driver.h' causing build error
for applications and examples. Because they don't define
'ALLOW_INTERNAL_API' flag and '__rte_internal' causes the error.
This patch is preparation for future '__rte_internal' usage.

At first place, applications/examples should not include
'rte_ethdev_driver.h', this is happening because of PMD public header
files include 'rte_ethdev_driver.h' by mistake.

Updated PMD public header files to not include internal header files.

But for unit test application, 'app/test', enable accessing internal
APIs, since some unit tests need them.

Fixes: ffc905f3b856 ("ethdev: separate driver APIs")
Fixes: ec0dec44ecb9 ("net/atlantic: enable MACsec configuration")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
4 years agonet/nfp: fix RSS hash configuration reporting
Heinrich Kuhn [Fri, 10 Jul 2020 14:28:46 +0000 (16:28 +0200)]
net/nfp: fix RSS hash configuration reporting

Prior to this fix the NFP PMD implementation of the .rss_hash_conf_get
callback did not propagate the current hardware state of rss_hf back up
to the caller. Users of the hash_conf_get callback would receive an
incorrect representation of what the RSS configuration currently is in
hardware.

Fixes: 934e4c60fbff ("nfp: add RSS")
Cc: stable@dpdk.org
Signed-off-by: Heinrich Kuhn <heinrich.kuhn@netronome.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
4 years agoapp/testpmd: add Tx scheduling command
Viacheslav Ovsiienko [Fri, 10 Jul 2020 12:39:42 +0000 (12:39 +0000)]
app/testpmd: add Tx scheduling command

This commit adds testpmd capability to provide timestamps on the packets
being sent in the txonly mode. This includes:

 - SEND_ON_TIMESTAMP support
   new device Tx offload capability support added, example:

     testpmd> port config 0 tx_offload send_on_timestamp on

 - set txtimes, registers field and flag, example:

     testpmd> set txtimes 1000000,0

   This command enables the packet send scheduling on timestamps if
   the first parameter is not zero, generic format:

     testpmd> set txtimes (inter),(intra)

   where:

     inter - is the delay between the bursts in the device clock units.
     If "intra" (next parameter) is zero, this is the time between the
     beginnings of the first packets in the neighbour bursts, if "intra"
     is not zero, "inter" specifies the time between the beginning of
     the first packet of the current burst and the beginning of the last
     packet of the previous burst. If "inter"parameter is zero the send
     scheduling on timestamps is disabled (default).

     intra - is the delay between the packets within the burst specified
     in the device clock units. The number of packets in the burst is
     defined by regular burst setting. If "intra" parameter is zero no
     timestamps provided in the packets excepting  the first one in the
     burst.

     As the result the bursts of packet will be transmitted with
     specific delay between the packets within the burst and specific
     delay between the bursts. The rte_eth_read_clock() is supposed to
     be engaged to get the current device clock value and provide the
     reference for the timestamps. If there is no supported
     rte_eth_read_clock() there will be no provided send scheduling on
     the device.

 - show txtimes, displays the timing settings
 - txonly burst time pattern

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agombuf: introduce accurate packet Tx scheduling
Viacheslav Ovsiienko [Fri, 10 Jul 2020 12:39:41 +0000 (12:39 +0000)]
mbuf: introduce accurate packet Tx scheduling

There is the requirement on some networks for precise traffic timing
management. The ability to send (and, generally speaking, receive)
the packets at the very precisely specified moment of time provides
the opportunity to support the connections with Time Division
Multiplexing using the contemporary general purpose NIC without involving
an auxiliary hardware. For example, the supporting of O-RAN Fronthaul
interface is one of the promising features for potentially usage of the
precise time management for the egress packets.

The main objective of this patchset is to specify the way how applications
can provide the moment of time at what the packet transmission must be
started and to describe in preliminary the supporting this feature
from mlx5 PMD side [1].

The new dynamic timestamp field is proposed, it provides some timing
information, the units and time references (initial phase) are not
explicitly defined but are maintained always the same for a given port.
Some devices allow to query rte_eth_read_clock() that will return
the current device timestamp. The dynamic timestamp flag tells whether
the field contains actual timestamp value. For the packets being sent
this value can be used by PMD to schedule packet sending.

The device clock is opaque entity, the units and frequency are
vendor specific and might depend on hardware capabilities and
configurations. If might (or not) be synchronized with real time
via PTP, might (or not) be synchronous with CPU clock (for example
if NIC and CPU share the same clock source there might be no
any drift between the NIC and CPU clocks), etc.

After PKT_RX_TIMESTAMP flag and fixed timestamp field supposed
deprecation and obsoleting, these dynamic flag and field might be
used to manage the timestamps on receiving datapath as well. Having
the dedicated flags for Rx/Tx timestamps allows applications not
to perform explicit flags reset on forwarding and not to promote
received timestamps to the transmitting datapath by default.
The static PKT_RX_TIMESTAMP is considered as candidate to become
the dynamic flag and this move should be discussed.

When PMD sees the "rte_dynfield_timestamp" set on the packet being sent
it tries to synchronize the time of packet appearing on the wire with
the specified packet timestamp. If the specified one is in the past it
should be ignored, if one is in the distant future it should be capped
with some reasonable value (in range of seconds). These specific cases
("too late" and "distant future") can be optionally reported via
device xstats to assist applications to detect the time-related
problems.

There is no any packet reordering according timestamps is supposed,
neither within packet burst, nor between packets, it is an entirely
application responsibility to generate packets and its timestamps
in desired order. The timestamps can be put only in the first packet
in the burst providing the entire burst scheduling.

PMD reports the ability to synchronize packet sending on timestamp
with new offload flag:

This is palliative and might be replaced with new eth_dev API
about reporting/managing the supported dynamic flags and its related
features. This API would break ABI compatibility and can't be introduced
at the moment, so is postponed to 20.11.

For testing purposes it is proposed to update testpmd "txonly"
forwarding mode routine. With this update testpmd application generates
the packets and sets the dynamic timestamps according to specified time
pattern if it sees the "rte_dynfield_timestamp" is registered.

The new testpmd command is proposed to configure sending pattern:

set tx_times <burst_gap>,<intra_gap>

<intra_gap> - the delay between the packets within the burst
              specified in the device clock units. The number
              of packets in the burst is defined by txburst parameter

<burst_gap> - the delay between the bursts in the device clock units

As the result the bursts of packet will be transmitted with specific
delays between the packets within the burst and specific delay between
the bursts. The rte_eth_read_clock is supposed to be engaged to get the
current device clock value and provide the reference for the timestamps.

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

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet: use named constants for deprecated QinQ TPIDs
Ivan Malov [Fri, 19 Jun 2020 09:21:15 +0000 (10:21 +0100)]
net: use named constants for deprecated QinQ TPIDs

Add named constants for deprecated QinQ TPIDs.
Update drivers which have already been using existing
TPID named constants from librte_net to use the
new named constants rather than magic numbers.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agoapp/testpmd: fix CPU cycles per packet stats on Tx modes
Phil Yang [Mon, 22 Jun 2020 09:04:42 +0000 (17:04 +0800)]
app/testpmd: fix CPU cycles per packet stats on Tx modes

In txonly and flowgen forwarding mode, calculating CPU per packets with
total received packets is not accurate. Use total transmitted packets
for these cases.

The error output under txonly mode:
testpmd> show fwd stats all

---------------------- Forward statistics for port 0  -------------------
RX-packets: 0              RX-dropped: 0             RX-total: 0
TX-packets: 3582891927     TX-dropped: 401965824     TX-total: 3984857751
TX-bursts : 86381636 [0% of 0 pkts + 85% of 64 pkts + 15% of 32 pkts]
-------------------------------------------------------------------------

---------------------- Forward statistics for port 1  -------------------
RX-packets: 1              RX-dropped: 394351696     RX-total: 394351697
TX-packets: 3582890632     TX-dropped: 401965568     TX-total: 3984856200
TX-bursts : 86381679 [0% of 0 pkts + 85% of 64 pkts + 15% of 32 pkts]
-------------------------------------------------------------------------

+++++++++++++++ Accumulated forward statistics for all ports+++++++++++++
RX-packets: 1              RX-dropped: 394351696     RX-total: 394351697
TX-packets: 7165782559     TX-dropped: 803931392     TX-total: 7969713951
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

CPU cycles/packet=54984156291.00 \
(total cycles=54984156291 / total RX packets=1) at 200 MHz Clock

Fixes: 53324971a14e ("app/testpmd: display/clear forwarding stats on demand")
Cc: stable@dpdk.org
Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agoapp/testpmd: remove softnic forward mode
Jasvinder Singh [Tue, 23 Jun 2020 09:32:59 +0000 (10:32 +0100)]
app/testpmd: remove softnic forward mode

Softnic can be used like other virtual devices without
needing any special mode. Therefore, remove softnic mode
from testpmd app. Documentation is updated as well.

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
4 years agodoc: announce marking ethdev internal symbol
Ferruh Yigit [Tue, 23 Jun 2020 13:49:51 +0000 (14:49 +0100)]
doc: announce marking ethdev internal symbol

The APIs are marked in the doxygen comment but better to mark the
symbols too. This is planned for v20.11 release.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
4 years agonet/enic: support burst mode info
Hyong Youb Kim [Thu, 2 Jul 2020 03:14:51 +0000 (20:14 -0700)]
net/enic: support burst mode info

Add Rx/Tx burst mode getter handlers.

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
4 years agonet/ice: support RSS for IPv6 prefix
Junfeng Guo [Thu, 9 Jul 2020 02:06:43 +0000 (10:06 +0800)]
net/ice: support RSS for IPv6 prefix

RSS for IPv6 prefix fields are supported in this patch, so that we
can use prefixes instead of full IPv6 address for RSS. These prefixes
include the first 32, 48, 64 bits of both SRC and DST IPv6 address.

Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agoapp/testpmd: support extended RSS offload types
Junfeng Guo [Thu, 9 Jul 2020 02:06:42 +0000 (10:06 +0800)]
app/testpmd: support extended RSS offload types

This patch adds testpmd cmdline support for IPv6 prefix.

Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agoethdev: add RSS types for IPv6 prefix
Junfeng Guo [Thu, 9 Jul 2020 02:06:41 +0000 (10:06 +0800)]
ethdev: add RSS types for IPv6 prefix

This patch defines new RSS offload types for IPv6 prefix with 32, 40,
48, 56, 64, 96 bits of both SRC and DST IPv6 address.
Ref https://tools.ietf.org/html/rfc6052.

Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/hinic/base: convert error value to ETIMEDOUT
Xiaoyun Wang [Thu, 9 Jul 2020 13:43:02 +0000 (21:43 +0800)]
net/hinic/base: convert error value to ETIMEDOUT

Following commit updated the error codes:
commit 2ae8e130cf21 ("net/hinic/base: modify returned error values")

In that commit 'ETIME' errors are not used because it is not supported
by FreeBSD, instead in this patch converting relevant error codes to
'ETIMEDOUT'.

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agoethdev: fix VLAN offloads set if no relative capabilities
Wei Hu (Xavier) [Thu, 9 Jul 2020 10:43:14 +0000 (18:43 +0800)]
ethdev: fix VLAN offloads set if no relative capabilities

Currently, there is a potential problem that calling the API function
rte_eth_dev_set_vlan_offload to start VLAN hardware offloads which the
driver does not support. If the PMD driver does not support certain VLAN
hardware offloads and does not check for it, the hardware setting will
not change, but the VLAN offloads in dev->data->dev_conf.rxmode.offloads
will be turned on.

It is supposed to check the hardware capabilities to decide whether the
relative callback needs to be called just like the behavior in the API
function named rte_eth_dev_configure. And it is also needed to cleanup
duplicated checks which are done in some PMDs. Also, note that it is
behaviour change for some PMDs which simply ignore (with error/warning
log message) unsupported VLAN offloads, but now it will fail.

Fixes: a4996bd89c42 ("ethdev: new Rx/Tx offloads API")
Fixes: 0ebce6129bc6 ("net/dpaa2: support new ethdev offload APIs")
Fixes: f9416bbafd98 ("net/enic: remove VLAN filter handler")
Fixes: 4f7d9e383e5c ("fm10k: update vlan offload features")
Fixes: fdba3bf15c7b ("net/hinic: add VLAN filter and offload")
Fixes: b96fb2f0d22b ("net/i40e: handle QinQ strip")
Fixes: d4a27a3b092a ("nfp: add basic features")
Fixes: 56139e85abec ("net/octeontx: support VLAN filter offload")
Fixes: ba1b3b081edf ("net/octeontx2: support VLAN offloads")
Fixes: d87246a43759 ("net/qede: enable and disable VLAN filtering")
Cc: stable@dpdk.org
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Hyong Youb Kim <hyonkim@cisco.com>
Acked-by: Sachin Saxena <sachin.saxena@nxp.com>
Acked-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Acked-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agoethdev: fix data room size verification in Rx queue setup
Wei Hu (Xavier) [Thu, 9 Jul 2020 10:43:13 +0000 (18:43 +0800)]
ethdev: fix data room size verification in Rx queue setup

In the rte_eth_rx_queue_setup API function, the local variable named
mbp_buf_size, which is the data room size of the input parameter mp,
is checked to guarantee that each memory chunk used for net device
in the mbuf is bigger than the min_rx_bufsize. But if mbp_buf_size is
less than RTE_PKTMBUF_HEADROOM, the value of the following  statement
will be a large number since the mbp_buf_size is a unsigned value.
    mbp_buf_size - RTE_PKTMBUF_HEADROOM
As a result, it will cause a segment fault in this situation.

This patch fixes it by modify the check condition to guarantee that the
local variable named mbp_buf_size is bigger than RTE_PKTMBUF_HEADROOM.

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Sachin Saxena <sachin.saxena@nxp.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agonet/dpaa2: avoid multiple IOVA conversions
Roman Kapl [Mon, 29 Jun 2020 11:17:58 +0000 (13:17 +0200)]
net/dpaa2: avoid multiple IOVA conversions

Avoids recalculation of DPAA2_IOVA_TO_VADDR, since this is somewhat
costly function on no-IOMMU setups.

Brings about 0.5 Gbps improvement at 19 Gbps speeds on LX2160 with 512b
packets.

Signed-off-by: Roman Kapl <rka@sysgo.com>
Reviewed-by: Hemant Agrawal <hemant.agrawal@nxp.com>
4 years agonet/enic: add more flow manager actions to dump
Hyong Youb Kim [Fri, 3 Jul 2020 02:23:51 +0000 (19:23 -0700)]
net/enic: add more flow manager actions to dump

The following commit introduced several new actions. Make the dump
function to print those actions.

commit 6faf81f1d2c3 ("net/enic: update flow manager API")

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
4 years agonet/enic: support VLAN push and pop flow actions
Hyong Youb Kim [Fri, 3 Jul 2020 02:23:50 +0000 (19:23 -0700)]
net/enic: support VLAN push and pop flow actions

Flow manager API includes push/pop actions, so support corresponding
DPDK flow actions.

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
4 years agocommon/mlx5: fix physical port name pattern recognition
Viacheslav Ovsiienko [Wed, 8 Jul 2020 20:52:16 +0000 (20:52 +0000)]
common/mlx5: fix physical port name pattern recognition

This patch makes the Infiniband device physical port name
recognition more strict. Currently mlx5 PMD might recognize
the names like "pf0sf0" erroneously as "pf0" and the wrong
device type (host PF representor) is reported.

The names like "pf0sf0" belong to PCI subfunctions which
is currently not supported by mlx5 PMD and this false
recognition must be eliminated.

Fixes: 420bbdae89f2 ("net/mlx5: fix host physical function representor naming")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agonet/mlx5: add ConnectX-6 Lx device ID
Ali Alnubani [Wed, 8 Jul 2020 09:14:04 +0000 (12:14 +0300)]
net/mlx5: add ConnectX-6 Lx device ID

This adds the ConnectX-6 Lx device id to the list of supported
Mellanox devices that run the MLX5 PMD.
The device is still in development stage.

Signed-off-by: Ali Alnubani <alialnu@mellanox.com>
Acked-by: Raslan Darawsheh <rasland@mellanox.com>
4 years agodoc: fix a typo in mlx5 guide
Ali Alnubani [Wed, 8 Jul 2020 09:13:20 +0000 (12:13 +0300)]
doc: fix a typo in mlx5 guide

Fixes: ecb160456aed ("net/mlx5: add device parameter for MPRQ stride size")
Cc: stable@dpdk.org
Signed-off-by: Ali Alnubani <alialnu@mellanox.com>
Acked-by: Raslan Darawsheh <rasland@mellanox.com>
4 years agonet/iavf: support RSS for IPv4 IPv6 mix of GTP
Junfeng Guo [Wed, 8 Jul 2020 03:27:39 +0000 (11:27 +0800)]
net/iavf: support RSS for IPv4 IPv6 mix of GTP

RSS for GTP with outer & inner ipv4 & ipv6 combination are supported
in this patch, so that we can process RSS based on inner 5 tuples or
3 tuples of all the cases below of GTP packets:
        1. ipv4 (outer) + ipv4 (inner)
        2. ipv4 (outer) + ipv6 (inner)
        3. ipv6 (outer) + ipv4 (inner)
        4. ipv6 (outer) + ipv6 (inner)

Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/ice: support RSS for IPv4 IPv6 mix of GTP
Junfeng Guo [Wed, 8 Jul 2020 03:27:38 +0000 (11:27 +0800)]
net/ice: support RSS for IPv4 IPv6 mix of GTP

RSS for GTP with outer & inner ipv4 & ipv6 combination are supported
in this patch, so that we can process RSS based on inner 5 tuples or
3 tuples of all the cases below of GTP packets:
        1. ipv4 (outer) + ipv4 (inner)
        2. ipv4 (outer) + ipv6 (inner)
        3. ipv6 (outer) + ipv4 (inner)
        4. ipv6 (outer) + ipv6 (inner)

Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/ice: fix protocol header for PPPoE
Simei Su [Thu, 9 Jul 2020 06:21:28 +0000 (14:21 +0800)]
net/ice: fix protocol header for PPPoE

When adding a RSS rule with pattern MAC_PPPOE_IPV4_UDP and input
set SRC/DST IPV4, because of incomplete protocol header fields,
the rule can't do hash with inner src/dst ipv4. PPPOE_IPV4_TCP/SCTP
and PPPOE_IPV6_UDP/TCP/SCTP also have similar issues. This patch
complements protocol header fields for PPPOE data packets.

Fixes: 0b952714e9c1 ("net/ice: refactor PF hash flow")

Signed-off-by: Simei Su <simei.su@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/ixgbe/base: update version
Guinan Sun [Thu, 9 Jul 2020 08:00:46 +0000 (08:00 +0000)]
net/ixgbe/base: update version

Update base code version in readme.

Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>