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 9FD1FA0093; Wed, 9 Nov 2022 02:11:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 42A7F400D7; Wed, 9 Nov 2022 02:11:08 +0100 (CET) Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by mails.dpdk.org (Postfix) with ESMTP id 3E0EC400D4 for ; Wed, 9 Nov 2022 02:11:05 +0100 (CET) Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.53]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4N6RfT1slXzHqVW; Wed, 9 Nov 2022 09:08:01 +0800 (CST) Received: from kwepemm600004.china.huawei.com (7.193.23.242) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 9 Nov 2022 09:11:02 +0800 Received: from [10.67.103.231] (10.67.103.231) by kwepemm600004.china.huawei.com (7.193.23.242) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 9 Nov 2022 09:11:01 +0800 Message-ID: Date: Wed, 9 Nov 2022 09:11:00 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH 2/2] app/testpmd: remove fast free offload for bond3 and bond4 To: Stephen Hemminger CC: , , , , <3chas3@gmail.com>, , References: <20221108084038.25136-1-lihuisong@huawei.com> <20221108084038.25136-3-lihuisong@huawei.com> <20221108100126.3b963338@hermes.local> From: "lihuisong (C)" In-Reply-To: <20221108100126.3b963338@hermes.local> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.103.231] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemm600004.china.huawei.com (7.193.23.242) X-CFilter-Loop: Reflected 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 在 2022/11/9 2:01, Stephen Hemminger 写道: > On Tue, 8 Nov 2022 16:40:38 +0800 > Huisong Li wrote: > >> The port configurations of bonding device need to be updated when add a >> slave device. But mbuf fast free offload can't be used in bonding mode >> Broadcast and mode 8023AD. So remove this offload for both mode in case >> of failing to initialize bonding device. >> >> Fixes: 76376bd9cd49 ("app/testpmd: update bond port configurations when add slave") >> >> Signed-off-by: Huisong Li > int ret; >> >> @@ -2825,6 +2826,13 @@ update_bonding_port_dev_conf(portid_t bond_pid) >> if (port->dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE) >> port->dev_conf.txmode.offloads |= >> RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE; >> + /* Bond mode broadcast & 8023AD don't support MBUF_FAST_FREE offload */ >> + bonding_mode = rte_eth_bond_mode_get(bond_pid); >> + if (bonding_mode == BONDING_MODE_8023AD || >> + bonding_mode == BONDING_MODE_BROADCAST) >> + port->dev_conf.txmode.offloads &= >> + ~RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE; >> + > This would be better handled in the bonding driver. > It should return the correct txmode offloads based on bonding mode. > That way it would work for any application not just testpmd. Good idea. I will fix it in v2. > .