Commit Graph

17300 Commits

Author SHA1 Message Date
Bruce Richardson
ecb904cc45 build: fix warnings when running external commands
Meson 0.61.1 is giving warnings that the calls to run_command do not
always explicitly specify if the result is to be checked or not, i.e.
there is a missing "check" parameter. This is because the default
behaviour without the parameter is due to change in the future.

We can fix these warnings by explicitly adding into each call whether
the result should be checked by meson or not. This patch therefore
adds in "check: false" to each run_command call where the result is
being checked by the DPDK meson.build code afterwards, and adds in
"check: true" to any calls where the result is currently unchecked.

Bugzilla ID: 921
Cc: stable@dpdk.org

Reported-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
2022-02-02 15:44:12 +01:00
Feifei Wang
bf44442612 net/i40e: remove redundant reset operation
For free buffer operation in i40e vector path, it is unnecessary to
store 'NULL' into txep.mbuf. This is because when putting mbuf into Tx
queue, tx_tail is the sentinel. And when doing tx_free, tx_next_dd is
the sentinel. In all processes, mbuf==NULL is not a condition in check.
Thus reset of mbuf is unnecessary and can be omitted.

Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2022-01-28 07:56:20 +01:00
Xiaoyu Min
87b26522f7 net/mlx5: reject jump to root table
Currently root table as destination is not supported.
The jump action which finally be translated to underlying root table in
rdma-core should be rejected.

Fixes: f78f747f41 ("net/mlx5: allow jump to group lower than current")
Cc: stable@dpdk.org

Signed-off-by: Xiaoyu Min <jackmin@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2022-01-26 17:41:12 +01:00
Bing Zhao
b4a4159d4e common/mlx5: fix probing failure code
While probing the device with unsupported class, the process should
fail because no appropriate driver was found. After traversing all
the drivers, an error value should be returned for the case.

In the previous implementation, zero value indicating probing success
was wrongly returned.

Fixes: ad435d3204 ("common/mlx5: add bus-agnostic layer")
Cc: stable@dpdk.org

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2022-01-26 17:41:12 +01:00
Raja Zidane
082becbf1f net/mlx5: fix mark enabling for Rx
To optimize datapath, the mlx5 pmd checked for mark action on flow
creation, and flagged possible destination rxqs (through queue/RSS
actions), then it enabled the mark action logic only for flagged rxqs.

Mark action didn't work if no queue/rss action was in the same flow,
even when the user use multi-group logic to manage the flows.
So, if mark action is performed in group X and the packet is moved to
group Y > X when the packet is forwarded to Rx queues, SW did not get
the mark ID to the mbuf.

Flag Rx datapath to report mark action for any queue when the driver
detects the first mark action after dev_start operation.

Fixes: 8e61555657 ("net/mlx5: fix shared RSS and mark actions combination")
Cc: stable@dpdk.org

Signed-off-by: Raja Zidane <rzidane@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2022-01-26 17:41:11 +01:00
Dmitry Kozlyuk
2eb92b0fbb common/mlx5: fix MR lookup for non-contiguous mempool
Memory region (MR) lookup by address inside mempool MRs
was not accounting for the upper bound of an MR.
For mempools covered by multiple MRs this could return
a wrong MR LKey, typically resulting in an unrecoverable
TxQ failure:

    mlx5_net: Cannot change Tx QP state to INIT Invalid argument

Corresponding message from /var/log/dpdk_mlx5_port_X_txq_Y_index_Z*:

    Unexpected CQE error syndrome 0x04 CQN = 128 SQN = 4848
        wqe_counter = 0 wq_ci = 9 cq_ci = 122

This is likely to happen with --legacy-mem and IOVA-as-PA,
because EAL intentionally maps pages at non-adjacent PA
to non-adjacent VA in this mode, and MLX5 PMD works with VA.

Fixes: 690b2a88c2 ("common/mlx5: add mempool registration facilities")
Cc: stable@dpdk.org

Reported-by: Wang Yunjian <wangyunjian@huawei.com>
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2022-01-26 17:41:10 +01:00
Yunjian Wang
0f7438e6d4 net/virtio: fix uninitialized RSS key
This patch fixes an issue that uninitialized old_rss_key
is used for restoring the rss_key.

Coverity issue: 373866
Fixes: 0c9d662070 ("net/virtio: support RSS")
Cc: stable@dpdk.org

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
2022-01-27 06:11:47 +01:00
Yunjian Wang
6abf10a21b net/virtio-user: check FD flags getting failure
The function fcntl() could return errors,
the return value need to be checked.

