dpdk.git
3 years agonet/ice/base: support external device secure programming
Qi Zhang [Tue, 2 Mar 2021 07:23:45 +0000 (15:23 +0800)]
net/ice/base: support external device secure programming

External topology devices (e.g. PHYs) connected to controller or to SoC
might have a firmware engine within the device and the firmware is
usually loaded from NVM connected to the topology device.

In some cases, those firmware packages might need to be regularly
updated in a secure way to prevent malicious user to burn malicious
firmware into the topology device. In other cases, the topology device
firmware might be burned independently, as burning the NVM attached to
the device might cause the device to stop function but could be fixed
without permanent damage.
SoC topologies also enable mezzanine card, with an ID EEPROM
within it. This ID EEPROM might need an update also.
This patch provides these abilities.

Signed-off-by: Amir Shay <shay.amir@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
3 years agonet/ice/base: support firmware log
Qi Zhang [Tue, 2 Mar 2021 07:23:44 +0000 (15:23 +0800)]
net/ice/base: support firmware log

Currently we do not provide full end-to-end solution for system level
debug and diagnostics. This change purpose is to fulfill design and
implementation gaps to provide full end-to-end (HW-FW-SW) diagnostic
solution. In addition to functional improvements, it will provide
feasible, user-friendly Debug information.

Signed-off-by: Amir Shay <shay.amir@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
3 years agonet/e1000: remove MTU setting limitation
Dapeng Yu [Fri, 19 Feb 2021 10:03:23 +0000 (18:03 +0800)]
net/e1000: remove MTU setting limitation

Currently, if requested MTU is bigger than mbuf size and scattered
receive is not enabled, setting MTU to that value fails.

This patch allows setting this special MTU when device is stopped,
because scattered_rx will be re-configured during next port start
and driver may enable scattered receive according new MTU value.

After this patch, driver may select different receive function
automatically after MTU set, according MTU values selected.

Fixes: 59d0ecdbf0e1 ("ethdev: MTU accessors")
Cc: stable@dpdk.org
Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
3 years agonet/igc: remove MTU setting limitation
Dapeng Yu [Fri, 19 Feb 2021 10:01:07 +0000 (18:01 +0800)]
net/igc: remove MTU setting limitation

Currently, if requested MTU is bigger than mbuf size and scattered
receive is not enabled, setting MTU to that value fails.

This patch allows setting this special MTU when device is stopped,
because scattered_rx will be re-configured during next port start
and driver may enable scattered receive according new MTU value.

After this patch, driver may select different receive function
automatically after MTU set, according MTU values selected.

Fixes: a5aeb2b9e225 ("net/igc: support Rx and Tx")
Cc: stable@dpdk.org
Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
3 years agonet/ice: fix VLAN filter with PF
Alvin Zhang [Fri, 19 Feb 2021 05:13:46 +0000 (13:13 +0800)]
net/ice: fix VLAN filter with PF

The macro flag DEV_RX_OFFLOAD_VLAN_FILTER is used to enable/disable
Rx VLAN filter, but not Tx VLAN filter. Therefore, Tx VLAN filter
should not be enabled/disabled in function ice_vsi_config_vlan_filter
called after checking DEV_RX_OFFLOAD_VLAN_FILTER flag.

In addition, the kernel driver doesn't enable/disable the TX VLAN
filter in the similar function ice_cfg_vlan_pruning.

This patch removes the setting about the TX VLAN filter in function
ice_vsi_config_vlan_filter.

Fixes: e0dcf94a0d7f ("net/ice: support VLAN ops")
Cc: stable@dpdk.org
Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Tested-by: Zhimin Huang <zhiminx.huang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
3 years agoethdev: document generic modify flow action
Alexander Kozyrev [Wed, 3 Mar 2021 22:19:04 +0000 (22:19 +0000)]
ethdev: document generic modify flow action

Field IDs for the MODIFY_FIELD action lack doxygen comments
and not visible in online DPDK documentation because of that.
Provide a meaningful description for every Field ID for the
rte_flow_field_id enumeration.

Fixes: 73b68f4c54a0 ("ethdev: introduce generic modify flow action")
Cc: stable@dpdk.org
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/ring: support secondary process
Ferruh Yigit [Wed, 30 Sep 2020 11:02:40 +0000 (12:02 +0100)]
net/ring: support secondary process

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
3 years agoapp/testpmd: support forced ethernet speed
Ajit Khaparde [Fri, 5 Mar 2021 19:42:32 +0000 (11:42 -0800)]
app/testpmd: support forced ethernet speed

Add support for forced ethernet speed setting.
Currently testpmd tries to configure the Ethernet port in autoneg mode.
It is not possible to set the Ethernet port to a specific speed while
starting testpmd. In some cases capability to configure a forced speed
for the Ethernet port during initialization may be necessary. This patch
tries to add this support.

The patch assumes full duplex setting and does not attempt to change that.
So speeds like 10M, 100M are not configurable using this method.

The command line to configure a forced speed of 10G:
dpdk-testpmd -c 0xff  -- -i  --eth-link-speed  10000

The command line to configure a forced speed of 50G:
dpdk-testpmd -c 0xff  -- -i  --eth-link-speed  50000

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agodoc: update release notes for dpaax
Hemant Agrawal [Fri, 5 Mar 2021 05:36:14 +0000 (11:06 +0530)]
doc: update release notes for dpaax

This patch updates the release notes for recently submitted changes.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agonet/txgbe: fix adding crypto SA
Jiawen Wu [Fri, 5 Mar 2021 02:14:38 +0000 (10:14 +0800)]
net/txgbe: fix adding crypto SA

