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 4F1C7A0540; Tue, 8 Nov 2022 09:40:21 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5E694410EA; Tue, 8 Nov 2022 09:40:17 +0100 (CET) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id C3865400D7 for ; Tue, 8 Nov 2022 09:40:14 +0100 (CET) Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4N61kQ4y2WzmVmN; Tue, 8 Nov 2022 16:39:58 +0800 (CST) Received: from kwepemm600004.china.huawei.com (7.193.23.242) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 8 Nov 2022 16:40:10 +0800 Received: from localhost.localdomain (10.69.192.56) 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; Tue, 8 Nov 2022 16:40:09 +0800 From: Huisong Li To: , CC: , , <3chas3@gmail.com>, , , Subject: [PATCH 2/2] app/testpmd: remove fast free offload for bond3 and bond4 Date: Tue, 8 Nov 2022 16:40:38 +0800 Message-ID: <20221108084038.25136-3-lihuisong@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20221108084038.25136-1-lihuisong@huawei.com> References: <20221108084038.25136-1-lihuisong@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) 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 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 --- app/test-pmd/testpmd.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 7381dfd9e5..4063ffe0f2 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -2812,6 +2812,7 @@ update_bonding_port_dev_conf(portid_t bond_pid) { #ifdef RTE_NET_BOND struct rte_port *port = &ports[bond_pid]; + uint8_t bonding_mode; uint16_t i; 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; + /* Apply Tx offloads configuration */ for (i = 0; i < port->dev_info.max_tx_queues; i++) port->txq[i].conf.offloads = port->dev_conf.txmode.offloads; -- 2.33.0