dpdk.git
3 years agonet/mlx5: register multiple pool for Rx queue
Viacheslav Ovsiienko [Mon, 26 Oct 2020 11:55:02 +0000 (11:55 +0000)]
net/mlx5: register multiple pool for Rx queue

The split feature for receiving packets was added to the mlx5
PMD, now Rx queue can receive the data to the buffers belonging
to the different pools and the memory of all the involved pool
must be registered for DMA operations in order to allow hardware
to store the data.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
3 years agonet/mlx5: configure Rx queue for buffer split
Viacheslav Ovsiienko [Mon, 26 Oct 2020 11:55:01 +0000 (11:55 +0000)]
net/mlx5: configure Rx queue for buffer split

The scatter-gather elements should be configured
accordingly to support the buffer split feature.
The application provides the desired settings for
the segments at the beginning of the packets and
PMD pads the buffer chain (if needed) with attributes
of last specified segment to accommodate the packet
of maximal length.

There are some limitations are implied. The MPRQ
feature should be disengaged if split is requested,
due to MPRQ neither supports pushing data to the
dedicated pools nor follows the flexible buffer sizes.
The vectorized rx_burst routines does not support
the scattering (these ones are extremely simplified
and work over the single segment only) and can't
handle split as well.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
3 years agonet/mlx5: support Rx buffer split description
Viacheslav Ovsiienko [Mon, 26 Oct 2020 11:55:00 +0000 (11:55 +0000)]
net/mlx5: support Rx buffer split description

The routine to provide Rx queue setup with specifying
extended receiving buffer description is added.
It allows application to specify desired segment
lengths, data position offsets in the buffer
and dedicated memory pool for each segment.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
3 years agonet/mlx5: implement tunnel offload
Gregory Etelson [Sun, 25 Oct 2020 14:08:09 +0000 (16:08 +0200)]
net/mlx5: implement tunnel offload

Tunnel Offload API provides hardware independent, unified model
to offload tunneled traffic. Key model elements are:
 - apply matches to both outer and inner packet headers
   during entire offload procedure;
 - restore outer header of partially offloaded packet;
 - model is implemented as a set of helper functions.

Implementation details:
* tunnel_offload PMD parameter must be set to 1 to enable the feature.
* application cannot use MARK and META flow actions with tunnel.
* offload JUMP action is restricted to steering tunnel rule only.

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
3 years agonet/mlx5: support shared action for RSS
Andrey Vesnovaty [Fri, 23 Oct 2020 10:24:10 +0000 (13:24 +0300)]
net/mlx5: support shared action for RSS

Implement shared action create/destroy/update/query. The current
implementation support is limited to shared RSS action only. The shared
RSS action create operation prepares hash RX queue objects for all
supported permutations of the hash.  The shared RSS action update
operation relies on functionality to modify hash RX queue introduced in
one of the previous commits in this patch series.

Implement RSS shared action and handle shared RSS on flow apply and
release. The lookup for hash RX queue object for RSS action is limited
to the set of objects stored in the shared action itself and when
handling shared RSS action. The lookup for hash RX queue object inside
shared action is performed by hash only.

Current implementation limited to DV flow driver operations i.e. verbs
flow driver operations doesn't support shared action.

Signed-off-by: Andrey Vesnovaty <andreyv@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
3 years agonet/mlx5: translate shared action for RSS action
Andrey Vesnovaty [Fri, 23 Oct 2020 10:24:09 +0000 (13:24 +0300)]
net/mlx5: translate shared action for RSS action

Handle shared action on flow validation/creation/destruction.
mlx5 PMD translates shared action into a regular one before handling
flow validation/creation. The shared action translation applied to
utilize the same execution path for both shared and regular actions.
The current implementation supports shared action translation for shared
RSS action only.

RSS action validation split to validate shared RSS action on its
creation in addition to action validation in flow validation/creation
path.

Implement rte_flow shared action API for mlx5 PMD, mostly forwarding
calls to flow driver operations (see struct mlx5_flow_driver_ops).

Signed-off-by: Andrey Vesnovaty <andreyv@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
3 years agonet/mlx5: modify hash Rx queue objects
Andrey Vesnovaty [Fri, 23 Oct 2020 10:24:08 +0000 (13:24 +0300)]
net/mlx5: modify hash Rx queue objects

Implement modification for hashed table of Rx queue object (see
mlx5_hrxq_modify()). This implementation relies on the capability to
modify TIR object via DevX API, i.e. current implementation doesn't
support verbs HW object operations. The functionality to modify hashed
table of Rx queue object is prerequisite to implement
rete_flow_shared_action_update() for shared RSS action in mlx5 PMD.

Signed-off-by: Andrey Vesnovaty <andreyv@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
3 years agocommon/mlx5: modify advanced Rx object via DevX
Andrey Vesnovaty [Fri, 23 Oct 2020 10:24:07 +0000 (13:24 +0300)]
common/mlx5: modify advanced Rx object via DevX