By register definition, Ipsec Rx IPv4 address should to be written
in the reg(0).

Fixes: 07cafb2adbc5 ("net/txgbe: add security session create operation")
Cc: stable@dpdk.org
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
3 years agonet/txgbe: update packet type
Jiawen Wu [Fri, 5 Mar 2021 02:14:37 +0000 (10:14 +0800)]
net/txgbe: update packet type

Update the packet type lookup table according to the HW design.
Fix the bug that inner L3 and L4 type can not be parsed when
QINQ insert in tunnel packet.

Fixes: 9e30b88f60b2 ("net/txgbe: support packet type")
Cc: stable@dpdk.org
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
3 years agonet/txgbe: fix Rx missed packet counter
Jiawen Wu [Fri, 5 Mar 2021 02:14:36 +0000 (10:14 +0800)]
net/txgbe: fix Rx missed packet counter

Add the Rx dropped packet counter into stats->imissed, to ensure the
stats correct.

Fixes: c9bb590d4295 ("net/txgbe: support device statistics")
Cc: stable@dpdk.org
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
3 years agonet/txgbe: remove unused functions
Jiawen Wu [Fri, 5 Mar 2021 02:14:35 +0000 (10:14 +0800)]
net/txgbe: remove unused functions

Remove unused functions for EEPROM read and write.

Fixes: 35c90ecccfd4 ("net/txgbe: add EEPROM functions")
Cc: stable@dpdk.org
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
3 years agonet/bonding: fix LACP system address check
Vadim Podovinnikov [Wed, 17 Feb 2021 16:26:55 +0000 (16:26 +0000)]
net/bonding: fix LACP system address check

In bond (LACP) we have several NICs (ports), when we have negotiation
with peer about what port we prefer, we send information about what
system we preferred in partner system name field. Peer also sends us
what partner system name it prefer.

When we receive a message from it we must compare its preferred system
name with our system name, but not with our port mac address

In my test I have several problems with that:
1. If master port (mac address same as system address) shuts down (I
   have two ports) I loose connection
2. If secondary port (mac address not same as system address) receives
   message before master port, my connection is not established.

Fixes: 56cbc0817399 ("net/bonding: fix LACP negotiation")
Cc: stable@dpdk.org
Signed-off-by: Vadim Podovinnikov <podovinnikov@protei.ru>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
3 years agonet/hns3: fix imprecise statistics
Chengchang Tang [Thu, 4 Mar 2021 07:44:54 +0000 (15:44 +0800)]
net/hns3: fix imprecise statistics

Currently, the hns3 statistics may be inaccurate due to the
following two problems:

1. Queue-level statistics are read from the firmware, and only one Rx or
   Tx can be read at a time. This results in a large time interval
   between reading multiple queues statistics in a stress scenario, such
   as 1280 queues used by a PF or 256 functions used at the same time.
   Especially when the 256 functions are used at the same time, the
   interval between every two firmware commands in a function can be
   huge, because the scheduling mechanism of the firmware is similar to
   RR.

2. The current statistics are read by type. The HW statistics are read
   first, and then the software statistics are read. Due to preceding
   reasons, HW reading may be time-consuming, which cause a
   synchronization problem between SW and HW statistics of the same
   queue.

In this patch, queue-level statistics are directly read from the bar
instead of the firmware, and all the statistics of a queue include HW
and SW are read at a time to reduce inconsistency.

Fixes: 8839c5e202f3 ("net/hns3: support device stats")
Cc: stable@dpdk.org
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
3 years agonet/hns3: process MAC interrupt
Hongbo Zheng [Thu, 4 Mar 2021 07:44:53 +0000 (15:44 +0800)]
net/hns3: process MAC interrupt

TNL is the abbreviation of tunnel, which means port
here. MAC TNL interrupt indicates the MAC status
report of the network port, which will be generated
when the MAC status changes.

This patch enables MAC TNL interrupt reporting, and
queries and prints the corresponding MAC status when
the interrupt is received, then clear the MAC interrupt
status. Because this interrupt uses the same interrupt
as RAS, the interrupt log is adjusted.

Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
3 years agonet/hns3: fix mbuf leakage
Huisong Li [Thu, 4 Mar 2021 07:44:52 +0000 (15:44 +0800)]
net/hns3: fix mbuf leakage

The mbufs of rx queue will be allocated in "hns3_do_start" function.
But these mbufs are not released when "hns3_dev_start" executes
failed.

Fixes: c4ae39b2cfc5 ("net/hns3: fix Rx interrupt after reset")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
3 years agonet/hns3: remove unused parameter markers
Huisong Li [Thu, 4 Mar 2021 07:44:51 +0000 (15:44 +0800)]
net/hns3: remove unused parameter markers

All input parameters in the "hns3_dev_xstats_get_by_id" API are used,
so the rte_unused flag of some variables should be deleted.

Fixes: 3213d584b698 ("net/hns3: fix xstats with id and names")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
3 years agonet/hns3: fix HW buffer size on MTU update
Chengchang Tang [Thu, 4 Mar 2021 07:44:50 +0000 (15:44 +0800)]
net/hns3: fix HW buffer size on MTU update

After MTU changed, the buffer used to store packets in HW should be
reallocated. And buffer size is allocated based on the maximum frame
size in the PF struct. However, the value of maximum frame size  is
not updated in time when MTU is changed. This would lead to a packet
loss for not enough buffer.

This patch update the maximum frame size before reallocating the HW
buffer. And a rollback operation is added to avoid the side effects
of buffer reallocation failures.