Fixes: 6a84c37e39 ("net/virtio-user: add vhost-user adapter layer")
Cc: stable@dpdk.org

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
2022-01-27 06:08:59 +01:00
Harold Huang
edca47a1d9 net/virtio-user: fix resource leak on probing failure
When eth_virtio_dev_init is failed, the registered virtio user memory
event cb is not released and the backend created tap device is not
destroyed.  It would cause some residual tap device existed in the host
and creating a new vdev could be failed because the new virtio_user_dev
could use the same address pointer and register memory event cb to the
same address is not allowed.

Fixes: ca8326a943 ("net/virtio_user: fix error management during init")
Cc: stable@dpdk.org

Signed-off-by: Harold Huang <baymaxhuang@gmail.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
2022-01-27 06:02:57 +01:00
Andy Pei
527ec438eb vdpa/ifc: fix log info mismatch
Fix log info mismatch.

Fixes: a3f8150eac ("net/ifcvf: add ifcvf vDPA driver")
Cc: stable@dpdk.org

Signed-off-by: Andy Pei <andy.pei@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
2022-01-27 05:56:52 +01:00
Xueming Li
8a886e573a net/virtio: fix Tx queue 0 overriden by queue 128
Both Rx queue and Tx queue are VirtQ in virtio, VQ index is 256 for Tx
queue 128. Uint8 type of TxQ VQ index overflows and overrides Tx queue 0
data.

This patch fixes VQ index type with uint16 type.

Fixes: c1f86306a0 ("virtio: add new driver")
Cc: stable@dpdk.org

Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-01-27 05:54:26 +01:00
Matan Azrad
b5e51edfbe vdpa/mlx5: workaround queue stop with traffic
When the event thread polls traffic and a virtq is stopping, the FW loses
synchronization in the virtq indexes.

It causes LM failure on synchronization between the HOST indexes to
the GUEST indexes.

Unset the event thread before the queue stop in the LM process.

Fixes: 31b9c29c86 ("vdpa/mlx5: support close and config operations")
Cc: stable@dpdk.org

Signed-off-by: Matan Azrad <matan@nvidia.com>
Acked-by: Xueming Li <xuemingl@nvidia.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-01-27 05:44:49 +01:00
Selwin Sebastian
a935a4c3c7 net/axgbe: alter port speed bit range
Newer generation Hardware uses the slightly different
port speed bit widths, so alter the existing port speed
bit range to extend support to the newer generation hardware
while maintaining the backward compatibility with older
generation hardware.

The previously reserved bits are now being used which
then requires the adjustment to the BIT values, e.g.:

Before:
   PORT_PROPERTY_0[22:21] - Reserved
   PORT_PROPERTY_0[26:23] - Supported Speeds

After:
   PORT_PROPERTY_0[21] - Reserved
   PORT_PROPERTY_0[26:22] - Supported Speeds

To make this backwards compatible, the existing BIT
definitions for the port speeds are incremented by one
to maintain the original position.

Signed-off-by: Selwin Sebastian <selwin.sebastian@amd.com>
Acked-by: Chandubabu Namburu <chandu@amd.com>
2022-01-27 15:29:24 +01:00
Selwin Sebastian
443ab5aada net/axgbe: support no-autoneg port mode
Add support for a new port mode that is a backplane
connection without support for auto negotiation.

Signed-off-by: Selwin Sebastian <selwin.sebastian@amd.com>
Acked-by: Chandubabu Namburu <chandu@amd.com>
2022-01-27 15:29:24 +01:00
Selwin Sebastian
cd48955b9f net/axgbe: reset PHY Rx when mailbox command timeout
Sometimes mailbox commands timeout when the RX data path becomes
unresponsive. This prevents the submission of new mailbox commands
to DXIO. This patch identifies the timeout and resets the RX data
path so that the next message can be submitted properly.

Signed-off-by: Selwin Sebastian <selwin.sebastian@amd.com>
Acked-by: Chandubabu Namburu <chandu@amd.com>
2022-01-27 15:29:24 +01:00
Selwin Sebastian
0df8d8df7e net/axgbe: simplify rate change mailbox interface
Simplify and centralize the mailbox command rate change interface by
having a single function perform the writes to the mailbox registers
to issue the request.

Signed-off-by: Selwin Sebastian <selwin.sebastian@amd.com>
Acked-by: Chandubabu Namburu <chandu@amd.com>
2022-01-27 15:29:23 +01:00
Selwin Sebastian
09b0a36cc7 net/axgbe: toggle PLL settings during rate change
For each rate change command submission, the FW has to do a phy
power off sequence internally. For this to happen correctly, the
PLL re-initialization control setting has to be turned off before
sending mailbox commands and re-enabled once the command submission
is complete. Without the PLL control setting, the link up takes
longer time in a fixed phy configuration.