Implement TIR modification (see mlx5_devx_cmd_modify_tir()) using DevX
API. TIR is the object containing the hashed table of Rx queue. The
functionality to configure/modify this HW-related object is prerequisite
to implement rete_flow_shared_action_update() for shared RSS action in
mlx5 PMD. HW-related structures for TIR modification add in mlx5_prm.h.

Signed-off-by: Andrey Vesnovaty <andreyv@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
3 years agonet/bnxt: update PMD supported features
Lance Richardson [Thu, 22 Oct 2020 20:19:51 +0000 (16:19 -0400)]
net/bnxt: update PMD supported features

Mark "BSD nic_uio", "Usage doc", and "Perf doc" as supported
for the bnxt PMD.

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
3 years agonet/bnxt: use shorter SIMD initializers
Lance Richardson [Thu, 22 Oct 2020 18:50:51 +0000 (14:50 -0400)]
net/bnxt: use shorter SIMD initializers

Make SIMD initialization code less verbose by using appropriate
intrinsics when all lanes of a vector are initialized to the
same value.

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
3 years agonet/bnxt: fix boolean operator usage
Lance Richardson [Thu, 22 Oct 2020 18:45:10 +0000 (14:45 -0400)]
net/bnxt: fix boolean operator usage

Use boolean AND operator instead of bitwise operator.

Coverity issue: 323488
Fixes: b42c15c83e88 ("net/bnxt: support trusted VF")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
3 years agonet/ice: update writeback policy to reduce latency
Jesse Brandeburg [Fri, 23 Oct 2020 20:22:00 +0000 (13:22 -0700)]
net/ice: update writeback policy to reduce latency

Just like iavf, setting the value to 2us allows for generally good
streaming packet performance while keeping latency down, and
generally keeps the performance of the PF and VF interfaces similar.

The previous value of 0x10 was making latency on a single packet
receive be as much as 16us.

Fixes: 65dfc889d86b ("net/ice: support Rx queue interruption")
Cc: stable@dpdk.org
Reported-by: Brian Johnson <brian.johnson@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
3 years agonet/iavf: fix performance with writeback policy
Jesse Brandeburg [Fri, 23 Oct 2020 20:21:59 +0000 (13:21 -0700)]
net/iavf: fix performance with writeback policy

The iavf driver was trying to use writeback on ITR, but was
never setting an ITR, so it didn't work. This caused performance
to be limited due to too much PCIe traffic and partial writes
during most benchmarking workloads.
Set the ITR during queue setup, which can be checked at runtime
by reading register 0x2800. Setting the value to 2us allows
for generally good streaming packet performance while keeping
latency down.

Fixes: d6bde6b5eae9 ("net/avf: enable Rx interrupt")
Cc: stable@dpdk.org
Reported-by: Brian Johnson <brian.johnson@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
3 years agoraw/ifpga/base: enhance driver reliability in multi-process
Wei Huang [Fri, 23 Oct 2020 08:59:59 +0000 (04:59 -0400)]
raw/ifpga/base: enhance driver reliability in multi-process

Current hardware protection is based on pthread mutex which
work just for situation of multi-thread in one process. In
multi-process environment, hardware state machine would be
corrupted by concurrent access, that means original pthread
mutex mechanism need be enhanced.

The major modifications in this patch are list below:
1. Create a mutex for adapter in shared memory named
   "mutex.IFPGA:domain:bus:dev.func" when device is probed.
2. Create a shared memory named "IFPGA:domain:bus:dev.func" during opae
   adapter is initializing. There is a reference count in shared memory.
   Shared memory will be destroyed once reference count turned to zero.
3. Two mutexs are created in shared memory and initialized with flag
   PTHREAD_PROCESS_SHARED. One for SPI and the other for I2C. They will
   be passed to SPI and I2C driver subsequently.
4. DTB data in flash will be cached in shared memory. Then MAX10 driver
   can read DTB from shared memory instead of flash. This avoid
   confliction of concurrent flash access between hardware and software.

Signed-off-by: Wei Huang <wei.huang@intel.com>
Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
3 years agoraw/ifpga/base: free resources when destroying device
Wei Huang [Fri, 23 Oct 2020 08:59:58 +0000 (04:59 -0400)]
raw/ifpga/base: free resources when destroying device

Add two functions to complete the resource free work, one is
'ifpga_adapter_destroy()', the other is 'ifpga_bus_uinit()'.

Then call 'opae_adapter_destroy()' and 'opae_adapter_data_free()'
in 'ifpga_rawdev_close()' to free resources.

Also 'opae_adapter_free()' is removed from 'ifpga_rawdev_destroy()',
because opae adapter is pointed by dev_private member in raw_dev,
it will be freed in 'rte_rawdev_pmd_release()'.