Fixes: 1f5ca0b460cd ("net/hns3: support some device operations")
Fixes: d51867db65c1 ("net/hns3: add initialization")
Cc: stable@dpdk.org
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
3 years agonet/hns3: support Rx descriptor advanced layout
Chengwen Feng [Thu, 4 Mar 2021 07:44:49 +0000 (15:44 +0800)]
net/hns3: support Rx descriptor advanced layout

Currently, the driver get packet type by parse the
L3_ID/L4_ID/OL3_ID/OL4_ID from Rx descriptor and then lookup multiple
tables, it's time consuming.

Now Kunpeng930 support advanced RXD layout, which:
1. Combine OL3_ID/OL4_ID to 8bit PTYPE filed, so the driver get packet
   type by lookup only one table.  Note: L3_ID/L4_ID become reserved
   fields.
2. The 1588 timestamp located at Rx descriptor instead of query from
   firmware.
3. The L3E/L4E/OL3E/OL4E will be zero when L3L4P is zero, so driver
   could optimize the good checksum calculations (when L3E/L4E is zero
   then mark PKT_RX_IP_CKSUM_GOOD/PKT_RX_L4_CKSUM_GOOD).

Considering compatibility, the firmware will report capability of
RXD advanced layout, the driver will identify and enable it by default.

This patch only provides basic function: identify and enable the RXD
advanced layout, and lookup ptype table if supported.

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
3 years agonet/hns3: support PF device with copper PHYs
Huisong Li [Thu, 4 Mar 2021 07:44:48 +0000 (15:44 +0800)]
net/hns3: support PF device with copper PHYs

The normal operation of devices with copper phys depends on the
initialization and configuration of the PHY chip. The task of
driving the PHY chip is implemented in some firmware versions.
If firmware supports the phy driver, it will report a capability
flag to driver in probing process. The driver determines whether
to support PF device with copper phys based on the capability bit.
If supported, the driver set a flag indicating that the firmware
takes over the PHY, and then the firmware initializes the PHY.

This patch supports the query of link status and link info, and
existing basic features for PF device with copper phys.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
3 years agonet/hns3: fix device capabilities for copper media type
Huisong Li [Thu, 4 Mar 2021 07:44:47 +0000 (15:44 +0800)]
net/hns3: fix device capabilities for copper media type

The configuration operation for PHY is implemented by firmware. And
a capability flag will be report to driver, which means the firmware
supports the PHY driver.  However, the current implementation only
supports obtaining the capability bit, but some basic functions of
copper ports in driver, such as, the query of link status and link
info, are not supported.

Therefore, it is necessary for driver to set the copper capability
bit to zero when the firmware supports the configuration of the PHY.

Fixes: 438752358158 ("net/hns3: get device capability from firmware")
Fixes: 95e50325864c ("net/hns3: support copper media type")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
3 years agonet/hns3: encapsulate port shaping interface
Huisong Li [Thu, 4 Mar 2021 07:44:46 +0000 (15:44 +0800)]
net/hns3: encapsulate port shaping interface

When rate of port changes, the rate limit of the port needs to
be updated. So it is necessary to encapsulate an interface that
configures the rate limit based on the rate.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
3 years agonet/hns3: add imissed packet stats
Min Hu (Connor) [Thu, 4 Mar 2021 07:44:45 +0000 (15:44 +0800)]
net/hns3: add imissed packet stats

This patch implement Rx imissed stats by querying cmdq.

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
3 years agonet/hns3: add bytes stats
Min Hu (Connor) [Thu, 4 Mar 2021 07:44:44 +0000 (15:44 +0800)]
net/hns3: add bytes stats

In current HNS3 PMD, Rx/Tx bytes from packet stats are not
implemented.

This patch implemented Rx/Tx bytes using soft counters.

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
3 years agonet/hns3: implement Tx mbuf free on demand
Chengwen Feng [Thu, 4 Mar 2021 07:44:43 +0000 (15:44 +0800)]
net/hns3: implement Tx mbuf free on demand

This patch add support tx_done_cleanup ops, which could support for
the API rte_eth_tx_done_cleanup to free consumed mbufs on Tx ring.

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
3 years agonet/hns3: add more registers to dump
Chengchang Tang [Thu, 4 Mar 2021 07:44:42 +0000 (15:44 +0800)]
net/hns3: add more registers to dump

This patch makes more registers dumped in the dump_reg API to help
locate the fault.

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
3 years agonet/hns3: support module EEPROM dump
Chengchang Tang [Thu, 4 Mar 2021 07:44:41 +0000 (15:44 +0800)]
net/hns3: support module EEPROM dump

This patch add support for dumping module EEPROM.

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
3 years agonet/mlx5: fix imissed statistics
Matan Azrad [Thu, 25 Feb 2021 10:45:01 +0000 (10:45 +0000)]
net/mlx5: fix imissed statistics

The imissed port statistic counts packets that were dropped by the
device Rx queues.

In mlx5, the imissed counter summarizes 2 counters:
- packets dropped by the SW queue handling counted by SW.
- packets dropped by the HW queues due to "out of buffer" events
  detected when no SW buffer is available for the incoming
  packets.

There is HW counter object that should be created per device, and all
the Rx queues should be assigned to this counter in configuration time.

This part was missed when the Rx queues were created by DevX what
remained the "out of buffer" counter clean forever in this case.

Add 2 options to assign the DevX Rx queues to queue counter:
- Create queue counter per device by DevX and assign all the
  queues to it.
- Query the kernel counter and assign all the queues to it.

Use the first option by default and if it is failed, fallback to the
second option.