Signed-off-by: Selwin Sebastian <selwin.sebastian@amd.com>
Acked-by: Chandubabu Namburu <chandu@amd.com>
2022-01-27 15:29:23 +01:00
Selwin Sebastian
7201a9b568 net/axgbe: attempt always link training in KR mode
Link training is always attempted when in KR mode, but the code is
structured to check if link training has been enabled before attempting
to perform it. Since that check will always be true, simplify the code
to always enable and start link training during KR auto-negotiation.

Signed-off-by: Selwin Sebastian <selwin.sebastian@amd.com>
Acked-by: Chandubabu Namburu <chandu@amd.com>
2022-01-27 15:29:23 +01:00
Chengwen Feng
fdfcb94d8f net/hns3: support indirect counter flow action
This patch support indirect counter action because the shared counter
attribute has been deprecated in DPDK 21.11.

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
2022-01-27 14:39:13 +01:00
Huisong Li
c48499171f net/hns3: extract functions to create RSS and FDIR flow rule
Extract two functions to create the RSS and FDIR flow rule for clearer
code logic.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
2022-01-27 14:39:13 +01:00
Chengwen Feng
092ffe854d net/hns3: rename function
This patch rename hns3_parse_rss_key with hns3_adjust_rss_key to
improve readability.

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
2022-01-27 14:39:13 +01:00
Chengwen Feng
2a1e7c4782 net/hns3: remove non re-entrant strerror call
This patch delete strerror invoke which was non re-entrant.

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
2022-01-27 14:39:13 +01:00
Chengwen Feng
3340aa9f50 net/hns3: replace single line functions
This patch removes single functions with actual calls.

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
2022-01-27 14:39:13 +01:00
Huisong Li
f5ed7d99cf net/hns3: extract common function to obtain revision ID
The code logic of obtaining the revision ID of PCI device is the same
for PF and VF driver. This patch extracts a common interface to do it.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
2022-01-27 14:39:13 +01:00
Huisong Li
5608b54756 net/hns3: remove logging memory addresses
Remove the printing of memory addresses.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
2022-01-27 14:39:13 +01:00
Huisong Li
af1f62b3d1 net/hns3: remove getting number of queue descriptors from FW
Application can specify the number of Rx/Tx queue descriptors in DPDK.
So driver does not obtain the default value from firmware and PF.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
2022-01-27 14:39:13 +01:00
Huisong Li
a65941e9c4 net/hns3: remove unused variables
Remove unused variables.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
2022-01-27 14:39:12 +01:00
Huisong Li
f13c07a570 net/hns3: extract reset failure handling to function
Extract a function to handle reset fail for clearer code logic.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
2022-01-27 14:39:12 +01:00
Huisong Li
fbbcf80a9d net/hns3: remove unnecessary blank lines
Remove unnecessary blank lines.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
2022-01-27 14:39:12 +01:00
Jie Hai
7be11baa6e net/hns3: make control plane function non-inline
This function is a control-plane interface and does
not need to use inline.

Signed-off-by: Jie Hai <haijie1@huawei.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
2022-01-27 14:39:12 +01:00
Huisong Li
2665a92054 net/hns3: extract common function to initialize MAC address
The code logic to initialize "data->mac_addrs" for PF and VF is similar.
This patch extracts a common API to initialize it to improve code
maintainability.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
2022-01-27 14:39:12 +01:00
Huisong Li
67d0b17947 net/hns3: fix using enum as boolean
The enum type variables cannot be used as bool variables. This patch
fixes for "with->func" in hns3_action_rss_same().

Fixes: eb158fc756 ("net/hns3: fix config when creating RSS rule after flush")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
2022-01-27 14:39:12 +01:00
Huisong Li
b70e96833a net/hns3: remove unnecessary assignment
Remove unnecessary assignment.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
2022-01-27 14:39:12 +01:00
Heinrich Kuhn
15174c40b7 net/nfp: free HW ring memzone on queue release
During Rx/Tx queue setup, memory is reserved for the hardware rings.
This memory zone should subsequently be freed in the queue release
logic. This commit also adds a call to the release logic in the
dev_close() callback so that the ring memzone may be freed during port
close too.

Fixes: b812daadad ("nfp: add Rx and Tx")
Cc: stable@dpdk.org