Signed-off-by: Wei Huang <wei.huang@intel.com>
Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
3 years agoraw/ifpga/base: fix return of IRQ unregister
Wei Huang [Fri, 23 Oct 2020 08:59:57 +0000 (04:59 -0400)]
raw/ifpga/base: fix return of IRQ unregister

Since 'rte_intr_callback_unregister()' can return positive
value as success, but 'ifpga_rawdev_destroy()' handle it as
an error.

Instead, only negative return is treated as failure.

Fixes: e0a1aafe2af9 ("raw/ifpga: introduce IRQ functions")
Cc: stable@dpdk.org
Signed-off-by: Wei Huang <wei.huang@intel.com>
Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
3 years agoraw/ifpga/base: handle unsupported interrupt type
Wei Huang [Fri, 23 Oct 2020 08:59:56 +0000 (04:59 -0400)]
raw/ifpga/base: handle unsupported interrupt type

Handle unsupported interrupt type requests properly,
on unsupported interrupt case:
'ifpga_unregister_msix_irq()' returns success,
'ifpga_register_msix_irq()' return failure.

Fixes: e0a1aafe2af9 ("raw/ifpga: introduce IRQ functions")
Cc: stable@dpdk.org
Signed-off-by: Wei Huang <wei.huang@intel.com>
Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
3 years agoraw/ifpga/base: fix interrupt handler instance usage
Wei Huang [Fri, 23 Oct 2020 08:59:55 +0000 (04:59 -0400)]
raw/ifpga/base: fix interrupt handler instance usage

Interrupt handler copied to the local 'intr_handle' variable by value
before passing it to IRQ functions.
This leads IRQ functions update the local variable instead of
'ifpga_irq_handle'.

Instead, using 'intr_handle' local variable as pointer to
'ifpga_irq_handle' as intended.

Fixes: e0a1aafe2af9 ("raw/ifpga: introduce IRQ functions")
Cc: stable@dpdk.org
Signed-off-by: Wei Huang <wei.huang@intel.com>
Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
3 years agonet/txgbe: support DCB info get
Jiawen Wu [Mon, 19 Oct 2020 08:54:12 +0000 (16:54 +0800)]
net/txgbe: support DCB info get

Add DCB information get operation.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: support PTP
Jiawen Wu [Mon, 19 Oct 2020 08:54:11 +0000 (16:54 +0800)]
net/txgbe: support PTP

Add PTP support.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: support device LED on and off
Jiawen Wu [Mon, 19 Oct 2020 08:54:09 +0000 (16:54 +0800)]
net/txgbe: support device LED on and off

Support device LED on and off.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: support register dump
Jiawen Wu [Mon, 19 Oct 2020 08:54:08 +0000 (16:54 +0800)]
net/txgbe: support register dump

Add register dump support.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: support EEPROM info get
Jiawen Wu [Mon, 19 Oct 2020 08:54:07 +0000 (16:54 +0800)]
net/txgbe: support EEPROM info get

Add EEPROM information get related operations.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: support getting FW version
Jiawen Wu [Mon, 19 Oct 2020 08:54:06 +0000 (16:54 +0800)]
net/txgbe: support getting FW version

Add firmware version get operation.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: support MTU set
Jiawen Wu [Mon, 19 Oct 2020 08:54:05 +0000 (16:54 +0800)]
net/txgbe: support MTU set

Add MTU set operation.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: add device promiscuous and allmulticast mode
Jiawen Wu [Mon, 19 Oct 2020 08:54:04 +0000 (16:54 +0800)]
net/txgbe: add device promiscuous and allmulticast mode

Add device promiscuous and allmulticast mode.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: support priority flow control
Jiawen Wu [Mon, 19 Oct 2020 08:54:03 +0000 (16:54 +0800)]
net/txgbe: support priority flow control

Add priority flow control support.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: support FC auto negotiation
Jiawen Wu [Mon, 19 Oct 2020 08:54:02 +0000 (16:54 +0800)]
net/txgbe: support FC auto negotiation

Add flow control negotiation with link partner.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: support flow control
Jiawen Wu [Mon, 19 Oct 2020 08:54:01 +0000 (16:54 +0800)]
net/txgbe: support flow control

Add flow control support.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: support DCB
Jiawen Wu [Mon, 19 Oct 2020 08:54:00 +0000 (16:54 +0800)]
net/txgbe: support DCB

Add DCB transmit and receive mode configurations,
and allocate DCB packet buffer.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: support RSS
Jiawen Wu [Mon, 19 Oct 2020 08:53:59 +0000 (16:53 +0800)]
net/txgbe: support RSS

Add RSS configure, support to RSS hash and reta operations for PF.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: add VMDq configure
Jiawen Wu [Mon, 19 Oct 2020 08:53:58 +0000 (16:53 +0800)]
net/txgbe: add VMDq configure

Add multiple queue setting with VMDq.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: add PF module configure for SRIOV
Jiawen Wu [Mon, 19 Oct 2020 08:53:57 +0000 (16:53 +0800)]
net/txgbe: add PF module configure for SRIOV