Fixes: e79c9be91515 ("net/mlx5: support Rx hairpin queues")
Fixes: dc9ceff73c99 ("net/mlx5: create advanced RxQ via DevX")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
3 years agocommon/mlx5: add DevX commands for queue counters
Matan Azrad [Thu, 25 Feb 2021 10:45:00 +0000 (10:45 +0000)]
common/mlx5: add DevX commands for queue counters

A queue counter set is an HW object that can be assigned to any RQ\QP
and it counts HW events on the assigned QPs\RQs.

Add DevX API to allocate and query queue counter set object.

The only used counter event is the "out of buffer" where the queue
drops packets when no SW buffer is available to receive it.

Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
3 years agocommon/mlx5: add DevX command to query WQ
Matan Azrad [Thu, 25 Feb 2021 10:44:59 +0000 (10:44 +0000)]
common/mlx5: add DevX command to query WQ

Add a DevX command to query Rx queues attributes created by VERBS.

Currently support only counter_set_id attribute.

This counter ID is managed by the kernel driver and being assigned to
any queue created by the kernel.

Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
3 years agocommon/mlx5/linux: add glue function to query WQ
Matan Azrad [Thu, 25 Feb 2021 10:44:58 +0000 (10:44 +0000)]
common/mlx5/linux: add glue function to query WQ

When Rx queue is created by VERBS API ibv_create_wq there is a dedicated
rdma-core API to query an information about this WQ(Work Queue).

VERBS WQ querying is needed for PMD cases which combine VERBS objects
with DevX objects.

Next feature to use this glue function is the HW queue counters.

Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
3 years agonet/pcap: fix file descriptor leak on close
Tengfei Zhang [Tue, 2 Mar 2021 16:51:30 +0000 (16:51 +0000)]
net/pcap: fix file descriptor leak on close

pcap fd was opend when vdev probed,
but not closed when vdev removed.

Fixes: c956caa6eabf ("pcap: support port hotplug")
Cc: stable@dpdk.org
Signed-off-by: Tengfei Zhang <zypscode@outlook.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/bnxt: refactor HWRM ring allocation routine
Somnath Kotur [Fri, 19 Feb 2021 09:28:03 +0000 (14:58 +0530)]
net/bnxt: refactor HWRM ring allocation routine

bnxt_alloc_hwrm_rings() was duplicating a snippet of code that was
already present in bnxt_alloc_hwrm_rx_ring() with just one line/function
invocation missing. Add that line and replace the snippet of code
with a call to bnxt_hwrm_alloc_rx_ring

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
3 years agonet/bnxt: fix Rx queue count
Lance Richardson [Thu, 18 Feb 2021 18:19:20 +0000 (13:19 -0500)]
net/bnxt: fix Rx queue count

bnxt_rx_queue_count_op() incorrectly returns the number of
filled but unprocessed completion queue entries instead of
the number of filled but unprocessed received packet
completions. Fix by properly accounting for the number of
completion ring entries used by the various received packet
completion types.

Fixes: 34c0ba839bae ("net/bnxt: fix Rx queue count")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
3 years agonet/mlx5: fix UAR allocation diagnostics messages
Viacheslav Ovsiienko [Wed, 24 Feb 2021 08:17:35 +0000 (10:17 +0200)]
net/mlx5: fix UAR allocation diagnostics messages

Depending on kernel capabilities and rdma-core version the mapping
of UAR (User Access Region) of desired memory caching type (non-cached
or write combining) might fail. The PMD implements the flexible
strategy of UAR mapping, alternating the type of caching to succeed.
During this process the failure diagnostics messages are emitted.
These messages are merely diagnostics ones and the logging level
should be adjusted to DEBUG.

Fixes: a0bfe9d56f74 ("net/mlx5: fix UAR memory mapping type")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
3 years agonet/mlx5: fix hashed list size for tunnel flow groups
Viacheslav Ovsiienko [Wed, 24 Feb 2021 08:15:14 +0000 (10:15 +0200)]
net/mlx5: fix hashed list size for tunnel flow groups

The hashed list size must be the power of 2, otherwise the
adjustment is applied and the warning message is emitted.
This patch provides the correct list size to eliminate the
warning.

Fixes: 4ec6360de37d ("net/mlx5: implement tunnel offload")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
3 years agonet/pcap: fix format string
Dmitry Kozlyuk [Sun, 14 Feb 2021 02:16:12 +0000 (05:16 +0300)]
net/pcap: fix format string

Use PRIu32 for uint32_t (found by -Wformat with Clang on Windows).

Fixes: a3f5252e5cbd ("net/pcap: enable infinitely Rx a pcap file")
Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agombuf: rename outer IP checksum macro
Lance Richardson [Thu, 25 Feb 2021 14:31:47 +0000 (09:31 -0500)]
mbuf: rename outer IP checksum macro

Rename PKT_RX_EIP_CKSUM_BAD to PKT_RX_OUTER_IP_CKSUM_BAD and
deprecate the original name. The new name is better aligned
with existing PKT_RX_OUTER_* flags, which should help reduce
confusion about its use.

Suggested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
3 years agonet/af_xdp: fix error handling during Rx queue setup
Ciara Loftus [Mon, 1 Mar 2021 10:34:13 +0000 (10:34 +0000)]
net/af_xdp: fix error handling during Rx queue setup

Prior to this commit, if rte_pktmbuf_alloc_bullk failed during rx queue
setup the error was not returned to the user and they may incorrectly
assume that the rx queue had been successfully set up. This commit ensures
that the error is returned to the user.

