Matan Azrad [Mon, 10 Feb 2020 12:27:34 +0000 (12:27 +0000)]
common/mlx5: fix glue dlopen with meson build
The glue shared library name was created by the common class FMT name,
driver_name_fmt = 'rte_common_@0@', which is not correlated with
LIB_GLUE_BASE = 'librte_pmd_mlx5_glue.so'.
This causes the dynamic linkage of the glue library to fail what
remained mlx5 drivers outside the PCI driver list.
The command:
MLX5_GLUE_PATH=$(pwd)/build-meson/drivers/common/mlx5
build-meson/app/dpdk-testpmd -n 4 -w 0000:00:05.0 -w 0000:00:06.0 -- -i
The log:
common_mlx5: Cannot load glue library:
/usr/local/lib64/dpdk/pmds-20.0.1-glue/librte_pmd_mlx5_glue.so.20.02.0:
cannot open shared object file: No such file or directory
Adjust the shared library name to the LIB_GLUE_BASE definition.
Fixes:
7b4f1e6bd367 ("common/mlx5: introduce common library")
Signed-off-by: Matan Azrad <matan@mellanox.com>
Ciara Loftus [Thu, 13 Feb 2020 08:49:14 +0000 (08:49 +0000)]
net/af_xdp: fix maximum MTU
The maximum MTU for af_xdp zero copy is equal to the page size less the
frame overhead introduced by AF_XDP (XDP HR = 256) and DPDK (frame
headroom = 320). The patch updates this value to reflect this.
This change also makes it possible to remove unneeded constants for both
zero-copy and copy mode.
Fixes:
d8a210774e1d ("net/af_xdp: support unaligned umem chunks")
Cc: stable@dpdk.org
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
Ciara Loftus [Thu, 13 Feb 2020 08:49:13 +0000 (08:49 +0000)]
net/af_xdp: fix fill queue addresses
The fill queue addresses should start at the beginning of the mempool
object instead of the beginning of the mbuf. This is because the umem
frame headroom includes the mp hdrobj size. Starting at this point
ensures AF_XDP doesn't write past the available room in the frame, in
the case of larger packets which are close to the size of the mbuf.
Fixes:
d8a210774e1d ("net/af_xdp: support unaligned umem chunks")
Cc: stable@dpdk.org
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
Ciara Loftus [Thu, 13 Feb 2020 08:49:12 +0000 (08:49 +0000)]
net/af_xdp: fix umem frame size and headroom
The previous frame size calculation incorrectly used
mb_pool->private_data_size and didn't include mb_pool->header_size.
Instead of performing a manual calculation, use the
rte_mempool_calc_obj_size API to determine the frame size.
The previous frame headroom calculation also incorrectly used
mb_pool->private_data_size and didn't include mb_pool->header_size or
the mbuf priv size. Fix this.
Fixes:
d8a210774e1d ("net/af_xdp: support unaligned umem chunks")
Cc: stable@dpdk.org
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
Hariprasad Govindharajan [Wed, 12 Feb 2020 10:29:47 +0000 (10:29 +0000)]
app/testpmd: add --portlist option
In current version, we are setting the ports
using portmask. With portmask, we can use only
up to 64 ports. This portlist option enables the user
to use more than 64 ports.
Now we can specify the ports in 2 different ways
- Using portmask (-p [0x]nnn): mask must be in hex format
- Using portlist in the following format
--portlist <p1>[-p2][,p3[-p4],...]
--portmask 0x2 is same as --portlist 1
--portmask 0x3 is same as --portlist 0-1
Signed-off-by: Hariprasad Govindharajan <hariprasad.govindharajan@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Suanming Mou [Thu, 6 Feb 2020 04:14:25 +0000 (06:14 +0200)]
net/mlx5: fix meter header modify before decap
The meter flows are split into three subflows each, the prefix subflow
with meter action color the packet, the meter subflow filters out the
colored packets, the suffix subflow applies all the remaining actions
to the passed packets. The tag header modify action is added to the
prefix subflow to make the suffix subflow to match the packets from the
prefix subflow.
Currently, the tag header modify action is added at the beginning in the
prefix subflow even before decap action. The header modify action does
not make sense to the later decap action, so the flow create will be
validated as incorrect flow rule and failed.
Move the tag header modify action just before meter action in the prefix
subflow to make the flow with decap action to do the decap first, then
do the tag and meter to fix that issue.
Fixes:
9ea9b049a960 ("net/mlx5: split meter flow")
Cc: stable@dpdk.org
Reported-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Dekel Peled [Tue, 11 Feb 2020 11:05:11 +0000 (13:05 +0200)]
net/mlx5: fix VLAN match for DV mode
Currently MLX5 PMD can't match on untagged packets specifically.
Tagged traffic still hits the flows intended for untagged packets.
If the flow has ETH, it will catch all matching packets, tagged
and untagged.
The solution is to use cvlan_tag bit.
If mask=1 and value=0 it matches on untagged traffic.
If mask=1 and value=1 it matches on tagged traffic.
This is the kernel implementation.
This patch updated MLX5 PMD to set cvlan_tag mask and value according
to flow rule contents.
This update is relevant when using DV flow engine (dv_flow_en=1).
See example at https://doc.dpdk.org/guides/nics/mlx5.html#limitations.
Fixes:
fc2c498ccb94 ("net/mlx5: add Direct Verbs translate items")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Wisam Jaddo [Tue, 11 Feb 2020 13:20:06 +0000 (15:20 +0200)]
net/mlx5: fix blocker for push VLAN on Rx
The blocker should take FDB into consideration, since FDB all directions
have transfer ingress in it.
Fixes:
55060e62e4d2 ("net/mlx5: block push VLAN action on Rx")
Cc: stable@dpdk.org
Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
Acked-by: Raslan Darawsheh <rasland@mellanox.com>
Viacheslav Ovsiienko [Sun, 9 Feb 2020 17:02:39 +0000 (17:02 +0000)]
app/testpmd: fix txonly flow generation entropy
The testpmd application in txonly forwarding mode has an option
to generate the packet flows by varying the destination IP address.
The patch increments the IP for each packet sent, this improves
the entropy and RSS distribution on the peer receiving size
is getting more uniform.
Fixes:
01b645dcff7f ("app/testpmd: move txonly prepare in separate function")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Shougang Wang [Tue, 11 Feb 2020 09:26:22 +0000 (09:26 +0000)]
net/ixgbe: remove dead code
This patch fixes (Logically dead code) coverity issue.
Coverity issue: 353624
Fixes:
ba7b12dd64e4 ("net/ixgbe: fix link up in FreeBSD")
Cc: stable@dpdk.org
Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Thomas Monjalon [Sun, 9 Feb 2020 21:17:25 +0000 (22:17 +0100)]
net/mlx: replace hardcoded value with macro
Replace checking against 65535 limit,
with a simpler form using RTE_MIN and UINT16_MAX macros.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Matan Azrad <matan@mellanox.com>
Viacheslav Ovsiienko [Sun, 9 Feb 2020 22:54:53 +0000 (22:54 +0000)]
net/mlx5: fix legacy multi-packet write session
To provide the better PCIe bandwidth utilization the ConnectX-4LX
NIC supports the multi-packet write (MPW) sessions allowing to
pack multiple packets into one descriptor (WQE). This is legacy
feature and it has some limitations on the packets and data
description segments. To provide the best performance all inline
packets must be put into shared data segment and the total length
of MPW session must be limited. The limit is controlled with
txq_inline_mpw devarg.
Fixes:
82e75f8323bf ("net/mlx5: fix legacy multi-packet Tx descriptors")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Zhaoyan Chen [Tue, 4 Feb 2020 03:35:09 +0000 (11:35 +0800)]
doc: split versions table in i40e guide
Split recommended mapping table for X710/XL710/XXV710 and X722,
since they have different firmware versions.
Signed-off-by: Zhaoyan Chen <zhaoyan.chen@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Haiyue Wang [Thu, 6 Feb 2020 12:04:42 +0000 (20:04 +0800)]
common/iavf: fix ABI version
The new symbols should be in ABI version 20.0.1.
Fixes:
89214fe915b8 ("net/iavf/base: move to drivers common directory")
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Matan Azrad [Sun, 9 Feb 2020 15:19:16 +0000 (15:19 +0000)]
net/mlx5: fix encap/decap validation
The encapsulation and decapsulation actions are divided into 2 types:
L2 and L3.
In order to configure L3 xcapsulation actions the user should use both
RAW_DECAP and RAW_ENCAP and setting the appropriated data sizes in
their action configuration structures.
The PMD flow validation wrongly didn't detect the RAW_DECAP
and RAW_ENCAP combination to distinguish between L3_DECAP and L3_ENCAP.
Thus, some xcapsulation related validation failed.
For example, when configuring modify header action before L3_DECAP.
Simplify the xcapsulation defines and fix the L3 xcapsulation detection
using the action configuration data sizes.
By the way, add the hairpin validation in this area.
Fixes:
d85c7b5ea59f ("net/mlx5: split hairpin flows")
Fixes:
8ba9eee4ce32 ("net/mlx5: add raw data encap/decap to Direct Verbs")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Stephen Hemminger [Fri, 7 Feb 2020 18:08:16 +0000 (10:08 -0800)]
net/netvsc: initialize link state
If application is using link state interrupt, the correct link state
needs to be filled in when device is started. This is similar to
how virtio updates link information.
Fixes:
4e9c73e96e83 ("net/netvsc: add Hyper-V network device")
Cc: stable@dpdk.org
Reported-by: Mohammed Gamal <mgamal@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Tested-by: Mohammed Gamal <mgamal@redhat.com>
Bernard Iremonger [Tue, 28 Jan 2020 13:48:45 +0000 (13:48 +0000)]
net/i40e: fix ESP flow creation
Merge of ESP and L2TP code in i40e_fdir.c added checks on
cus_pctype->index which caused flow creation for ESP to fail.
Added fill_ipv4_function()
Refactored code to have one path for customized and non customized
pctype's.
Fixes:
c5f8365bc85d ("net/i40e: support flow director for L2TPv3 over IP")
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Rory Sexton <rory.sexton@intel.com>
Guinan Sun [Mon, 10 Feb 2020 04:15:25 +0000 (04:15 +0000)]
net/ixgbe: remove dead code
This patch fixes (Logically dead code) coverity issue.
Coverity issue: 353613
Fixes:
3c4270187518 ("net/ixgbe: support VF MAC address add/remove")
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Yahui Cao [Tue, 21 Jan 2020 02:25:59 +0000 (10:25 +0800)]
net/ice: fix flow director passthru
The original PASSTHRU implementation is forwarding to queue 0. The
corrected implementation is forwarding to the next stage filter.
Fixes:
f5cafa961fae ("net/ice: add flow director create and destroy")
Cc: stable@dpdk.org
Signed-off-by: Yahui Cao <yahui.cao@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Ajit Khaparde [Thu, 6 Feb 2020 18:29:55 +0000 (10:29 -0800)]
doc: fix release notes for bnxt
Fixes:
94eb699bc82e ("net/bnxt: support flow mark action")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Santoshkumar Karanappa Rastapur [Thu, 6 Feb 2020 16:33:14 +0000 (22:03 +0530)]
net/bnxt: fix buffer allocation reattempt
In case of a buffer allocation failure, we reattempt buffer allocation
before the Rx handler exits. We were not attempting this when producer
index is greater than the number of buffers to allocate. Fixed it with
correct checks.
Fixes:
d9dd0b29ed31 ("net/bnxt: fix Rx handling and buffer allocation logic")
Cc: stable@dpdk.org
Signed-off-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Kalesh AP [Thu, 6 Feb 2020 16:33:13 +0000 (22:03 +0530)]
net/bnxt: make locally used functions static
bnxt_rss_ctxts() function is declared in header file bnxt.h,
implemented in bnxt_ethdev.c, and called only in bnxt_ethdev.c.
Also many functions are declared in header file bnxt_hwrm.h,
implemented in bnxt_hwrm.c, and called only in bnxt_hwrm.c.
This patch moves these function declarations into bnxt_ethdev.c
and bnxt_hwrm.c, as static functions.
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kalesh AP [Thu, 6 Feb 2020 16:33:12 +0000 (22:03 +0530)]
net/bnxt: fix port stop on error recovery failure
During live FW upgrade or error recovery, if restoring the filter
settings fail after port start, driver invokes bnxt_uninit_resources()
only. Fix it to invoke bnxt_dev_stop_op() first before calling
bnxt_uninit_resources().
Fixes:
df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com>
Kalesh AP [Thu, 6 Feb 2020 16:33:11 +0000 (22:03 +0530)]
net/bnxt: register for debug notification from FW
PF driver has to register for the debug notification async event
with firmware in the HWRM_FUNC_DRV_RGTR command.
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kalesh AP [Thu, 6 Feb 2020 16:33:10 +0000 (22:03 +0530)]
net/bnxt: log firmware debug notifications
The debug notifications are not functional in nature, they should
only have diagnostic value. Other than logging to system log,
drivers shall not take any other functional action based on this
async event.
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>
Rahul Gupta [Thu, 6 Feb 2020 16:33:09 +0000 (22:03 +0530)]
net/bnxt: fix default timeout for getting FW version
Initially when driver is loading, there is no HWRM timeout configured
by FW, the VER_GET command needs use default timeout as 500ms and
while recovering from fatal/non-fatal FW error, it should use timeout
as 50ms.
Fixes:
458f0360e8dc ("net/bnxt: get default HWRM command timeout from FW")
Cc: stable@dpdk.org
Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kalesh AP [Thu, 6 Feb 2020 16:33:08 +0000 (22:03 +0530)]
net/bnxt: fix unnecessary delay in port stop
VFs and multifunction PFs do not have the privilege to change
link configuration. We force the physical link down as a part
of device stop only for single physical function(SPF).
This change also helps in eliminating the logs when a VF port
is stopped:
"Port 0: link state change event"
"bnxt_print_link_info(): Port 0 Link Up - speed 25000 Mbps - full-duplex"
Fixes:
316e412299fd ("net/bnxt: fix crash when closing")
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>
Junxiao Shi [Mon, 27 Jan 2020 18:32:11 +0000 (11:32 -0700)]
drivers/crypto: fix session-less mode
When OpenSSL or AESNI-MB cryptodev is being used in sessionless mode
for symmetric crypto operation (e.g. SHA256 hash), the driver prints
error message:
CRYPTODEV: set_sym_session_private_data() line 489:
Set private data for driver 0 not allowed
Then, AESNI-MB driver segfaults in post_process_mb_job().
Bugzilla ID: 377
Fixes:
b3bbd9e5f2 ("cryptodev: support device independent sessions")
Fixes:
c68d7aa354 ("crypto/aesni_mb: use architecture independent macros")
Cc: stable@dpdk.org
Signed-off-by: Junxiao Shi <git@mail1.yoursunny.com>
Marcin Smoczynski [Fri, 7 Feb 2020 14:28:04 +0000 (15:28 +0100)]
test/crypto: add CPU crypto mode cases
This patch adds ability to run unit tests in cpu crypto mode for AESNI
GCM cryptodev.
Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>
Tested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Marcin Smoczynski [Tue, 11 Feb 2020 10:36:27 +0000 (11:36 +0100)]
examples/ipsec-secgw: add missing SPDX license tag
Add missing BSD-3 license tag to inline fallback testing scripts.
Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Artur Trybula [Wed, 12 Feb 2020 12:06:49 +0000 (13:06 +0100)]
doc: add cycle-count mode in compression perf tool
This commit adds release notes and updates documentation for
the cycle-count mode added to the compression performance tool.
Fixes:
2695db95a147 ("test/compress: add cycle-count mode to perf tool")
Signed-off-by: Artur Trybula <arturx.trybula@intel.com>
Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Artur Trybula [Thu, 6 Feb 2020 09:37:35 +0000 (10:37 +0100)]
test/compress: replace test vector
This patch replaces an existing test vector with a new one containing
public domain text only. This is to avoid any potential issues
re-licensing content as BSD-3 which has no clear original license.
Fixes:
b06aa643cac4 ("test/compress: add initial unit tests")
Cc: stable@dpdk.org
Signed-off-by: Artur Trybula <arturx.trybula@intel.com>
Arek Kusztal [Fri, 31 Jan 2020 07:28:48 +0000 (08:28 +0100)]
doc: add missing release notes for QAT
Updated release notes for the changes done in QAT for DPDK 20.02
Original commits for these features are as follows.
Fixes:
026f21c0b951 ("common/qat: support dual threads for enqueue/dequeue")
Fixes:
6cde900bd59d ("common/qat: remove tail write coalescing")
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Marcin Smoczynski [Thu, 6 Feb 2020 12:36:02 +0000 (13:36 +0100)]
cryptodev: fix doxygen of CPU crypto API
Add missing doxygen comment of rte_crypto_mbuf_to_vec's fields.
Fixes:
7adf992fb9bf ("cryptodev: introduce CPU crypto API")
Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
David Marchand [Fri, 7 Feb 2020 14:06:00 +0000 (15:06 +0100)]
crypto/ccp: fix queue alignment
Caught by compiling with -fno-common.
A ____cacheline_aligned symbol can be found in the crypto/ccp driver
object files.
Looking at this driver source, the ____cacheline_aligned (kernel?)
alignment macro is undefined.
The compiler treats this as a symbol definition and generates a global
symbol.
Fixes:
ef4b04f87fa6 ("crypto/ccp: support device init")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Thierry Herbelot [Mon, 10 Feb 2020 07:35:12 +0000 (08:35 +0100)]
crypto/octeontx2: add kmod dependency info
Like for OCTEON TX, the OCTEON TX2 crypto engines must
first be unbound from their kernel module, then rebound to
vfio-pci, before being used in DPDK.
As this capability is detected at runtime by dpdk-pmdinfo,
add the info in the PMD registering directives.
Then an external script can be used for bind and unbind.
Fixes:
2f8a1b963eb77 ("crypto/octeontx2: add PMD skeleton")
Cc: stable@dpdk.org
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Ciara Power [Fri, 14 Feb 2020 16:17:25 +0000 (16:17 +0000)]
lib: fix unnecessary double negation
An equality expression already returns either 0 or 1.
There is no need to use double negation for these cases.
Fixes:
ea672a8b1655 ("mbuf: remove the rte_pktmbuf structure")
Fixes:
a0fd91cefcc0 ("mempool: rename functions with confusing names")
Cc: stable@dpdk.org
Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Fan Zhang [Fri, 14 Feb 2020 11:41:18 +0000 (11:41 +0000)]
examples/fips_validation: fix AES-GCM cipher length parsing
This patch fixes the cipher len keyword typo.
Fixes:
07f5e4553293 ("examples/fips_validation: fix cipher length for AES-GCM")
Suggested-by: Akhil Goyal <akhil.goyal@nxp.com>
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Xiao Wang [Tue, 21 Jan 2020 03:06:57 +0000 (22:06 -0500)]
examples/l3fwd-power: fix interrupt disable
Since all related queues' interrupts are turned on before epoll, we need
to turn off all the interrupts after wakeup. This patch fixes the issue
of only turning off the interrupted queues.
Fixes:
b736d64787fc ("examples/l3fwd-power: disable Rx interrupt when waking up")
Cc: stable@dpdk.org
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Tested-by: Harman Kalra <hkalra@marvell.com>
Reviewed-by: Liang Ma <liang.j.ma@intel.com>
Tested-by: Liang Ma <liang.j.ma@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
Xiao Wang [Tue, 21 Jan 2020 03:06:56 +0000 (22:06 -0500)]
examples/l3fwd-power: fix a typo
Fixes:
aee3bc79cc34 ("examples/l3fwd-power: enable one-shot Rx interrupt and polling switch")
Cc: stable@dpdk.org
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
Scott Wasson [Fri, 14 Feb 2020 10:00:52 +0000 (10:00 +0000)]
kni: fix not contiguous FIFO
KNI requires FIFO to be physically contiguous, with existing
'rte_memzone_reserve()' API this is not guaranteed by default and as a
result KNI rings and packet delivery may be broken if reserved memory
is not physically contiguous.
Fixing it by providing 'RTE_MEMZONE_IOVA_CONTIG' flag to ask physically
contiguous memory.
Bugzilla ID: 389
Fixes:
23fa86e529e4 ("memzone: enable IOVA-contiguous reserving")
Cc: stable@dpdk.org
Signed-off-by: Scott Wasson <scott_wasson@affirmednetworks.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Thomas Monjalon [Mon, 5 Aug 2019 12:30:12 +0000 (14:30 +0200)]
doc: remove major in designation of normal releases
The word "major" was used to differentiate with release candidates
or stable maintenance releases.
However the word "major" can be understood as "LTS",
so it is less confusing to avoid this word.
Reported-by: Ori Kam <orika@mellanox.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
Thomas Monjalon [Sun, 9 Feb 2020 21:14:52 +0000 (22:14 +0100)]
fix Mellanox copyright and SPDX tag
Mellanox owns Tilera and EZchip, so the copyrights can be converted.
At the same time, the license header is switched to SPDX tag format,
and a typo is fixed in another copyright line.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Vamsi Attunuru [Thu, 6 Feb 2020 11:53:57 +0000 (17:23 +0530)]
examples/kni: add SIGTERM signal handling
SIGTERM handling is added for graceful application exit.
Useful when application is terminated without specifying
any signal on 'kill' command.
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Ferruh Yigit [Wed, 12 Feb 2020 17:14:24 +0000 (17:14 +0000)]
kni: fix build with Linux 5.6
With the following Linux commit a new parameter 'txqueue' has been added
to 'ndo_tx_timeout' ndo:
commit
0290bd291cc0 ("netdev: pass the stuck queue to the timeout handler")
The change reflected to the KNI with version check.
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
David Hunt [Tue, 11 Feb 2020 10:50:08 +0000 (10:50 +0000)]
examples/power: fix ack for enable/disable turbo
When a VM sends a command through virtio-serial to enable/disable
turbo, it is successfully enabled or disabled, yet the response to the
VM is NACK. This is because all the library frequency change APIs return
1 for success (change in frequency), 0 for success (no change in
frequency) and -1 for failure. However the turbo enable/disable APIs just
return 0 for success and -1 for failure.
Fix the handling of the return code to treat ">= 0" as success, and
send an ACK. Only send NACK when < 0 (failure).
Fixes:
0de94bcac7fc ("examples/vm_power: send confirmation cmd to guest")
Cc: stable@dpdk.org
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Lei Yao <lei.a.yao@intel.com>
Ciara Power [Fri, 7 Feb 2020 10:24:02 +0000 (10:24 +0000)]
examples/ioat: fix invalid link status check
The return value of the get link function call was not checked, and
could return a negative value indicating a failure. This meant the
link_status of the link being checked is invalid, because the link was
not filled with data. The return value is now checked, and if the return
value is not 0 for success, the loop continues with the next port.
To avoid confusion between variable names, the existing retval variable
is renamed to link_status, to better represent its use.
Coverity issue: 350348
Fixes:
c8e6ceecebc1 ("examples/ioat: add new sample app for ioat driver")
Cc: stable@dpdk.org
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Ciara Power [Tue, 4 Feb 2020 16:00:06 +0000 (16:00 +0000)]
examples/ioat: fix failure check for ioat dequeue
The nb_dq return value from the ioat dequeue is negative in failure
cases, however the variable was an unsigned int, causing the condition
where nb_dq <= 0 to never be true. This is now cast to a signed int,
which will successfully reflect the -1 value to be used in this
conditional check.
Coverity issue: 350342
Coverity issue: 350349
Fixes:
92c981637ffc ("examples/ioat: handle failure case for ioat dequeue")
Cc: stable@dpdk.org
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Praveen Shetty [Thu, 28 Nov 2019 11:27:14 +0000 (11:27 +0000)]
examples/ioat: fix unchecked return value
patch checks the return value of function rte_eth_dev_info_get,
if return value is negative error message printed on the console.
Coverity issue: 350361
Fixes:
c8e6ceecebc1 ("examples/ioat: add new sample app for ioat driver")
Cc: stable@dpdk.org
Signed-off-by: Praveen Shetty <praveen.shetty@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Gargi Sau [Mon, 9 Dec 2019 06:37:56 +0000 (06:37 +0000)]
examples/ethtool: fix unchecked return value
This checks the return value from the function
rte_eth_dev_set_vlan_offload.
Coverity issue: 350358
Fixes:
bda68ab9d1e7 ("examples/ethtool: add user-space ethtool sample application")
Cc: stable@dpdk.org
Signed-off-by: Gargi Sau <gargi.sau@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Konstantin Ananyev [Wed, 12 Feb 2020 13:47:45 +0000 (13:47 +0000)]
test/acl: add 32-bit range test case
Add new test-case to improve test coverage for 32-bit range fields.
Suggested-by: Ido Goshen <ido@cgstowernetworks.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Konstantin Ananyev [Wed, 12 Feb 2020 13:47:44 +0000 (13:47 +0000)]
acl: fix 32-bit match for range field
ACL build phase for range fields that are bigger then
16 bits might generate wrong trie.
For more details please refer to:
https://bugs.dpdk.org/show_bug.cgi?id=307
Bugzilla ID: 307
Fixes:
dc276b5780c2 ("acl: new library")
Cc: stable@dpdk.org
Reported-by: Ido Goshen <ido@cgstowernetworks.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Pallavi Kadam [Fri, 7 Feb 2020 03:14:37 +0000 (19:14 -0800)]
eal/windows: support command line options parsing
Adding specific logic for eal.c to support parsing on
Windows.
Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Signed-off-by: Antara Ganesh Kolar <antara.ganesh.kolar@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
Reviewed-by: Keith Wiles <keith.wiles@intel.com>
Reviewed-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: Narcisa Ana Maria Vasile <narcisa.vasile@microsoft.com>
Acked-by: Narcisa Ana Maria Vasile <narcisa.vasile@microsoft.com>
Pallavi Kadam [Fri, 7 Feb 2020 03:14:36 +0000 (19:14 -0800)]
eal/windows: support more common files
Added support for additional common files in meson build
to expand Windows EAL and to support the lcore parsing
feature on Windows.
Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Signed-off-by: Antara Ganesh Kolar <antara.ganesh.kolar@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
Reviewed-by: Keith Wiles <keith.wiles@intel.com>
Reviewed-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: Narcisa Ana Maria Vasile <narcisa.vasile@microsoft.com>
Acked-by: Narcisa Ana Maria Vasile <narcisa.vasile@microsoft.com>
Pallavi Kadam [Fri, 7 Feb 2020 03:14:35 +0000 (19:14 -0800)]
eal: disable syslog and dlopen on Windows
Excluding syslog/ dlfcn definitions and parameters
from Windows by adding #ifndef RTE_EXEC_ENV_WINDOWS.
Note: This is a temporary change. In future, separate
'unix' directory will be created for unix specific functions.
Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
Reviewed-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: Narcisa Ana Maria Vasile <narcisa.vasile@microsoft.com>
Acked-by: Narcisa Ana Maria Vasile <narcisa.vasile@microsoft.com>
Pallavi Kadam [Fri, 7 Feb 2020 03:14:34 +0000 (19:14 -0800)]
eal/x86: include SSE4 support on Windows
Modified common/include/arch/x86/rte_vect.h
to include SSE4 header for Windows.
Signed-off-by: Antara Ganesh Kolar <antara.ganesh.kolar@intel.com>
Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
Reviewed-by: Keith Wiles <keith.wiles@intel.com>
Reviewed-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: Narcisa Ana Maria Vasile <narcisa.vasile@microsoft.com>
Acked-by: Narcisa Ana Maria Vasile <narcisa.vasile@microsoft.com>
Pallavi Kadam [Fri, 7 Feb 2020 03:14:33 +0000 (19:14 -0800)]
eal/windows: detect process type
Adding a function to detect process type, also included
header files to contain suitable function declarations
and to support extra warning flags.
Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Signed-off-by: Antara Ganesh Kolar <antara.ganesh.kolar@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
Reviewed-by: Keith Wiles <keith.wiles@intel.com>
Reviewed-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: Narcisa Ana Maria Vasile <narcisa.vasile@microsoft.com>
Acked-by: Narcisa Ana Maria Vasile <narcisa.vasile@microsoft.com>
Pallavi Kadam [Fri, 7 Feb 2020 03:14:32 +0000 (19:14 -0800)]
eal/windows: add getopt implementation
Adding getopt files to support parsing option on
Windows.
The original contribution is under BSD-2 license.
https://github.com/greenplum-db/libusual/blob/master/usual/getopt.c
https://github.com/greenplum-db/libusual/blob/master/usual/getopt.h
Signed-off-by: Antara Ganesh Kolar <antara.ganesh.kolar@intel.com>
Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
Reviewed-by: Keith Wiles <keith.wiles@intel.com>
Reviewed-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: Narcisa Ana Maria Vasile <narcisa.vasile@microsoft.com>
Acked-by: Narcisa Ana Maria Vasile <narcisa.vasile@microsoft.com>
Pallavi Kadam [Fri, 7 Feb 2020 03:14:31 +0000 (19:14 -0800)]
eal/windows: add some basic functions and macros
Adding additional function definitions for pthread, cpuset
implementation, asprintf implementation, in order to support
common code.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
Reviewed-by: Keith Wiles <keith.wiles@intel.com>
Reviewed-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: Narcisa Ana Maria Vasile <narcisa.vasile@microsoft.com>
Acked-by: Narcisa Ana Maria Vasile <narcisa.vasile@microsoft.com>
Pallavi Kadam [Fri, 7 Feb 2020 03:14:30 +0000 (19:14 -0800)]
eal/windows: add dirent implementation
Adding dirent.h on Windows to support common code.
eal_common_options.c includes this file.
The original contribution is under MIT license.
https://github.com/tronkko/dirent
Signed-off-by: Antara Ganesh Kolar <antara.ganesh.kolar@intel.com>
Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
Reviewed-by: Keith Wiles <keith.wiles@intel.com>
Reviewed-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: Narcisa Ana Maria Vasile <narcisa.vasile@microsoft.com>
Acked-by: Narcisa Ana Maria Vasile <narcisa.vasile@microsoft.com>
Pallavi Kadam [Fri, 7 Feb 2020 03:14:29 +0000 (19:14 -0800)]
license: add exceptions for Windows
The Governing Board and Tech Board have provided exceptions for
MIT and BSD-2-Clause license files for DPDK support on Windows.
Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Thomas Monjalon [Tue, 11 Feb 2020 23:57:24 +0000 (00:57 +0100)]
devtools: enable more config options in build test
The Linux kernel modules kni and igb_uio were disabled by default
so they need a new option (+kmods) for testing compilation.
Some recent features were not enabled in compilation testing:
- mlx5 vDPA (depends on libibverbs)
- ifpga (depends on libfdt)
- ipn3ke (depends on libfdt)
- Arm WFE
Check on libfdt availability is added, and not considered as a fix.
Fixes:
91a861e54164 ("config: disable Linux kernel modules by default")
Fixes:
95276abaaf0a ("vdpa/mlx5: introduce Mellanox vDPA driver")
Fixes:
1be7855d7739 ("eal: add wait until equal API")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
Thomas Monjalon [Tue, 11 Feb 2020 23:57:23 +0000 (00:57 +0100)]
config: deduplicate options
Some config options are overwritten with the same value
as the one inherited from its template parent.
Such duplicates which have no meaningful comments are removed.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
Matan Azrad [Tue, 11 Feb 2020 19:48:47 +0000 (19:48 +0000)]
vdpa/mlx5: fix ABI version
Changed the ABI version to 20.0.1.
Fixes:
95276abaaf0a ("vdpa/mlx5: introduce Mellanox vDPA driver")
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Matan Azrad [Tue, 11 Feb 2020 19:48:46 +0000 (19:48 +0000)]
common/mlx5: fix ABI version
Changed the ABI version to 20.0.1.
Fixes:
7b4f1e6bd367 ("common/mlx5: introduce common library")
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Thomas Monjalon [Mon, 10 Feb 2020 09:53:34 +0000 (10:53 +0100)]
build: remove redundant config include
The header file rte_config.h is always included by make or meson.
If required in an exported API header file, it must be included
in the public header file for external applications.
In the internal files, explicit include of rte_config.h is useless,
and can be removed.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Mahipal Challa [Tue, 11 Feb 2020 11:27:41 +0000 (16:57 +0530)]
raw/octeontx2_ep: fix ABI version
Changed the ABI version to 20.0.1.
Fixes:
56d46d13f736 ("raw/octeontx2_ep: add build infra and device probe")
Signed-off-by: Mahipal Challa <mchalla@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Anoob Joseph [Mon, 10 Feb 2020 10:27:29 +0000 (15:57 +0530)]
common/octeontx2: fix 20.02 new symbols ABI version
Move symbols added in 20.02 release to DPDK_20.0.1 ABI.
Fixes:
d06551535a09 ("common/octeontx2: add security capability routine")
Fixes:
3fe4d07d1678 ("crypto/octeontx2: enable CPT to share QP with ethdev")
Fixes:
f44e71637755 ("net/octeontx2: add security session operations")
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Thomas Monjalon [Thu, 6 Feb 2020 16:05:42 +0000 (17:05 +0100)]
version: 20.02-rc2
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Mahipal Challa [Mon, 27 Jan 2020 13:18:21 +0000 (18:48 +0530)]
raw/octeontx2_ep: fix error handling
Defects reported by coverity scan are resolved.
Coverity issue: 353611, 353622, 353632
Fixes:
81fd15a2acc2 ("raw/octeontx2_ep: add device configuration")
Fixes:
b848f0416acb ("raw/octeontx2_ep: add dequeue operation")
Signed-off-by: Mahipal Challa <mchalla@marvell.com>
Sunil Kumar Kori [Tue, 14 Jan 2020 09:04:53 +0000 (14:34 +0530)]
common/octeontx2: add polling based response mbox message
Currently otx2_mbox_get_rsp_xxx get response once AF driver
interrupts after completion. But this function will get into
deadlock if called in another interrupt context.
To avoid it, implemented another version of this function which polls
on dedicated memory for a given timeout.
Also after clearing interrupt, there could UP messages available for
processing. So irq handler must check mbox messages.
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Harman Kalra [Tue, 14 Jan 2020 09:04:52 +0000 (14:34 +0530)]
eal: check if running in interrupt context
Added an API to check if current execution is in interrupt
context. This will be helpful to handle nested interrupt cases.
Signed-off-by: Harman Kalra <hkalra@marvell.com>
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Vladimir Medvedkin [Tue, 21 Jan 2020 15:07:09 +0000 (15:07 +0000)]
fib: fix possible integer overflow
This commit fixes possible integer overflow for
prev_idx in build_common_root() CID 350596
and
tbl8_idx in write_edge() CID 350597
Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
overflow_before_widen: Potentially overflowing expression tbl8_idx * 256
with type int (32 bits, signed) is evaluated using 32-bit arithmetic,
and then used in a context that expects an expression of
type uint64_t (64 bits, unsigned).
Coverity issue: 350596, 350597
Fixes:
c3e12e0f0354 ("fib: add dataplane algorithm for IPv6")
Cc: stable@dpdk.org
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Viacheslav Ovsiienko [Thu, 6 Feb 2020 09:49:20 +0000 (09:49 +0000)]
test/mbuf: check pinned external buffer
This patch adds unit test for the mbufs allocated from
the special pool with pinned external data buffers.
The pinned buffer mbufs are tested in the same way as
regular ones with taking into account some specifics
of cloning/attaching.
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Viacheslav Ovsiienko [Wed, 22 Jan 2020 08:50:35 +0000 (08:50 +0000)]
mbuf: fix pinned memory function style
Minor style issue is fixed.
Fixes:
6c8e50c2e549 ("mbuf: create pool with external memory buffers")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Stephen Hemminger [Wed, 22 Jan 2020 17:39:56 +0000 (09:39 -0800)]
mbuf: display more fields in dump
The rte_pktmbuf_dump should display offset, refcount, and vlan
info since these are often useful during debugging.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Stephen Hemminger [Wed, 22 Jan 2020 17:06:11 +0000 (09:06 -0800)]
mem: fix munmap in error unwind
The loop to unwind existing mmaps was only unmapping the
first segment and the error paths after mmap() were not
doing munmap of the current segment.
Fixes:
66cc45e293ed ("mem: replace memseg with memseg lists")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Qingmin Liu [Mon, 6 Jan 2020 02:06:27 +0000 (10:06 +0800)]
config: add Broadcom Stingray for meson cross-compilation
Broadcom Stingray is armv8 CPU having cortex-a72. The implementor ID is
0x41 (arm) and the primary part number is 0xd08 (cortex-a72).
Signed-off-by: Qingmin Liu <qingmin.liu@broadcom.com>
Liron Himi [Fri, 29 Nov 2019 09:11:00 +0000 (11:11 +0200)]
config: update Marvell ARMADA
disable more NXP modules that conflict with MUSDK
Signed-off-by: Liron Himi <lironh@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Thomas Monjalon [Thu, 23 Jan 2020 08:30:22 +0000 (09:30 +0100)]
ring: fix namespace prefix of inline functions
When adding custom element size feature, some internal inline functions
were added in a public header without rte_ prefix.
It is fixed by adding __rte_ring_.
Fixes:
cc4b218790f6 ("ring: support configurable element size")
Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Stephen Hemminger [Sun, 26 Jan 2020 01:04:38 +0000 (17:04 -0800)]
app/pdump: fix build with clang
Clang checks indentation and found incorrect indentation in pdump.
app/pdump/main.c:598:3: error: misleading indentation;
statement is not part of the previous 'if'
[-Werror,-Wmisleading-indentation]
Fixes:
caa7028276b8 ("app/pdump: add tool for packet capturing")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Junxiao Shi [Mon, 27 Jan 2020 21:38:00 +0000 (14:38 -0700)]
bpf: fix headers install with meson
Previously, when librte_bpf is built with meson+ninja, its
headers such as bpf_def is not installed to the system.
This commit fixes this problem.
Fixes:
94972f35a02e ("bpf: add BPF loading and execution framework")
Cc: stable@dpdk.org
Signed-off-by: Junxiao Shi <git@mail1.yoursunny.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Mon, 27 Jan 2020 14:28:22 +0000 (14:28 +0000)]
build: allow using wildcards to disable drivers
Rather than having to explicitly list each and every driver to disable in a
build, we can use a small python script and the python glob library to
expand out the wildcards. This means that we can configure meson using e.g.
meson -Ddisable_drivers=crypto/*,event/* build
to do a build omitting all the crypto and event drivers. Explicitly
specified drivers e.g. net/i40e, work as before, and can be mixed with
wildcarded drivers as required.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Robin Jarry <robin.jarry@6wind.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Bruce Richardson [Fri, 24 Jan 2020 15:37:55 +0000 (15:37 +0000)]
build: remove some icc warnings
While icc builds without the "werror" setting build successfully, there are
a lot of warnings. To make the output cleaner, and to allow building with
warnings enabled, we can add a list of warning ids to ignore.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Fri, 24 Jan 2020 15:37:54 +0000 (15:37 +0000)]
net/octeontx2: check compiler flag before use
Rather than assuming all compilers support the -flax-vector-extensions
flag, we should test this before using it, thereby potentially avoiding
warnings.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Thomas Monjalon [Tue, 21 Jan 2020 14:35:31 +0000 (15:35 +0100)]
mk: ignore missing field initializers warning
Three warnings are commonly disabled in DPDK with make and meson:
* address-of-packed-member
always disabled
* missing-field-initializers
disabled with meson
disabled with make + clang or make + gcc < 4.7
disabled with make + gcc <= 5 for test files and event drivers
* packed-not-aligned
disabled with meson
This change is removing exceptions for missing-field-initializers.
As it is always disabled, some redundant configs are cleaned up.
Now the situation is:
* address-of-packed-member
always disabled
* missing-field-initializers
always disabled
* packed-not-aligned
disabled with meson
It could alternatively be decided to disable missing-field-initializers
only for old gcc (< 6).
The warning packed-not-aligned is not modified in this change.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Sunila Sahu [Wed, 5 Feb 2020 13:16:18 +0000 (18:46 +0530)]
common/cpt: remove self assignment
This fixes coverity issue of self assignment.
Coverity issue: 353635
Fixes:
99faef832563 ("crypto/octeontx: support ECPM")
Signed-off-by: Sunila Sahu <ssahu@marvell.com>
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Archana Muniganti [Wed, 5 Feb 2020 13:16:17 +0000 (18:46 +0530)]
common/cpt: fix component for empty IOV buffer
fill_sg_comp_from_iov() prepares gather components for i/p IOV
buffers and extra buf. This API is failing to create a gather component
for extra_buf when IOV buf len is zero. Though there is enough space
to accommodate extra_buf, because of pre-decrementing of extra_buf
length from aggregate size, this issue is seen.
Fixes:
b74652f3a91f ("common/cpt: add microcode interface for encryption")
Cc: stable@dpdk.org
Signed-off-by: Archana Muniganti <marchana@marvell.com>
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Archana Muniganti [Wed, 5 Feb 2020 13:16:16 +0000 (18:46 +0530)]
common/cpt: check cipher and auth keys are set
Returning error when cipher and auth key are not getting set
Fixes:
6cc54096520d ("crypto/octeontx: add supported sessions")
Cc: stable@dpdk.org
Signed-off-by: Archana Muniganti <marchana@marvell.com>
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Sucharitha Sarananaga [Wed, 5 Feb 2020 13:16:15 +0000 (18:46 +0530)]
common/cpt: support variable key size for HMAC
HMAC algorithms supports key lengths from 1 to 1024 bytes.
Signed-off-by: Archana Muniganti <marchana@marvell.com>
Signed-off-by: Sucharitha Sarananaga <ssarananaga@marvell.com>
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Archana Muniganti [Wed, 5 Feb 2020 13:16:14 +0000 (18:46 +0530)]
crypto/octeontx2: extend AES-GCM capabilities
OCTEON TX2 crypto PMD supports digest lengths from 4 to 16 bytes
with new firmware.
Signed-off-by: Archana Muniganti <marchana@marvell.com>
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Anoob Joseph [Wed, 5 Feb 2020 13:16:13 +0000 (18:46 +0530)]
common/cpt: remove redundant bitswaps
The structures can be written for direct h/w usage to avoid multiple
bitswaps.
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Marcin Smoczynski [Tue, 4 Feb 2020 13:12:57 +0000 (14:12 +0100)]
examples/ipsec-secgw: test CPU crypto
Enable cpu-crypto mode testing by adding dedicated environmental
variable CRYPTO_PRIM_TYPE. Setting it to 'type cpu-crypto' allows
to run test scenario with cpu crypto acceleration.
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Marcin Smoczynski [Tue, 4 Feb 2020 13:12:56 +0000 (14:12 +0100)]
examples/ipsec-secgw: support CPU crypto
Add support for CPU accelerated crypto. 'cpu-crypto' SA type has
been introduced in configuration allowing to use abovementioned
acceleration.
Legacy mode is not currently supported.
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Marcin Smoczynski [Tue, 4 Feb 2020 13:12:55 +0000 (14:12 +0100)]
ipsec: support CPU crypto mode
Update library to handle CPU cypto security mode which utilizes
cryptodev's synchronous, CPU accelerated crypto operations.
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Marcin Smoczynski [Tue, 4 Feb 2020 13:12:53 +0000 (14:12 +0100)]
security: add CPU crypto action type
Introduce CPU crypto action type allowing to differentiate between
regular async 'none security' and synchronous, CPU crypto accelerated
sessions.
This mode is similar to ACTION_TYPE_NONE but crypto processing is
performed synchronously on a CPU.
Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Marcin Smoczynski [Tue, 4 Feb 2020 13:12:52 +0000 (14:12 +0100)]
crypto/aesni_gcm: support CPU crypto
Add support for CPU crypto mode by introducing required handler.
Authenticated encryption and decryption are supported with tag
generation/verification.
CPU crypto support include both AES-GCM and GMAC algorithms.
Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Tested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Marcin Smoczynski [Tue, 4 Feb 2020 13:12:51 +0000 (14:12 +0100)]
cryptodev: introduce CPU crypto API
Add new API allowing to process crypto operations in a synchronous
manner. Operations are performed on a set of SG arrays.
Cryptodevs which allows CPU crypto operation mode have to
use RTE_CRYPTODEV_FF_SYM_CPU_CRYPTO capability.
Add a helper method to easily convert mbufs to a SGL form.
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Sucharitha Sarananaga [Tue, 7 Jan 2020 09:38:43 +0000 (15:08 +0530)]
examples/fips_validation: support AES XTS
AES XTS support is added to fips application. Parse test-vectors
from input files, populate AES XTS tests and prepare AES XTS
operations for fips validation.
Signed-off-by: Abed Kamaluddin <akamaluddin@marvell.com>
Signed-off-by: Archana Muniganti <marchana@marvell.com>
Signed-off-by: Sucharitha Sarananaga <ssarananaga@marvell.com>
Sucharitha Sarananaga [Mon, 6 Jan 2020 09:33:11 +0000 (15:03 +0530)]
examples/fips_validation: fix cipher length for AES-GCM
Cipher length need to be updated in case of AES-GCM decryption.
Fixes:
4aaad2995e13 ("examples/fips_validation: support GCM parsing")
Cc: stable@dpdk.org
Signed-off-by: Archana Muniganti <marchana@marvell.com>
Signed-off-by: Sucharitha Sarananaga <ssarananaga@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>