Add PF module configure for SRIOV.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: add process mailbox operation
Jiawen Wu [Mon, 19 Oct 2020 08:53:56 +0000 (16:53 +0800)]
net/txgbe: add process mailbox operation

Add check operation for vf function level reset,
mailbox messages and ack from vf.
Waiting to process the messages.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: add PF module init and uninit for SRIOV
Jiawen Wu [Mon, 19 Oct 2020 08:53:55 +0000 (16:53 +0800)]
net/txgbe: add PF module init and uninit for SRIOV

Add PF module init and uninit operations with mailbox.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: add SWFW semaphore and lock
Jiawen Wu [Mon, 19 Oct 2020 08:53:54 +0000 (16:53 +0800)]
net/txgbe: add SWFW semaphore and lock

Add semaphore between software and firmware.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: support VLAN
Jiawen Wu [Mon, 19 Oct 2020 08:53:53 +0000 (16:53 +0800)]
net/txgbe: support VLAN

Add VLAN filter, tpid, offload and strip set support.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: add queue stats mapping
Jiawen Wu [Mon, 19 Oct 2020 08:53:52 +0000 (16:53 +0800)]
net/txgbe: add queue stats mapping

Add queue stats mapping set, and clear hardware counters.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: support device xstats
Jiawen Wu [Mon, 19 Oct 2020 08:53:51 +0000 (16:53 +0800)]
net/txgbe: support device xstats

Add device extended stats get from reading hardware registers.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: support device statistics
Jiawen Wu [Mon, 19 Oct 2020 08:53:50 +0000 (16:53 +0800)]
net/txgbe: support device statistics

Add device stats get from reading hardware registers.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: add Rx and Tx queue info get
Jiawen Wu [Mon, 19 Oct 2020 08:53:49 +0000 (16:53 +0800)]
net/txgbe: add Rx and Tx queue info get

Add Rx and Tx queue information get operation.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: support Rx interrupt
Jiawen Wu [Mon, 19 Oct 2020 08:53:48 +0000 (16:53 +0800)]
net/txgbe: support Rx interrupt

Support rx queue interrupt.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: support device stop and close
Jiawen Wu [Mon, 19 Oct 2020 08:53:47 +0000 (16:53 +0800)]
net/txgbe: support device stop and close

Add device stop, close and reset operations.
And support hardware thermal sensor.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: add Rx and Tx data path start and stop
Jiawen Wu [Mon, 19 Oct 2020 08:53:46 +0000 (16:53 +0800)]
net/txgbe: add Rx and Tx data path start and stop

Add receive and transmit data path start and stop.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: support device start
Jiawen Wu [Mon, 19 Oct 2020 08:53:45 +0000 (16:53 +0800)]
net/txgbe: support device start

Add device start operation with hardware start and reset.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: support Rx
Jiawen Wu [Mon, 19 Oct 2020 08:53:44 +0000 (16:53 +0800)]
net/txgbe: support Rx

Fill receive functions and define receive descriptor.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: support Tx prepare
Jiawen Wu [Mon, 19 Oct 2020 08:53:43 +0000 (16:53 +0800)]
net/txgbe: support Tx prepare

Fill transmit prepare function.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: support Tx with hardware offload
Jiawen Wu [Mon, 19 Oct 2020 08:53:42 +0000 (16:53 +0800)]
net/txgbe: support Tx with hardware offload

Fill transmit function with hardware offload.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: support simple Tx
Jiawen Wu [Mon, 19 Oct 2020 08:53:41 +0000 (16:53 +0800)]
net/txgbe: support simple Tx

Fill simple transmit function and define transmit descriptor.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: support packet type
Jiawen Wu [Mon, 19 Oct 2020 08:53:40 +0000 (16:53 +0800)]
net/txgbe: support packet type

Add packet type marco definition and convert ptype to ptid.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: add Rx and Tx start and stop
Jiawen Wu [Mon, 19 Oct 2020 08:53:39 +0000 (16:53 +0800)]
net/txgbe: add Rx and Tx start and stop

Add receive and transmit units start and stop for specified queue.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: add Rx and Tx queues setup and release
Jiawen Wu [Mon, 19 Oct 2020 08:53:38 +0000 (16:53 +0800)]
net/txgbe: add Rx and Tx queues setup and release

Add receive and transmit queues setup and release.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: add Rx and Tx init
Jiawen Wu [Mon, 19 Oct 2020 08:53:37 +0000 (16:53 +0800)]
net/txgbe: add Rx and Tx init

Add receive and transmit initialize unit.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: add unicast hash bitmap
Jiawen Wu [Mon, 19 Oct 2020 08:53:36 +0000 (16:53 +0800)]
net/txgbe: add unicast hash bitmap

Add unicast hash bitmap.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: add MAC address operations
Jiawen Wu [Mon, 19 Oct 2020 08:53:35 +0000 (16:53 +0800)]
net/txgbe: add MAC address operations

