On 11/1/22 06:41, humin (Q) wrote:
Reviewed-by: Min Hu (Connor) <humin29huawei.com>

在 2022/10/29 11:50, Huisong Li 写道:
Some capabilities (like, rx_offload_capa and tx_offload_capa) of bonding
device in dev_info is zero when no slave is added. And its capability will
be updated when add a new slave device.

The capability to update dynamically may introduce some problems if not
handled properly. For example, the reconfig() is called to initialize
bonding port configurations when create a bonding device. The global
tx_mode is assigned to dev_conf.txmode. The DEV_TX_OFFLOAD_MBUF_FAST_FREE
which is the default value of global tx_mode.offloads in testpmd is removed
from bonding device configuration because of zero rx_offload_capa.
As a result, this offload isn't set to bonding device.

Generally, port configurations of bonding device must be within the
intersection of the capability of all slave devices. If use original port
configurations, the removed capabilities because of adding a new slave may
cause failure when re-initialize bonding device.

So port configurations of bonding device also need to be updated because of the added and removed capabilities. In addition, this also helps to ensure
consistency between testpmd and bonding device.

Signed-off-by: Huisong Li <lihuis...@huawei.com>
---
  - v3: fix code comment
  - v2: fix a spelling error in commit log

It fails to apply on dpdk-next-net/main. Could you rebase it,
please, and send v4. Thanks.


Reply via email to