DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH v2] net/bonding: fix RSS not work for bonding
@ 2022-01-18  9:18 Yu Wenjun
  2022-01-18  9:27 ` Min Hu (Connor)
  0 siblings, 1 reply; 3+ messages in thread
From: Yu Wenjun @ 2022-01-18  9:18 UTC (permalink / raw)
  To: ferruh.yigit, humin29, tangchengchang; +Cc: dev, stable, 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 <yuwenjun@cmss.chinamobile.com>
---
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)",
-- 
1.8.3.1




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] net/bonding: fix RSS not work for bonding
  2022-01-18  9:18 [PATCH v2] net/bonding: fix RSS not work for bonding Yu Wenjun
@ 2022-01-18  9:27 ` Min Hu (Connor)
  2022-01-26 15:50   ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Min Hu (Connor) @ 2022-01-18  9:27 UTC (permalink / raw)
  To: Yu Wenjun, ferruh.yigit, tangchengchang; +Cc: dev, stable

Acked-by: Min Hu (Connor) <humin29@huawei.com>

在 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 <yuwenjun@cmss.chinamobile.com>
> ---
> 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)",
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] net/bonding: fix RSS not work for bonding
  2022-01-18  9:27 ` Min Hu (Connor)
@ 2022-01-26 15:50   ` Ferruh Yigit
  0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2022-01-26 15:50 UTC (permalink / raw)
  To: Min Hu (Connor), Yu Wenjun, tangchengchang; +Cc: dev, stable

On 1/18/2022 9:27 AM, Min Hu (Connor) wrote:

> 在 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 <yuwenjun@cmss.chinamobile.com>
> 
> Acked-by: Min Hu (Connor) <humin29@huawei.com>
> 

Updated commit log to include rss key length being 0 detail,
based on discussions in the mail list.


Applied to dpdk-next-net/main, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-26 15:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-18  9:18 [PATCH v2] net/bonding: fix RSS not work for bonding Yu Wenjun
2022-01-18  9:27 ` Min Hu (Connor)
2022-01-26 15:50   ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).