Add MAC address related operations.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: add autoneg control read and write
Jiawen Wu [Mon, 19 Oct 2020 08:53:34 +0000 (16:53 +0800)]
net/txgbe: add autoneg control read and write

Add autoc read and write for kr/kx/kx4/sfi link.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: add multi-speed link setup
Jiawen Wu [Mon, 19 Oct 2020 08:53:33 +0000 (16:53 +0800)]
net/txgbe: add multi-speed link setup

Add multispeed fiber setup link and laser control.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: add link status change
Jiawen Wu [Mon, 19 Oct 2020 08:53:32 +0000 (16:53 +0800)]
net/txgbe: add link status change

Add ethdev link interrupt handler, MAC setup link
and check link status and get capabilities.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: add device configuration
Jiawen Wu [Mon, 19 Oct 2020 08:53:31 +0000 (16:53 +0800)]
net/txgbe: add device configuration

Add device configure operation.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: add interrupt operation
Jiawen Wu [Mon, 19 Oct 2020 08:53:30 +0000 (16:53 +0800)]
net/txgbe: add interrupt operation

Add device interrupt handler and setup misx interrupt.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: support getting device info
Jiawen Wu [Mon, 19 Oct 2020 08:53:29 +0000 (16:53 +0800)]
net/txgbe: support getting device info

Add device information get operation.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: add PHY reset
Jiawen Wu [Mon, 19 Oct 2020 08:53:28 +0000 (16:53 +0800)]
net/txgbe: add PHY reset

Add phy reset function, support read and write phy registers.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: add module identify
Jiawen Wu [Mon, 19 Oct 2020 08:53:27 +0000 (16:53 +0800)]
net/txgbe: add module identify

Add sfp anf qsfp module identify, i2c start and stop.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: add PHY init
Jiawen Wu [Mon, 19 Oct 2020 08:53:26 +0000 (16:53 +0800)]
net/txgbe: add PHY init

Add phy init functions, get phy type and identify.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: add HW init and reset operation
Jiawen Wu [Mon, 19 Oct 2020 08:53:25 +0000 (16:53 +0800)]
net/txgbe: add HW init and reset operation

Add hardware init function and reset operation in mac layer.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: add EEPROM functions
Jiawen Wu [Mon, 19 Oct 2020 08:53:24 +0000 (16:53 +0800)]
net/txgbe: add EEPROM functions

Add EEPROM functions.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: add HW infrastructure and dummy function
Jiawen Wu [Mon, 19 Oct 2020 08:53:23 +0000 (16:53 +0800)]
net/txgbe: add HW infrastructure and dummy function

Add hardware infrastructure and dummy function.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: add MAC type and bus LAN id
Jiawen Wu [Mon, 19 Oct 2020 08:53:22 +0000 (16:53 +0800)]
net/txgbe: add MAC type and bus LAN id

Add base driver shared code.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: add error types and registers
Jiawen Wu [Mon, 19 Oct 2020 08:53:21 +0000 (16:53 +0800)]
net/txgbe: add error types and registers

Add error types and registers.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: add device init and uninit
Jiawen Wu [Mon, 19 Oct 2020 08:53:20 +0000 (16:53 +0800)]
net/txgbe: add device init and uninit

Add basic init and uninit function,
and some macro definitions prepare for hardware infrastructure.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: support probe and remove
Jiawen Wu [Mon, 19 Oct 2020 08:53:19 +0000 (16:53 +0800)]
net/txgbe: support probe and remove

Add basic PCIe ethdev probe and remove.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/txgbe: add build and doc infrastructure
Jiawen Wu [Mon, 19 Oct 2020 08:53:18 +0000 (16:53 +0800)]
net/txgbe: add build and doc infrastructure

Adding bare minimum PMD library and doc build infrastructure
and claim the maintainership for txgbe PMD.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agoapp/testpmd: fix RSS key for flow API RSS rule
Lijun Ou [Wed, 21 Oct 2020 10:07:10 +0000 (18:07 +0800)]
app/testpmd: fix RSS key for flow API RSS rule

When a flow API RSS rule is issued in testpmd, device RSS key is changed
unexpectedly, device RSS key is changed to the testpmd default RSS key.

Consider the following usage with testpmd:
1. first, startup testpmd:
 testpmd> show port 0 rss-hash key
 RSS functions: all ipv4-frag ipv4-other ipv6-frag ipv6-other ip
 RSS key: 6D5A56DA255B0EC24167253D43A38FB0D0CA2BCBAE7B30B477CB2DA38030F
          20C6A42B73BBEAC01FA
2. create a rss rule
 testpmd> flow create 0 ingress pattern eth / ipv4 / udp / end \
          actions rss types ipv4-udp end queues end / end

3. show rss-hash key
 testpmd> show port 0 rss-hash key
 RSS functions: all ipv4-udp udp
 RSS key: 74657374706D6427732064656661756C74205253532068617368206B65792
          C206F76657272696465

