Commit Graph

31382 Commits

Author SHA1 Message Date
Bruce Richardson
e16b972b1a build: remove deprecated Meson functions
Starting in meson 0.56, the functions meson.source_root() and
meson.build_root() are deprecated and to be replaced by the [more
descriptive] functions: project_source_root()/global_source_root() and
project_build_root()/global_build_root(). Unfortunately, these new
replacement functions were only added in 0.56 release too, so to use
them we would need version checks for old/new functions to remove the
deprecation warnings.

However, the functions "current_build_dir()" and "current_source_dir()"
remain unaffected by all this, so we can bypass the versioning problem,
by saving off these values to "dpdk_source_root" and "dpdk_build_root"
in the top-level meson.build file

Bugzilla ID: 926
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
2022-02-02 18:46:53 +01:00
Bruce Richardson
d832326ae9 build: fix warning about using -Wextra flag
Each build, meson would issue a warning reporting that the
"warning_level" setting should be used in place of adding -Wextra
directly to our build commands. Testing with meson 0.61 shows that the
only difference for gcc and clang builds between warning levels 1 and
2 is the addition of -Wextra, so we can remove the warning by deleting
our explicit set of Wextra and changing the build defaults to
warning_level 2.

Fixes: 524a0d5d66 ("build: enable extra warnings with meson")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2022-02-02 15:56:45 +01:00
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
Martijn Bakker
44f44d8298 pflock: fix header file installation
The generic header file was missing
in the list of files to install.

Fixes: 9667d97c25 ("pflock: add phase-fair reader writer locks")
Cc: stable@dpdk.org

Signed-off-by: Martijn Bakker <gladdyu@gmail.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-02-02 14:34:11 +01:00
Qi Zhang
affa9de474 doc: update matching versions in ice guide
Add recommended matching list for ice PMD in DPDK 21.08 and DPDK 21.11.

Cc: stable@dpdk.org

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Junfeng Guo <junfeng.guo@intel.com>
2022-01-28 09:55:25 +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
Maxime Coquelin
afd857cba9 vhost: use proper logging type for data path
This patch changes type from config to data for functions
called in the datapath.

Suggested-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2022-01-27 09:46:02 +01:00
Maxime Coquelin
d84723029c vhost: differentiate IOTLB logs
Same logging messages were used for both IOTLB cache
insertion failure and IOTLB pending insertion failure.

This patch differentiate them to ease logs analysis.

Suggested-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2022-01-27 09:45:55 +01:00
Maxime Coquelin
5b03016509 vhost: remove multi-line logs
This patch replaces multi-lines logs in multiple single-
line logs in order to ease logs filtering based on their
socket path.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2022-01-27 09:45:49 +01:00
Maxime Coquelin
02798b0735 vhost: improve virtio-net layer logs
This patch standardizes logging done in Virtio-net, so that
the Vhost-user socket path is always prepended to the logs.
It will ease log analysis when multiple Vhost-user ports
are in use.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2022-01-27 09:45:43 +01:00
Maxime Coquelin
c85c35b1d4 vhost: improve socket layer logs
This patch adds the Vhost socket path whenever possible in
order to make debugging possible when multiple Vhost
devices are in use. Some vhost-user layer functions are
modified to pass the device path down to the socket layer.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2022-01-27 09:45:36 +01:00
Maxime Coquelin
b53c9d20fa vhost: improve vhost-user layer logs
This patch adds the Vhost-user socket path to Vhost-user
layer logs in order to ease logs filtering.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2022-01-27 09:45:29 +01:00
Maxime Coquelin
ccf1ebd611 vhost: improve vhost layer logs
This patch prepends Vhost logs with the Vhost-user socket
path when available to ease filtering logs for a given port.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2022-01-27 09:45:11 +01:00
Maxime Coquelin
843d8e3fde vhost: improve vDPA registration failure log
This patch adds name of the device failing vDPA registration.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2022-01-27 09:45:01 +01:00
Maxime Coquelin
2d1c05c9ac vhost: improve IOTLB logs
This patch adds IOTLB mempool name when logging debug
or error messages, and also prepends the socket path.
to all the logs.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2022-01-27 09:44:31 +01:00
Andy Pei
8974b6c730 vhost: add log when setting vring base
This patch adds log for vring related info in handling of vhost message
VHOST_USER_SET_VRING_BASE, which will be useful in live migration case.

Signed-off-by: Andy Pei <andy.pei@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
2022-01-27 09:39:08 +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