Bugzilla ID: 643
Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks")
Cc: stable@dpdk.org
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
3 years agonet/sfc: fix buffer size for flow parse
Ivan Malov [Fri, 26 Feb 2021 14:10:23 +0000 (17:10 +0300)]
net/sfc: fix buffer size for flow parse

Pass the size of the buffer where the item's mask
is stored and not the indirection pointer size.

Coverity issue: 363735
Fixes: dadff137931c ("net/sfc: support encap flow items in transfer rules")
Cc: stable@dpdk.org
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
3 years agonet/txgbe: reuse some PF Rx/Tx features for VF
Jiawen Wu [Thu, 25 Feb 2021 08:09:00 +0000 (16:09 +0800)]
net/txgbe: reuse some PF Rx/Tx features for VF

Some Rx/Tx operations like queue setup and release, packet type get, and
Tx done cleanup have been supported on PF device. There are ops
functions directly added.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
3 years agonet/txgbe: support VF start and stop
Jiawen Wu [Thu, 25 Feb 2021 08:08:59 +0000 (16:08 +0800)]
net/txgbe: support VF start and stop

Add support to start, stop and reset VF device.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
3 years agonet/txgbe: support VF register dump
Jiawen Wu [Thu, 25 Feb 2021 08:08:58 +0000 (16:08 +0800)]
net/txgbe: support VF register dump

Add support to dump registers for VF.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
3 years agonet/txgbe: support VF MTU update
Jiawen Wu [Thu, 25 Feb 2021 08:08:57 +0000 (16:08 +0800)]
net/txgbe: support VF MTU update

Add MTU set operation for VF device.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
3 years agonet/txgbe: support VF multicast MAC filter
Jiawen Wu [Thu, 25 Feb 2021 08:08:56 +0000 (16:08 +0800)]
net/txgbe: support VF multicast MAC filter

Add multicast MAC filter support for VF driver.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
3 years agonet/txgbe: support VF promiscuous and allmulticast
Jiawen Wu [Thu, 25 Feb 2021 08:08:55 +0000 (16:08 +0800)]
net/txgbe: support VF promiscuous and allmulticast

Support to enable and disable promiscuous and allmulticast mode on VF
device.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
3 years agonet/txgbe: support VF RSS
Jiawen Wu [Thu, 25 Feb 2021 08:08:54 +0000 (16:08 +0800)]
net/txgbe: support VF RSS

Support RSS hash and RETA operations for VF device.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
3 years agonet/txgbe: support VF VLAN
Jiawen Wu [Thu, 25 Feb 2021 08:08:53 +0000 (16:08 +0800)]
net/txgbe: support VF VLAN

Add VLAN filter, offload and strip set support to VF driver.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
3 years agonet/txgbe: support VF stats and xstats
Jiawen Wu [Thu, 25 Feb 2021 08:08:52 +0000 (16:08 +0800)]
net/txgbe: support VF stats and xstats

Add VF device stats and extended stats get from reading hardware
registers.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
3 years agonet/txgbe: support VF Rx/Tx
Jiawen Wu [Thu, 25 Feb 2021 08:08:51 +0000 (16:08 +0800)]
net/txgbe: support VF Rx/Tx

Configure VF device with RX port. Initialize receive and transmit unit,
set the receive and transmit functions. And support to check the
status of RX and TX descriptors.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
3 years agonet/txgbe: support VF get link status
Jiawen Wu [Thu, 25 Feb 2021 08:08:50 +0000 (16:08 +0800)]
net/txgbe: support VF get link status

Add support to get link speed, duplex mode and state of VF device.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
3 years agonet/txgbe: support VF interrupt
Jiawen Wu [Thu, 25 Feb 2021 08:08:49 +0000 (16:08 +0800)]
net/txgbe: support VF interrupt

Add VF device interrupt handler, support to enable and disable RX queue
interrupt, and configure MSI-X interrupt.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
3 years agonet/txgbe: support VF get information
Jiawen Wu [Thu, 25 Feb 2021 08:08:48 +0000 (16:08 +0800)]
net/txgbe: support VF get information

Add information get operation for VF device.
RX and TX offload capabilities are same as the PF device.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
3 years agonet/txgbe: support VF MAC address
Jiawen Wu [Thu, 25 Feb 2021 08:08:47 +0000 (16:08 +0800)]
net/txgbe: support VF MAC address

Generate a random MAC address if none was assigned by PF during
the initialization of VF device. And support to add and remove
MAC address.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
3 years agonet/txgbe: add VF base code
Jiawen Wu [Thu, 25 Feb 2021 08:08:46 +0000 (16:08 +0800)]
net/txgbe: add VF base code

Implement VF device init and uninit function with hardware operations,
and negotiate with PF in mailbox.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
3 years agonet/txgbe: support VF probe and remove
Jiawen Wu [Thu, 25 Feb 2021 08:08:45 +0000 (16:08 +0800)]
net/txgbe: support VF probe and remove

Introduce virtual function driver in txgbe PMD,
add simple init and uninit function to probe and remove the device.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
3 years agoapp/testpmd: remove unnecessary UDP tunnel check
Xiaoyun Li [Thu, 18 Feb 2021 03:06:10 +0000 (11:06 +0800)]
app/testpmd: remove unnecessary UDP tunnel check

cmd_tunnel_udp_config checked 'cmd' to set prot_type but this cmd is
only for rx_vxlan_port. The unnecessary cmd check will cause uninit
coverity issue. So remove it and rename 'cmd' to 'rx_vxlan_port'.