This is because testpmd always sends a key with the RSS rule,
if user provides a key as part of the rule that key is used, if user
doesn't provide a key, testpmd default key is sent to the PMDs, which is
causing device programmed RSS key to be changed.

There was a previous attempt to fix the same issue [1], but it has been
reverted back [2] because of the crash when 'key_len' is provided
without 'key'.

This patch follows the same approach with the initial fix [1] but also
addresses the crash.

After change, testpmd RSS key is 'NULL' by default, if user provides a
key as part of rule it is used, if not no key is sent to the PMDs at all

[1]
Commit a4391f8bae85 ("app/testpmd: set default RSS key as null")

[2]
Commit f3698c3d09a6 ("app/testpmd: revert setting default RSS")

Fixes: d0ad8648b1c5 ("app/testpmd: fix RSS flow action configuration")
Cc: stable@dpdk.org
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/netvsc: allocate contiguous physical memory for RNDIS
Long Li [Thu, 22 Oct 2020 00:26:07 +0000 (17:26 -0700)]
net/netvsc: allocate contiguous physical memory for RNDIS

When sending data, netvsc assumes the tx_rndis buffer is contiguous and
calculates physical addresses based on this assumption.

Use memzone to allocate tx_rndis so it's guaranteed that this buffer is
physically contiguous.

Cc: stable@dpdk.org
Signed-off-by: Long Li <longli@microsoft.com>
3 years agonet/mvpp2: fix memory leak in error path
Yunjian Wang [Thu, 22 Oct 2020 04:25:27 +0000 (12:25 +0800)]
net/mvpp2: fix memory leak in error path

In mrvl_create() allocated memory for 'mtr', we don't free it
when profile get fails and it will lead to memory leak.

We can get profile at the beginning of the function to
fix it, before calling mtr = rte_zmalloc_socket().

Fixes: cdb53f8da628 ("net/mvpp2: support metering")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Liron Himi <lironh@marvell.com>
3 years agonet/ena: remove unused macro
David Marchand [Fri, 23 Oct 2020 08:43:51 +0000 (10:43 +0200)]
net/ena: remove unused macro

This assert macro is not called anymore.
This also fixes an invalid reference to RTE_LOGTYPE_ERR that does not
exist.

Fixes: 3adcba9a8987 ("net/ena: update HAL to the newer version")
Fixes: 6f1c9df9e9cc ("net/ena: use dynamic log type for debug logging")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
3 years agoexamples/vhost: support vhost async data path
Cheng Jiang [Thu, 22 Oct 2020 08:59:07 +0000 (08:59 +0000)]
examples/vhost: support vhost async data path

This patch is to implement vhost DMA operation callbacks for CBDMA
PMD and add vhost async data-path in vhost sample. With providing
callback implementation for CBDMA, vswitch can leverage IOAT to
accelerate vhost async data-path.

Signed-off-by: Cheng Jiang <cheng1.jiang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
3 years agoexamples/vhost: add async vhost args parsing
Cheng Jiang [Thu, 22 Oct 2020 08:59:06 +0000 (08:59 +0000)]
examples/vhost: add async vhost args parsing

This patch is to add async vhost driver arguments parsing function
for CBDMA channel, DMA initiation function and args description.
The meson build file is changed to fix dependency problem. With
these arguments vhost device can be set to use CBDMA or CPU for
enqueue operation and bind vhost device with specific CBDMA channel
to accelerate data copy.

Signed-off-by: Cheng Jiang <cheng1.jiang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
3 years agovhost: remove fallback in async enqueue API
Patrick Fu [Wed, 21 Oct 2020 05:44:25 +0000 (13:44 +0800)]
vhost: remove fallback in async enqueue API

By design, async enqueue API should return directly if async device
is not registered. This patch removes the corrupted implementation of
the enqueue fallback from async mode to sync mode.

Fixes: cd6760da1076 ("vhost: introduce async enqueue for split ring")
Cc: stable@dpdk.org
Signed-off-by: Patrick Fu <patrick.fu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
3 years agovhost: check virtqueue metadata pointer
Maxime Coquelin [Mon, 19 Oct 2020 17:34:15 +0000 (19:34 +0200)]
vhost: check virtqueue metadata pointer

This patch checks whether the virtqueue metadata pointer
is valid before dereferencing it. It is not considered
a fix as earlier patch ensures there are no holes in the
array of virtqueue metadata pointers.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agovhost: validate index in async API
Maxime Coquelin [Mon, 19 Oct 2020 17:34:14 +0000 (19:34 +0200)]
vhost: validate index in async API

This patch validates the queue index parameter, in order
to ensure no out-of-bound accesses happen.

Fixes: 9eed6bfd2efb ("vhost: allow to enable or disable features")
Cc: stable@dpdk.org
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agovhost: validate index in inflight API
Maxime Coquelin [Mon, 19 Oct 2020 17:34:13 +0000 (19:34 +0200)]
vhost: validate index in inflight API

