[PATCH V5] app/testpmd: update bond port configurations when add slave

Andrew Rybchenko andrew.rybchenko at oktetlabs.ru
Mon Nov 7 06:36:04 CET 2022


On 11/7/22 05:18, Huisong Li wrote:
> 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 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 <lihuisong at huawei.com>
> Reviewed-by: Min Hu (Connor) <humin29 at huawei.com>

Applied to dpdk-next-net/main, thanks.



More information about the dev mailing list