Tianfei Zhang [Thu, 14 Nov 2019 09:02:54 +0000 (17:02 +0800)]
raw/ifpga/base: align send buffer for SPI
The length of send buffer of SPI bus should be 4bytes align.
Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
Signed-off-by: Andy Pei <andy.pei@intel.com>
Tianfei Zhang [Thu, 14 Nov 2019 09:02:53 +0000 (17:02 +0800)]
raw/ifpga/base: support device tree
In PAC N3000 card, this is a BMC chip which using MAX10 FPGA
to manage the board configuration, like sensors, flash controller,
QSFP, powers. And this is a SPI bus connected between A10 FPGA and
MAX10, we can access the MAX10 registers over this SPI bus.
In BMC, there are about 19 sensors in MAX10 chip, including the FPGA
core temperature, Board temperature, board current, voltage and so on.
We use DTB (Device tree table) to describe it. This DTB file is store
in nor flash partition, which will flashed in Factory when the boards
delivery to customers. And the same time, the customers can easy to
customize the BMC configuration like change the sensors.
Add device tree support by using libfdt library in Linux distribution.
The end-user should pre-install the libfdt and libfdt-devel package
before use DPDK on PAC N3000 Card.
For Centos 7.x: sudo yum install libfdt libfdt-devel
For Ubuntu 18.04: sudo apt install libfdt-dev libfdt1
To eliminate build error, we currently do not compile raw/ifpga
and net/ipn3ke. User should install libfdt and libfdt-devel first,
modify config/common_linux, CONFIG_RTE_LIBRTE_PMD_IFPGA_RAWDEV=n
to CONFIG_RTE_LIBRTE_PMD_IFPGA_RAWDEV=y, modify config/common_base,
CONFIG_RTE_LIBRTE_IPN3KE_PMD=n to CONFIG_RTE_LIBRTE_IPN3KE_PMD=y.
Then this function can work.
Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
Signed-off-by: Andy Pei <andy.pei@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Tianfei Zhang [Thu, 14 Nov 2019 09:02:52 +0000 (17:02 +0800)]
raw/ifpga/base: expose SEU error
This patch exposes SEU error information to application then application
could compare this information (128bit) with its own SMH file to know
if this SEU is a fatal error or not.
Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
Signed-off-by: Andy Pei <andy.pei@intel.com>
Tianfei Zhang [Thu, 14 Nov 2019 09:02:51 +0000 (17:02 +0800)]
raw/ifpga/base: clear pending bit
Every defined bit in FME_ERROR0 is RW1C. Other reserved bits are always
0 when readout and it will plan to be RW1C if needed in future.
So it is safe just write the read back value to clear all the errors.
Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
Signed-off-by: Andy Pei <andy.pei@intel.com>
Tianfei Zhang [Thu, 14 Nov 2019 09:02:50 +0000 (17:02 +0800)]
raw/ifpga/base: support IRQ
Add IRQ support for ifpga FME global error, port error and unit.
We implemented this feature by vfio interrupt mechanism.
To build this feature, CONFIG_RTE_EAL_VFIO should be enabled.
Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
Signed-off-by: Andy Pei <andy.pei@intel.com>
Andy Pei [Thu, 14 Nov 2019 09:02:49 +0000 (17:02 +0800)]
net/i40e: support ipn3ke FPGA port bonding
In ipn3ke, each FPGA network side port bonding to an i40e pf,
each i40e pf link status should get data from FPGA network,
side port. This patch provide bonding relationship.
Signed-off-by: Rosen Xu <rosen.xu@intel.com>
Signed-off-by: Andy Pei <andy.pei@intel.com>
Viacheslav Ovsiienko [Thu, 14 Nov 2019 08:56:36 +0000 (08:56 +0000)]
net/mlx5: fix vport id in port id action
The kernel driver (starting from OFED 4.7.3.1.3) uses the upper half
of metadata register C0 to provide VHCA and vport id's. The mlx5 PMD
should check the actual mask of register C0 and shift the vport id
value for port actions appropriately.
Fixes:
f07341e7aed3 ("net/mlx5: update source and destination vport translations")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Viacheslav Ovsiienko [Wed, 13 Nov 2019 16:24:50 +0000 (16:24 +0000)]
net/mlx5: fix environment variable recovery
The state of environment variable MLX5_BF_SHUT_UP was not
recovered correctly if there was no tx_db_nc devarg specified.
Fixes:
8409a28573d3 ("net/mlx5: control transmit doorbell register mapping")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Yahui Cao [Thu, 14 Nov 2019 14:16:12 +0000 (22:16 +0800)]
net/ice: add SPDX tag
Fixes:
84dc7a95a2d3 ("net/ice: enable flow director engine")
Signed-off-by: Yahui Cao <yahui.cao@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Qi Zhang [Thu, 14 Nov 2019 05:02:01 +0000 (13:02 +0800)]
net/ice: ignore error when removing RSS rule
Currently, multiple rte_flow RSS rules may map to the same
hardware rule if a later rule is just for input set change or
symm turn on/off. So after one of the rules be destroyed, we will
get error ICE_ERR_DOES_NOT_EXIST when destroying any other rules.
The patch simply fixes this by ignoring this error. A more
sophisticated fix that remember the sequence and replay properly
will be provided in the future.
Fixes:
5ad3db8d4bdd ("net/ice: enable advanced RSS")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Simei Su [Wed, 13 Nov 2019 02:03:29 +0000 (10:03 +0800)]
net/ice: fix RSS flow destroy
In ice_hash_create(), whatever the hash_function is, the
filter_ptr->symm is always 0 and when we destroy the flow, the
ice_rem_rss_cfg() is never carried out. So the destroy function never
works well. The patch fixes this issue and at the same time
distinguishes between simple_xor and symmetric_toeplitz.
To fix this issue, the patch adds a new structure to include a flag to
indicate if it is a simple_xor flow so that it's easier to remove the
config when destroying the flow. The patch also simplifies code
implementation logic in ice_hash_create().
Fixes:
5ad3db8d4bdd ("net/ice: enable advanced RSS")
Signed-off-by: Simei Su <simei.su@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Ajit Khaparde [Wed, 13 Nov 2019 08:29:45 +0000 (13:59 +0530)]
net/bnxt: fix null dereference in Rx stop
Null-checking "rxq" suggests that it may be null, but it has already
been dereferenced on all paths leading to the check.
Refactored the code to address this issue.
Coverity issue: 350594
Fixes:
fc4bfea59696 ("net/bnxt: fix Rx queue start/stop for Thor based NICs")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Venkat Duvvuru [Wed, 13 Nov 2019 08:29:44 +0000 (13:59 +0530)]
net/bnxt: fix log message level
When an existing mac_addr is tried to get programmed again, a
message is displayed that the mac_addr already exists.
However the message is of type ERR. This patch changes the message
to type DEBUG
Fixes:
938a87db4324 ("net/bnxt: fix redundant MAC address check")
Cc: stable@dpdk.org
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Wed, 13 Nov 2019 08:29:43 +0000 (13:59 +0530)]
net/bnxt: fix crash in xstats get
We would hit a segfault in bnxt_dev_xstats_get_op() if xstats argument
is NULL, Check if the argument is NULL and return appropriately.
Fixes:
bfb9c2260be2 ("net/bnxt: support xstats get/reset")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Andy Gospodarek <gospo@broadcom.com>
Rahul Gupta [Wed, 13 Nov 2019 08:29:42 +0000 (13:59 +0530)]
net/bnxt: fix flow creation with non-consecutive group ids
In non-RSS mode, vnics map 1:1 with Rx queues during init. This can
create problems if non-consecutive group IDs are given as part of
subsequent flow create cmds as they can end up pointing to Rx queues
(mapped during init) that are different than the intended destination
queue as specified in the flow create cmd.
To fix this, now that we have the ability to dynamically create
vnics, do not create any additional vnics other than the default vnic
during init. Allocate them only during flow/filter creation time.
When RSS is disabled we need to use the COS queue count queried
from firmware.
Fixes:
36024b2e7fe5 ("net/bnxt: allow dynamic creation of VNIC")
Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Somnath Kotur [Wed, 13 Nov 2019 08:29:41 +0000 (13:59 +0530)]
net/bnxt: limit queue count for NS3/Stingray devices
Cap max queue count to 128 for NS3 devices and ensure that same count
is reported as part of dev_info_get_op as well
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com>
Kalesh AP [Wed, 13 Nov 2019 08:29:40 +0000 (13:59 +0530)]
net/bnxt: add checks for firmware reset
Driver should fail the eth_dev_ops callbacks and accessing
Tx and Rx queues when device is in reset or in error state.
Added missing checks for fw reset in few routines.
Fixes:
be14720def9c ("net/bnxt: support FW reset")
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Xiaoyu Min [Wed, 13 Nov 2019 09:29:59 +0000 (11:29 +0200)]
net/mlx5: fix layer bits to be unique
The layer bits should be unique otherwise layer info will be
interpreted wrongly.
Fixes:
70d84dc797b7 ("net/mlx5: add internal tag item and action")
Fixes:
55deee1715f0 ("net/mlx5: extend flow mark support")
Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Dekel Peled [Tue, 12 Nov 2019 14:19:20 +0000 (16:19 +0200)]
net/mlx5: fix verbs flow counter query
Function flow_verbs_counter_query() was recently modified.
The new 'if' condition uses a pointer to flow counter-set.
This pointer is valid only if flow contains a count action.
This patch adds check to verify the pointer is valid.
Fixes:
d85c7b5ea59f ("net/mlx5: split hairpin flows")
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Dekel Peled [Mon, 11 Nov 2019 14:32:46 +0000 (16:32 +0200)]
net/mlx5: fix getting Rx queue type
Function mlx5_rxq_get_type() uses the input queue index, without
checking it, as index to the Rx queues array.
If this value is too high, it will result in pointer to memory out
of Rx queues array bounds.
This patch adds check of the input queue index, to verify it is valid.
Fixes:
d85c7b5ea59f ("net/mlx5: split hairpin flows")
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Viacheslav Ovsiienko [Wed, 13 Nov 2019 08:27:45 +0000 (08:27 +0000)]
net/mlx5: fix suffix flow creation in metadata split
The variable cleanup was erroneously done before pointer usage.
The cleanup is moved to appropriate place, comment is clarified.
Fixes:
8d72fa668964 ("net/mlx5: share tag between meter and metadata")
Reported-by: Eli Britstein <elibr@mellanox.com>
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Matan Azrad [Tue, 12 Nov 2019 22:00:10 +0000 (22:00 +0000)]
net/mlx5: revert default rules amount optimization
This reverts commit
304ffe576f239e5405228c0feec04b6138d525b7.
It tried to optimize the amount of the default flow
rules and created it only once on top of the PF representor.
For each FDB rule, the default port ID to match on is like of the port
that triggers the flow.
Hence, the single default rule will not be matched on the VF traffic.
As a result, all the traffic of the VFs will not match to the jump flow
in the root table and will always be forwarded to the representor port.
Revert the commit.
Fixes:
304ffe576f23 ("net/mlx5: fix condition to create default rule")
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Shougang Wang [Wed, 13 Nov 2019 01:37:58 +0000 (01:37 +0000)]
net/ice: fix wild pointer
To avoid wild pointer, pointers should be set to NULL after free them.
Fixes:
1a2fc1799f09 ("net/ice: reject duplicated flow for flow director")
Fixes:
84dc7a95a2d3 ("net/ice: enable flow director engine")
Fixes:
0f880c3df192 ("net/ice: add flow director counter resource init/release")
Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Shougang Wang [Wed, 13 Nov 2019 01:37:57 +0000 (01:37 +0000)]
net/ice: fix flow director counter resource release
All the counter resources should be cleaned up when teardown.
Fixes:
0f880c3df192 ("net/ice: add flow director counter resource init/release")
Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Shougang Wang [Wed, 13 Nov 2019 01:37:56 +0000 (01:37 +0000)]
net/ice: fix flow director profile removal
The removal of FDIR profile should start from the next
of ICE_FLTR_PTYPE_NONF_NONE.
Fixes:
109e8e06249e ("net/ice: configure HW flow director rule")
Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Shougang Wang [Wed, 13 Nov 2019 01:37:55 +0000 (01:37 +0000)]
net/ice: fix memzone reserve and release in flow director
To avoid memzone reserve failure and memory leak, following
resources management should be added.
- Check if the FDIR Memzone already exists before reserving.
- Free FDIR memzone when teardown and other failure scenarios.
Fixes:
84dc7a95a2d3 ("net/ice: enable flow director engine")
Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Wei Zhao [Tue, 12 Nov 2019 03:21:55 +0000 (11:21 +0800)]
net/ice/base: fix switch programming for IPv6
Correct an error in the IPV6 header bitmask used for programming switch
rules.
Also, change other programming switch headers to use big endian
fields in order to make setting these easier.
Fixes:
04b8ec1ea807 ("net/ice/base: add protocol structures and defines")
Cc: stable@dpdk.org
Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Bruce Richardson [Tue, 12 Nov 2019 13:40:23 +0000 (13:40 +0000)]
net/i40e: fix clang build with 16B descriptors
When compiling with 16B descriptor support enabled, clang compiles gave
an error, complaining that the final parameter of _mm256_blend_epi32()
had to be an immediate value (i.e. compile-time constant):
i40e_rxtx_vec_avx2.c:561:21: error: argument to
'__builtin_ia32_pblendd256' must be a constant integer
__m256i tmp0_1 = _mm256_blend_epi32(fdir_zero_mask,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
While it appears that GCC was able to convert the constant variable
value "fdir_blend_mask" into the blend call, clang was not doing so. To
guarantee the use of an immediate we convert the variable value to a
"#define".
Fixes:
7d087a0a8b8e ("net/i40e: support flow director on AVX Rx")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Leyi Rong [Tue, 12 Nov 2019 02:42:06 +0000 (10:42 +0800)]
net/iavf: fix Tx checksum offload in AVX path
Fix iavf vf_checksum_sw case fail in X710/XXV710, set bit2 to 1
of CMD field in Tx descriptor of AVX Tx path according to Spec.
Fixes:
af0c246a3800 ("net/iavf: enable AVX2 for iavf")
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Qi Zhang [Tue, 12 Nov 2019 13:45:57 +0000 (21:45 +0800)]
net/ice/base: fix TCAM entry management
Order intermediate VSIG list correct in order to correctly match
existing VSIG lists.
When overriding pre-existing TCAM entries, properly delete the existing
entry and remove it from the change/update list.
Fixes:
51d04e4933e3 ("net/ice/base: add flexible pipeline module")
Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Tested-by: Zhirun Yan <zhirun.yan@intel.com>
Chenxu Di [Tue, 12 Nov 2019 05:56:06 +0000 (05:56 +0000)]
net/i40e: fix hotplug remove
testpmd will occur infinite loops when device hotplug remove.
We can fix the issue by using the pci generic remove function
Fixes:
ac89d46096d5 ("net/i40e: release port upon close")
Signed-off-by: Chenxu Di <chenxux.di@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Chenxu Di [Tue, 12 Nov 2019 06:00:14 +0000 (06:00 +0000)]
net/ixgbe: fix hotplug remove
testpmd will occur infinite loops when device hotplug remove.
We can fix the issue by using the pci generic remove function
Fixes:
f2f4990eff94 ("net/ixgbe: release port upon close")
Signed-off-by: Chenxu Di <chenxux.di@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Simei Su [Thu, 7 Nov 2019 05:47:03 +0000 (13:47 +0800)]
net/ice: fix crash with wrong package
This patch fixes core dump issue when entering safe mode with a
wrong ice.pkg. In safe mode, rte_flow is not supported and it
won't initialize any flow engine.
Fixes:
7615a6895009 ("net/ice: rework for generic flow enabling")
Signed-off-by: Simei Su <simei.su@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Qiming Yang [Mon, 11 Nov 2019 03:24:24 +0000 (11:24 +0800)]
net/ice: fix link status recovery
This patch fixes a kernel driver link status issue by recovering
link status when device stops.
Fixes:
e6161345d8a9 ("net/ice: support link status change")
Cc: stable@dpdk.org
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Simei Su [Mon, 11 Nov 2019 07:55:27 +0000 (15:55 +0800)]
net/ice: fix RSS rule destroy
This patch changes RSS rule destroy interface from ice_rem_vsi_rss_cfg()
to ice_rem_rss_cfg(). To coordinate with input set change, it should
destroy a specific flow rule but not all vsi cfg.
Fixes:
5ad3db8d4bdd ("net/ice: enable advanced RSS")
Signed-off-by: Simei Su <simei.su@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Dekel Peled [Mon, 11 Nov 2019 14:32:31 +0000 (16:32 +0200)]
net/mlx5: fix check of RSS queue index
RSS action validation function checks the queues included in RSS
to make sure they are valid.
A Queue is considered valid if the pointer to the queue (item at
location queue-index of RxQ array) is not a null value.
The queue indices are not checked. If a large value is entered as
queue index, using it as an index in RxQ array will result in a
pointer to memory out of array bounds. If this memory contains a
value which is not null, this queue will be wrongly considered valid.
This patch updates function mlx5_flow_validate_action_rss() with
check of the input queue indices, as done in function
mlx5_flow_validate_action_queue().
Fixes:
23c1d42c7138 ("net/mlx5: split flow validation to dedicated function")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Viacheslav Ovsiienko [Tue, 12 Nov 2019 08:53:58 +0000 (08:53 +0000)]
net/mlx5: fix query host adapter attributes
Host adapter attributes are queried from kernel via multiple
DevX calls. The retrieved data were erroneously overwritten,
the order of querying is fixed.
Fixes:
6bc327b94fe8 ("net/mlx5: fill meter capabilities using DevX")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Akhil Goyal [Wed, 20 Nov 2019 05:58:45 +0000 (11:28 +0530)]
crypto/openssl: support in-place scatter gather
As per current support, Scatter Gather is only supported
for out of place input and output buffers.
This patch add support for Scatter Gather for in-place buffers.
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Fan Zhang [Wed, 6 Nov 2019 10:54:25 +0000 (10:54 +0000)]
examples/fips_validation: fix auth verify
Fixes:
f64adb6714e0 ("examples/fips_validation: support HMAC parsing")
Cc: stable@dpdk.org
This patch fixes the incorrect mbuf write and digest memory leak in
fips_validation authentication verify.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
Akhil Goyal [Fri, 8 Nov 2019 10:46:10 +0000 (16:16 +0530)]
app/crypto-perf: support PDCP
test-crypto-perf app is updated to calculate PDCP
throughput numbers.
2 new params are added for PDCP
--pdcp-sn-sz <5/7/12/15/18>
--pdcp-domain <control/user>
./dpdk-test-crypto-perf --master-lcore 0 -l 0,1 --log-level=8 --
--devtype crypto_dpaa2_sec --optype pdcp --cipher-algo aes-ctr
--cipher-op encrypt --auth-algo null --auth-op generate --auth-key-sz
16 --ptest throughput --total-ops 100000 --burst-sz 64 --buffer-sz
64,390,1512 --pool-sz 4096 --silent --pdcp-sn-sz 12 --pdcp-domain
control
Signed-off-by: Manish Tomar <manish.tomar@nxp.com>
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Pablo de Lara [Thu, 14 Nov 2019 12:21:04 +0000 (12:21 +0000)]
doc: update release notes for AESNI PMDs
AESNI MB and AESNI GCM PMDs were updated to support
latest IPSec Multi buffer library (v0.53), and the user guide
of hose drivers were updated but not release notes.
Fixes:
4b701523742e ("crypto/aesni_gcm: support in-place chained mbufs")
Fixes:
d91dc5835656 ("doc: support IPsec Multi-buffer lib v0.53")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Stephen Hemminger [Fri, 8 Nov 2019 17:06:14 +0000 (09:06 -0800)]
examples/ipsec-segw: add SPDX license tag
Add missing BSD license tag to IPsec examples.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Lukasz Bartosik [Wed, 6 Nov 2019 15:48:14 +0000 (16:48 +0100)]
examples/ipsec-secgw: fix default configuration
Update default configuration of ipsec-secgw:
1.In ep0.cfg change SPI value used by two inbound IPv6 security
policies from 15 to 115 and 16 to 116 to point to existing inbound
SAs. There are no inbound SAs with SPI value 15, 16.
- In ep1.cfg change SPI value used by two outbound IPv6 security
policies from 15 to 115 and 16 to 116 to point to existing outbound
SAs. There are no outbound SAs with SPI value 15, 16. Add missing
priority parameter in two inbound IPv4 security policies.
Fixes:
60a94afefc84 ("examples/ipsec-secgw: add sample configuration files")
Cc: stable@dpdk.org
Signed-off-by: Lukasz Bartosik <lbartosik@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Xueming Li [Tue, 12 Nov 2019 14:50:28 +0000 (14:50 +0000)]
malloc: fix realloc padded element size
When resize a memory with next element, the original element size grows.
If the orginal element has padding, the real inner element size didn't
grow as well and this causes trailer verification failure when malloc
debug enabled.
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>
Xueming Li [Tue, 12 Nov 2019 14:50:27 +0000 (14:50 +0000)]
malloc: fix realloc copy size
In rte_realloc, if the old element has pad and need to allocate a new
memory, the padding size was not deducted, so more data was copied to
new data area.
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>
Bruce Richardson [Tue, 12 Nov 2019 16:41:36 +0000 (16:41 +0000)]
kernel/freebsd: always use clang for kmod compilation
Clang is the system compiler for FreeBSD and kernel module builds can fail
when built with gcc, e.g. when testing with test-meson-builds.sh.
Therefore, it's safer to always use clang to build the kmods since the
actual flags used are outside of DPDK's control and cannot be guaranteed to
work with all compilers.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Bruce Richardson [Tue, 12 Nov 2019 16:41:35 +0000 (16:41 +0000)]
kernel/freebsd: allow installing kernel modules
Set the install path for the kernel modules as /boot/modules. This may
ease the integration with the official FreeBSD ports system as all
components should be correctly located in the staging directory after
running "ninja install"
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Bruce Richardson [Tue, 19 Nov 2019 15:15:43 +0000 (15:15 +0000)]
ci: add 32-bit travis builds
Add a travis job to build for 32-bit on 64-bit systems to catch additional
build errors, for example, incorrect use of printf specifiers with uint64_t
types.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Kevin Traynor [Wed, 13 Nov 2019 16:10:15 +0000 (16:10 +0000)]
lib: fix doxygen typos
Fix these as they are user visible. Found with codespell.
Fixes:
af75078fece3 ("first public release")
Fixes:
c2361bab70c5 ("eal: compute IOVA mode based on PA availability")
Fixes:
0880c40113ef ("drivers: advertise kmod dependencies in pmdinfo")
Fixes:
56b6ef874f80 ("efd: new Elastic Flow Distributor library")
Fixes:
5a5f3178d4a8 ("power: return error when environment already set")
Cc: stable@dpdk.org
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Kevin Traynor [Wed, 13 Nov 2019 16:10:14 +0000 (16:10 +0000)]
lib: fix log typos
Fix these as they are user visible. Found with codespell.
Fixes:
bacaa2754017 ("eal: add channel for multi-process communication")
Fixes:
f05e26051c15 ("eal: add IPC asynchronous request")
Fixes:
0cbce3a167f1 ("vfio: skip DMA map failure if already mapped")
Fixes:
445c6528b55f ("power: common interface for guest and host")
Fixes:
e6c6dc0f96c8 ("power: add p-state driver compatibility")
Fixes:
8f972312b8f4 ("vhost: support vhost-user")
Cc: stable@dpdk.org
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
David Marchand [Tue, 19 Nov 2019 12:59:23 +0000 (13:59 +0100)]
build: remove unneeded meson option
The meson option has been missed when removing this code.
Fixes:
8e35792c5325 ("eal: remove dead code on NUMA node detection")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Michael Pfeiffer [Fri, 15 Nov 2019 13:03:28 +0000 (14:03 +0100)]
kni: reduce interface name size
The name in rte_kni_device_info is passed to the kernel, which allows
interface names with at most 16 bytes (IFNAMSIZ). rte_kni_alloc with a
longer name currently trigger a kernel BUG in alloc_netdev_mqs in
net/core/dev.c. Reduce RTE_KNI_NAMESIZE to prevent this situation.
Signed-off-by: Michael Pfeiffer <michael.pfeiffer@tu-ilmenau.de>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Anatoly Burakov [Thu, 14 Nov 2019 13:58:21 +0000 (13:58 +0000)]
mempool: remove check for bad IOVA when populating
Currently, mempool will check if IOVA is bad for a segment, and reject
the IOVA if hugepages are also enabled. This check is wrong because now
that we have external memory segments, they are allowed to have their
IOVA's to be invalid. This check also doesn't make much sense in the
first place, because the following code can handle bad IOVA's perfectly
well (and in fact, this check is not triggering a failure when
--no-huge option is enabled), so there is not much sense to check for
this in the first place.
Fixes:
950e8fb4e194 ("mem: allow registering external memory areas")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Tested-by: Bo Chen <box.c.chen@intel.com>
Anatoly Burakov [Thu, 14 Nov 2019 13:58:20 +0000 (13:58 +0000)]
mempool: use actual IOVA addresses when populating
Currently, when mempool is being populated, we get IOVA address
of every segment using rte_mem_virt2iova(). This works for internal
memory, but does not really work for external memory, and does not
work on platforms which return RTE_BAD_IOVA as a result of this
call (such as FreeBSD). Moreover, even when it works, the function
in question will do unnecessary pagewalks in IOVA as PA mode, as
it falls back to rte_mem_virt2phy() instead of just doing a lookup in
internal memseg table.
To fix it, replace the call to first attempt to look through the
internal memseg table (this takes care of internal and external memory),
and fall back to rte_mem_virt2iova() when unable to perform VA->IOVA
translation via memseg table.
Fixes:
66cc45e293ed ("mem: replace memseg with memseg lists")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Tested-by: Bo Chen <box.c.chen@intel.com>
Vamsi Attunuru [Sun, 17 Nov 2019 15:12:44 +0000 (16:12 +0100)]
eal/linux: remove KNI restriction on IOVA
Now that KNI supports VA (with kernel versions starting 4.6.0), we can
accept IOVA as VA, but KNI must be configured for this.
Pass iova_mode when creating KNI netdevs.
So far, IOVA detection policy forced IOVA as PA when KNI is loaded,
whatever the buses IOVA requirements were.
We can now use IOVA as VA, but this comes with a cost in KNI.
When no constraint is expressed by the buses, keep the current behavior
of choosing PA.
Note: this change supposes that dpdk is built on the same kernel than
the target system kernel; no objection has been expressed on this topic.
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Vamsi Attunuru [Sun, 17 Nov 2019 15:12:43 +0000 (16:12 +0100)]
kni: support userspace VA
Patch adds support for kernel module to work in IOVA = VA mode by
providing address translation routines to convert userspace VA to
kernel VA.
KNI performance using PA is not changed by this patch.
But comparing KNI using PA to KNI using VA, the latter will have lower
performance due to the cost of the added translation.
This translation is implemented only with kernel versions starting 4.6.0.
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Zhike Wang [Wed, 13 Nov 2019 11:03:28 +0000 (19:03 +0800)]
vhost: fix vring requests validation broken if no FD
When VHOST_USER_VRING_NOFD_MASK is set, the fd_num is 0,
so validate_msg_fds() will return error. In this case,
the negotiation of vring message between vhost user front end and
back end would fail, and as a result, vhost user link could NOT be up.
How to reproduce:
1.Run dpdk testpmd insides VM, which locates at host with ovs+dpdk.
2.Notice that inside ovs there are endless logs regarding failure to
handle VHOST_USER_SET_VRING_CALL, and link of vm could NOT be up.
Fixes:
bf472259dde6 ("vhost: fix possible denial of service by leaking FDs")
Cc: stable@dpdk.org
Signed-off-by: Zhike Wang <wangzk320@163.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
David Marchand [Tue, 12 Nov 2019 19:33:41 +0000 (20:33 +0100)]
doc/guides: clean repeated words
Shoot repeated words in all our guides.
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
David Marchand [Tue, 12 Nov 2019 19:31:03 +0000 (20:31 +0100)]
doc: fix link to AESNI mb external library
Add missing _.
Fixes:
2977a13657ab ("doc: fix AESNI_MB guide")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Xiao Wang [Fri, 18 Oct 2019 00:01:47 +0000 (20:01 -0400)]
doc: fix address type description for IOAT rawdev
Align the description to what the code snippet shows.
Fixes:
0a92e63fc4cd ("raw/ioat: add local API to perform copies")
Cc: stable@dpdk.org
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
David Marchand [Tue, 8 Oct 2019 09:47:36 +0000 (11:47 +0200)]
doc: fix internal links for older releases
Using external explicit references to http://doc.dpdk.org makes older
releases documentation point to the current master documentation pages.
Switch to internal references.
Fixes:
59ad25fe2184 ("doc: add overview of qat guide")
Fixes:
30e7fbd62839 ("doc: add event timer adapter guide")
Fixes:
b7f859c9a9a5 ("doc: add switch representation documentation")
Fixes:
f714a18885a6 ("app/testbbdev: add test application for bbdev")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Luca Boccassi [Sat, 21 Sep 2019 14:52:42 +0000 (16:52 +0200)]
doc: add oss-security to the security process
The OSS-security project functions as a single point of contact for
pre-release, embargoed security notifications. Distributions and major
vendors are subscribed to this private list, so that they can be warned
in advance and schedule the work required to fix the vulnerability.
List and link this process in the DPDK security process document.
Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Krzysztof Kanas [Tue, 12 Nov 2019 20:31:02 +0000 (21:31 +0100)]
test: optimise fd closing in forks
Caught while investigating timeouts on a ARM64 server.
Stracing a test process running the eal_flags_autotest, we can see that
the fork helper is checking all possible file descriptors from
getdtablesize() to 2, and close the existing ones.
We can do better by inspecting this forked process /proc/self/fd
directory.
Besides, checking file descriptors via /proc/self/fd only makes sense for
Linux. This code was a noop on FreeBSD.
Fixes:
af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Krzysztof Kanas <kkanas@marvell.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
Wangyu (Eric) [Wed, 13 Nov 2019 07:17:30 +0000 (07:17 +0000)]
bus/pci: align next mapping address on page boundary
Currently, the next address picked by PCI mapping infrastructure
may be page-unaligned due to BAR length being smaller than page size.
This leads to a situation where the requested map address is invalid,
resulting in mmap() call returning an arbitrary address,
which will later interfere with device BAR mapping in secondary processes.
Fix it by always aligning the next requested address on page boundary.
Fixes:
c752998b5e2e ("pci: introduce library and driver")
Cc: stable@dpdk.org
Signed-off-by: Xiaofeng Deng <dengxiaofeng@huawei.com>
Signed-off-by: Wangyu (Eric) <seven.wangyu@huawei.com>
Acked-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Gavin Hu <gavin.hu@arm.com>
Stephen Hemminger [Fri, 8 Nov 2019 18:00:35 +0000 (10:00 -0800)]
cmdline: remove unnecessary #ifdef
The #ifdef to conditionally include <sys/socket.h> on BSD
is unnecessary. It is harmless to include the header on other
OS's. An extra include is better than an #ifdef.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
David Marchand [Tue, 12 Nov 2019 12:37:33 +0000 (13:37 +0100)]
examples/l2fwd: fix build warning with system wide install
Caught when compiling this example with pkg-config:
## Building l2fwd
...
main.c: In function ‘main’:
main.c:716:3: warning: ‘rte_eth_dev_set_ptypes’ is deprecated: Symbol
is not yet part of stable ABI [-Wdeprecated-declarations]
716 | ret = rte_eth_dev_set_ptypes(portid, RTE_PTYPE_UNKNOWN, NULL,
| ^~~
In file included from main.c:38:
...build-x86-default/install-root/usr/local/include/rte_ethdev.h:2661:5:
note: declared here
2661 | int rte_eth_dev_set_ptypes(uint16_t port_id, uint32_t
ptype_mask,
| ^~~~~~~~~~~~~~~~~~~~~~
ln -sf l2fwd-shared build/l2fwd
Fixes:
9731df2e7554 ("examples/l2fwd: disable packet type parsing")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Maxime Coquelin [Tue, 3 Sep 2019 15:34:22 +0000 (17:34 +0200)]
vhost: fix possible denial of service by leaking FDs
A malicious Vhost-user master could send in loop hand-crafted
vhost-user messages containing more file descriptors the
vhost-user slave expects. Doing so causes the application using
the vhost-user library to run out of FDs.
This issue has been assigned CVE-2019-14818
Fixes:
8f972312b8f4 ("vhost: support vhost-user")
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Maxime Coquelin [Fri, 23 Aug 2019 13:17:05 +0000 (15:17 +0200)]
vhost: fix possible denial of service on SET_VRING_NUM
vhost_user_set_vring_num() performs multiple allocations
without checking whether data were previously allocated.
It may cause a denial of service because of the memory leaks
that happen if a malicious vhost-user master keeps sending
VHOST_USER_SET_VRING_NUM request until the slave runs out
of memory.
This issue has been assigned CVE-2019-14818
Fixes:
b0a985d1f340 ("vhost: add dequeue zero copy")
Reported-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thomas Monjalon [Tue, 12 Nov 2019 08:07:25 +0000 (09:07 +0100)]
version: 19.11-rc2
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Ray Kinsella [Mon, 11 Nov 2019 11:57:58 +0000 (11:57 +0000)]
doc: update versioning guide for ABI versions
Updates to the ABI versioning guide, to account for the changes to the DPDK
ABI/API policy. Fixes for references to abi versioning and policy guides.
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Ray Kinsella [Mon, 11 Nov 2019 11:57:57 +0000 (11:57 +0000)]
doc: introduce major ABI versions
This policy change introduces major ABI versions, these are
declared every year, typically aligned with the LTS release
and are supported by subsequent releases in the following year.
This change is intended to improve ABI stabilty for those projects
consuming DPDK.
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Ray Kinsella [Mon, 11 Nov 2019 11:57:56 +0000 (11:57 +0000)]
doc: separate versioning guide into version and policy
Separate versioning.rst into abi versioning and abi policy guidance, in
preparation for adding more detail to the abi policy. Add an entry to the
maintainer file for the abi policy.
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
David Hunt [Tue, 29 Oct 2019 11:40:13 +0000 (11:40 +0000)]
examples/vm_power: fix no port in guest
If there are no ports available to the guest cli application, it will
exit when setting up the default policy because it fails to set the mac
address. This should not be the case, as this example can be used for
many other use cases that do not need ports.
If ports not found, simply set nb_mac_to_monitor in the policy to zero
and continue.
Fixes:
70febdcfd60f ("examples: check status of getting MAC address")
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Lei Yao <lei.a.yao@intel.com>
David Hunt [Wed, 24 Jul 2019 13:18:03 +0000 (14:18 +0100)]
examples/vm_power: fix OOB frequency oscillations
The branch ratio algorithm in the vm_power_manager sample application
can be very sensitive at patricular loads in a workload, causing
oscillations between min and max frequency. For example, if a
workload is at 50%, scaling up may change the ratio
enough that it immediately thinks it needs to scale down again.
This patch introduces a sliding window recording the scale up/down
direction for the last 32 samples, and scales up if any samples indicate
we should scale up, otherwise scale down. Each core has it's own window.
Fixes:
4b1a631b8a8a ("examples/vm_power: add oob monitoring functions")
Cc: stable@dpdk.org
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Matan Azrad [Mon, 11 Nov 2019 10:42:05 +0000 (10:42 +0000)]
ethdev: fix last item detection on RSS flow expand
There is a rte_flow API which expands a RSS flow pattern to multiple
patterns according to the RSS hash types in the RSS action
configuration.
As part of the expansion, detection of the last item of the flow uses
the "next proto" field of the last configured item in the pattern list.
Wrongly, the mask of this field was not considered in order to validate
the field.
Ignore "next proto" fields when their corresponded masks invalidate them.
Fixes:
fc2dd8dd492f ("ethdev: fix expand RSS flows")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Dekel Peled [Mon, 11 Nov 2019 17:47:35 +0000 (19:47 +0200)]
app/testpmd: set maximum LRO packet size
This patch implements use of the API for LRO aggregated packet
max size.
It adds command-line and runtime commands to configure this value,
and adds option to show the supported value.
Documentation is updated accordingly.
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Dekel Peled [Mon, 11 Nov 2019 17:47:34 +0000 (19:47 +0200)]
net/mlx5: set maximum LRO packet size
This patch implements use of the API for LRO aggregated packet
max size.
Rx queue create is updated to use the relevant configuration.
Documentation is updated accordingly.
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Dekel Peled [Mon, 11 Nov 2019 17:47:33 +0000 (19:47 +0200)]
ethdev: add maximum LRO packet size
This patch implements API for configuration and
validation of max size for LRO aggregated packet.
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Matan Azrad <matan@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Jerin Jacob [Fri, 8 Nov 2019 16:56:03 +0000 (22:26 +0530)]
eventdev: reserve space in main structs for extension
The struct rte_eventdev and rte_eventdev_data are supposed
to be used internally only, but there is a chance that
increasing their size would break ABI for some applications.
In order to allow smooth addition of features without breaking
ABI compatibility, some space is reserved.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Sachin Saxena [Mon, 11 Nov 2019 16:08:57 +0000 (21:38 +0530)]
net/dpaa2: fix Rx offload flags on jumbo MTU set
The JUMBO frame handling in dpaa2_dev_mtu_set api was not correct.
When frame_size is greater than RTE_ETHER_MAX_LEN, the
intention is to add JUMBO flag in rx offload while it was resetting
all other flags other than JUMBO as AND operator was used instead of OR.
Fixes:
0ebce6129bc6 ("net/dpaa2: support new ethdev offload APIs")
Cc: stable@dpdk.org
Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
Reviewed-by: Gagandeep Singh <g.singh@nxp.com>
Thomas Monjalon [Mon, 11 Nov 2019 07:26:09 +0000 (08:26 +0100)]
ethdev: reserve space in main structs for extension
In order to allow smooth addition of features without breaking
ABI compatibility, some space is reserved in several core structs
of ethdev API.
The struct rte_eth_dev and rte_eth_dev_data are supposed
to be used internally only, but there is a chance that
increasing their size would break ABI for some applications.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Raslan Darawsheh [Mon, 11 Nov 2019 11:40:20 +0000 (11:40 +0000)]
net/mlx5: set VF MAC address from host
Allow to configure the default MAC address of a VF
via its representor port in the host.
An API was proposed to specify explicitly the VF as a
target: https://patches.dpdk.org/patch/62176/
It has been rejected by the technical board in order to
keep compatibility with behavior in Intel PMDs.
http://mails.dpdk.org/archives/dev/2019-November/150588.html
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Pavan Nikhilesh [Mon, 11 Nov 2019 13:19:13 +0000 (18:49 +0530)]
app/testpmd: disable packet type parsing by default
Disable packey type parsing on port init, user can enable ptype parsing
by issuing set ptype command.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Pavan Nikhilesh [Mon, 11 Nov 2019 13:19:12 +0000 (18:49 +0530)]
app/testpmd: add command to set supported packet types
Add command to set supported ptype mask.
Usage:
set port <port_id> ptype_mask <ptype_mask>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Pavan Nikhilesh [Mon, 11 Nov 2019 13:19:11 +0000 (18:49 +0530)]
examples/l2fwd: disable packet type parsing
Disable packet type parsing as l2fwd doesn't rely on packet types.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Pavan Nikhilesh [Mon, 11 Nov 2019 13:19:10 +0000 (18:49 +0530)]
examples/eventdev: add new Rx RSS hash offload
Since pipeline_generic uses `rte_mbuf::hash::rss` add the new Rx offload
flag `DEV_RX_OFFLOAD_RSS_HASH` to inform PMD to copy the RSS hash result
into the mbuf.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Pavan Nikhilesh [Mon, 11 Nov 2019 13:19:09 +0000 (18:49 +0530)]
examples/eventdev: split port init sequence
Split port initialization sequence based on event device capabilities.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Pavan Nikhilesh [Mon, 11 Nov 2019 13:19:08 +0000 (18:49 +0530)]
drivers/net: update Rx RSS hash offload capabilities
Add DEV_RX_OFFLOAD_RSS_HASH flag for all PMDs that support RSS hash
delivery.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Pavan Nikhilesh [Mon, 11 Nov 2019 13:19:07 +0000 (18:49 +0530)]
ethdev: validate offloads set by PMD
Some PMDs cannot work when certain offloads are enable/disabled, as a
workaround PMDs auto enable/disable offloads internally and expose it
through dev->data->dev_conf.rxmode.offloads.
After device specific dev_configure is called compare the requested
offloads to the offloads exposed by the PMD and, if the PMD failed
to enable a given offload then log it and return -EINVAL from
rte_eth_dev_configure, else if the PMD failed to disable a given offload
log and continue with rte_eth_dev_configure.
Suggested-by: Andrew Rybchenko <arybchenko@solarflare.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Pavan Nikhilesh [Mon, 11 Nov 2019 13:19:06 +0000 (18:49 +0530)]
ethdev: add mbuf RSS update as an offload
Add new Rx offload flag `DEV_RX_OFFLOAD_RSS_HASH` which can be used to
enable/disable PMDs write to `rte_mbuf::hash::rss`.
PMDs notify the validity of `rte_mbuf::hash:rss` to the application
by enabling `PKT_RX_RSS_HASH ` flag in `rte_mbuf::ol_flags`.
Also update testpmd rx_offload command to include RSS_HASH
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Pavan Nikhilesh [Mon, 11 Nov 2019 13:19:05 +0000 (18:49 +0530)]
ethdev: add packet type range function
Add `rte_eth_dev_set_ptypes` function that will allow the application
to inform the PMD about reduced range of packet types to handle.
Based on the ptypes set PMDs can optimize their Rx path.
-If application doesn’t want any ptype information it can call
`rte_eth_dev_set_ptypes(ethdev_id, RTE_PTYPE_UNKNOWN, NULL, 0)`
and PMD may skip packet type processing and set rte_mbuf::packet_type to
RTE_PTYPE_UNKNOWN.
-If application doesn’t call `rte_eth_dev_set_ptypes` PMD can return
`rte_mbuf::packet_type` with `rte_eth_dev_get_supported_ptypes`.
-If application is interested only in L2/L3 layer, it can inform the PMD
to update `rte_mbuf::packet_type` with L2/L3 ptype by calling
`rte_eth_dev_set_ptypes(ethdev_id,
RTE_PTYPE_L2_MASK | RTE_PTYPE_L3_MASK, NULL, 0)`.
Suggested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Haiyue Wang [Fri, 8 Nov 2019 15:44:35 +0000 (23:44 +0800)]
doc: add ice PMD in doxygen
Add the doxygen for ice protocol extraction feature APIs.
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
Haiyue Wang [Fri, 8 Nov 2019 15:44:34 +0000 (23:44 +0800)]
net/ice: optimize protocol extraction by dynamic mbuf
The original design is to use rte_mbuf::udata64 to save the metadata of
protocol extraction which has network protocol data fields and type, a
private API is used to decode this metadata.
Use the dynamic mbuf field and flags to register the needed fields in
mbuf, to avoid overwriting 'rte_mbuf::udata64', since the application
may use it. Now the protocol extraction metadate is saved into dynamic
mbuf field with 4B size, and its type and validity is indicated by the
related dynamic mbuf flags in 'rte_mbuf::ol_flags'.
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
Bing Zhao [Fri, 8 Nov 2019 05:26:57 +0000 (07:26 +0200)]
net/mlx5: optimize tag traversal with hash list
Tag action for flow mark/flag could be reused by different flows.
When creating a new flow with mark, the existing tag resources will
be traversed in order to confirm if the action is already created.
If only one linked list is used, the searching rate will drop
significantly with the number of tag actions increasing.
By using a hash lists table, it will speed up the searching process
and in the meanwhile, the memory consumption won't be large if only
a small number tag action resources are created(compared to other
hash table implementations). The list heads array size could be
optimized with some extendable hash table in the future.
Signed-off-by: Bing Zhao <bingz@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Bing Zhao [Fri, 8 Nov 2019 15:23:10 +0000 (17:23 +0200)]
net/mlx5: reorganize flow matcher resources
Matchers are created on the specific table. If a single linked list
is used to store these, then the finding process might be the
bottleneck when there are a lot of different flow matchers on a
huge amount of tables. The matchers could be move into the table
data resource structure in order to reduce the comparison times
when finding.
Signed-off-by: Bing Zhao <bingz@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Bing Zhao [Fri, 8 Nov 2019 15:23:09 +0000 (17:23 +0200)]
net/mlx5: reorganize jump table resources
Jump object is associated with table object, so there is no need to
use a single linked list to store it. All the jump objects could be
put together with related flow tables.
Signed-off-by: Bing Zhao <bingz@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Bing Zhao [Fri, 8 Nov 2019 15:23:08 +0000 (17:23 +0200)]
net/mlx5: reorganize flow tables with hash list
In the current flow tables organization, arrays are used. This is
fast for searching, creating related object that will be used in
flow creation. But it introduces some limitation to the table index.
Then we can reorganize the flow tables information with hash list.
When using hash list, there is no need to maintain three arrays for
NIC TX, RX and FDB tables object information.
This attribute could be used together with the table ID to generate
a 64-bits key that is unique for the hash list insertion, lookup and
deletion.
Signed-off-by: Bing Zhao <bingz@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Viacheslav Ovsiienko [Fri, 8 Nov 2019 15:07:50 +0000 (15:07 +0000)]
net/mlx5: control transmit doorbell register mapping
The rdma core library can map doorbell register in two ways,
depending on the environment variable "MLX5_SHUT_UP_BF":
- as regular cached memory, the variable is either missing or
set to zero. This type of mapping may cause the significant
doorbell register writing latency and requires explicit
memory write barrier to mitigate this issue and prevent
write combining.
- as non-cached memory, the variable is present and set to
not "0" value. This type of mapping may cause performance
impact under heavy loading conditions but the explicit write
memory barrier is not required and it may improve core
performance.
The new devarg is introduced "tx_db_nc", if this parameter is
set to zero, the doorbell register is forced to be mapped to
cached memory and requires explicit memory barrier after
writing to. If "tx_db_nc" is set to non-zero value the doorbell
will be mapped as non-cached memory, not requiring the memory
barrier. If "tx_db_nc" is missing the behaviour will be defined
by presence of "MLX5_SHUT_UP_BF" in environment. If variable
is missed the default value zero will be set for ARM64 hosts
and one for others.
In run time the code checks the mapping type and provides the
memory barrier after writing to tx doorbell register if it is
needed. The mapping type is extracted directly from the
uar_mmap_offset field in the queue properties.
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>
Stephen Hemminger [Fri, 1 Nov 2019 20:12:56 +0000 (13:12 -0700)]
net/failsafe: support xstats
Add support for extended statistics in failsafe driver.
Reports detailed statistics for each sub device.
Example:
testpmd> show port xstats 1
rx_good_packets: 0
tx_good_packets: 0
rx_good_bytes: 0
tx_good_bytes: 0
rx_missed_errors: 0
rx_errors: 0
tx_errors: 0
rx_mbuf_allocation_errors: 0
rx_q0packets: 0
rx_q0bytes: 0
rx_q0errors: 0
tx_q0packets: 0
tx_q0bytes: 0
rx_sub0_good_packets: 0
tx_sub0_good_packets: 0
...
rx_sub1_good_packets: 0
tx_sub1_good_packets: 0
rx_sub1_good_bytes: 0
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Stephen Hemminger [Fri, 1 Nov 2019 20:12:55 +0000 (13:12 -0700)]
app/testpmd: block xstats for hidden ports
All the other testpmd commands block access to devices that
are owned. Looks like xstat got overlooked.
Fixes:
bfd5051b43b5 ("app/testpmd: new command to get extended statistics")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>