Signed-off-by: Heinrich Kuhn <heinrich.kuhn@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
2022-01-26 17:29:59 +01:00
Nobuhiro Miki
adcf2717cb net/tap: forbid different Rx/Tx queue number
Users can create the desired number of RxQ and TxQ in DPDK. For
example, if the number of RxQ = 2 and the number of TxQ = 5,
a total of 8 file descriptors will be created for a tap device,
including RxQ, TxQ, and one for keepalive. The RxQ and TxQ
with the same ID are paired by dup(2).

In this scenario, Kernel will have 3 RxQ where packets are
incoming but not read. The reason for this is that there are only
2 RxQ that are polled by DPDK, while there are 5 queues in Kernel.
This patch add a checking if DPDK has appropriate numbers of
queues to avoid unexpected packet drop.

Signed-off-by: Nobuhiro Miki <nmiki@yahoo-corp.jp>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2022-01-26 17:18:31 +01:00
Yu Wenjun
4986aea2b8 net/bonding: fix RSS with early configure
RSS don't work when bond_ethdev_configure called before
rte_eth_bond_slave_add.

This is because internals->rss_key_len is 0 in bond_ethdev_configure().
If internals->rss_key_len is 0, internals->rss_key can not be set
properly.

e.g.:
doesn't work (examples/bond/main.c):
rte_eth_bond_create()
rte_eth_dev_configure()
rte_eth_bond_slave_add()
rte_eth_dev_start()

works (testpmd):
rte_eth_bond_create()
rte_eth_bond_slave_add()
rte_eth_dev_configure()
rte_eth_dev_start()

Fixing by using 'default_rss_key' when 'internals->rss_key_len' is 0.

Fixes: 6b1a001ec5 ("net/bonding: fix RSS key length")
Cc: stable@dpdk.org

Signed-off-by: Yu Wenjun <yuwenjun@cmss.chinamobile.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
2022-01-26 16:47:17 +01:00
Min Hu (Connor)
3ca3dcd651 net/hns3: fix vector Rx/Tx when PTP enabled
If hardware supports IEEE 1588 PTP, PTP capability will be set.
Currently, vec and sve burst is unsupported when PTP capability is set.

For sake of Rx/Tx performance, IEEE 1588 PTP is not supported in sve or
vec burst mode. When enabling IEEE 1588 PTP, Rx/Tx burst mode should be
simple or common. Rx/Tx burst mode could be set like this, for example:
-a 0000:35:00.0,rx_func_hint=common,tx_func_hint=common

This patch supports vec and sve burst when PTP is disabled. And only
support simple or common burst When PTP is enabled.

Fixes: 38b539d96e ("net/hns3: support IEEE 1588 PTP")
Cc: stable@dpdk.org

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
2022-01-26 15:52:09 +01:00
Huisong Li
5a2b22b40f net/hns3: fix mailbox wait time
The mailbox wait time can be specified at runtime. But the variable that
controls this time are not initialized when the variable isn't designated
or is specified as an invalid value, which will fail to initialize device
in the case where no device is bound to initialize the device.

Fixes: 2fc3e696a7 ("net/hns3: add runtime config for mailbox limit time")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
2022-01-26 15:52:09 +01:00
Min Hu (Connor)
96c33cfb06 net/hns3: fix Rx/Tx functions update
When fast path operation is introduced, the Rx/Tx function is done by
object 'rte_eth_fp_ops'. So 'rte_eth_fp_ops' should be updated if
'fast-path functions' need to be changed, such as PMD receive function,
prepare function and so on.

This patch fixed receiving packets bug when fast path operation is
introduced.

Fixes: bba6366983 ("net/hns3: support Rx/Tx and related operations")
Fixes: 168b7d79da ("net/hns3: support set link up/down for PF")
Cc: stable@dpdk.org

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
2022-01-26 15:52:09 +01:00
Stephen Hemminger
d6dccbd766 net/memif: remove unnecessary Rx interrupt stub
The code in memif driver to stub out rx_irq_enable is unnecessary
and causes different error returns than other drivers.
The core ethdev code will return -ENOTSUP if the driver has
a null rx_queue_intr_enable callback.

Fixes: 09c7e63a71 ("net/memif: introduce memory interface PMD")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2022-01-26 15:22:10 +01:00
Wei Huang
e55d8d4c12 raw/ifpga/base: fix port feature ID
Fix ID value of port features to match the definition from hardware.

Fixes: 473c88f9b3 ("drivers/raw: remove rawdev from directory names")
Cc: stable@dpdk.org

