Hyong Youb Kim [Thu, 20 Jan 2022 14:26:37 +0000 (06:26 -0800)]
net/enic: support GENEVE flow item
Recent VIC models can parse GENEVE, including options, and inner
packet headers. Enable GENEVE header and option flow items. Currently,
only the first option that follows the GENEVE header can be matched,
and the GENEVE header item must specify option length.
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com> Reviewed-by: John Daley <johndale@cisco.com>
Nipun Gupta [Mon, 3 Jan 2022 10:01:25 +0000 (15:31 +0530)]
net/dpaa: check status before configuring shared MAC
For shared MAC interface, it is a prerequisite to enable the
interface in the kernel, before using it in user-space. This
patch makes sure that device is not getting configured in
case shared MAC interface is not enabled in the kernel.
Jun Yang [Mon, 3 Jan 2022 10:01:22 +0000 (15:31 +0530)]
net/dpaa2: handle secondary process for DPNI
This change uses 'dev->process_private' instead of 'priv->hw'
to get dpmcp per process while setting flow distribution,
as priv->hw is only valid for primary process.
It also initialize rte_dpaa2_bpid_info in secondary process.
Signed-off-by: Jun Yang <jun.yang@nxp.com> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Vanshika Shukla [Mon, 3 Jan 2022 10:01:19 +0000 (15:31 +0530)]
net/dpaa2: fix timestamping for IEEE1588
The current implementation of DPAA2 driver code is such
that it records Rx and Tx timestamp for PTP without checking
if they are PTP packets or not. Packets for which
RTE_MBUF_F_RX_IEEE1588_TMST and RTE_MBUF_F_TX_IEEE1588_TMST
is not set, Rx and Tx timestamp should not be recorded.
This patch fixes this issue by checking if the required
flags are set in the mbuf before recording timestamps.
Also this change defines separate values for
DPAA2_TX_CONF_ENABLE and DPAA2_NO_PREFETCH_RX
Rohit Raj [Mon, 3 Jan 2022 10:01:17 +0000 (15:31 +0530)]
net/dpaa2: warn on high Rx descriptor number
Added warning message if application is configuring nb_desc
more than supported by PEB memory suggesting user to configure
HW descriptors in normal memory rather than in faster PEB
memory.
In file included from ../lib/eal/linux/include/rte_os.h:14,
from ../lib/eal/include/rte_common.h:28,
from ../lib/eal/include/rte_log.h:25,
from ../lib/ethdev/rte_ethdev.h:164,
from ../lib/ethdev/ethdev_driver.h:18,
from ../drivers/net/cxgbe/base/t4vf_hw.c:6:
In function ‘t4_os_atomic_add_tail’,
inlined from ‘t4vf_wr_mbox_core’ at
../drivers/net/cxgbe/base/t4vf_hw.c:115:2:
../drivers/net/cxgbe/base/adapter.h:742:9:
warning: storing the address of local variable ‘entry’ in
‘((struct mbox_list *)adapter)[96].tqh_last’ [-Wdangling-pointer=]
742 | TAILQ_INSERT_TAIL(head, entry, next);
| ^~~~~~~~~~~~~~~~~
../drivers/net/cxgbe/base/t4vf_hw.c: In function ‘t4vf_wr_mbox_core’:
../drivers/net/cxgbe/base/t4vf_hw.c:86:27: note: ‘entry’ declared here
86 | struct mbox_entry entry;
| ^~~~~
../drivers/net/cxgbe/base/t4vf_hw.c:86:27: note: ‘adapter’ declared here
Fixes: 3bd122eef2cc ("cxgbe/base: add hardware API for Chelsio T5 series adapters") Cc: stable@dpdk.org Reported-by: Ferruh Yigit <ferruh.yigit@intel.com> Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Dmitry Kozlyuk [Fri, 17 Dec 2021 09:58:16 +0000 (11:58 +0200)]
app/testpmd: fix external buffer allocation
External pinned buffer memory (--mp-alloc=xbuf)
was allocated as multiple IOVA-contiguous memzones
of 2M size and 2M alignment.
Due to the malloc overhead and the alignment requirement,
each 2M memzone consumed 4M of hugepage memory:
2M of usable memory + X of malloc overhead + (2M-X) padding.
The allocation often failed with 2M hugepages and IOVA-as-PA
if a PA-contiguous span of 2 hugepages could not be found.
Also, with any hugepage size and IOVA mode
memory consumption was almost 2x of the usable amount.
Alignment requirement of 2M for external buffers is redundant.
It was an attempt to ensure IOVA-contiguity
by forcing memzones to start at hugepage boundaries,
while 2M size intended to leave no unused space on the page.
As shown above, this in fact caused excessive memory consumption
and decreased the chance of a successful allocation.
RTE_MEMZONE_F_IOVA_CONTIG already ensures IOVA-contiguity.
Remove the alignment requirement.
Reduce the memzone size by the malloc overhead size (4 cache lines),
so that memory consumption for each memzone is
(2M-X) of usable memory + X of malloc overhead = 2M.
This also means that whenever there are free 2M hugepages,
an IOVA-contiguous memzone can always be allocated.
Fixes: 72512e1897b2 ("app/testpmd: add mempool with external data buffers") Cc: stable@dpdk.org Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com> Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Yunjian Wang [Fri, 10 Dec 2021 11:41:01 +0000 (19:41 +0800)]
net/bonding: fix mode type mismatch
There were some type-mismatch issues in bonding and fix them:
- Use %u to fix argument type mismatch in RTE_BOND_LOG.
- The internals->mode is of type uint8_t. But the function
parameter 'mode' is of type int. So change the mode type
from int to uint8_t.
Fixes: 2efb58cbab6e ("bond: new link bonding library") Fixes: a45b288ef21a ("bond: support link status polling") Fixes: 68451eb6698c ("net/bonding: call through EAL on create/free") Cc: stable@dpdk.org Signed-off-by: Yunjian Wang <wangyunjian@huawei.com> Acked-by: Min Hu (Connor) <humin29@huawei.com>
Ciara Loftus [Thu, 9 Dec 2021 17:19:47 +0000 (17:19 +0000)]
net/af_xdp: fix build with -Wunused-function
The get_shared_umem function is only called when the kernel
flag XDP_UMEM_UNALIGNED_CHUNK_FLAG is defined. Move the
function implementation and associated helper so that it only
gets compiled when that flag is set.
net/axgbe: use PCI root complex device to distinguish device
"bus/pci: optimize bus scan" broke axgbe on V1000/R1000.
RV root complex pci device does not have any kernel driver assigned
so it is removed from pci scan list which is used in
"net/axgbe: add a HW quirk for register definitions".
Get root complex device id directly from pci sysfs instead of
pci scan list.
Fixes: 991e0b1dbc4a ("net/axgbe: add a HW quirk for register definitions") Cc: stable@dpdk.org Signed-off-by: Chandubabu Namburu <chandu@amd.com> Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
The first "set txtimes" command parameter specifies the time
interval between scheduled send bursts for single queue. This
interval should be the same for all the forwarding ports.
It requires to maintain the timing related variables on per
queue basis instead of per core, as currently implemented.
This resulted in wrong burst intervals if two or more cores
were generating the scheduled traffic for two or more ports
in txonly mode.
This patch moves the timing variable to the fstream structure.
Only txonly forwarding mode with enabled send scheduling is
affected.
Chengchang Tang [Tue, 9 Nov 2021 07:57:26 +0000 (15:57 +0800)]
net/bonding: fix offloading configuration
Currently, part offloadings of the bonding device will not take effect
by using dev_configure(). Because the related configuration will not be
delivered to the slave devices in this way.
The offloading capability of the bonding device is the intersection of
the capability of all slave devices. Based on this, the following
functions are added to the bonding driver:
1. If a Tx offloading is within the capability of the bonding device
(i.e, all the slave devices support this Tx offloading), the enabling
status of the offloading of all slave devices depends on the
configuration of the bonding device.
2. For the Tx offloading that is not within the Tx offloading capability
of the bonding device, the enabling status of the offloading on the
slave devices is irrelevant to the bonding device configuration. And
it depends on the original configuration of the slave devices.
Fixes: e8b3e1a9b1bb ("net/bonding: switch to new offloading API") Cc: stable@dpdk.org Signed-off-by: Chengchang Tang <tangchengchang@huawei.com> Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Asaf Ravid [Wed, 1 Dec 2021 10:29:53 +0000 (15:59 +0530)]
net/cnxk: fix promiscuous mode in multicast enable flow
When multicast promiscuous was being enabled it caused the unicast
promiscuous to be disabled. This fix resolves this by setting
NIX_RX_MODE_PROMISC when eth_dev->data->promiscuous is set, regardless.
Fixes: 325d79c00a5a ("net/cnxk: support all multicast") Cc: stable@dpdk.org Signed-off-by: Asaf Ravid <aravid@marvell.com> Acked-by: Jerin Jacob <jerinj@marvell.com>
Ajit Khaparde [Tue, 4 Jan 2022 08:38:24 +0000 (14:08 +0530)]
net/bnxt: check VF representor pointer before access
The PF or trusted VF Rx handler could invoke the VF representor's
Rx function without knowledge of the application cleaning up the
representor ports. Check if the vfr_bp pointer is valid before
accessing it.
Fixes: 6dc83230b43b ("net/bnxt: support port representor data path") Cc: stable@dpdk.org Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Kalesh AP [Tue, 4 Jan 2022 08:38:23 +0000 (14:08 +0530)]
net/bnxt: fix xstats query
Fix incorrect memset in bnxt_dev_xstats_get_op.
In bnxt_dev_xstats_get_op(), the PMD is not zeroing the whole
buffer supplied by the application. This can end up passing
junk statistics values to the application when the FW does not
support extended stats on a function.
Fixed to call memset() with correct size.
Fixes: f55e12f33416 ("net/bnxt: support extended port counters") Cc: stable@dpdk.org Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Ajit Khaparde [Tue, 4 Jan 2022 08:38:21 +0000 (14:08 +0530)]
net/bnxt: fix PAM4 mask setting
Set the PAM4 mask setting only when PAM4 signaling is enabled.
Setting it otherwise seems to result in link negotiation.
Also auto_pam4_link_speeds has been renamed to
auto_pam4_link_speed_mask to reflect its real usage.
Ajit Khaparde [Tue, 4 Jan 2022 08:38:20 +0000 (14:08 +0530)]
net/bnxt: fix ring teardown
Check for valid bit while scanning for hwrm_done completion
during ring teardown. Not checking the valid bit could cause a
ring overflow when we ring the doorbell.
Fixes: 4fb6ab3f866d ("net/bnxt: check flush status during ring free") Cc: stable@dpdk.org Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Kalesh AP [Tue, 4 Jan 2022 08:38:19 +0000 (14:08 +0530)]
net/bnxt: fix handling of VF configuration change
When there is a change in the default VLAN of the VF,
FW sends the VF_CFG_CHANGE async event to the driver.
Upon receiving this async event, driver currently only queries
the FW using HWRM_FUNC_QCFG. But this is not enough.
Driver has to clean up the existing filter and recreate filters
so the FW can apply the default VLAN to the filter.
Fixes: 12213821a8a3 ("net/bnxt: register for more async events") Cc: stable@dpdk.org Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Somnath Kotur [Tue, 4 Jan 2022 08:38:18 +0000 (14:08 +0530)]
net/bnxt: refactor datapath stop for reuse
Refactor bnxt_stop_rxtx() for reuse.
By accepting rte_eth_dev as input, bnxt_stop_rxtx() can be used
in multiple scenarios such as representor devices.
Kalesh AP [Tue, 4 Jan 2022 08:38:17 +0000 (14:08 +0530)]
net/bnxt: get maximum supported multicast filters count
The HWRM_FUNC_QCAPS response indicates the maximum number
of multicast filters that can be supported by this function
on the RX side.
Fixed to use this value instead of the hard coded value 16.
Fixes: d69851df12b2 ("net/bnxt: support multicast filter and set MAC addr") Cc: stable@dpdk.org Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Kalesh AP [Tue, 4 Jan 2022 08:38:16 +0000 (14:08 +0530)]
net/bnxt: fix flow create when RSS is disabled
This patch reverts the commit "5d47d06b2c83".
Revert this commit as it caused a regression on legacy chips.
On newer chips we use TruFlow based flow creation instead of
HWRM based flow creation.
Kalesh AP [Tue, 4 Jan 2022 08:38:15 +0000 (14:08 +0530)]
net/bnxt: add null check for mark table
During the port start, driver ignores mark table allocation failure.
This could cause a segfault due to NULL pointer dereference in
bnxt_set_mark_in_mbuf(). Fix this by checking the pointer validity
before accessing it.
Fixes: b87abb2e55cb ("net/bnxt: support marking packet") Cc: stable@dpdk.org Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Kalesh AP [Tue, 4 Jan 2022 08:38:12 +0000 (14:08 +0530)]
net/bnxt: cap maximum number of unicast MAC addresses
The Maximum number of receive mac addr is hard coded to 128
in the ethdev library(RTE_ETH_NUM_RECEIVE_MAC_ADDR).
But the bnxt devices support more than 128 unicast MAC filters
which could result in a segfault while user tries to add more
than 128 unicast MAC addresses to the port.
Fixes: a2033fda22ab ("net/bnxt: fix number of MAC addresses for VMDq") Cc: stable@dpdk.org Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Kalesh AP [Tue, 4 Jan 2022 08:38:10 +0000 (14:08 +0530)]
net/bnxt: restore RSS configuration after reset recovery
During reset recovery, driver is not restoring the VNIC rss hash key.
It's generating a new random hash key which results in unexpected
RSS behavior after recovery. Fixed this by storing the VNIC RSS
configuration to a local struct and then applying the cached value
during the recovery.
Kalesh AP [Tue, 4 Jan 2022 08:38:07 +0000 (14:08 +0530)]
net/bnxt: fix multicast address set
Fix bnxt_dev_set_mc_addr_list_op.
Fix to cache the multicast mac addresses added to the port
to the driver private structure memory. Use this cached mc list
to program the FW.
This fixes an issue where multicast packets reception is
successful only if the multicast mac address of the packets
is the first one in the multicast address list of the port.
This is in preparation for another fix in the series.
Fixes: d69851df12b2 ("net/bnxt: support multicast filter and set MAC addr") Cc: stable@dpdk.org Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Lance Richardson [Tue, 30 Nov 2021 14:42:26 +0000 (09:42 -0500)]
net/bnxt: fix xstats names query overrun
When the xstats_names parameter to rte_eth_xstats_get_names()
is non-NULL and the size parameter is less than the required
number of entries, the driver must return the required size
without modifying (and over-running) the caller's xstats_names
array.
Update bnxt_dev_xstats_get_names_op() in accordance with this
requirement.
Dmitry Kozlyuk [Tue, 28 Dec 2021 09:20:43 +0000 (11:20 +0200)]
net/mlx5: relax headroom assertion
A debug assertion in Single-Packet Receive Queue (SPRQ) mode
required all Rx mbufs to have a 128 byte headroom,
based on the assumption that rte_pktmbuf_init() sets it.
However, rte_pktmbuf_init() may set a smaller headroom
if the dataroom is insufficient, e.g. this is a natural case
for split buffer segments. The headroom can also be larger.
Only check the headroom size when vectored Rx routines
are used because they rely on it. Relax the assertion
to require sufficient headroom size, not an exact one.
Dmitry Kozlyuk [Tue, 28 Dec 2021 09:17:03 +0000 (11:17 +0200)]
net/mlx5: fix GCC uninitialized variable warning
When building with -Db_sanitize=thread, GCC gives a warning:
drivers/net/mlx5/mlx5_flow_meter.c: In function ‘mlx5_flow_meter_create’:
drivers/net/mlx5/mlx5_flow_meter.c:1170:33: warning: ‘legacy_fm’ may be
used uninitialized in this function [-Wmaybe-uninitialized]
This is a false-positive: legacy_fm is initialized and used
if and only if priv->sh->meter_aso_en is false.
Work around this by initializing legacy_fm to NULL.
Add an assertion before legacy_fm use in case the logic changes.
Fixes: 444320186393 ("net/mlx5: support meter creation with policy") Cc: stable@dpdk.org Reported-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
Gregory Etelson [Thu, 23 Dec 2021 13:16:38 +0000 (15:16 +0200)]
net/mlx5: fix GRE protocol type translation for Verbs
When application creates several flows to match on GRE tunnel without
explicitly specifying GRE protocol type value in flow rules, PMD will
translate that to zero mask.
RDMA-CORE cannot distinguish between different inner flow types and
produces identical matchers for each zero mask.
The patch extracts inner header type from flow rule and forces it in
GRE protocol type, if application did not specify any.
Gregory Etelson [Thu, 23 Dec 2021 13:08:17 +0000 (15:08 +0200)]
net/mlx5: fix RSS expansion with explicit next protocol
The PMD RSS expansion scheme by default compiles flow rules for all
flow item types that may branch out from a stub supplied
by application.
For example,
ETH can lead to VLAN, IPv4 or IPv6.
IPv4 can lead to UDP, TCP, IPv4 or IPv6.
If application explicitly specified next protocol type, expansion must
use that option only and not create flows with other protocol types.
The PMD ignored explicit next protocol values in GRE and VXLAN-GPE.
The patch updates RSS expansion for GRE and VXLAN-GPE with explicit
next protocol settings.
Lior Margalit [Thu, 23 Dec 2021 08:15:41 +0000 (10:15 +0200)]
net/mlx5: fix assertion on flags set in packet mbuf
Fixed the assertion on the flags set in pkt->ol_flags for vectorized
MPRQ. With vectorized MPRQ the CQs are processed before copying the
MPRQ bufs so the valid assertion is that the expected flag is set and
not that the pkt->ol_flags equlas this flag alone.
Michael Baum [Thu, 16 Dec 2021 18:40:40 +0000 (20:40 +0200)]
common/mlx5: fix missing validation in devargs parsing
The rte_kvargs_parse function parses the arguments
"key=value,key=value,..." string and return an allocated structure that
contains a key/value list.
It enables also to send a key without value and updates the values in
the following ways:
- "key=value,key,..." - value is updated as NULL.
- "key=value,key=,..." - value is updated as "" (empty string).
Mlx5 PMDs use this function to parse, but they don't support key without
value. They send the value as an argument to strtol function.
When strtol gets NULL as a parameter it cause a crash, when it gets ""
(empty string) it returns 0.
Adds a check that will prevent an argument in these formats, and returns
an error for it.
Fixes: 85209924039c ("common/mlx5: share memory related devargs") Cc: stable@dpdk.org Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
Michael Baum [Wed, 8 Dec 2021 14:51:34 +0000 (16:51 +0200)]
net/mlx5: fix memory socket selection in ASO management
In ASO objects creation (WQE, CQE and MR), socket number is given as
a parameter.
The selection was wrongly socket 0 hardcoded even if the user didn't
configure memory for this socket.
This patch replaces the selection to default socket (SOCKET_ID_ANY).
Fixes: f935ed4b645a ("net/mlx5: support flow hit action for aging") Cc: stable@dpdk.org Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
Michael Baum [Wed, 24 Nov 2021 22:02:38 +0000 (00:02 +0200)]
common/mlx5: fix error handling in multi-class probe
The common drivers_probe function calls in a loop to all probe functions
for classes requested by the user. After it manages to probe them all,
it updates this on the device in the "classes_loaded" field.
If one of them fails, all those probed to it are remove using the
drivers_remove function. However, this function only releases the
classes in the "classes_loaded" field on the given device and misses the
newly probed classes.
This patch removes the condition from the release function, and ensures
that the caller function sends a more accurate parameter.
Fixes: 8a41f4deccc3 ("common/mlx5: introduce layer for multiple class drivers") Cc: stable@dpdk.org Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
Bin Zheng [Fri, 10 Dec 2021 08:22:09 +0000 (16:22 +0800)]
net/ixgbe: add vector Rx parameter check
Under the circumstance that `rx_tail` wrap back to zero
and the advance speed of `rx_tail` is greater than `rxrearm_start`,
`rx_tail` will catch up with `rxrearm_start` and surpass it.
This may cause some mbufs be reused by application.
So we need to make some restrictions to ensure that
`rx_tail` will not exceed `rxrearm_start`.
Dapeng Yu [Wed, 24 Nov 2021 08:12:20 +0000 (16:12 +0800)]
net/ice: track DCF state of PF
When VF is reset, PF will change DCF state from ON to other state, if
flow creation, destroy, or redirect command is sent to DCF at this
time, it will fail.
This patch tracks DCF state and returns try-again error to caller when
DCF state is not ON.
Cc: stable@dpdk.org Signed-off-by: Dapeng Yu <dapengx.yu@intel.com> Acked-by: Haiyue Wang <haiyue.wang@intel.com>
Qi Zhang [Wed, 24 Nov 2021 01:09:28 +0000 (09:09 +0800)]
net/ice: fix Tx checksum offload capability
Add missing capability for outer UDP Tx checksum.
Also fixed the feature list in ice_dcf.ini
Fixes: bf89db4409bb ("net/ice: complete device info get in DCF") Cc: stable@dpdk.org Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Acked-by: Qiming Yang <qiming.yang@intel.com>
Junfeng Guo [Wed, 22 Dec 2021 08:11:38 +0000 (16:11 +0800)]
net/ice: fix pattern check for flow director parser
FDIR rules with masks are not supported in current code. Thus add
pattern check for IPv4/UDP/TCP/SCTP addr/port to terminate the FDIR
programming stage.
common/cnxk: update CPU directive in NPA assembly code
Use arch_extension instead of .cpu directive in NPA assembly code
snippets. Using .cpu directive with generic causes it to override
the micro architecture selected by march,mcpu.
For example if march=armv8.5-a+crypto+sve2 provided then the .cpu
directive overrides it to generic+crypto+sve2, use arch_extension
to get the expected result.
Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com> Acked-by: Jerin Jacob <jerinj@marvell.com>
common/cnxk: use CAS with release semantics for batch alloc
Before issuing the batch alloc, we clear the first word of
cache lines so that NPA can update the status. Make sure that
this line clear is flushed before the batch alloc is issued.
Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com> Acked-by: Jerin Jacob <jerinj@marvell.com>
common/cnxk: ensure ROC cache alignment of NPA stack size
When PLT_CACHE_LINE_SIZE is set to 64B, the memzone size reserved for
NPA stack could be a multiple of 64B. In such a case, when NDC SYNC
is initiated for the NPA LF, it could go and corrupt an additional
64B bytes as NDC flushes in multiples of ROC cache line size (128B).
So ensure that NPA stack size requested is a multiple of 128B.
Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com> Acked-by: Jerin Jacob <jerinj@marvell.com>
Michael Baum [Tue, 23 Nov 2021 18:38:05 +0000 (20:38 +0200)]
net/mlx5: fix MPRQ stride devargs adjustment
In Multi-Packet RQ creation, the user can choose the number of strides
and their size in bytes. The user updates it using specific devargs for
both of these parameters.
The above two parameters determine the size of the WQE which is actually
their product of multiplication.
If the user selects values that are not in the supported range, the PMD
changes them to default values. However, apart from the range
limitations for each parameter individually there is also a minimum
value on their multiplication. When the user selects values that their
multiplication are lower than minimum value, no adjustment is made and
the creation of the WQE fails.
This patch adds an adjustment in these cases as well. When the user
selects values whose multiplication is lower than the minimum, they are
replaced with the default values.
Fixes: ecb160456aed ("net/mlx5: add device parameter for MPRQ stride size") Cc: stable@dpdk.org Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
Michael Baum [Tue, 23 Nov 2021 18:38:04 +0000 (20:38 +0200)]
net/mlx5: improve stride parameter names
In the striding RQ management there are two important parameters, the
size of the single stride in bytes and the number of strides.
Both the data-path structure and config structure keep the log of the
above parameters. However, in their names there is no mention that the
value is a log which may be misleading as if the fields represent the
values themselves.
This patch updates their names describing the values more accurately.
Fixes: ecb160456aed ("net/mlx5: add device parameter for MPRQ stride size") Cc: stable@dpdk.org Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
Michael Baum [Tue, 23 Nov 2021 18:38:03 +0000 (20:38 +0200)]
common/mlx5: add minimum WQE size for striding RQ
Some devices have a WQE size limit for striding RQ. On some newer
devices, this limitation is smaller and information on its size is
provided by the firmware.
This patch adds the attribute query from firmware: the minimum required
size of WQE buffer for striding RQ in granularity of Bytes.
Cc: stable@dpdk.org Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
The MAC addresses fields are 48 bit wide and are processed
by mlx5 PMD as two words. There the bug was introduced for
the offset, causing malfunction of MODIFY_FIELD action
with MAC address fields as source or destination and
with non zero field offset.
Anatoly Burakov [Mon, 9 Nov 2020 15:47:48 +0000 (15:47 +0000)]
mem: quiet base address hint warning if not requested
Any EAL memory allocation often goes through eal_get_virtual_area()
function, which will print a warning whenever the resulting allocation
didn't match the specified address requirements. This is useful for
when we have requested a specific base virtual address, to let the user
know that the mapping has deviated from that address.
However, on Linux, we also have a default base address that's there to
ensure better chances of successful secondary process initialization,
as well as higher likelihood of the virtual areas to fit inside the
IOMMU address width. Because of this default base address, there are
warnings printed even when no base address was explicitly requested,
which can be confusing to the user.
Emit this warning with debug level unless base address was explicitly
requested by the user.
DMA module internal header files are currently being installed to the
prefix directory. This patch updates DMA meson config file to exclude
internal headers during install stage.
David Marchand [Thu, 27 Jan 2022 10:55:11 +0000 (11:55 +0100)]
devtools: fix comment detection in forbidden token check
After a comment section was detected, passing to a new hunk was not seen
as ending the section and all subsequent hunks were ignored.
Fixes: 7413e7f2aeb3 ("devtools: alert on new calls to exit from libs") Cc: stable@dpdk.org Reported-by: Thomas Monjalon <thomas@monjalon.net> Signed-off-by: David Marchand <david.marchand@redhat.com>
Tejasree Kondoj [Mon, 6 Dec 2021 11:07:57 +0000 (16:37 +0530)]
test/crypto: add fragmented packet case
Add fragmented plain packet test case in combined mode.
The test case leverages combined mode framework to generate
IPsec packet from a fragment and verify that headers are formed
correctly. The IPsec packet would be decapsulated and the plain
packet is compared against the original packet.
Tejasree Kondoj [Mon, 6 Dec 2021 11:07:53 +0000 (16:37 +0530)]
test/crypto: add IPsec fragmented packet known vectors
Added fragmented plain packet known vector test case in
IPsec outbound. The test case sends a fragmented packet
and ensures that the IPsec packet generated has correct
fragmentation fields (ie, the IPsec packet is not fragmented)
by comparing against the known vector.
Tejasree Kondoj [Mon, 6 Dec 2021 11:07:51 +0000 (16:37 +0530)]
test/crypto: add IPv6 tunnel mode cases
Added IPv6 known vector and combined mode tests.
Following modes are added:
Tunnel IPv6 in IPv6
Tunnel IPv4 in IPv4
Tunnel IPv4 in IPv6
Tunnel IPv6 in IPv4
Ciara Power [Fri, 10 Dec 2021 14:09:52 +0000 (14:09 +0000)]
crypto/ipsec_mb: fix tainted data for session
Downcasting a void * to struct aesni_gcm_session * caused the session
data to be treated as tainted.
Removing the void * temporary variable and adding a cast avoids this
issue.
Coverity issue: 374377 Fixes: 746825e5c0ea ("crypto/ipsec_mb: move aesni_gcm PMD") Cc: stable@dpdk.org Signed-off-by: Ciara Power <ciara.power@intel.com> Acked-by: Fan Zhang <roy.fan.zhang@intel.com>