This patch validates the queue index parameter, in order
to ensure neither out-of-bound accesses nor NULL pointer
dereferencing happen.

Fixes: 4d891f77ddfa ("vhost: add APIs to get inflight ring")
Cc: stable@dpdk.org
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agovhost: validate index in live-migration API
Maxime Coquelin [Mon, 19 Oct 2020 17:34:12 +0000 (19:34 +0200)]
vhost: validate index in live-migration API

This patch validates the queue index parameter, in order
to ensure no out-of-bound accesses happen.

Fixes: bd2e0c3fe5ac ("vhost: add APIs for live migration")
Cc: stable@dpdk.org
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agovhost: validate index in guest notification API
Maxime Coquelin [Mon, 19 Oct 2020 17:34:11 +0000 (19:34 +0200)]
vhost: validate index in guest notification API

This patch validates the queue index parameter, in order
to ensure neither out-of-bound accesses nor NULL pointer
dereferencing happen.

Fixes: 9eed6bfd2efb ("vhost: allow to enable or disable features")
Cc: stable@dpdk.org
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agovhost: validate index in available entries API
Maxime Coquelin [Mon, 19 Oct 2020 17:34:10 +0000 (19:34 +0200)]
vhost: validate index in available entries API

This patch validates the queue index parameter, in order
to ensure neither out-of-bound accesses nor NULL pointer
dereferencing happen.

Fixes: a67f286a6596 ("vhost: export queue free entries")
Cc: stable@dpdk.org
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agovhost: fix virtqueues metadata allocation
Maxime Coquelin [Mon, 19 Oct 2020 17:34:09 +0000 (19:34 +0200)]
vhost: fix virtqueues metadata allocation

The Vhost-user backend implementation assumes there will be
no holes in the device's array of virtqueues metadata
pointers.

It can happen though, and would cause segmentation faults,
memory leaks or undefined behaviour.

This patch keep the assumption that there is no holes in this
array, and allocate all uninitialized virtqueues metadata up
to requested index.

Fixes: 160cbc815b41 ("vhost: remove a hack on queue allocation")
Cc: stable@dpdk.org
Suggested-by: Adrian Moreno <amorenoz@redhat.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agonet/vhost: fix xstats after clearing stats
David Christensen [Thu, 15 Oct 2020 17:49:37 +0000 (10:49 -0700)]
net/vhost: fix xstats after clearing stats

The PMD API allows stats and xstats values to be cleared separately.
This is a problem for the vhost PMD since some of the xstats values are
derived from existing stats values.  For example:

testpmd> show port xstats all
...
tx_unicast_packets: 17562959
...
testpmd> clear port stats all
...
show port xstats all
...
tx_unicast_packets: 18446744073709551615
...

Modify the driver so that stats and xstats values are stored, updated,
and cleared separately.

Fixes: 4d6cf2ac93dc ("net/vhost: add extended statistics")
Cc: stable@dpdk.org
Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
3 years agonet/iavf: fix vector Rx
Jeff Guo [Fri, 16 Oct 2020 09:44:31 +0000 (17:44 +0800)]
net/iavf: fix vector Rx

The limitation of burst size in vector rx was removed, since it should
retrieve as much received packets as possible. And also the scattered
receive path should use a wrapper function to achieve the goal of
burst maximizing.

Bugzilla ID: 516
Fixes: 319c421f3890 ("net/avf: enable SSE Rx Tx")
Fixes: 1162f5a0ef31 ("net/iavf: support flexible Rx descriptor in SSE path")
Fixes: 5b6e8859081d ("net/iavf: support flexible Rx descriptor in AVX path")
Cc: stable@dpdk.org
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Tested-by: Wei Ling <weix.ling@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
3 years agonet/fm10k: fix vector Rx
Jeff Guo [Fri, 16 Oct 2020 09:44:30 +0000 (17:44 +0800)]
net/fm10k: fix vector Rx

The scattered receive path should use a wrapper function to achieve the
goal of burst maximizing.

Bugzilla ID: 516
Fixes: fe65e1e1ce61 ("fm10k: add vector scatter Rx")
Cc: stable@dpdk.org
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
3 years agonet/ice: fix vector Rx
Jeff Guo [Fri, 16 Oct 2020 09:44:29 +0000 (17:44 +0800)]
net/ice: fix vector Rx

The limitation of burst size in vector rx was removed, since it should
retrieve as much received packets as possible. And also the scattered
receive path should use a wrapper function to achieve the goal of
burst maximizing.

Bugzilla ID: 516
Fixes: c68a52b8b38c ("net/ice: support vector SSE in Rx")
Cc: stable@dpdk.org
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Tested-by: Yingya Han <yingyax.han@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
3 years agonet/i40e: fix vector Rx
Jeff Guo [Fri, 16 Oct 2020 09:44:28 +0000 (17:44 +0800)]
net/i40e: fix vector Rx