Coverity issue: 366155
Fixes: bd948f20d609 ("app/testpmd: VXLAN packet identification")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/ionic: fix completion type in lif init
Andrew Boyer [Tue, 16 Feb 2021 20:35:40 +0000 (12:35 -0800)]
net/ionic: fix completion type in lif init

The completion type was wrong.
Don't check the completion if the wait timed out.

Fixes: 669c8de67c88 ("net/ionic: support basic LIF")
Cc: stable@dpdk.org
Signed-off-by: Andrew Boyer <aboyer@pensando.io>
3 years agonet/ionic: store Tx fragment limit in queue
Andrew Boyer [Tue, 16 Feb 2021 20:35:39 +0000 (12:35 -0800)]
net/ionic: store Tx fragment limit in queue

A future patch will allow Tx scatter/gather to be disabled. Store the
value in the queue so it can be changed at runtime based on the
configuration.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
3 years agonet/ionic: send as many packets as possible
Andrew Boyer [Tue, 16 Feb 2021 20:35:38 +0000 (12:35 -0800)]
net/ionic: send as many packets as possible

Rather than dropping the whole burst if some don't fit.
This improves performance.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Signed-off-by: Vishwas Danivas <vishwas@pensando.io>
3 years agonet/ionic: ring doorbell once at the end of each burst
Andrew Boyer [Tue, 16 Feb 2021 20:35:37 +0000 (12:35 -0800)]
net/ionic: ring doorbell once at the end of each burst

This improves performance.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
3 years agonet/ionic: break up queue post function
Andrew Boyer [Tue, 16 Feb 2021 20:35:36 +0000 (12:35 -0800)]
net/ionic: break up queue post function

Break it up rather than inlining it, so that we can remove
branches from the hot path.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
3 years agonet/ionic: log queue counters when tearing down
Andrew Boyer [Tue, 16 Feb 2021 20:35:35 +0000 (12:35 -0800)]
net/ionic: log queue counters when tearing down

This improves debuggability.

To see the logs, use EAL arg: --log-level=pmd.net.ionic,debug

While here, stop counting fragments, but start counting mtods.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
3 years agonet/ionic: use socket id passed in for Rx and Tx queues
Andrew Boyer [Tue, 16 Feb 2021 20:35:34 +0000 (12:35 -0800)]
net/ionic: use socket id passed in for Rx and Tx queues

Pipe the value from the queue setup routines through to
ionic_qcq_alloc().

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
3 years agonet/ionic: split up queue-completion queue structure
Andrew Boyer [Tue, 16 Feb 2021 20:35:33 +0000 (12:35 -0800)]
net/ionic: split up queue-completion queue structure

Create a unique Q-CQ struct for adminq, notifyq, rxq, and txq to
reduce the size of each object.

Minimize the size of each field to squeeze into as few cachelines
as possible.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
3 years agonet/ionic: cut down queue structure
Andrew Boyer [Tue, 16 Feb 2021 20:35:32 +0000 (12:35 -0800)]
net/ionic: cut down queue structure

This will conserve resources.

Rename ionic_qcq_alloc() arg from 'base' to 'type_name' for clarity.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
3 years agonet/ionic: remove unused interrupt free function
Andrew Boyer [Tue, 16 Feb 2021 20:35:31 +0000 (12:35 -0800)]
net/ionic: remove unused interrupt free function

This will conserve resources.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
3 years agonet/ionic: remove unused field from queue structure
Andrew Boyer [Tue, 16 Feb 2021 20:35:30 +0000 (12:35 -0800)]
net/ionic: remove unused field from queue structure

This will conserve resources.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
3 years agonet/ionic: convert info array to generic pointers
Andrew Boyer [Tue, 16 Feb 2021 20:35:29 +0000 (12:35 -0800)]
net/ionic: convert info array to generic pointers

Drop the callback part of the object and store only the pointers.
This saves a bit of space and simplifies the code.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
3 years agonet/ionic: consolidate adminq code
Andrew Boyer [Tue, 16 Feb 2021 20:35:28 +0000 (12:35 -0800)]
net/ionic: consolidate adminq code

The adminq is the only caller of ionic_q_service(), so absorb it
into ionic_adminq_service().
Move all of the adminq code together into ionic_main.c.
Staticize a few things.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
3 years agonet/ionic: remove unused filter delete function
Andrew Boyer [Tue, 16 Feb 2021 20:35:27 +0000 (12:35 -0800)]
net/ionic: remove unused filter delete function

This function is unused.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
3 years agonet/ionic: cut down completion queue structure
Andrew Boyer [Tue, 16 Feb 2021 20:35:26 +0000 (12:35 -0800)]
net/ionic: cut down completion queue structure

Add Q_NEXT_TO_POST() and Q_NEXT_TO_SRVC() macros.
Use a precomputed size mask.

This will conserve resources.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
3 years agonet/dpaa: support Rx buffer size
Hemant Agrawal [Wed, 24 Feb 2021 12:43:11 +0000 (18:13 +0530)]
net/dpaa: support Rx buffer size

This patch adds Rx buf size support in rxq info for dpaa.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agonet/dpaa2: support Rx buffer size
Hemant Agrawal [Wed, 24 Feb 2021 12:43:10 +0000 (18:13 +0530)]
net/dpaa2: support Rx buffer size

This patch adds RX buf size support in queue info

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agobus/dpaa: enhance checks for bus and device detection
Hemant Agrawal [Wed, 24 Feb 2021 12:43:09 +0000 (18:13 +0530)]
bus/dpaa: enhance checks for bus and device detection

1. It is not a error if no network device available. One can
only use crypto device
2. Improve logging for failure in detecting the bus

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agobus/dpaa: support shared MAC interface
Nipun Gupta [Wed, 24 Feb 2021 12:43:08 +0000 (18:13 +0530)]
bus/dpaa: support shared MAC interface

