Ferruh Yigit [Tue, 11 May 2021 13:14:33 +0000 (14:14 +0100)]
net/bnx2x: fix build with GCC 11
Reproduced with '--buildtype=debugoptimized' config,
compiler version: gcc (GCC) 12.0.0
20210509 (experimental)
Build error:
In file included from ../drivers/net/bnx2x/bnx2x.c:16:
../drivers/net/bnx2x/bnx2x.c: In function ‘bnx2x_hc_ack_sb’:
../drivers/net/bnx2x/bnx2x.h:1528:35:
warning: ‘igu_ack’ is used uninitialized [-Wuninitialized]
#define REG_WR32(sc, offset, val) bnx2x_reg_write32(sc, (offset), val)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/net/bnx2x/bnx2x.h:1531:33:
note: in expansion of macro ‘REG_WR32’
1531 | #define REG_WR(sc, offset, val) REG_WR32(sc, offset, val)
| ^~~~~~~~
../drivers/net/bnx2x/bnx2x.h:1916:9: note: in expansion of macro ‘REG_WR’
1916 | REG_WR(sc, hc_addr, *val);
| ^~~~~~
../drivers/net/bnx2x/bnx2x.h:1905:33: note: ‘igu_ack’ declared here
1905 | struct igu_ack_register igu_ack;
| ^~~~~~~
REG_WR32 requires 'uint32_t', use union instead of cast to 'uint32_t'.
Bugzilla ID: 692
Fixes:
38dff79ba736 ("net/bnx2x: update HSI")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
Ferruh Yigit [Tue, 11 May 2021 13:14:32 +0000 (14:14 +0100)]
net/bnx2x: fix build with GCC 11
Reproduced with '--buildtype=debugoptimized' config,
compiler version: gcc (GCC) 12.0.0
20210509 (experimental)
Build error:
In file included from ../drivers/net/bnx2x/bnx2x_rxtx.c:8:
../drivers/net/bnx2x/bnx2x_rxtx.c: In function ‘bnx2x_upd_rx_prod_fast’:
../drivers/net/bnx2x/bnx2x.h:1528:35:
warning: ‘rx_prods’ is used uninitialized [-Wuninitialized]
#define REG_WR32(sc, offset, val) bnx2x_reg_write32(sc, (offset), val)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/net/bnx2x/bnx2x.h:1531:33:
note: in expansion of macro ‘REG_WR32’
1531 | #define REG_WR(sc, offset, val) REG_WR32(sc, offset, val)
| ^~~~~~~~
../drivers/net/bnx2x/bnx2x_rxtx.c:331:9:
note: in expansion of macro ‘REG_WR’
331 | REG_WR(sc, fp->ustorm_rx_prods_offset, val[0]);
| ^~~~~~
../drivers/net/bnx2x/bnx2x_rxtx.c:324:40: note: ‘rx_prods’ declared here
324 | struct ustorm_eth_rx_producers rx_prods = { 0 };
| ^~~~~~~~
REG_WR32 requires 'uint32_t', use union instead of cast to 'uint32_t'.
Bugzilla ID: 692
Fixes:
38dff79ba736 ("net/bnx2x: update HSI")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
Alvin Zhang [Wed, 12 May 2021 08:28:26 +0000 (16:28 +0800)]
net/igc: fix speed configuration
Fixed speed mode is not supported currently, this patch
removes configurations for this mode and adds fault handling
for ETH_LINK_SPEED_FIXED.
Fixes:
4f09bc55ac3d ("net/igc: implement device base operations")
Cc: stable@dpdk.org
Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Junfeng Guo <junfeng.guo@intel.com>
Alvin Zhang [Wed, 12 May 2021 09:23:11 +0000 (17:23 +0800)]
net/i40e: fix VF RSS configuration
The kernel driver supports VF RSS configuration message
"VIRTCHNL_OP_GET_RSS_HENA_CAPS and VIRTCHNL_OP_SET_RSS_HENA",
this patch adds PMD support for these messages.
Fixes:
b81295c474b0 ("net/i40e: add user callback for VF to PF message")
Cc: stable@dpdk.org
Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Jie Wang [Wed, 12 May 2021 03:14:07 +0000 (03:14 +0000)]
net/ice: fix VSI array out of bounds access
In the loop, when the index of array "vsi->rss_key" is equal
to "vsi->rss_key_size", the array will be accessed out of bounds.
Fixes:
50370662b727 ("net/ice: support device and queue ops")
Cc: stable@dpdk.org
Signed-off-by: Jie Wang <jie1x.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Beilei Xing [Wed, 12 May 2021 08:10:14 +0000 (16:10 +0800)]
net/iavf: fix Tx context descriptor
The QW0 of Tx context descriptor should be reset to 0, otherwise the
previous hardware writeback value may pollute the next context descriptor
write.
Fixes:
a2b29a7733ef ("net/avf: enable basic Rx Tx")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Alvin Zhang [Tue, 11 May 2021 08:45:31 +0000 (16:45 +0800)]
net/i40e: fix offload flag checking in simple Tx
Tx offload flags 'PKT_TX_IPV6, PKT_TX_IPV4, PKT_TX_OUTER_IPV6,
PKT_TX_OUTER_IPV4' are supported in simple datapath.
This patch removes these offload flags from packet checking in simple
Tx datapath and defines 2 macro I40E_TX_OFFLOAD_SIMPLE_SUP_MASK
and I40E_TX_OFFLOAD_SIMPLE_NOTSUP_MASK.
Fixes:
146ffa81d05e ("net/i40e: add Tx preparation for simple Tx datapath")
Cc: stable@dpdk.org
Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Leyi Rong <leyi.rong@intel.com>
Stanislaw Kardach [Wed, 12 May 2021 10:13:46 +0000 (12:13 +0200)]
net/ena: disable ops not supported by secondary process
For dev_ops not supported by the secondary process, either return -EPERM
or return without doing anything. In both cases log a warning.
It's still application's responsibility to avoid calls like that and
those changes are for debugging/informational purposes.
Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Shay Agroskin <shayagr@amazon.com>
Stanislaw Kardach [Wed, 12 May 2021 10:13:45 +0000 (12:13 +0200)]
net/ena: make ethdev references multi-process safe
rte_pci_device and rte_eth_dev are process-local structures. Therefore
ena_adapter::pdev and ena_adapter::rte_dev cannot be used universally.
Both ena_timer_wd_callback and ena_interrupt_handler_rte needs access to
the rte_eth_dev, but as they are being setup and executed in the primary
process, it is safe to pass there the same pointer, which is used for
the device configuration.
In all other cases, except the eth_ena_dev_init(), the rte_eth_dev_data
is used instead.
Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Shay Agroskin <shayagr@amazon.com>
Michal Krawczyk [Wed, 12 May 2021 10:13:44 +0000 (12:13 +0200)]
net/ena: indicate Rx RSS hash presence
To make it possible to the app to determine if the hash was calculated
for the packet or not, the PKT_RX_RSS_HASH should be set in the mbuf's
ol_flags.
As the PMD wasn't setting that, the application couldn't check if there
is a hash in a proper way.
The hash is valid only if it's UDP or TCP and the IP packet wasn't
fragmented.
Fixes:
e5df9f33db00 ("net/ena: fix passing RSS hash to mbuf")
Cc: stable@dpdk.org
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Amit Bernstein <amitbern@amazon.com>
Haifei Luo [Wed, 12 May 2021 10:49:33 +0000 (13:49 +0300)]
app/testpmd: support action meter color
Currently action RTE_FLOW_ACTION_TYPE_METER_COLOR is defined.
Add the CLI for this action: color type (types)
There are three types: green, yellow and red.
Example for the new policy meter CLIs:
add port meter policy 0 1 g_actions color type green / end y_actions
color type yellow / end r_actions color type red / end
In the above command, the action type is
RTE_FLOW_ACTION_TYPE_METER_COLOR, the meter policy action list:
green -> green, yellow -> yellow, red -> red.
Signed-off-by: Haifei Luo <haifeil@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Cheng Jiang [Wed, 12 May 2021 02:30:56 +0000 (02:30 +0000)]
vhost: fix sign extension in async packed ring
Change the variable type in store_dma_desc_info_packed() to fix
suspicious implicit sign extension.
Coverity issue: 370608, 370610, 370612
Fixes:
873e8dad6f49 ("vhost: support packed ring in async datapath")
Signed-off-by: Cheng Jiang <cheng1.jiang@intel.com>
Cheng Jiang [Wed, 12 May 2021 02:30:41 +0000 (02:30 +0000)]
vhost: fix sign extension in async split ring
Change the variable type in store_dma_desc_info_split() to fix
suspicious implicit sign extension.
Coverity issue: 370604, 370607, 370609
Fixes:
3d6cb86b0de5 ("vhost: refactor async split ring functions")
Signed-off-by: Cheng Jiang <cheng1.jiang@intel.com>
Ed Czeck [Tue, 11 May 2021 20:58:54 +0000 (16:58 -0400)]
net/ark: fix control thread argument
Thread argument changed to wrong value during thread name addition,
fixing that bug.
Fixes:
fdefe038eb9b ("net/ark: set generator delay thread name")
Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Gregory Etelson [Thu, 6 May 2021 09:57:51 +0000 (12:57 +0300)]
net/mlx5: fix tunnel offload private items location
Tunnel offload API requires application to query PMD for specific flow
items and actions. Application uses these PMD specific elements to
build flow rules according to the tunnel offload model.
The model does not restrict private elements location in a flow rule,
but the current MLX5 PMD implementation expects that tunnel offload
rule will begin with PMD specific elements.
The patch removes that placement limitation.
Fixes:
4ec6360de37d ("net/mlx5: implement tunnel offload")
Cc: stable@dpdk.org
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
John Daley [Tue, 11 May 2021 19:25:26 +0000 (12:25 -0700)]
net/enic: enable GENEVE offload via VNIC configuration
The admin-configured vNIC settings (i.e. via CIMC or UCSM) now include
Geneve offload. Use that setting to decide whether to enable or
disable Geneve offload and remove the devarg 'geneve-opt'.
Also, the firmware now allows the driver to change the Geneve port
number. So extend udp_tunnel_port_{add,del} to accept Geneve port, in
addition to VXLAN.
Fixes:
93fb21fdbe23 ("net/enic: enable overlay offload for VXLAN and GENEVE")
Cc: stable@dpdk.org
Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Hyong Youb Kim <hyonkim@cisco.com>
David Marchand [Tue, 11 May 2021 11:33:58 +0000 (13:33 +0200)]
net/ice: fix leak on thread termination
A terminated pthread should be joined or detached so that its associated
resources are released.
The "ice-reset-<vf_id>" threads are used to service some reset task in
the background, but they are never joined by the thread that created
them.
The easiest solution is to detach new threads.
The Windows EAL did not provide a pthread_detach wrapper but there is no
resource to release for Windows threads, so add an empty wrapper.
Fixes:
3b3757bda3c3 ("net/ice: get VF hardware index in DCF")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
David Marchand [Tue, 11 May 2021 11:33:57 +0000 (13:33 +0200)]
net/ark: fix leak on thread termination
A terminated pthread should be joined or detached so that its associated
resources are released.
The "ark-delay-pg" thread is just used to delay some task but it is never
joined by the thread that created it.
The easiest solution is to detach the new thread.
Fixes:
727b3fe292bc ("net/ark: integrate PMD")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ed Czeck <ed.czeck@atomicrules.com>
Gregory Etelson [Tue, 11 May 2021 08:03:31 +0000 (11:03 +0300)]
app/testpmd: fix tunnel offload flows cleanup
Tunnel offload model requires application to obtain PMD related flow
items or actions to construct a flow rule. These elements acquire
internal PMD flow resources that must be explicitly released.
The patch destroys tunnel offload PMD resources after flow creation
failure.
Fixes:
1b9f274623b8 ("app/testpmd: add commands for tunnel offload")
Cc: stable@dpdk.org
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Chengwen Feng [Mon, 10 May 2021 13:38:13 +0000 (21:38 +0800)]
net/hns3: fail setting FEC if one bit mode is not supported
If the FEC mode was not supported, it should return error code.
This patch also adds a space when log error info.
Fixes:
9bf2ea8dbc65 ("net/hns3: support FEC")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Chengwen Feng [Mon, 10 May 2021 13:38:12 +0000 (21:38 +0800)]
net/hns3: fix ordering in secondary process initialization
The memory barrier is used to ensure that the response is returned
only after the Tx/Rx function is set, it should place after the Rx/Tx
function is set.
Fixes:
23d4b61fee5d ("net/hns3: support multiple process")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Chengwen Feng [Mon, 10 May 2021 13:38:11 +0000 (21:38 +0800)]
net/hns3: fix secondary process request start/stop Rx/Tx
This secondary process should not send request to start/stop Rx/Tx,
this patch fixes it.
Fixes:
23d4b61fee5d ("net/hns3: support multiple process")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Chengwen Feng [Mon, 10 May 2021 13:38:10 +0000 (21:38 +0800)]
net/hns3: fix mailbox message ID in log
The mailbox message id is uint8_t, but the unsupported mailbox message
id was logged by uint16.
Fixes:
463e748964f5 ("net/hns3: support mailbox")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Chengwen Feng [Sat, 8 May 2021 07:40:57 +0000 (15:40 +0800)]
net/hns3: fix TM QCN error event report by MSI-X
The TM QCN error event should report by RAS other than MSIX.
Also this patch adds fifo int enable configuration before the TM QCN
error event is enabled.
Fixes:
f53a793bb7c2 ("net/hns3: add more hardware error types")
Fixes:
3903c05382c5 ("net/hns3: remove read when enabling TM QCN error event")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Jiawen Wu [Sat, 8 May 2021 06:35:26 +0000 (14:35 +0800)]
net/txgbe: fix QinQ strip
Support to enable and disable QINQ hardware strip, when configure VLAN
offload with QINQ strip mask. If there are packets have QINQ tag to RSS,
users should enable QINQ strip before configuring the RSS.
Fixes:
220b0e49bc47 ("net/txgbe: support VLAN")
Cc: stable@dpdk.org
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Chengwen Feng [Fri, 7 May 2021 09:08:18 +0000 (17:08 +0800)]
net/hns3: fix querying flow director counter for out param
The hardware doesn't support counting the number of bytes that through
the fdir rule. Therefore, the corresponding out parameters (e.g.
bytes_set/bytes) is set to zero.
Fixes:
fcba820d9b9e ("net/hns3: support flow director")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Hongbo Zheng [Fri, 7 May 2021 09:08:17 +0000 (17:08 +0800)]
net/hns3: fix VF alive notification after config restore
Currently in the VF reset scenario, the VF performs the set
alive operation before restoring the configuration completed,
which may cause the hardware to work in an abnormal state.
This patch fix this problem by set VF alive after restoring
the configuration is completed.
Fixes:
a5475d61fa34 ("net/hns3: support VF")
Cc: stable@dpdk.org
Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Chengwen Feng [Fri, 7 May 2021 09:08:16 +0000 (17:08 +0800)]
net/hns3: clear hash map on flow director clear
The fdir hash map hold the pointers of fdir rule elements, it needs to
be set to NULL when clear all fdir rules.
Fixes:
fcba820d9b9e ("net/hns3: support flow director")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Chengwen Feng [Fri, 7 May 2021 09:08:15 +0000 (17:08 +0800)]
net/hns3: fix log on flow director clear
If clear FDIR rules fail, the error code was logged, but the error code
was useless because it was the sum of all fail code.
This patch fixes it by log the success cnt and fail cnt.
Fixes:
fcba820d9b9e ("net/hns3: support flow director")
Fixes:
8eed8acc812e ("net/hns3: add error code to some logs")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Chengwen Feng [Fri, 7 May 2021 09:08:14 +0000 (17:08 +0800)]
net/hns3: return error on PCI config write failure
This patch returns error code when calling rte_pci_write_config() API.
Fixes:
6dd32ded17d8 ("net/hns3: check PCI config space write")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Min Hu (Connor) [Thu, 6 May 2021 13:30:12 +0000 (21:30 +0800)]
doc: add more description in hns3 guide
This patch adds more description for hns3 PMD document, that is:
'Sample Application Notes', 'Statistics','Performance tuning'.
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Ciara Loftus [Mon, 10 May 2021 08:47:54 +0000 (09:47 +0100)]
net/af_xdp: fix build with Linux < 5.4
Prior to this change, two implementations of rx_syscall_handler
existed although only one was needed (for the zero copy path which
is only available from kernel 5.4 and onwards). Remove the second
definition from compat.h and move the first definition back to where
it is called in the Rx function. Doing this removes a build warning
on kernels before 5.4 which complained about the second function
being defined but not used.
Fixes:
2aa51cdd559e ("net/af_xdp: fix trigger for syscall on Tx")
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Heinrich Kuhn [Mon, 10 May 2021 16:45:50 +0000 (18:45 +0200)]
net/nfp: fix reporting of RSS capabilities
Before this change the dev_infos callback always reported RSS
capabilities regardless of whether the capability is supported by the
device or not. First check the capabilities field in the BAR of the
device and advertise RSS functionality accordingly.
Fixes:
8b945a7f7dcb ("drivers/net: update Rx RSS hash offload capabilities")
Cc: stable@dpdk.org
Signed-off-by: Heinrich Kuhn <heinrich.kuhn@netronome.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Michal Krawczyk [Tue, 11 May 2021 06:45:54 +0000 (08:45 +0200)]
net/ena: update version to v2.3.0
This version update contains:
* memcpy mapping to the dpdk-optimized version.
* ena_com (HAL) update to the latest version (from 18.09.2020).
* Bug fixes for the large LLQ headers and devargs parsing.
* Bug fix for the default ring size.
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Stanislaw Kardach [Tue, 11 May 2021 06:45:53 +0000 (08:45 +0200)]
net/ena: report default ring size
Remove invalid ring size alignment logic and add default Rx and Tx port
ring sizes to the device info spec.
The logic in lines 1297 and 1371 is invalid. The
RTE_ETH_DEV_FALLBACK_RX_RINGSIZE (and the TX counterpart) is a value
that rte_eth_rx_queue_setup() will set if
dev_info.default_rxportconf.ring_size is 0 and user provided 0 in
nb_rx_desc argument. However the current code treats it as a hint for
the PMD to change the ring size to internal defaults.
Additionally since the ENA_DEFAULT_RING_SIZE is defined, report it in
the device capabilities so that both rte_ethdev code and the user can
utilize it for device configuration.
Fixes:
ea93d37eb49d ("net/ena: add HW queues depth setup")
Cc: stable@dpdk.org
Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Shay Agroskin <shayagr@amazon.com>
Stanislaw Kardach [Tue, 11 May 2021 06:45:50 +0000 (08:45 +0200)]
net/ena: handle spurious wakeups in wait event
pthread_cond_timedwait() may spuriously wakeup according to POSIX.
Therefore it is required to check whether predicate is actually true
before finishing the waiting loop.
Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Shay Agroskin <shayagr@amazon.com>
Stanislaw Kardach [Tue, 11 May 2021 06:45:49 +0000 (08:45 +0200)]
net/ena: remove endian swap functions
swap*_*_le() functions are not used anywhere and besides there are rte
alternatives already present.
Fixes:
1173fca25af9 ("ena: add polling-mode driver")
Cc: stable@dpdk.org
Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Shay Agroskin <shayagr@amazon.com>
Michal Krawczyk [Tue, 11 May 2021 06:45:47 +0000 (08:45 +0200)]
net/ena: fix crash with unsupported device argument
As the documentation of rte_kvargs_parse() states, the valid_keys
argument must be NULL terminated. Lack of this feature may cause
segmentation fault if the passed devarg will be different then the
supported value.
Fixes:
8a7a73f26cc9 ("net/ena: support large LLQ headers")
Cc: stable@dpdk.org
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Shay Agroskin <shayagr@amazon.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Igor Chauskin [Tue, 11 May 2021 06:45:46 +0000 (08:45 +0200)]
net/ena: fix parsing of large LLQ header device argument
The code incorrectly checked the return value of comparison when parsing
the argument key name. The return value of strcmp should be compared
to 0 to identify a match.
Fixes:
8a7a73f26cc9 ("net/ena: support large LLQ headers")
Cc: stable@dpdk.org
Signed-off-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Shay Agroskin <shayagr@amazon.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
Amit Bernstein [Tue, 11 May 2021 06:45:45 +0000 (08:45 +0200)]
net/ena/base: adjust to latest ena-com
1. As memzone uses unique names, changed alloc coherent macro to use
64 bit size atomic variable to increase the memzone name space
2. "handle" param name change to be consistent with other macros
3. Variable definition displacement
4. Backslash alignment to column 80
Signed-off-by: Amit Bernstein <amitbern@amazon.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Shay Agroskin <shayagr@amazon.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
Michal Krawczyk [Tue, 11 May 2021 06:45:44 +0000 (08:45 +0200)]
net/ena/base: prefetch cache with intention to write
As in the v20.11 rte_prefetch0_write API was added, it should be used
in the platform file for the definition of the macro prefetchw, instead
of using simply prefetch0.
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Amit Bernstein <amitbern@amazon.com>
Michal Krawczyk [Tue, 11 May 2021 06:45:43 +0000 (08:45 +0200)]
net/ena/base: remove mutable RSS from host info
This feature wasn't used by any of the drivers. Because of that, it was
removed.
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Shay Agroskin <shayagr@amazon.com>
Michal Krawczyk [Tue, 11 May 2021 06:45:42 +0000 (08:45 +0200)]
net/ena/base: remove indirection table from features context
The RSS indirection table shouldn't be included as a part of the
device features context.
If the driver has to acquire it, it can be done using the separate API
whenever the RSS configuration is needed.
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Amit Bernstein <amitbern@amazon.com>
Michal Krawczyk [Tue, 11 May 2021 06:45:41 +0000 (08:45 +0200)]
net/ena/base: destroy multiple wait events
Although the ENA DPDK PMD doesn't have to perform any actions for
destroying the wait event, some other platforms have to.
The macro "ENA_WAIT_EVENT_DESTROY" was renamed to
"ENA_WAIT_EVENTS_DESTROY" and also whole implementation responsible for
that was moved to a separate function for better readability.
Fixes:
3adcba9a8987 ("net/ena: update HAL to the newer version")
Cc: stable@dpdk.org
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
Michal Krawczyk [Tue, 11 May 2021 06:45:40 +0000 (08:45 +0200)]
net/ena/base: fix type conversions by explicit casting
To silence error messages from the static code analysis, make the type
conversions explicit where they're intended.
Also fix the type for the DMA width value.
Fixes:
99ecfbf845b3 ("ena: import communication layer")
Cc: stable@dpdk.org
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
Michal Krawczyk [Tue, 11 May 2021 06:45:39 +0000 (08:45 +0200)]
net/ena/base: improve style and comments
List of changes:
* Comment style was adjusted for the functions
* The keys_num at "struct ena_admin_feature_rss_flow_hash_control" was
renamed to the key_parts to better describe it's meaning
* The RSS indirection table was called "REDIRECTION" -> changed to
INDIRECTION
* Change AENQ field "syndrom" -> "syndrome"
* Calculate number of the RSS key parts or whole key by using the
common way: sizeof of the first element of the RSS key
* Add description of the "enum ena_admin_aq_feature_id"
* Rename "map_rx_buf_bidirectional" field as "rx_buf_mirroring"
* Other minor style fixes (remove extra spaces, add missing line break,
improve indentation)
* Remove unused macros ENA_ADMIN_EXTRA_PROPERTIES_*
* Restructure the "if {} else if {} else" conditional statement for
setting up the meta descriptor
Fixes:
99ecfbf845b3 ("ena: import communication layer")
Fixes:
b68309be44c0 ("net/ena/base: update communication layer for the ENAv2")
Fixes:
b2b02edeb0d6 ("net/ena/base: upgrade HAL for new HW features")
Cc: stable@dpdk.org
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
Michal Krawczyk [Tue, 11 May 2021 06:45:38 +0000 (08:45 +0200)]
net/ena/base: add device argument to logging macros
Some platforms may make use of the device argument to make the logs more
verbose and specific for the appropriate device.
As it's not used by the ENA DPDK PMD for the logging, the type is just
defined, but never used.
It may be reconsidered to change this in the future by adding port ID
to the message logs, but as for now the logging behavior won't change.
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
Michal Krawczyk [Tue, 11 May 2021 06:45:37 +0000 (08:45 +0200)]
net/ena/base: unify parameter names for functions
Instead of using 'queue' for struct ena_com_admin_queue and 'dev' for
struct ena_com_dev variables, use more descriptive 'admin_queue' and
'ena_dev'.
This also unifies the names of variables of the type struct ena_com_dev
in the driver.
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
Igor Chauskin [Tue, 11 May 2021 06:45:36 +0000 (08:45 +0200)]
net/ena: switch memcpy to optimized version
memcpy is now mapped to rte_memcpy macro on x86 architectures.
Fixes:
9ba7981ec992 ("ena: add communication layer for DPDK")
Cc: stable@dpdk.org
Signed-off-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Artur Rojek <ar@semihalf.com>
Kamil Vojanec [Fri, 5 Feb 2021 09:00:45 +0000 (10:00 +0100)]
net/mlx5/linux: fix firmware version
This patch fixes a bug where firmware version was not
copied from ibv_device_attr structure into mlx5_dev_attr
structure, resulting in inability to read firmware
version.
Fixes:
e85f623e13ea ("net/mlx5: remove attributes dependency on Verbs")
Cc: stable@dpdk.org
Signed-off-by: Kamil Vojanec <xvojan00@stud.fit.vutbr.cz>
Acked-by: Matan Azrad <matan@nvidia.com>
Viacheslav Ovsiienko [Wed, 28 Apr 2021 09:31:45 +0000 (12:31 +0300)]
net/mlx5/linux: fix missed Rx packet stats
There was a typo - the device context was wrongly provided
instead of counter's one for the DevX query operation.
Fixes:
e6988afdc75a ("net/mlx5: fix imissed statistics")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Viacheslav Ovsiienko [Wed, 28 Apr 2021 09:18:19 +0000 (12:18 +0300)]
net/mlx5: fix Tx queue doorbell record field offset
If the Send Queue (backing one for PMD Tx queue) the was
created with DevX API the doorbell record offset for the
producer index field was incorrect. If hardware missed the
doorbell register write event the wrong content of doorbell
record might cause queue malfunction. For the Send Queues
created with Verbs API the doorbell record offset was
configured correctly.
Fixes:
86d259cec852 ("net/mlx5: separate Tx queue object creations")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Jiawei Wang [Fri, 7 May 2021 09:42:12 +0000 (12:42 +0300)]
net/mlx5: fix RSS flow item expansion for GRE key
The support of RSS expansion for the flows with IPv6 GRE item was added
to mlx5 PMD. And the GRE KEY item support in expansion was missed
and the flows with GRE and GRE KEY items were expanded in the wrong
way causing the flow creation failure.
This patch adds the RSS expansion support for GRE KEY and mlx5 PMD
performs RSS expansion correctly.
Fixes:
048f0d45e342 ("net/mlx5: support RSS expansion for IPv6 GRE")
Cc: stable@dpdk.org
Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Xiaoyu Min <jackmin@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Shiri Kuzin [Fri, 7 May 2021 07:01:22 +0000 (10:01 +0300)]
common/mlx5: fix mkey attributes initialization
The crypto driver added new fields to the mkey attributes struct:
crypto_en and set_remote_rw.
The entire mkey struct was not initialized, only specific fields in it,
which caused the new added fields not to be initialized resulting in a
mkey creation error.
This is fixed by initializing the entire mkey attributes struct to 0
which will prevent this issue from reoccurring if any fields are added
to the mkey struct in the future.
Fixes:
0111a74e13dd ("common/mlx5: adjust DevX mkey fields for crypto")
Signed-off-by: Shiri Kuzin <shirik@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Qi Zhang [Mon, 10 May 2021 03:18:35 +0000 (11:18 +0800)]
net/ice/base: remove dead code in capabilities parsing
Execution cannot reach this statement: "break;".
Remove the unnecessary if branch.
Coverity issue: 370613
Fixes:
2913bc4155d2 ("net/ice/base: sign external device package programming")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
Wenjun Wu [Sat, 8 May 2021 08:40:41 +0000 (16:40 +0800)]
net/ice: remove redundant RSS configuration for GTPU
Originally, the default RSS for GTPU is inner fields. Now, we hope outer
RSS for GTPU to be the default.
Since RSS for IPv4, RSS for IPv6, RSS for UDP and RSS for TCP can cover
the cases of outer RSS for GTPU, this patch deletes redundant default
RSS configurations for GTPU.
Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Wenzhuo Lu [Mon, 10 May 2021 01:32:51 +0000 (09:32 +0800)]
net/iavf: remove dead code in Rx function selection
Execution cannot reach the expression "use_avx2"
inside this statement: "if (!use_sse && !use_avx2 &..."."
The check is useless.
Coverity issue: 370606
Fixes:
bb3ef9aaa478 ("net/iavf: fix Rx function selection")
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Ting Xu [Sat, 8 May 2021 07:11:47 +0000 (15:11 +0800)]
net/ice: fix IP RSS configuration template
To enable IP fragment RSS hash, ICE_FLOW_SEG_HDR_IPV_FRAG is added to the
IP RSS configuration template, together with ICE_FLOW_SEG_HDR_IPV_OTHER.
It will cause error when associating flow profile. And packet id field
for RSS is not correctly added when IP fragment is enabled. To fix this
issue, this patch only selects one of the above two segment header types
based on RSS types.
Fixes:
f1ea76eb6394 ("net/ice: support RSS hash for IP fragment")
Cc: stable@dpdk.org
Signed-off-by: Ting Xu <ting.xu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Alvin Zhang [Sat, 8 May 2021 03:11:28 +0000 (11:11 +0800)]
net/ice: fix Tx queue vector setup
If vector mode is not allowed for Tx, no need to perform vector
related setup for Tx queue.
The patch deferred vector setup for Tx queue to the place that
vector mode is confirmed to be allowed.
Fixes:
28f9002ab67f ("net/ice: add Tx AVX512 offload path")
Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
David Marchand [Thu, 6 May 2021 10:07:02 +0000 (12:07 +0200)]
net/ice/base: fix memory allocation wrapper
This is reported by our internal covscan:
1. dpdk-20.11/drivers/net/ice/base/ice_switch.c:4214: sign_extension:
Suspicious implicit sign extension: "s_rule_size" with type "u16" (16
bits, unsigned) is promoted in "num_unicast * s_rule_size" to type "int"
(32 bits, signed), then sign-extended to type "unsigned long" (64 bits,
unsigned).
If "num_unicast * s_rule_size" is greater than 0x7FFFFFFF, the upper bits
of the result will all be 1.
# 4212| s_rule_size = ICE_SW_RULE_RX_TX_ETH_HDR_SIZE;
# 4213| s_rule = (struct ice_aqc_sw_rules_elem *)
# 4214|-> ice_calloc(hw, num_unicast, s_rule_size);
# 4215| if (!s_rule) {
# 4216| status = ICE_ERR_NO_MEMORY;
Even if this condition is not likely to happen, in any case, it is more
straightforward to rely on the existing rte_calloc.
Fixes:
5f0978e96220 ("net/ice/base: add OS specific implementation")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Shijith Thotton [Fri, 7 May 2021 10:12:47 +0000 (15:42 +0530)]
test/event: fix result of unsupported periodic timer
Test case setup should return -ENOTSUP, if it is not supported.
Fixes:
7d761b07fcf6 ("test/event: add unit tests for periodic timer")
Cc: stable@dpdk.org
Signed-off-by: Shijith Thotton <sthotton@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Pavan Nikhilesh [Thu, 6 May 2021 21:03:09 +0000 (02:33 +0530)]
app/eventdev: fix lcore parsing skipping last core
The last lcore declared in the list is also a valid lcore in the list.
Fixes:
32d7dbf269be ("app/eventdev: fix overflow in lcore list parsing")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
David Marchand [Thu, 6 May 2021 08:41:54 +0000 (10:41 +0200)]
event/dpaa2: remove unused macros
Fixes:
653242c3375a ("event/dpaa2: add self test")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Hongbo Zheng [Wed, 12 May 2021 02:19:19 +0000 (10:19 +0800)]
power: fix sanity checks for guest channel read
In function power_guest_channel_read_msg, 'lcore_id' is used before
validity check, which may cause buffer 'global_fds' accessed by index
'lcore_id' overflow.
This patch moves the validity check of 'lcore_id' before the 'lcore_id'
being used for the first time.
Fixes:
9dc843eb273b ("power: extend guest channel API for reading")
Cc: stable@dpdk.org
Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
Thomas Monjalon [Tue, 11 May 2021 20:57:36 +0000 (22:57 +0200)]
doc: remove PDF requirements
The documentation is generated in HTML only.
The PDF format is abandoned since DPDK 20.11
while dropping support of the make-based build.
This decision has been mentioned by the Technical Board:
https://mails.dpdk.org/archives/dev/2021-January/195549.html
Fixes:
3cc6ecfdfe85 ("build: remove makefiles")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Min Hu (Connor) [Tue, 4 May 2021 01:07:49 +0000 (09:07 +0800)]
test/timer: check memzone allocation
Segmentation fault may occur without checking if memzone
reserves succeed or not.
Fixes:
50247fe03fe0 ("test/timer: exercise new APIs in secondary process")
Cc: stable@dpdk.org
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Chengchang Tang [Thu, 6 May 2021 09:29:36 +0000 (17:29 +0800)]
examples/timer: fix time interval
Timer sample example assumes that the frequency of the timer is about
2Ghz to control the period of calling rte_timer_manage(). But this
assumption is easy to fail. For example. the frequency of tsc on ARM64
is much less than 2Ghz.
This patch uses the frequency of the current timer to calculate the
correct time interval to ensure consistent result on all platforms.
In addition, the rte_rdtsc() is replaced with the more recommended
rte_get_timer_cycles function in this patch.
Fixes:
af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Chengwen Feng [Tue, 11 May 2021 10:41:23 +0000 (18:41 +0800)]
ipc: use monotonic clock
Currently, the mp uses gettimeofday() API to get the time, and used as
timeout parameter.
But the time which gets from gettimeofday() API isn't monotonically
increasing. The process may fail if the system time is changed.
This fixes it by using clock_gettime() API with monotonic attribution.
Fixes:
783b6e54971d ("eal: add synchronous multi-process communication")
Fixes:
f05e26051c15 ("eal: add IPC asynchronous request")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Kevin Laatz [Wed, 12 May 2021 10:47:46 +0000 (10:47 +0000)]
raw/ioat: fix parameter shadow warning
In the function __idxd_completed_ops() we have a parameter shadow warning
due to a local variable having the same name as one of the function
parameters. This issue is fixed by simply renaming the local variable.
This warning was caught when additions were made to the OVS codebase,
which include adding calls the IOAT APIs. The OVS build passes the
-Wshadow flag by default, allowing the warning to be seen when building
OVS with DPDK 21.05-rc2.
Fixes:
245efe544d8e ("raw/ioat: report status of completed jobs")
Reported-by: Sunil Pai G <sunil.pai.g@intel.com>
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Tested-by: Sunil Pai G <sunil.pai.g@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Min Hu (Connor) [Thu, 22 Apr 2021 06:21:46 +0000 (14:21 +0800)]
raw/skeleton: add missing check after setting attribute
This patch adds return value check for setting an attribute.
Fixes:
88a81bcecb7b ("raw/skeleton: remove compile-time constant for device id")
Cc: stable@dpdk.org
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Lance Richardson [Sat, 8 May 2021 14:27:53 +0000 (10:27 -0400)]
eal: fix memory mapping on 32-bit target
For 32-bit targets, size_t is normally a 32-bit type and
does not have sufficient range to represent 64-bit offsets
that are needed when mapping PCI addresses.
Use uint64_t instead.
Found when attempting to run 32-bit Linux dpdk-testpmd
using VFIO driver:
EAL: pci_map_resource(): cannot map resource(63, 0xc0010000, \
0x200000, 0x20000000000): Invalid argument ((nil))
Fixes:
c4b89ecb64ea ("eal: introduce memory management wrappers")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Thomas Monjalon [Mon, 10 May 2021 20:45:37 +0000 (22:45 +0200)]
doc: fix build with Sphinx 4
Sphinx 4.0 became stricter with permalink configuration:
"
html_add_permalinks has been deprecated since v3.5.0.
Please use html_permalinks and html_permalinks_icon instead.
"
The new variable is used while keeping compatibility
with older Sphinx versions.
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
David Marchand [Thu, 6 May 2021 14:25:19 +0000 (16:25 +0200)]
net: fix header include order for FreeBSD
Spotted by sparse in OVS build:
../../lib/netdev-dpdk.c: note: in included file (through
/home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_ip.h,
/home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h, ...):
../../include/sparse/arpa/inet.h:22:2: error: "Must include
<netinet/in.h> before <arpa/inet.h> for FreeBSD support"
This is a check enforced by OVS itself.
See [1] for some context.
1: https://github.com/openvswitch/ovs/commit/
b2befd5bb2db
Fixes:
89813a522e68 ("net: provide IP-related API on any OS")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
David Marchand [Thu, 6 May 2021 14:04:55 +0000 (16:04 +0200)]
net: add endianness annotations to ethernet headers
Spotted by sparse in OVS build:
/home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h:789:27:
error: incorrect type in initializer (different base types)
/home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h:789:27:
expected unsigned short [usertype] ether_type
/home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h:789:27:
got restricted ovs_be16 [usertype]
/home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h:829:25:
error: incorrect type in initializer (different base types)
/home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h:829:25:
expected unsigned short [usertype] vlan_tci
/home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h:829:25:
got restricted ovs_be16 [usertype]
/home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h:830:26:
error: incorrect type in initializer (different base types)
/home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h:830:26:
expected unsigned short [usertype] eth_proto
/home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h:830:26:
got restricted ovs_be16 [usertype]
This was not caught before as no code in headers was using those fields.
This changed with commit
6f2168b69aee ("ethdev: reuse ethernet header
definition in flow item") and commit
a56a262e3408 ("ethdev: reuse VLAN
header definition in flow item").
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
David Marchand [Mon, 26 Apr 2021 12:51:08 +0000 (14:51 +0200)]
log: register with standardized names
Let's try to enforce the convention where most drivers use a pmd. logtype
with their class reflected in it, and libraries use a lib. logtype.
Introduce two new macros:
- RTE_LOG_REGISTER_DEFAULT can be used when a single logtype is
used in a component. It is associated to the default name provided
by the build system,
- RTE_LOG_REGISTER_SUFFIX can be used when multiple logtypes are used,
and then the passed name is appended to the default name,
RTE_LOG_REGISTER is left untouched for existing external users
and for components that do not comply with the convention.
There is a new Meson variable log_prefix to adapt the default name
for baseband (pmd.bb.), bus (no pmd.) and mempool (no pmd.) classes.
Note: achieved with below commands + reverted change on net/bonding +
edits on crypto/virtio, compress/mlx5, regex/mlx5
$ git grep -l RTE_LOG_REGISTER drivers/ |
while read file; do
pattern=${file##drivers/};
class=${pattern%%/*};
pattern=${pattern#$class/};
drv=${pattern%%/*};
case "$class" in
baseband) pattern=pmd.bb.$drv;;
bus) pattern=bus.$drv;;
mempool) pattern=mempool.$drv;;
*) pattern=pmd.$class.$drv;;
esac
sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file;
sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file;
done
$ git grep -l RTE_LOG_REGISTER lib/ |
while read file; do
pattern=${file##lib/};
pattern=lib.${pattern%%/*};
sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file;
sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file;
done
Signed-off-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Vladimir Medvedkin [Thu, 6 May 2021 11:40:22 +0000 (12:40 +0100)]
hash: fix tuple adjustment
rte_thash_adjust_tuple() uses random to generate a new subtuple if
fn() callback reports about collision. In some cases random changes
the subtuple in a way that after complementary bits are applied the
original tuple is obtained. This patch replaces random with subtuple
increment.
Fixes:
28ebff11c2dc ("hash: add predictable RSS")
Cc: vladimir.medvedkin@intel.com
Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
Tested-by: Stanislaw Kardach <kda@semihalf.com>
Reviewed-by: Stanislaw Kardach <kda@semihalf.com>
David Marchand [Thu, 6 May 2021 10:06:37 +0000 (12:06 +0200)]
eal: fix leak in shared lib mode detection
This is reported by our internal covscan:
1. dpdk-20.11/lib/librte_eal/common/eal_common_options.c:508: alloc_fn:
Storage is returned from allocation function "dlopen".
6. dpdk-20.11/lib/librte_eal/common/eal_common_options.c:508:
leaked_storage: Failing to save or free storage allocated by
"dlopen("librte_eal.so.21.0", 5)" leaks it.
# 506| * shared library is not already loaded i.e. it's
# statically linked.)
# 507| */
# 508|-> if (dlopen("librte_eal.so."ABI_VERSION, RTLD_LAZY |
# RTLD_NOLOAD) != NULL &&
# 509| *default_solib_dir != '\0' &&
# 510| stat(default_solib_dir, &sb) == 0 &&
This leak is not an issue per se, but on the other hand, this is easy
to fix and I prefer not having to waive this warning later.
Fixes:
06c7871dde01 ("eal: restrict default plugin path to shared lib mode")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
David Marchand [Thu, 6 May 2021 08:41:42 +0000 (10:41 +0200)]
bus/fslmc: remove unused debug macro
Fixes:
ce9efbf5bb09 ("bus/fslmc: support dynamic logging")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Bruce Richardson [Thu, 6 May 2021 15:09:08 +0000 (16:09 +0100)]
raw/ioat: skip VA requirement for bus without device
If after a bus scan, there are no devices using a particular bus, then
that bus should not be taken into account when deciding whether DPDK
should be run in VA or PA addressing mode. This becomes an issue when
the DSA bus driver code is used on a system without an IOMMU. The PCI
bus correctly reports that it only works in PA mode, while the DSA bus -
also correctly - reports that it works only in VA mode. The difference
is that there will be no devices found in a scan for the DSA bus, since
the kernel driver can only present those to userspace in the presence of
an IOMMU.
While we could change DSA instance to always report that it does not
care about the addressing mode, this would imply that it could be used
with DPDK in PA mode which is not the case. Therefore, this patch
changes the driver to report DC (don't care) in the case where no
devices are present, and VA otherwise.
NOTE: this addressing mode use of VA-only applies only in the case of
using DSA through the idxd kernel driver. The use of DSA though vfio-pci
is unaffected and works as with other PCI devices.
Fixes:
b7aaf417f936 ("raw/ioat: add bus driver for device scanning automatically")
Reported-by: Harry van Haaren <harry.van.haaren@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Anatoly Burakov <anatoly.burakov@intel.com>
Tested-by: Harry van Haaren <harry.van.haaren@intel.com>
Tested-by: Conor Walsh <conor.walsh@intel.com>
Bruce Richardson [Thu, 6 May 2021 11:19:27 +0000 (12:19 +0100)]
raw/ioat: fix directory handle leak
When reading the /dev directory as part of the bus scan for DSA devices,
the directory handle from opendir was not freed on function return,
leading to a resource leak.
Coverity issue: 370588
Fixes:
b7aaf417f936 ("raw/ioat: add bus driver for device scanning automatically")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
David Marchand [Fri, 7 May 2021 11:54:04 +0000 (13:54 +0200)]
build: fix default drivers list without Python
If no enable_drivers option is passed, the default is to build
the drivers list by calling list-dir-globs.py.
But if no Python interpreter is installed, no error is reported
and all drivers end up being disabled.
Example on a minimal FreeBSD VM:
dpdk@freebsd:~/dpdk $ meson setup build
...
drivers:
common/cpt: not in enabled drivers build config
common/dpaax: not in enabled drivers build config
common/iavf: not in enabled drivers build config
common/mvep: not in enabled drivers build config
common/octeontx: not in enabled drivers build config
common/octeontx2: not in enabled drivers build config
bus/dpaa: not in enabled drivers build config
bus/fslmc: not in enabled drivers build config
...
dpdk@freebsd:~/dpdk $ cd drivers/
dpdk@freebsd:~/dpdk/drivers $ ~/dpdk/buildtools/list-dir-globs.py */*
env: python3: No such file or directory
Rely on meson internal interpreter.
Check return code when calling this script.
Fixes:
ab9407c3addd ("build: allow using wildcards to disable drivers")
Fixes:
2e33309ebe03 ("config: enable/disable drivers in Arm builds")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Thomas Monjalon [Fri, 7 May 2021 12:14:13 +0000 (14:14 +0200)]
net/hns3: fix debug build
The variable "dev" is not used in hns3_get_tx_prep_needed()
in the case of RTE_LIBRTE_ETHDEV_DEBUG:
drivers/net/hns3/hns3_rxtx.c:4213:45: error: unused parameter ‘dev’
Fixes:
d7ec2c076579 ("net/hns3: select Tx prepare based on Tx offload")
Cc: stable@dpdk.org
Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
David Marchand [Thu, 29 Apr 2021 07:00:06 +0000 (09:00 +0200)]
doc: fix Arm SoCs list
Keep the list of SoCs in a single place and include it so that the
documentation won't get outdated.
Fixes:
8f5ea6a464ac ("config/arm: fix implementer and its SoCs")
Fixes:
1b4c86a721c9 ("config/arm: add Marvell CN10K")
Fixes:
7cf32a22b240 ("config/arm: add Hisilicon kunpeng")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Thomas Monjalon [Wed, 5 May 2021 22:31:24 +0000 (00:31 +0200)]
version: 21.05-rc2
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Kai Ji [Wed, 5 May 2021 14:45:13 +0000 (15:45 +0100)]
test/crypto: copy offset data to OOP destination buffer
Copy over the offset data required for auth in out-of-place op
when auth offset and cipher offset are not aligned.
Fixes:
e847fc512817 ("test/crypto: add encrypted digest case for AES-CTR-CMAC")
Cc: stable@dpdk.org
Signed-off-by: Kai Ji <kai.ji@intel.com>
Hemant Agrawal [Wed, 5 May 2021 12:16:52 +0000 (17:46 +0530)]
crypto/dpaa2_sec: fix close and uninit functions
The init function was calling the dpseci_open
while dpseci_close was called by the open function.
This is a mismatch un-init shall clean the init configurations and
close shall clear the configure function settings.
This was causing issue with recent changes in test framework, where
the close was being called and causing DPAA2 SEC to fail in configure
Fixes:
e5cbdfc53765 ("crypto/dpaa2_sec: add basic operations")
Cc: stable@dpdk.org
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Hemant Agrawal [Mon, 3 May 2021 08:39:53 +0000 (14:09 +0530)]
crypto/dpaa_sec: affine the thread portal affinity
DPAA requires the I/O shall be done in a HW portal context only.
The portal affinity is currently only being done in session create
and config APIs with the assumption that same thread will be used
for IO. This is causing issue.
This patch add support during I/O to check the HW portal affinity
and affine portal- if not affined already.
Fixes:
9a984458f755 ("crypto/dpaa_sec: rewrite Rx/Tx path")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Kai Ji [Tue, 4 May 2021 14:19:41 +0000 (15:19 +0100)]
test/crypto: fix auth-cipher compare length in OOP
For out-of-place operations, comparing expected ciphertext with
the operation result should skip cipher_offset bytes, as those
will not be copied from source to the destination buffer, making
the tests fail.
Fixes:
02ed7b3871d6 ("test/crypto: add SNOW3G test cases for auth-cipher")
Cc: stable@dpdk.org
Signed-off-by: Kai Ji <kai.ji@intel.com>
Signed-off-by: Damian Nowak <damianx.nowak@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Konstantin Ananyev [Thu, 29 Apr 2021 10:47:57 +0000 (11:47 +0100)]
examples/ipsec-secgw: fix handling IPv6 extension headers
Recent patch to support UDP encapsulation introduced problem with
handling inbound IPv6 packets with header extensions.
This patch aims to fix the issue.
Bugzilla ID: 695
Fixes:
9a1cc8f1ed74 ("examples/ipsec-secgw: support UDP encapsulation")
Reported-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Adam Dybkowski [Wed, 28 Apr 2021 14:41:42 +0000 (15:41 +0100)]
compress/qat: enable compression on GEN3
This patch enables the compression on QAT GEN3 (on hardware
versions that support it) and changes the error message shown
on older hardware versions that don't support the compression.
It also fixes the crash that happened on IM buffer allocation
failure (not enough memory) during the PMD cleaning phase.
Fixes:
a124830a6f00 ("compress/qat: enable dynamic huffman encoding")
Fixes:
352332744c3a ("compress/qat: add dynamic SGL allocation")
Cc: stable@dpdk.org
Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Adam Dybkowski [Wed, 28 Apr 2021 14:41:41 +0000 (15:41 +0100)]
common/qat: increase IM buffer size for GEN3
This patch increases the intermediate buffer size used for the
compression on QAT GEN3 to accommodate new hardware versions.
Fixes:
a124830a6f00 ("compress/qat: enable dynamic huffman encoding")
Cc: stable@dpdk.org
Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Min Hu (Connor) [Mon, 26 Apr 2021 00:56:59 +0000 (08:56 +0800)]
app/bbdev: fix HARQ error messages
The logging should show context by printing the two variables which
compared to each other. 'nb_harq_inputs', not 'nb_hard_outputs';
'nb_harq_outputs', not 'nb_hard_outputs'.
This patch corrected misused variable.
Fixes:
d819c08327f3 ("app/bbdev: update for 5GNR")
Cc: stable@dpdk.org
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Nicolas Chautru <nicolas.chautru@intel.com>
Min Hu (Connor) [Thu, 22 Apr 2021 09:25:05 +0000 (17:25 +0800)]
app/bbdev: check memory allocation
Return value of a function 'rte_malloc' is dereferenced without
checking, and may result in segmentation fault.
This patch fixed it.
Fixes:
31a7853d1ed9 ("baseband/turbo_sw: support large size code block")
Cc: stable@dpdk.org
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Nicolas Chautru <nicolas.chautru@intel.com>
Reshma Pattan [Wed, 21 Apr 2021 10:45:34 +0000 (11:45 +0100)]
examples/vm_power: remove VM channel number check
VM channel number should not be validated against the
host vm_power_manager coremask core indexes, as VM
cores need not to be same as host cores.
So remove this check, to allow all the vm channels
to be added successfully.
Fixes:
b49c677a0d24 ("examples/vm_power: respect core mask")
Cc: stable@dpdk.org
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Reviewed-by: David Hunt <david.hunt@intel.com>
Chengwen Feng [Wed, 5 May 2021 04:10:07 +0000 (12:10 +0800)]
eal: fix service core list parsing
This patch adds checking for service core index validity when parsing
service corelist.
Fixes:
7dbd7a6413ef ("service: add -S corelist option")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Chengwen Feng [Wed, 5 May 2021 04:10:06 +0000 (12:10 +0800)]
ipc: check malloc sync reply result
This patch adds checking for mp reply result in handle_sync().
Fixes:
07dcbfe0101f ("malloc: support multiprocess memory hotplug")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Chengwen Feng [Wed, 21 Apr 2021 02:08:16 +0000 (10:08 +0800)]
raw/ntb: check memory allocations
This patch adds checking for rte_zmalloc() result when init Intel ntb
device, also fix the same bug when start ntb device.
Fixes:
034c328eb025 ("raw/ntb: support Intel NTB")
Fixes:
c39d1e082a4b ("raw/ntb: setup queues")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
Chengwen Feng [Wed, 21 Apr 2021 02:08:15 +0000 (10:08 +0800)]
raw/ntb: check SPAD user index
This patch adds checking spad user index validity when set or get attr.
Fixes:
277310027965 ("raw/ntb: introduce NTB raw device driver")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
Jerin Jacob [Wed, 5 May 2021 14:25:25 +0000 (19:55 +0530)]
examples: fix pkg-config override
Move pkg-config override to beginning in the Makefile to allow
use PKGCONF variable to detect the libdpdk availability.
Fixes:
fda34680eb9a ("examples: remove legacy sections of makefiles")
Cc: stable@dpdk.org
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Thomas Monjalon [Mon, 3 May 2021 14:45:33 +0000 (16:45 +0200)]
regex/octeontx2: remove unused include directory
The variable inc_dir is not defined in this file.
Fixes:
4cd1c5fd9ed4 ("regex/octeontx2: introduce REE driver")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Guy Kaneti <guyk@marvell.com>