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 D0791A0540; Tue, 8 Nov 2022 09:40:16 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8335C400D7; Tue, 8 Nov 2022 09:40:16 +0100 (CET) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id 892624003C 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 4N61kQ3cLwzmVl3; 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 1/2] net/bonding: fix bond3 and bond4 process mbuf fast free Date: Tue, 8 Nov 2022 16:40:37 +0800 Message-ID: <20221108084038.25136-2-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 RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE offload can't be used in bonding mode Broadcast and mode 8023AD. Currently, bonding driver forcibly removes from the dev->data->dev_conf.txmode.offloads and processes as success in bond_ethdev_configure(). But this still cause that rte_eth_dev_configure() fails to execute because of the failure of validating Tx offload in the eth_dev_validate_offloads(). So bonding driver shouldn't modify offloads in dev->data->dev_conf.txmode and should return error in this case. Fixes: 18c41457cbae ("net/bonding: fix mbuf fast free usage") Cc: stable@dpdk.org Signed-off-by: Huisong Li --- drivers/net/bonding/rte_eth_bond_pmd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 864e073db8..b5e832276a 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -3712,10 +3712,8 @@ bond_ethdev_configure(struct rte_eth_dev *dev) if ((offloads & RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE) && (internals->mode == BONDING_MODE_8023AD || internals->mode == BONDING_MODE_BROADCAST)) { - RTE_BOND_LOG(WARNING, - "bond mode broadcast & 8023AD don't support MBUF_FAST_FREE offload, force disable it."); - offloads &= ~RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE; - dev->data->dev_conf.txmode.offloads = offloads; + RTE_BOND_LOG(ERR, "bond mode broadcast & 8023AD don't support MBUF_FAST_FREE offload."); + return -EINVAL; } link_speeds = dev->data->dev_conf.link_speeds; -- 2.33.0