DPAA can share an interface on classification criteria with kernel.

This patch enables default kernel driver to be used as a shared MAC
interface with DPDK interface. (provided that VSP is enabled on that
interface.)

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agobus/dpaa: support secondary process init
Hemant Agrawal [Wed, 24 Feb 2021 12:43:07 +0000 (18:13 +0530)]
bus/dpaa: support secondary process init

Secondary process also need the access the qman and bman
ccsr map.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agonet/dpaa: prevent multiple mempool config
Nipun Gupta [Wed, 24 Feb 2021 12:43:06 +0000 (18:13 +0530)]
net/dpaa: prevent multiple mempool config

The current driver only support single buffer pool on a given
PMD instance. Return error, if trying to configure more.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agonet/dpaa: do not release CGR ranges
Nipun Gupta [Wed, 24 Feb 2021 12:43:05 +0000 (18:13 +0530)]
net/dpaa: do not release CGR ranges

CGR are automatically freed up in the kernel. As we do not cleanup
the queues, if we release the CGR here, kernel reports them in use.
So have them freed up in the kernel.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agomempool/dpaa2: support stats for secondary process
Hemant Agrawal [Wed, 24 Feb 2021 12:43:04 +0000 (18:13 +0530)]
mempool/dpaa2: support stats for secondary process

DPAA2 DPBP object access need availability of MCP object
pointer. In case of secondary process, we need to use local
MCP pointer instead of primary process.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agonet/dpaa2: change Tx queue congestion settings
Hemant Agrawal [Wed, 24 Feb 2021 12:43:03 +0000 (18:13 +0530)]
net/dpaa2: change Tx queue congestion settings

Change the Tx queue congestion notification to
the ratio of current queue size instead of fixed.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agonet/dpaa2: enable error queues optionally
Nipun Gupta [Wed, 24 Feb 2021 12:43:02 +0000 (18:13 +0530)]
net/dpaa2: enable error queues optionally

In case error packets are received by the Ethernet interface,
this patch enables receiving packets on the error queue,
printing the error and the error packet.

To enable, use the dev_arg as : fslmc:dpni.1,drv_error_queue=1

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agonet/dpaa2: support optional Tx confirmation
Hemant Agrawal [Wed, 24 Feb 2021 12:43:01 +0000 (18:13 +0530)]
net/dpaa2: support optional Tx confirmation

Add support for dev arg ``fslmc:dpni.1,drv_tx_conf=1``

It is optional for dpaa2 to use TX confirmation. DPAA2
can free the transmitted packets. However some use-case
requires the TX confirmation to be explicit.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agonet/dpaa2: do not drop parse error packets by dpdmux
Hemant Agrawal [Wed, 24 Feb 2021 12:43:00 +0000 (18:13 +0530)]
net/dpaa2: do not drop parse error packets by dpdmux

DPDMUX should not drop parse error packets. They shall
be left to the decision of the connected DPNI interfaces

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agonet/dpaa2: skip resetting dpdmux
Apeksha Gupta [Wed, 24 Feb 2021 12:42:59 +0000 (18:12 +0530)]
net/dpaa2: skip resetting dpdmux

This is require as the interface is shared with Linux and we do not want
the dpdmux to be reset. Rather the default interface to kernel shall
continue.
command dpdmux_set_resetable is used to skip DPDMUX reset.

By default the DPDMUX_RESET command will reset the DPDMUX completely,
dpdmux_set_resetable command will be ignored in old MC firmware.

Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agonet/dpaa2: support raw pattern in dpdmux
Akhil Goyal [Wed, 24 Feb 2021 12:42:58 +0000 (18:12 +0530)]
net/dpaa2: support raw pattern in dpdmux

Added support for flow raw pattern and check that the call
for dpdmux_set_custom_key() which should be called
only once for a particular DPDMUX as all previous rules
will be erased with this call.
Hence calling it for the first time only.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agonet/dpaa2: support configuring dpdmux max Rx frame length
Hemant Agrawal [Wed, 24 Feb 2021 12:42:57 +0000 (18:12 +0530)]
net/dpaa2: support configuring dpdmux max Rx frame length

This patch introduce a new PMD API, which can help the applications
to configure the max frame length for a given dpdmux interface

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agonet/dpaa2: support traffic management
Gagandeep Singh [Wed, 24 Feb 2021 12:42:56 +0000 (18:12 +0530)]
net/dpaa2: support traffic management

Add basic support for scheduling and shaping on dpaa2
platform.

HW supports 2 level of scheduling and shaping.
However the current patch only support single level.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agonet/dpaa: support external buffers in Tx
Hemant Agrawal [Wed, 24 Feb 2021 12:42:55 +0000 (18:12 +0530)]
net/dpaa: support external buffers in Tx

This patch support tx of external buffers

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agonet/dpaa2: support external buffers in Tx
Nipun Gupta [Wed, 24 Feb 2021 12:42:54 +0000 (18:12 +0530)]
net/dpaa2: support external buffers in Tx

This patch support Tx of external allocated buffers.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Signed-off-by: Sachin Saxena <sachin.saxena@oss.nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agonet/dpaa2: allocate SGT from first segment
Hemant Agrawal [Wed, 24 Feb 2021 12:42:53 +0000 (18:12 +0530)]
net/dpaa2: allocate SGT from first segment

This patch enables support to use the first segment
headroom to build the HW required Scatter Gather
Table. (if space is available).
This will avoid 1 less buffer for SG buffer creation.

