From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 330D8A0093; Mon, 7 Nov 2022 06:36:06 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E8E5940156; Mon, 7 Nov 2022 06:36:05 +0100 (CET) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 65FA14003F for ; Mon, 7 Nov 2022 06:36:05 +0100 (CET) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id D69255A; Mon, 7 Nov 2022 08:36:04 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru D69255A DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1667799364; bh=kzEIfcavMt9592pShkKEmrZu8d7PajUUT0B93v58cyQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=ncQg2SupZX3axUnehm2zskZ1tHZ7/PG7pcTCrMdHOIRk/zuB2/jmgAJOl7wjYT/BD Fpud5v3VEDJwpQ79hh7E1ftwGnTOUfKmrBUHk28HoEoNA+MtjYQCI/e2A4WRzc3X/F My1QnVM7DZ0ymSSVNRYHJ9s3deP5zmjic92CW7Ws= Message-ID: <232ff238-e430-09d9-efde-c43f4445e6db@oktetlabs.ru> Date: Mon, 7 Nov 2022 08:36:04 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH V5] app/testpmd: update bond port configurations when add slave Content-Language: en-US To: Huisong Li , dev@dpdk.org Cc: ferruh.yigit@amd.com, 3chas3@gmail.com, humin29@huawei.com, liudongdong3@huawei.com, huangdaode@huawei.com References: <20221028035331.49406-1-lihuisong@huawei.com> <20221107021834.20694-1-lihuisong@huawei.com> From: Andrew Rybchenko Organization: OKTET Labs In-Reply-To: <20221107021834.20694-1-lihuisong@huawei.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 > Reviewed-by: Min Hu (Connor) Applied to dpdk-next-net/main, thanks.