Signed-off-by: Wei Huang <wei.huang@intel.com>
Acked-by: Tianfei Zhang <tianfei.zhang@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
2022-01-26 11:02:05 +01:00
Ajit Khaparde
8496483099 net/bnxt: fix VF resource allocation strategy
1. VFs need a notification queue to handle async messages.
But the current logic does not reserve a notification queue leading
to initialization failure in some cases.
2. With the current logic, DPDK PF driver reserves only one VNIC
to the VFs leading to initialization failure with more than 1 RXQs.

Added logic to distribute number of NQs and VNICs from the pool
across VFs and PF.

While reserving resources for the VFs, the strategy is to keep
both min & max values the same. This could result in a failure
when there isn't enough resources to satisfy the request.
Hence fixed to instruct the FW to not reserve all minimum
resources requested for the VF. The VF driver can request the FW
for the allocated resources during probe.

Fixes: b7778e8a1c ("net/bnxt: refactor to properly allocate resources for PF/VF")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
2022-01-25 05:45:28 +01:00
Kalesh AP
5b8b248c96 net/bnxt: fix memzone allocation per VNIC
In case of Thor RSS table size is too big. This could result in
memory allocation failure when the supported vnic count is high.
Instead of allocating the memzone for all VNICs in one shot,
allocate for each VNIC individually.

Also, fixed to free the memzone in the uninit path.

Fixes: 9738793f28 ("net/bnxt: add VNIC functions and structs")
Cc: stable@dpdk.org

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2022-01-25 05:45:28 +01:00
Kalesh AP
75915b2b3c net/bnxt: handle ring cleanup in case of error
In bnxt_alloc_mem(), after bnxt_alloc_async_ring_struct(),
any of the functions failure causes an error:

bnxt_hwrm_ring_free(): hwrm_ring_free nq failed. rc:1

Fix this by initializing ring->fw_ring_id to INVALID_HW_RING_ID
in bnxt_alloc_async_ring_struct().

Fixes: bd0a14c99f ("net/bnxt: use dedicated CPR for async events")
Cc: stable@dpdk.org

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
2022-01-25 05:45:28 +01:00
Kalesh AP
7b82c4de0d net/bnxt: fix check for autoneg enablement
HWRM_PORT_PHY_QCFG_OUTPUT response indicates the autoneg speed mask
supported by the FW. While enabling autoneg, driver should also check
the FW advertised PAM4 speeds supported in auto mode which is set
in the HWRM_PORT_PHY_QCFG_OUTPUT response.

Fixes: c23f9ded03 ("net/bnxt: support 200G PAM4 link")
Cc: stable@dpdk.org

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
2022-01-25 05:45:28 +01:00
Tianfei Zhang
60e68d170b raw/ifpga: fix thread closing
When we want to close a thread, we should set a flag to notify
thread handler function.

Fixes: 9c006c45d0 ("raw/ifpga: scan PCIe BDF device tree")
Cc: stable@dpdk.org

Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
2022-01-25 05:49:06 +01:00
Yunjian Wang
6c76b76dc6 net/ice: fix link up when starting device
Currently, there is a possibility that the link status is not correct
after set link up, the device ID is 159b. It would be fixed by calling
ice_link_update() while the parameter 'wait_to_complete' is true. It's
reasonable to wait for complete right after set link up as it is not
in an link status change interrupt handling scenario.

Fixes: cf911d90e3 ("net/ice: support link update")
Cc: stable@dpdk.org

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2022-01-25 02:41:23 +01:00
Steve Yang
5256925658 net/ice: support module EEPROM
Add new callbacks for eth_dev_ops of ice to get the information
and data of plugin module EEPROM.

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2022-01-25 02:06:48 +01:00
Simei Su
f5ada3bcf1 net/ice: fix mbuf offload flag for Rx timestamp
For received PTP packets, the flag "RTE_MBUF_F_RX_IEEE1588_TMST" has not
been set which leads to received PTP packet not timestamped by hardware
shown in testpmd/ieee1588 fwd.

Fixes: 646dcbe6c7 ("net/ice: support IEEE 1588 PTP")
Cc: stable@dpdk.org

Signed-off-by: Simei Su <simei.su@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2022-01-25 01:58:27 +01:00
Tianfei Zhang
eacdd03c79 raw/ifpga/base: fix SPI transaction
When EOP is detected, 2 more bytes should be received
(may be a SPI_PACKET_ESC before last valid byte) then
rx should be finished.

Fixes: 96ebfcf812 ("raw/ifpga/base: add SPI and MAX10 device driver")
Cc: stable@dpdk.org

Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
2022-01-25 01:42:46 +01:00