The limitation of burst size in vector rx was removed, since it should
retrieve as much received packets as possible. And also the scattered
receive path should use a wrapper function to achieve the goal of
burst maximizing.

Bugzilla ID: 516
Fixes: 5b463eda8d26 ("net/i40e: make vector driver filenames consistent")
Fixes: ae0eb310f253 ("net/i40e: implement vector PMD for ARM")
Fixes: c3def6a8724c ("net/i40e: implement vector PMD for altivec")
Cc: stable@dpdk.org
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
3 years agonet/ixgbe: fix vector Rx
Jeff Guo [Fri, 16 Oct 2020 09:44:27 +0000 (17:44 +0800)]
net/ixgbe: fix vector Rx

The limitation of burst size in vector rx was removed, since it should
retrieve as much received packets as possible. And also the scattered
receive path should use a wrapper function to achieve the goal of
burst maximizing.

Bugzilla ID: 516
Fixes: b20971b6cca0 ("net/ixgbe: implement vector driver for ARM")
Fixes: 0e51f9dc4860 ("net/ixgbe: rename x86 vector driver file")
Cc: stable@dpdk.org
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Tested-by: Feifei Wang <feifei.wang2@arm.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
3 years agonet/i40e: fix QinQ flow pattern to allow non full mask
Padraig Connolly [Thu, 15 Oct 2020 09:28:58 +0000 (10:28 +0100)]
net/i40e: fix QinQ flow pattern to allow non full mask

Issue reported by customer that only full mask was allowed on inner and
outer VLAN tag, thus not allowing mask to set VLAN ID filter only.
Removed check that enforces inner vlan and outer vlan equal
I40E_TCI_MASK (full mask 0xffff).

Fixes: d37705068ee8 ("net/i40e: parse QinQ pattern")
Cc: stable@dpdk.org
Signed-off-by: Padraig Connolly <padraig.j.connolly@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
3 years agonet/ice: optimize Tx by using AVX512
Leyi Rong [Fri, 23 Oct 2020 04:14:07 +0000 (12:14 +0800)]
net/ice: optimize Tx by using AVX512

Optimize Tx path by using AVX512 instructions and vectorize the
tx free bufs process.

Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
3 years agonet/ice: add RSS hash parsing in AVX512 path
Leyi Rong [Fri, 23 Oct 2020 04:14:06 +0000 (12:14 +0800)]
net/ice: add RSS hash parsing in AVX512 path

Support RSS hash parsing in AVX512 data path as the default
RXDID is set to #22, that means the RSS hash field locates
in the 2nd 16B of each Flex Rx descriptor.

Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
3 years agonet/ice: add AVX512 vector path
Leyi Rong [Fri, 23 Oct 2020 04:14:05 +0000 (12:14 +0800)]
net/ice: add AVX512 vector path

Add AVX512 support for ice PMD. This patch adds ice_rxtx_vec_avx512.c
to support ice AVX512 vPMD.

This patch aims to enable AVX512 on ice vPMD. Main changes are focus
on Rx path compared with AVX2 vPMD.

Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
3 years agonet/ixgbe: prevent driver forcing application to exit
Conor Walsh [Tue, 20 Oct 2020 10:02:48 +0000 (10:02 +0000)]
net/ixgbe: prevent driver forcing application to exit

Remove the usage of rte_panic() within ixgbe_pf_host_init()

Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
3 years agonet/ixgbe: check switch domain allocation result
Conor Walsh [Tue, 20 Oct 2020 10:02:47 +0000 (10:02 +0000)]
net/ixgbe: check switch domain allocation result

The return value of rte_eth_switch_domain_alloc() was not being checked
within ixgbe_pf_host_init() which caused a coverity issue. If the call
fails a warning is logged using PMD_INIT_LOG() and *vfinfo is free'd.
ixgbe_pf_host_init() now has a return value which is checked in
eth_ixgbe_dev_init()

Coverity issue: 362795
Fixes: cf80ba6e2038 ("net/ixgbe: add support for representor ports")
Cc: stable@dpdk.org
Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
3 years agonet/bnxt: fix resource leak
Ajit Khaparde [Tue, 20 Oct 2020 23:24:28 +0000 (16:24 -0700)]
net/bnxt: fix resource leak

Fix a potential resource leak in case of errors during dev args
parsing during device probe.

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>
3 years agonet/i40e: fix virtual channel conflict
Yuying Zhang [Mon, 19 Oct 2020 02:20:25 +0000 (02:20 +0000)]
net/i40e: fix virtual channel conflict

i40evf_execute_vf_cmd() uses _atomic_set_cmd() to execute virtual
channel commands safely in multi-process mode and multi-thread mode.
However, it returns error when one process or thread is pending. Add
rte_spinlock_trylock() to handle this issue in concurrent scenarios.

Fixes: 4861cde46116 ("i40e: new poll mode driver")
Cc: stable@dpdk.org
Signed-off-by: Yuying Zhang <yuying.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>