Signed-off-by: Sachin Saxena <sachin.saxena@oss.nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agonet/dpaa: fix getting link status
Rohit Raj [Wed, 24 Feb 2021 12:42:52 +0000 (18:12 +0530)]
net/dpaa: fix getting link status

According to DPDK Documentation, rte_eth_link_get API can wait up to 9
seconds for auto-negotiation to finish and then returns link status.

In current implementation of rte_eth_link_get API in DPAA drivers, it
was not waiting for auto negotiation to finish and was returning link
status DOWN
It can cause issues with DPDK applications which relies
on rte_eth_link_get API for link statusand does not support link status
interrupt.

This patch fixes this bug by adding wait for up to 9 seconds for auto
negotiation to finish.

Fixes: 2aa10990a8dd ("bus/dpaa: enable link state interrupt")
Cc: stable@dpdk.org
Signed-off-by: Rohit Raj <rohit.raj@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agonet/dpaa2: fix getting link status
Rohit Raj [Wed, 24 Feb 2021 12:42:51 +0000 (18:12 +0530)]
net/dpaa2: fix getting link status

According to DPDK Documentation, rte_eth_link_get API can wait up to 9
seconds for auto-negotiation to finish and then returns link status.

In current implementation of rte_eth_link_get API in DPAA2 drivers, it
was not waiting for auto negotiation to finish and was returning link
status DOWN
It can cause issues with DPDK applications which relies on
rte_eth_link_get API for link status and does not support link status
interrupt.
Similar kind of issue was seen in TRex Application.

This patch fixes this bug by adding wait for up to 9 seconds for auto
negotiation to finish.

Fixes: c56c86ff87c1 ("net/dpaa2: update link status")
Cc: stable@dpdk.org
Signed-off-by: Rohit Raj <rohit.raj@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agobus/dpaa: fix statistics reading
Nipun Gupta [Wed, 24 Feb 2021 12:42:50 +0000 (18:12 +0530)]
bus/dpaa: fix statistics reading

Reading of word un-aligned values after reading word aligned
values lead to corruption of memory.
This patch make changes such that word aligned access is made,
before making an un-aligned access

Fixes: 6d6b4f49a155 ("bus/dpaa: add FMAN hardware operations")
Cc: stable@dpdk.org
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agobus/fslmc: fix random portal hangs with qbman 5.0
Youri Querry [Wed, 24 Feb 2021 12:42:49 +0000 (18:12 +0530)]
bus/fslmc: fix random portal hangs with qbman 5.0

Random portal hangs observed on device with QBMAN 5.0

This fixes few random packet hang issues in event mode.
Few things fixed it.
1. Generally, pi == ci, no need for extra checks.
2. The proper initializations in init with ci

Fixes: 1b49352f41be ("bus/fslmc: rename portal pi index to consumer index")
Cc: stable@dpdk.org
Signed-off-by: Youri Querry <youri.querry_1@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agoapp/testpmd: remove duplicated offload display
Ferruh Yigit [Fri, 5 Feb 2021 14:26:50 +0000 (14:26 +0000)]
app/testpmd: remove duplicated offload display

"show port cap all|<port_id>" was to display offload configuration of
port(s).

But later two other commands added to show same information in more
accurate way:
 show port (port_id) rx_offload configuration
 show port (port_id) tx_offload configuration

These new commands can both show port and queue level configuration,
also with their capabilities counterparts easier to see offload
capability and configuration of the port in similar syntax.

So the functionality is duplicated and removing this version, to favor
the new commands.

Another problem with this command is it requires each new offload to be
added into the function to display them, and there were missing offloads
that are not displayed, this requirement for sure will create gaps by
time as new offloads added.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Lance Richardson <lance.richardson@broadcom.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
3 years agoapp/testpmd: count outer IP checksum errors
Lance Richardson [Fri, 29 Jan 2021 22:35:54 +0000 (17:35 -0500)]
app/testpmd: count outer IP checksum errors

Count and display outer IP checksum errors in the checksum
forwarder.

Example forwarder stats output:
  RX-packets: 158            RX-dropped: 0             RX-total: 158
  Bad-ipcsum: 48             Bad-l4csum: 48            Bad-outer-l4csum: 6
  Bad-outer-ipcsum: 40
  TX-packets: 0              TX-dropped: 0             TX-total: 0

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Acked-by: Wisam Jaddo <wisamm@nvidia.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/iavf: fix VLAN tag extraction handling
Haiyue Wang [Tue, 23 Feb 2021 03:10:58 +0000 (11:10 +0800)]
net/iavf: fix VLAN tag extraction handling

The new VIRTCHNL_VF_OFFLOAD_VLAN_V2 capability added support that allows
the PF to set the location of the RX VLAN tag for stripping offloads.

So the VF needs to extract the VLAN tag according to the location flags.

Fixes: 1c301e8c3cff ("net/iavf: support new VLAN capabilities")
Cc: stable@dpdk.org
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Tested-by: Wei Xie <weix.xie@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
3 years agonet/mlx5: fix metadata item validation for ingress flows
Viacheslav Ovsiienko [Wed, 10 Feb 2021 09:30:51 +0000 (11:30 +0200)]
net/mlx5: fix metadata item validation for ingress flows

In legacy metadata mode the metadata register B is engaged to
handle the metadata item. In the ingress domain the hardware
supports the register setting only, the match on register B
is not supported.

Due to this limitation only the SET_META action can be supported
for the ingress flows, the META item should be rejected on
flow validation.

Fixes: 5f3541724e08 ("net/mlx5: fix flow META item validation")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>