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 7AEE6A00C2; Tue, 1 Nov 2022 03:34:24 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1BEBA40694; Tue, 1 Nov 2022 03:34:24 +0100 (CET) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id D2CA040685 for ; Tue, 1 Nov 2022 03:34:21 +0100 (CET) Received: from kwepemi500012.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4N1YxN3yZ8zHvGJ; Tue, 1 Nov 2022 10:34:00 +0800 (CST) Received: from [10.78.134.87] (10.78.134.87) by kwepemi500012.china.huawei.com (7.221.188.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 1 Nov 2022 10:34:17 +0800 Message-ID: Date: Tue, 1 Nov 2022 10:34:17 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.0.3 Subject: Re: [PATCH] net/bonding: fix slave device Rx/Tx offload configuration To: Huisong Li , CC: , , , References: <20221028023646.32585-1-lihuisong@huawei.com> From: "humin (Q)" In-Reply-To: <20221028023646.32585-1-lihuisong@huawei.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.78.134.87] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To kwepemi500012.china.huawei.com (7.221.188.12) 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 Acked-by: Min Hu (Connor) 在 2022/10/28 10:36, Huisong Li 写道: > Normally, the Rx/Tx offload capability of bonding interface is > the intersection of the capability of all slave devices. And > Rx/Tx offloads configuration of slave device comes from bonding > interface. But now there is a risk that slave device retains its > previous offload configurations which is not within the offload > configurations of bond interface. > > Fixes: 57b156540f51 ("net/bonding: fix offloading configuration") > Cc: stable@dpdk.org > > Signed-off-by: Huisong Li > --- > drivers/net/bonding/rte_eth_bond_pmd.c | 17 ++++------------- > 1 file changed, 4 insertions(+), 13 deletions(-) > > diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c > index dc74852137..ca87490065 100644 > --- a/drivers/net/bonding/rte_eth_bond_pmd.c > +++ b/drivers/net/bonding/rte_eth_bond_pmd.c > @@ -1741,20 +1741,11 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev, > slave_eth_dev->data->dev_conf.link_speeds = > bonded_eth_dev->data->dev_conf.link_speeds; > > - slave_eth_dev->data->dev_conf.txmode.offloads |= > - bonded_eth_dev->data->dev_conf.txmode.offloads; > - > - slave_eth_dev->data->dev_conf.txmode.offloads &= > - (bonded_eth_dev->data->dev_conf.txmode.offloads | > - ~internals->tx_offload_capa); > - > - slave_eth_dev->data->dev_conf.rxmode.offloads |= > - bonded_eth_dev->data->dev_conf.rxmode.offloads; > - > - slave_eth_dev->data->dev_conf.rxmode.offloads &= > - (bonded_eth_dev->data->dev_conf.rxmode.offloads | > - ~internals->rx_offload_capa); > + slave_eth_dev->data->dev_conf.txmode.offloads = > + bonded_eth_dev->data->dev_conf.txmode.offloads; > > + slave_eth_dev->data->dev_conf.rxmode.offloads = > + bonded_eth_dev->data->dev_conf.rxmode.offloads; > > nb_rx_queues = bonded_eth_dev->data->nb_rx_queues; > nb_tx_queues = bonded_eth_dev->data->nb_tx_queues;