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 7AF94A00C3; Tue, 18 Jan 2022 10:27:35 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 20881426ED; Tue, 18 Jan 2022 10:27:35 +0100 (CET) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id 7ACA04068E; Tue, 18 Jan 2022 10:27:33 +0100 (CET) Received: from dggeme756-chm.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4JdNh70XylzccWj; Tue, 18 Jan 2022 17:26:47 +0800 (CST) Received: from [10.67.103.128] (10.67.103.128) by dggeme756-chm.china.huawei.com (10.3.19.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.21; Tue, 18 Jan 2022 17:27:30 +0800 Subject: Re: [PATCH v2] net/bonding: fix RSS not work for bonding To: Yu Wenjun , , CC: , References: <1642497532-16596-1-git-send-email-yuwenjun@cmss.chinamobile.com> From: "Min Hu (Connor)" Message-ID: <0a8fe3a0-6762-6da1-f7c6-c33b727c50a4@huawei.com> Date: Tue, 18 Jan 2022 17:27:30 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <1642497532-16596-1-git-send-email-yuwenjun@cmss.chinamobile.com> Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.103.128] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggeme756-chm.china.huawei.com (10.3.19.102) 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/1/18 17:18, Yu Wenjun дµÀ: > RSS don't work when bond_ethdev_configure called before > rte_eth_bond_slave_add. > > e.g.: > dont't work(examples/bond/main.c): > rte_eth_bond_create() > rte_eth_dev_configure() > rte_eth_bond_slave_add() > rte_eth_dev_start() > > work(testpmd): > rte_eth_bond_create() > rte_eth_bond_slave_add() > rte_eth_dev_configure() > rte_eth_dev_start() > > Fixes: 6b1a001ec546 ("net/bonding: fix RSS key length") > Cc: stable@dpdk.org > > Signed-off-by: Yu Wenjun > --- > v2: > - Fixed patch format. > > drivers/net/bonding/rte_eth_bond_pmd.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c > index 84f4900..31bcee1 100644 > --- a/drivers/net/bonding/rte_eth_bond_pmd.c > +++ b/drivers/net/bonding/rte_eth_bond_pmd.c > @@ -3504,6 +3504,11 @@ struct bwg_slave { > if (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS) { > struct rte_eth_rss_conf *rss_conf = > &dev->data->dev_conf.rx_adv_conf.rss_conf; > + > + if (internals->rss_key_len == 0) { > + internals->rss_key_len = sizeof(default_rss_key); > + } > + > if (rss_conf->rss_key != NULL) { > if (internals->rss_key_len > rss_conf->rss_key_len) { > RTE_BOND_LOG(ERR, "Invalid rss key length(%u)", >