Michael Baum [Wed, 6 Jan 2021 08:19:25 +0000 (08:19 +0000)]
net/mlx5: fix leak on ASO SQ creation failure
In ASO SQ creation, the PMD allocates umem buffer for SQ.
When umem buffer allocation fails, the MR and CQ memory are not freed
what caused a memory leak.
Free it.
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, 6 Jan 2021 08:19:24 +0000 (08:19 +0000)]
net/mlx5: remove CQE padding device argument
The data-path code doesn't take care on 'rxq_cqe_pad_en' and use padded
CQE for any case when the system cache-line size is 128B.
This makes the argument redundant.
Remove it.
Fixes:
bc91e8db12cd ("net/mlx5: add 128B padding of Rx completion entry")
Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Michael Baum [Wed, 6 Jan 2021 08:19:23 +0000 (08:19 +0000)]
common/mlx5: fix completion queue entry size configuration
According to the current data-path implementation in the PMD the CQE
size must follow the cache-line size.
So, the configuration of the CQE size should be depended in
RTE_CACHE_LINE_SIZE.
Wrongly, part of the CQE creations didn't follow it exactly what caused
an incompatibility between HW and SW in the data-path when working in
128B cache-line size systems.
Adjust the rule for any CQE creation.
Remove the cqe_size attribute from the DevX CQ creation command and set
it inside the command translation according to the cache-line size.
Fixes:
79a7e409a2f6 ("common/mlx5: prepare support of packet pacing")
Fixes:
5cd0a83f413e ("common/mlx5: support more fields in DevX CQ create")
Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Dekel Peled [Sun, 10 Jan 2021 17:37:56 +0000 (19:37 +0200)]
net/mlx5: fix hairpin flow split decision
Previously, the identification of hairpin queue was done using
mlx5_rxq_get_type() function.
Recent patch replaced it with use of mlx5_rxq_get_hairpin_conf(),
and check of the return value conf != NULL.
The case of return value is NULL (queue is not hairpin) was not handled.
As result, non-hairpin flows were wrongly handled.
This patch adds the required check for return value is NULL.
Fixes:
509f8470de55 ("net/mlx5: do not split hairpin flow in explicit mode")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Tal Shnaiderman [Thu, 7 Jan 2021 13:08:27 +0000 (15:08 +0200)]
net/mlx5: split multi-thread flow handling per OS
multi-threaded flows feature uses pthread function pthread_key_create
but for Windows the destruction option in the function is unimplemented.
To resolve it, Windows will implement destruction mechanism to cleanup
mlx5_flow_workspace object for each terminated thread.
Linux flow will keep the current behavior.
Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Acked-by: Khoa To <khot@microsoft.com>
Kiran Kumar K [Mon, 21 Dec 2020 07:45:18 +0000 (13:15 +0530)]
net/octeontx2: support 24B custom L2 header parsing
Adding support to parse 24B custom L2 header. Added devargs support to
configure the PKIND, and removed the restriction to support custom
headers on non SDP interface.
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Sunil Kumar Kori [Mon, 21 Dec 2020 14:03:08 +0000 (19:33 +0530)]
net/octeontx2: fix corruption in segments list
On Tx, lastseg->next is not being reset to null for multi segmented
packet and same mbuf can be used on Rx which has a stale mbuf entry into
mbuf->next.
On Rx, application receives mbuf with mbuf->next uninitialized though
mbuf->nb_segs is correct. Application iterates over all segments using
mbuf->next ignoring mbuf->nb_segs which leads to undefined behavior.
So earlier assumption of just having right value in mbuf->nb_segs is
enough, is incorrect. Mbuf must contain valid and synced value in
nb_segs and next pointer.
Fixes:
364eb0e46683 ("net/octeontx2: avoid per packet barrier with multi segment")
Cc: stable@dpdk.org
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Yunjian Wang [Mon, 7 Dec 2020 11:37:15 +0000 (19:37 +0800)]
net/mvneta: check allocation in Rx queue flush
The function rte_malloc() could return NULL, the return value
need to be checked.
Fixes:
ce7ea764597e ("net/mvneta: support Rx/Tx")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Liron Himi <lironh@marvell.com>
Somnath Kotur [Thu, 24 Dec 2020 09:37:34 +0000 (15:07 +0530)]
net/bnxt: check chip reset in stop and close
While the error recovery thread is running, an application
can invoke dev_stop or dev_close_op thus triggering a race
and unwanted consequences if dev_close is invoked while the
recovery is not yet completed.
Fix by having another lock to synchronize between the 2 threads and
return EGAIN if adapter is in the middle of recovery when dev_stop
or dev_close ops are invoked
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Somnath Kotur [Thu, 24 Dec 2020 09:37:33 +0000 (15:07 +0530)]
net/bnxt: fix error handling in device start
Call bnxt_dev_stop in error path of bnxt_dev_start_op() to keep
it simple and consistent
Fixes:
c09f57b49c13 ("net/bnxt: add start/stop/link update operations")
Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Somnath Kotur [Thu, 24 Dec 2020 09:37:32 +0000 (15:07 +0530)]
net/bnxt: fix lock init and destroy
Invoking init/uninit locks in init_resources and uninit_resources
would end up initializing and destroying locks on every port start
stop which is not desired.
Move the 2 routines to dev_init and dev_close respectively as
locks need to be initialized and destroyed only once during the
lifetime of the driver.
Fixes:
1cb3d39a48f7 ("net/bnxt: synchronize between flow related functions")
Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kalesh AP [Sun, 20 Dec 2020 05:24:30 +0000 (21:24 -0800)]
net/bnxt: add Rx logic for 58818 chips
1. On the new 58818 chips, the RX completion is largely the same except
for the new completion opcode and the stripped VLAN format and
checksum status. Added bnxt_parse_csum_v2(), bnxt_parse_pkt_type_v2()
and bnxt_rx_vlan_v2() to support the new RX completion logic.
2. Disable vector mode RX/TX for 58818 chips for now.
3. The cfa_code format on 58818 chips is different than legacy chips.
So skip cfa_code parsing logic on 58818 chips for now.
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kalesh AP [Sun, 20 Dec 2020 05:24:29 +0000 (21:24 -0800)]
net/bnxt: modify context memory allocation
Newer devices like SR2 may have chip backing store and do not require
host backed memory allocation.
In these cases, HWRM_FUNC_BACKING_STORE_QCAPS will return a zero entry
size to indicate contexts for which the host should not allocate backing
store.
Selectively allocate context memory based on device capabilities and
only enable backing store for the appropriate contexts
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kalesh AP [Sun, 20 Dec 2020 05:24:28 +0000 (21:24 -0800)]
net/bnxt: support LRO for SR2 chip
Add the new chip specific TPA v2 logic to bnxt_tpa_start() to fully
support TPA on the new chip.
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kalesh AP [Sun, 20 Dec 2020 05:24:27 +0000 (21:24 -0800)]
net/bnxt: modify VNIC accounting
Modify VNIC accounting when enabling RFS on newer chips.
Unlike legacy chips, newer chips don't need additional VNIC resources
for ntuple filter. Fix the code accordingly so that we don't reserve
and allocate additional VNICs on newer chips.
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kalesh AP [Sun, 20 Dec 2020 05:24:26 +0000 (21:24 -0800)]
net/bnxt: add new Rx checksum mode
The 58818 chips support two different checksum modes.
Host driver has to register with FW which checksum mode it
prefers to use. DPDK driver want to use "cs_all_ok_mode=1".
FW advertises the support of the different checksum modes
on per VNIC basis in the HWRM_VNIC_QCAPS response.
Driver should use HWRM_VNIC_CFG to configure the needed
checksum mode.
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kalesh AP [Sun, 20 Dec 2020 05:24:25 +0000 (21:24 -0800)]
net/bnxt: support 58818 chip family
The new chip (Stingray 2) is part of the P5 chip family with a number
of changes:
1. Implement the epoch doorbell bit for 58818 chip. With the new
doorbell infrastructure and the unbounded index logic, now set the
epoch doorbell bit to support proper doorbell operation on the new
chip. Toggle epoch bit of all rings when it's wrapped to support
doorbell overflow checking.
2. Get the legacy doorbell size from firmware. Legacy doorbell support
has been removed in Stingray 2. So, the fast path doorbell pages
start from the base of the BAR. Drivers need to use
legacy_l2_db_space_size_kb field in the hwrm_func_qcfg_output
response to get the legacy doorbell page offset from the BAR.
3. Set VALID doorbell bit on 58818 chip family. This class of chip has a
valid doorbell bit added and it needs to be set.
4. Use "chip_num" returned by firmware. The "chip_num" field in the
HWRM_VER_GET output returns the chip number. Use this value to
identify chip category for 58818 chip family.
5. Added device ids for Stingray2 PF/VF devices.
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Jeff Guo [Wed, 13 Jan 2021 05:31:29 +0000 (13:31 +0800)]
net/ice: refactor packet type parsing
If the capability of a PTYPE within a specific package could be
negotiated, no need to maintain a different PTYPE list for each
type of the package when parsing PTYPE. So refactor the PTYPE
parsing mechanism for each flow engines.
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Jeff Guo [Wed, 13 Jan 2021 05:31:28 +0000 (13:31 +0800)]
net/ice/base: add more packet type values
Add some macros for some PType value.
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Murphy Yang [Fri, 8 Jan 2021 08:30:11 +0000 (08:30 +0000)]
net/i40e: add null input checks
Pointer 'NULL' check for 'mac_addr' or 'conf' within i40e PMD APIs.
Fixes:
66c78f4799ff ("net/i40e: add support for packet template to flow director")
Fixes:
04b443fb2c43 ("net/i40e: fix port id type")
Cc: stable@dpdk.org
Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Haiyue Wang [Tue, 12 Jan 2021 08:13:02 +0000 (16:13 +0800)]
net/iavf: support new VLAN capabilities
The new VLAN virtchnl opcodes introduce new capabilities like VLAN
filtering, stripping and insertion.
The AVF needs to query the VLAN capabilities based on current device
configuration firstly.
AVF is able to configure inner VLAN filter when port VLAN is enabled
base on negotiation; and AVF is able to configure outer VLAN (0x8100)
if port VLAN is disabled to be compatible with legacy mode.
When port VLAN is updated by DCF, the AVF needs to reset to query the
new VLAN capabilities.
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Haiyue Wang [Tue, 12 Jan 2021 08:13:01 +0000 (16:13 +0800)]
net/ice: add DCF VLAN handling
Add the DCF port representor infrastructure for the VFs of DCF attached
PF. Then the standard ethdev API like VLAN can be used to configure the
VFs.
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Haiyue Wang [Tue, 12 Jan 2021 08:13:00 +0000 (16:13 +0800)]
net/iavf: support CRC strip disabling
The VF will check the PF's CRC strip capability firstly, then set the
'CRC strip disable' value in the queue configuration according to the
RX CRC offload setting.
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Qi Zhang [Thu, 7 Jan 2021 04:53:33 +0000 (12:53 +0800)]
common/iavf: update copyright date
Updated the Copyright for 2021.
Updated FreeBSD IAVF driver of version.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Qi Zhang [Thu, 7 Jan 2021 05:15:04 +0000 (13:15 +0800)]
common/iavf: support VLAN offload by DCF
Add new opcode VIRTCHNL_OP_DCF_VLAN_OFFLOAD to set VLAN offload
by DCF, the virtchnl message includes:
1. A valid target VF
2. Type of VLAN to be supported: outer or inner
3. Ethertype of the VLAN (either 0x8100 or 0x88A8 or 0x9100)
4. VLAN insert settings
a). No insert offload, VLAN ID in the packet (default)
b). Offload via transmit descriptor
c). Insert as a port VLAN (via VSI)
5. VLAN strip settings
a). Strip (and discard)
b). Strip and place in descriptor
c). No Strip
6. VLAN ID for the target VF
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Qi Zhang [Thu, 7 Jan 2021 05:07:08 +0000 (13:07 +0800)]
common/iavf: support new VLAN capabilities
Currently VIRTCHNL only allows for VLAN filtering and offloads to happen
on a single 802.1Q VLAN. Add support to filter and offload on inner,
outer, and/or inner + outer VLANs.
This is done by introducing the new capability
VIRTCHNL_VF_OFFLOAD_VLAN_V2. The flow to negotiate this new capability
is shown below.
1. VF - sets the VIRTCHNL_VF_OFFLOAD_VLAN_V2 bit in the
virtchnl_vf_resource.vf_caps_flags during the
VIRTCHNL_OP_GET_VF_RESOURCES request message. The VF should also set
the VIRTCHNL_VF_OFFLOAD_VLAN bit in case the PF driver doesn't
support the new capability.
2. PF - sets the VLAN capability bit it supports in the
VIRTCHNL_OP_GET_VF_RESOURCES response message. This will either be
VIRTCHNL_VF_OFFLOAD_VLAN_V2, VIRTCHNL_VF_OFFLOAD_VLAN, or none.
3. VF - If the VIRTCHNL_VF_OFFLOAD_VLAN_V2 capability was ACK'd by the
PF, then the VF needs to request the VLAN capabilities of the
PF/Device by issuing a VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2_CAPS request.
If the VIRTCHNL_VF_OFFLOAD_VLAN capability was ACK'd then the VF
knows only single 802.1Q VLAN filtering/offloads are supported. If no
VLAN capability is ACK'd then the PF/Device doesn't support hardware
VLAN filtering/offloads for this VF.
4. PF - Populates the virtchnl_vlan_caps structure based on what it
allows/supports for that VF and sends that response via
VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2_CAPS.
After VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2_CAPS is successfully negotiated
the VF driver needs to interpret the capabilities supported by the
underlying PF/Device. The VF will be allowed to filter/offload the
inner 802.1Q, outer (various ethertype), inner 802.1Q + outer
(various ethertypes), or none based on which fields are set.
The VF will also need to interpret where the VLAN tag should be inserted
and/or stripped based on the negotiated capabilities.
Also, update the virtchnl_op_str() function to support the added opcodes.
Signed-off-by: Brett Creeley <brett.creeley@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Leyi Rong [Wed, 6 Jan 2021 05:35:48 +0000 (13:35 +0800)]
net/ice: enlarge Rx queue rearm threshold to 64
We observe performance drop on ice AVX512 data path after stop and
start by using testpmd.
As CPU polling is faster in AVX512 path, L3 contested accesses is
intensified when rxrearm_start is a random value after testpmd
stop/start.
Enlarge ICE_RXQ_REARM_THRESH to 64 to ease the contested accesses and
fix the performance drop issue.
Cc: stable@dpdk.org
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Murphy Yang [Fri, 8 Jan 2021 07:17:52 +0000 (07:17 +0000)]
net/ice: disable IPv4 checksum offload in vector Tx
ICE choices vector TX path or basic TX path by macro
'ICE_NO_VECTOR_FLAGS'.
This patch adds 'DEV_TX_OFFLOAD_IPV4_CKSUM' in 'ICE_NO_VECTOR_FLAGS'
to make IPv4 checksum offload processed by basic TX path.
Fixes:
a22483208800 ("net/ice: disable TSO offload in vector path")
Cc: stable@dpdk.org
Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Alvin Zhang [Fri, 8 Jan 2021 07:29:10 +0000 (15:29 +0800)]
net/ice: fix RSS lookup table initialization
RSS look-up table initialization is done incorrectly due to
divide-by-zero error.
Add a check to rx-queue count.
Fixes:
50370662b727 ("net/ice: support device and queue ops")
Cc: stable@dpdk.org
Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Tested-by: Wei Xie <weix.xie@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Murphy Yang [Thu, 7 Jan 2021 09:17:10 +0000 (09:17 +0000)]
net/iavf: fix conflicting RSS combination rules
Currently, when use 'flow' command to create a rule with following
invalid RSS type combination, it can be created successfully.
Invalid RSS combinations list:
- ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP
- ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP
This patch adds these combinations in 'invalid_rss_comb' array to do
valid check, if the combination check failed, the rule will be created
unsuccessful.
Fixes:
91f27b2e39ab ("net/iavf: refactor RSS")
Cc: stable@dpdk.org
Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
Jiawen Wu [Fri, 18 Dec 2020 09:37:02 +0000 (17:37 +0800)]
net/txgbe: add security type in flow action
Add security type in flow action.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Jiawen Wu [Fri, 18 Dec 2020 09:37:01 +0000 (17:37 +0800)]
net/txgbe: add security offload in Rx and Tx
Add security offload in Rx and Tx process.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Jiawen Wu [Fri, 18 Dec 2020 09:37:00 +0000 (17:37 +0800)]
net/txgbe: destroy security session
Add support to clear a security session's private data,
get the size of a security session,
add update the mbuf with provided metadata.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Jiawen Wu [Fri, 18 Dec 2020 09:36:59 +0000 (17:36 +0800)]
net/txgbe: add security session create operation
Add support to configure a security session.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Jiawen Wu [Fri, 18 Dec 2020 09:36:58 +0000 (17:36 +0800)]
net/txgbe: add IPsec context creation
Initialize securiry context, and add support to get
security capabilities.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Jiawen Wu [Fri, 18 Dec 2020 09:36:56 +0000 (17:36 +0800)]
net/txgbe: add TM hierarchy commit
Add traffic manager hierarchy commit.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Jiawen Wu [Fri, 18 Dec 2020 09:36:55 +0000 (17:36 +0800)]
net/txgbe: support TM node add and delete
Support traffic manager node add and delete operations.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Jiawen Wu [Fri, 18 Dec 2020 09:36:54 +0000 (17:36 +0800)]
net/txgbe: support TM shaper profile add and delete
Support traffic manager profile add and delete operations.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Jiawen Wu [Fri, 18 Dec 2020 09:36:53 +0000 (17:36 +0800)]
net/txgbe: add TM capabilities get operation
Add support to get traffic manager capabilities.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Jiawen Wu [Fri, 18 Dec 2020 09:36:52 +0000 (17:36 +0800)]
net/txgbe: add TM configuration init and uninit
Add traffic manager configuration init and uninit operations.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Jiawen Wu [Fri, 18 Dec 2020 09:36:51 +0000 (17:36 +0800)]
net/txgbe: support UDP tunnel port add and delete
Support UDP tunnel port add and delete operations.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Jiawen Wu [Fri, 18 Dec 2020 09:36:50 +0000 (17:36 +0800)]
net/txgbe: flush all filters
Add support to flush all the filters.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Jiawen Wu [Fri, 18 Dec 2020 09:36:49 +0000 (17:36 +0800)]
net/txgbe: support destroying consistent filter
Add a function to destroy the flow filter.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Jiawen Wu [Fri, 18 Dec 2020 09:36:48 +0000 (17:36 +0800)]
net/txgbe: support creating consistent filter
Create a flow rule, to use the matched filter which the rule hit first.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Jiawen Wu [Fri, 18 Dec 2020 09:36:47 +0000 (17:36 +0800)]
net/txgbe: parse RSS filter
Check if the rule is a RSS filter rule, and get the RSS info.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Jiawen Wu [Fri, 18 Dec 2020 09:36:46 +0000 (17:36 +0800)]
net/txgbe: restore RSS filter
Add support to restore RSS filter.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Jiawen Wu [Fri, 18 Dec 2020 09:36:45 +0000 (17:36 +0800)]
net/txgbe: parse flow director filter
Check if the rule is a flow director rule, and get the flow director info.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Jiawen Wu [Fri, 18 Dec 2020 09:36:44 +0000 (17:36 +0800)]
net/txgbe: support flow director filter add and delete
Support add and delete operations on flow director filter.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Jiawen Wu [Fri, 18 Dec 2020 09:36:43 +0000 (17:36 +0800)]
net/txgbe: configure flow director filter
Configure flow director filter with it enabled.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Jiawen Wu [Fri, 18 Dec 2020 09:36:42 +0000 (17:36 +0800)]
net/txgbe: add flow director filter init and uninit
Add flow director filter init and uninit operations.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Jiawen Wu [Fri, 18 Dec 2020 09:36:41 +0000 (17:36 +0800)]
net/txgbe: parse L2 tunnel filter
Check if the rule is a L2 tunnel rule, and get the L2 tunnel info.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Jiawen Wu [Fri, 18 Dec 2020 09:36:40 +0000 (17:36 +0800)]
net/txgbe: support L2 tunnel filter add and delete
Support L2 tunnel filter add and delete operations.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Jiawen Wu [Fri, 18 Dec 2020 09:36:39 +0000 (17:36 +0800)]
net/txgbe: config L2 tunnel filter with e-tag
Config L2 tunnel filter with e-tag.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Jiawen Wu [Fri, 18 Dec 2020 09:36:38 +0000 (17:36 +0800)]
net/txgbe: add L2 tunnel filter init and uninit
Add L2 tunnel filter init and uninit.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Jiawen Wu [Fri, 18 Dec 2020 09:36:37 +0000 (17:36 +0800)]
net/txgbe: parse syn filter
Check if the rule is a TCP SYN rule, and get the SYN info.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Jiawen Wu [Fri, 18 Dec 2020 09:36:36 +0000 (17:36 +0800)]
net/txgbe: support syn filter add and delete
Support add and delete operations on syn filter.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Jiawen Wu [Fri, 18 Dec 2020 09:36:35 +0000 (17:36 +0800)]
net/txgbe: parse ethertype filter
Check if the rule is a ethertype rule, and get the ethertype info.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Jiawen Wu [Fri, 18 Dec 2020 09:36:34 +0000 (17:36 +0800)]
net/txgbe: support ethertype filter add and delete
Support add and delete operations on ethertype filter.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Jiawen Wu [Fri, 18 Dec 2020 09:36:33 +0000 (17:36 +0800)]
net/txgbe: parse n-tuple filter
Check if the rule is a n-tuple rule, and get the n-tuple info.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Jiawen Wu [Fri, 18 Dec 2020 09:36:32 +0000 (17:36 +0800)]
net/txgbe: support ntuple filter add and delete
Support add and delete operations on ntuple filter.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Jiawen Wu [Fri, 18 Dec 2020 09:36:31 +0000 (17:36 +0800)]
net/txgbe: add ntuple filter init and uninit
Add ntuple filter init and uninit.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Jiawen Wu [Fri, 18 Dec 2020 09:36:30 +0000 (17:36 +0800)]
net/txgbe: add generic flow API
Introduce rte_flow with its validate, create, destroy and flush
operations into txgbe PMD.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Andrew Boyer [Wed, 16 Dec 2020 21:12:57 +0000 (13:12 -0800)]
net/ionic: stop queues when LIF is stopped
Otherwise they cannot be restarted, because the FW will reject INIT
or ENA commands on queues which are already running.
Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Andrew Boyer [Wed, 16 Dec 2020 21:12:56 +0000 (13:12 -0800)]
net/ionic: improve queue state handling
Skip ionic_lif_[rxq|txq]_init() in queue start if it's already done.
Move ionic_lif_[rxq|txq]_deinit() from queue stop to queue release.
This allows the queues to be restarted.
Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Andrew Boyer [Wed, 16 Dec 2020 21:12:55 +0000 (13:12 -0800)]
net/ionic: improve link state handling
Add UP and FW_RESET state flags.
Update the stack info when the link state changes.
Convert set_link_up/set_link_down to lif_start/lif_stop.
Condition reported link state on UP flag.
Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Andrew Boyer [Wed, 16 Dec 2020 21:12:54 +0000 (13:12 -0800)]
net/ionic: complete release on close
ionic_dev_close() is responsible for destroying the ethdev, lif, and
adapter. eth_ionic_dev_remove() calls ionic_dev_close().
Remove-on-close is now required behavior for a PMD.
Remove the UNMAINTAINED flag.
Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Andrew Boyer [Wed, 16 Dec 2020 21:12:53 +0000 (13:12 -0800)]
net/ionic: remove multi-LIF support
This feature is unused, so remove it.
There is exactly one adapter / lif / ethdev per port.
Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Andrew Boyer [Wed, 16 Dec 2020 21:12:52 +0000 (13:12 -0800)]
net/ionic: preserve Rx mode across LIF stop/start
Otherwise, non-default settings (like PROMISC) get reset.
This will become important when link toggling is tied to LIF stop/start.
Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Andrew Boyer [Wed, 16 Dec 2020 21:12:51 +0000 (13:12 -0800)]
net/ionic: preserve RSS state unless RETA size changes
This preserves settings across a LIF stop/start.
This will become important when link toggling is tied to LIF stop/start.
Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Jiayu Hu [Mon, 11 Jan 2021 12:16:27 +0000 (07:16 -0500)]
vhost: enhance async enqueue for small packets
Async enqueue offloads large copies to DMA devices, and small copies
are still performed by the CPU. However, it requires users to get
enqueue completed packets by rte_vhost_poll_enqueue_completed(), even
if they are completed by the CPU when rte_vhost_submit_enqueue_burst()
returns. This design incurs extra overheads of tracking completed
pktmbufs and function calls, thus degrading performance on small packets.
This patch enhances async enqueue for small packets by enabling
rte_vhost_submit_enqueue_burst() to return completed packets.
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Tested-by: Yinan Wang <yinan.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Jiayu Hu [Mon, 11 Jan 2021 12:16:26 +0000 (07:16 -0500)]
vhost: cleanup async enqueue
This patch removes unnecessary check and function calls, and it changes
appropriate types for internal variables and fixes typos.
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Tested-by: Yinan Wang <yinan.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Maxime Coquelin [Fri, 8 Jan 2021 09:41:49 +0000 (10:41 +0100)]
net/virtio: fix memory init with vDPA backend
This patch fixes an overhead met with mlx5-vdpa Kernel
driver, where for every page in the mapped area, all the
memory tables gets updated. For example, with 2MB hugepages,
a single IOTLB_UPDATE for a 1GB region causes 512 memory
updates on mlx5-vdpa side.
Using batching mode, the mlx5 driver will only trigger a
single memory update for all the IOTLB updates that happen
between the batch begin and batch end commands.
Fixes:
6b901437056e ("net/virtio: introduce vhost-vDPA backend")
Cc: stable@dpdk.org
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Maxime Coquelin [Fri, 8 Jan 2021 09:41:48 +0000 (10:41 +0100)]
net/virtio: add missing backend features negotiation
This patch adds missing backend features negotiation for
in Vhost-vDPA. Without it, IOTLB messages v2 could be sent
by Virtio-user PMD while not supported by the backend.
Fixes:
6b901437056e ("net/virtio: introduce vhost-vDPA backend")
Cc: stable@dpdk.org
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Karra Satwik [Sun, 20 Dec 2020 22:44:43 +0000 (04:14 +0530)]
net/cxgbe: accept VLAN flow items without ethertype
When apps pass the RTE_FLOW_ITEM_TYPE_VLAN without setting the
ethertype field in RTE_FLOW_ITEM_TYPE_ETH, then assume 0x8100
VLAN by default and don't reject the rule.
Fixes:
55f003d8884c ("net/cxgbe: support flow API for matching QinQ VLAN")
Cc: stable@dpdk.org
Signed-off-by: Karra Satwik <kaara.satwik@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
John Daley [Thu, 17 Dec 2020 01:37:15 +0000 (17:37 -0800)]
net/enic: remove deprecated flow director code
The Flow Director (FDIR) API was removed in release 20.11.
This patch removes the remainder of the FDIR code in the
PMD.
Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Hyong Youb Kim <hyonkim@cisco.com>
Selwin Sebastian [Wed, 6 Jan 2021 08:00:58 +0000 (13:30 +0530)]
net/axgbe: support reading FW version
Added support for fw_version_get API
Signed-off-by: Selwin Sebastian <selwin.sebastian@amd.com>
Acked-by: Somalapuram Amaranath <asomalap@amd.com>
Xuan Ding [Fri, 8 Jan 2021 08:38:44 +0000 (08:38 +0000)]
net/ice: refactor PF RSS
This patch refactors the PF RSS code based on the below design:
1. ice_pattern_match_item->input_set_mask is the superset of
ETH_RSS_xxx.
2. ice_pattern_match_item->meta is the ice_rss_hash_cfg template.
3. ice_hash_parse_pattern will generate pattern hint.
4. ice_hash_parse_action will refine the ice_rss_hash_cfg based on
the pattern hint and rss_type.
5. The refine process includes:
1) refine protocol headers(VLAN/PPPOE/GTPU).
2) refine hash bit fields of l2, l3, l4.
3) refine hash bit fields for gtpu header.
Signed-off-by: Xuan Ding <xuan.ding@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Ruifeng Wang [Tue, 12 Jan 2021 02:57:08 +0000 (02:57 +0000)]
config/arm: add Neoverse N2
Add Arm Neoverse N2 cpu support.
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Ruifeng Wang [Tue, 12 Jan 2021 02:57:07 +0000 (02:57 +0000)]
common/octeontx2: fix build with SVE
Building with gcc 10.2 with SVE extension enabled got error:
{standard input}: Assembler messages:
{standard input}:4002: Error: selected processor does not support `mov z3.b,#0'
{standard input}:4003: Error: selected processor does not support `whilelo p1.b,xzr,x7'
{standard input}:4005: Error: selected processor does not support `ld1b z0.b,p1/z,[x8]'
{standard input}:4006: Error: selected processor does not support `whilelo p4.s,wzr,w7'
This is because inline assembly code explicitly resets cpu model to
not have SVE support. Thus SVE instructions generated by compiler
auto vectorization got rejected by assembler.
Added SVE to the cpu model specified by inline assembly for SVE support.
Not replacing the inline assembly with C atomics because the driver relies
on specific LSE instruction to interface to co-processor [1].
Fixes:
8a4f835971f5 ("common/octeontx2: add IO handling APIs")
Cc: stable@dpdk.org
[1] https://mails.dpdk.org/archives/dev/2021-January/196092.html
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Ruifeng Wang [Tue, 12 Jan 2021 02:57:06 +0000 (02:57 +0000)]
net/octeontx: fix build with SVE
Building with gcc 10.2 with SVE extension enabled got error:
{standard input}: Assembler messages:
{standard input}:91: Error: selected processor does not support `addvl x4,x8,#-1'
{standard input}:95: Error: selected processor does not support `ptrue p1.d,all'
{standard input}:135: Error: selected processor does not support `whilelo p2.d,xzr,x5'
{standard input}:137: Error: selected processor does not support `decb x1'
This is because inline assembly code explicitly resets cpu model to
not have SVE support. Thus SVE instructions generated by compiler
auto vectorization got rejected by assembler.
Added SVE to the cpu model specified by inline assembly for SVE support.
Not replacing the inline assembly with C atomics because the driver relies
on specific LSE instruction to interface to co-processor [1].
Fixes:
f0c7bb1bf778 ("net/octeontx/base: add octeontx IO operations")
Cc: stable@dpdk.org
[1] https://mails.dpdk.org/archives/dev/2021-January/196092.html
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Ruifeng Wang [Tue, 12 Jan 2021 02:57:05 +0000 (02:57 +0000)]
net/hns3: fix build with SVE
Building with SVE extension enabled stopped with error:
error: ACLE function ‘svwhilelt_b64_s32’ requires ISA extension ‘sve’
18 | #define PG64_256BIT svwhilelt_b64(0, 4)
This is caused by unintentional cflags reset.
Fixed the issue by not touching cflags, and using flags defined by
compiler.
Fixes:
952ebacce4f2 ("net/hns3: support SVE Rx")
Cc: stable@dpdk.org
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Ruifeng Wang [Tue, 12 Jan 2021 02:57:04 +0000 (02:57 +0000)]
lpm/arm: support SVE
Added new path to do lpm4 lookup by using scalable vector extension.
The SVE path will be selected if compiler has flag SVE set.
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Ruifeng Wang [Thu, 14 Jan 2021 06:59:25 +0000 (06:59 +0000)]
test: improve coverage on LPM tbl8
Existing test cases create 256 tbl8 groups for testing. The number covers
only 8 bit next_hop/group field. Since the next_hop/group field had been
extended to 24-bits, creating more than 256 groups in tests can improve
the coverage.
Coverage was not expanded to reach the max supported group number, because
it would take too much time to run for this fast-test.
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Tested-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Ruifeng Wang [Thu, 14 Jan 2021 06:59:22 +0000 (06:59 +0000)]
lpm: fix vector IPv4 lookup
rte_lpm_lookupx4 could return wrong next hop when more than 256 tbl8
groups are created. This is caused by incorrect type casting of tbl8
group index that been stored in tbl24 entry. The casting caused group
index truncation and hence wrong tbl8 group been searched.
Issue fixed by applying proper mask to tbl24 entry to get tbl8 group index.
Fixes:
dc81ebbacaeb ("lpm: extend IPv4 next hop field")
Fixes:
cbc2f1dccfba ("lpm/arm: support NEON")
Fixes:
d2cc7959342b ("lpm: add AltiVec for ppc64")
Cc: stable@dpdk.org
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Tested-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Vladimir Medvedkin [Tue, 15 Dec 2020 18:25:19 +0000 (18:25 +0000)]
fib6: improve AVX512 lookup performance
Improved performance for AVX512 FIB6 lookup by doubling the number
of flows being processed
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Dmitry Kozlyuk [Tue, 12 Jan 2021 00:36:02 +0000 (03:36 +0300)]
build: fix linker flags on Windows
The --export-dynamic linker option is only applicable to ELF.
On Windows, where COFF is used, it causes warnings:
x86_64-w64-mingw32-ld: warning: --export-dynamic is not supported
for PE+ targets, did you mean --export-all-symbols? (MinGW)
LINK : warning LNK4044: unrecognized option '/-export-dynamic';
ignored (clang)
Don't add --export-dynamic on Windows anywhere.
Fixes:
b031e13d7f0d ("build: fix plugin load on static build")
Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>
Eugeny Parshutin [Wed, 2 Dec 2020 17:48:06 +0000 (20:48 +0300)]
doc: add vtune profiling config to prog guide
Return back 'profiling with vtune' section to profiling programmers
guide with updated instruction on how to enable vtune profiling
with meson configuration option.
Fixes:
89c67ae2cba7 ("doc: remove references to make from prog guide")
Cc: stable@dpdk.org
Signed-off-by: Eugeny Parshutin <eugeny.parshutin@linux.intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Thomas Monjalon [Wed, 2 Dec 2020 17:15:21 +0000 (18:15 +0100)]
devtools: adjust verbosity of ABI check
The scripts gen-abi.sh and check-abi.sh are updated
to print error messages to stderr so they are likely never ignored.
When called from test-meson-builds.sh, the standard messages on stdout
can be more quiet depending on the verbosity settings.
The beginning of the ABI check is announced in verbose mode.
The commands are printed in very verbose mode.
The check result details are available in verbose mode.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Ophir Munk [Sun, 10 Jan 2021 11:10:23 +0000 (11:10 +0000)]
app/regex: measure performance with precise clock
Performance measurement (elapsed time and Gbps) are based on Linux
clock() API. The resolution is improved by replacing the clock() API
with rte_rdtsc_precise() API.
Signed-off-by: Ophir Munk <ophirmu@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
Ophir Munk [Sun, 10 Jan 2021 11:10:22 +0000 (11:10 +0000)]
app/regex: measure performance per queue pair
Up to this commit measuring the parsing elapsed time and Giga bits per
second performance was done on the aggregation of all QPs (per core).
This commit separates the time measurements per individual QP.
Signed-off-by: Ophir Munk <ophirmu@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
Ophir Munk [Sun, 10 Jan 2021 11:10:21 +0000 (11:10 +0000)]
app/regex: support multiple cores
Up to this commit the regex application was running with multiple QPs on
a single core. This commit adds the option to specify a number of cores
on which multiple QPs will run.
A new parameter 'nb_lcores' was added to configure the number of cores:
--nb_lcores <num of cores>.
If not configured the number of cores is set to 1 by default. On
application startup a few initial steps occur by the main core: the
number of QPs and cores are parsed. The QPs are distributed as evenly
as possible on the cores. The regex device and all QPs are initialized.
The data file is read and saved in a buffer. Then for each core the
application calls rte_eal_remote_launch() with the worker routine
(run_regex) as its parameter.
Signed-off-by: Ophir Munk <ophirmu@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
Ophir Munk [Sun, 10 Jan 2021 11:10:20 +0000 (11:10 +0000)]
app/regex: read data file once at startup
Up to this commit the input data file was read from scratch for each QP,
which is redundant. Starting from this commit the data file is read only
once at startup. Each QP will clone the data.
Signed-off-by: Ophir Munk <ophirmu@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
Ophir Munk [Sun, 10 Jan 2021 11:10:19 +0000 (11:10 +0000)]
app/regex: support multiple queue pairs
Up to this commit the regex application used one QP which was assigned a
number of jobs, each with a different segment of a file to parse. This
commit adds support for multiple QPs assignments. All QPs will be
assigned the same number of jobs, with the same segments of file to
parse. It will enable comparing functionality with different numbers of
QPs. All queues are managed on one core with one thread. This commit
focuses on changing routines API to support multi QPs, mainly, QP scalar
variables are replaced by per-QP struct instance. The enqueue/dequeue
operations are interleaved as follows:
enqueue(QP #1)
enqueue(QP #2)
...
enqueue(QP #n)
dequeue(QP #1)
dequeue(QP #2)
...
dequeue(QP #n)
A new parameter 'nb_qps' was added to configure the number of QPs:
--nb_qps <num of qps>.
If not configured, nb_qps is set to 1 by default.
Signed-off-by: Ophir Munk <ophirmu@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
Ophir Munk [Sun, 10 Jan 2021 11:10:18 +0000 (11:10 +0000)]
app/regex: move mempool creation to worker routine
Function rte_pktmbuf_pool_create() is moved from init_port() routine to
run_regex() routine. Looking forward on multi core support - init_port()
will be called only once as part of application startup while mem pool
creation should be called multiple times (per core).
Signed-off-by: Ophir Munk <ophirmu@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
Ori Kam [Thu, 17 Dec 2020 10:37:31 +0000 (12:37 +0200)]
regex/mlx5: add response flags
This commit propagate the response flags from the regex engine.
Signed-off-by: Francis Kelly <fkelly@nvidia.com>
Signed-off-by: Ori Kam <orika@nvidia.com>
Ori Kam [Thu, 17 Dec 2020 10:37:30 +0000 (12:37 +0200)]
regexdev: add resource limit reached flag
When scanning a buffer it is possible that the scan will abort
due to some internal resource limit.
This commit adds such response flag, so application can handle such cases.
Signed-off-by: Francis Kelly <fkelly@nvidia.com>
Signed-off-by: Ori Kam <orika@nvidia.com>
Tal Shnaiderman [Wed, 6 Jan 2021 20:35:53 +0000 (22:35 +0200)]
eal: add generic thread-local-storage functions
Add support for TLS functionality in EAL.
The following functions are added:
rte_thread_tls_key_create - create a TLS data key.
rte_thread_tls_key_delete - delete a TLS data key.
rte_thread_tls_value_set - set value bound to the TLS key
rte_thread_tls_value_get - get value bound to the TLS key
TLS key is defined by the new type rte_tls_key.
The API allocates the thread local storage (TLS) key.
Any thread of the process can subsequently use this key
to store and retrieve values that are local to the thread.
Those functions are added in addition to TLS capability
in rte_per_lcore.h to allow abstraction of the pthread
layer for all operating systems.
Windows implementation is under librte_eal/windows and
implemented using WIN32 API for Windows only.
Unix implementation is under librte_eal/unix and
implemented using pthread for UNIX compilation.
Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Tal Shnaiderman [Wed, 6 Jan 2021 20:35:52 +0000 (22:35 +0200)]
eal: move thread affinity functions to new file
Move the definition of the functions
rte_thread_set_affinity and rte_thread_get_affinity
to new file, rte_thread.h
The file will implement generic threading functionality
and will only host threading functions which do not reference
pthread API.
Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Alvin Zhang [Fri, 8 Jan 2021 05:35:40 +0000 (13:35 +0800)]
net/i40e: refactor RSS flow
1. Delete original code.
2. Add 2 tables(One maps flow pattern and RSS type to PCTYPE,
another maps RSS type to input set).
3. Parse RSS pattern and RSS type to get PCTYPE.
4. Parse RSS action to get queues, RSS function and hash field.
5. Create and destroy RSS filters.
6. Create new files for hash flows.
Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Alvin Zhang [Fri, 8 Jan 2021 05:35:39 +0000 (13:35 +0800)]
net/i40e: fix returned code for RSS hardware failure
The API should return the system error status, but it returned the
hardware error status, this is confuses the caller.
This patch adds check on hardware execution status and returns -EIO
in case of hardware execution failure.
Fixes:
1d4b2b4966bb ("net/i40e: fix VF overwrite PF RSS LUT for X722")
Fixes:
d0a349409bd7 ("i40e: support AQ based RSS config")
Cc: stable@dpdk.org
Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>