DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/bonding: fix RSS not work for bonding in DPDK21.11
@ 2022-01-17 13:27 俞文俊_yewu
  0 siblings, 0 replies; 8+ messages in thread
From: 俞文俊_yewu @ 2022-01-17 13:27 UTC (permalink / raw)
  To: ferruh.yigit, humin29, tangchengchang; +Cc: dev, stable

[-- Attachment #1: Type: text/plain, Size: 1369 bytes --]

From 85c4ffffe32996fc262dd6f69d0ce272ae8e8350 Mon Sep 17 00:00:00 2001
From: Yu Wenjun 
Date: Wed, 12 Jan 2022 15:01:10 +0800
Subject: [PATCH] net/bonding: fix RSS not work for bonding

RSS don't work when bond_ethdev_configure called before rte_eth_bond_slave_add in DPDK21.11.

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()

Signed-off-by: Yu Wenjun 
Acked-by: Min Hu (Connor) 
---
 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 84f4900ee5..31bcee15cf 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -3504,6 +3504,11 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
 	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)",
-- 
2.32.0.windows.1


[-- Attachment #2: Type: text/html, Size: 1463 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [PATCH] net/bonding: fix RSS not work for bonding in DPDK21.11
@ 2022-01-12  7:29 俞文俊_yewu
  2022-01-14  0:59 ` Min Hu (Connor)
  2022-01-15  1:07 ` Min Hu (Connor)
  0 siblings, 2 replies; 8+ messages in thread
From: 俞文俊_yewu @ 2022-01-12  7:29 UTC (permalink / raw)
  To: tangchengchang, humin29, ferruh.yigit; +Cc: dev, stable

[-- Attachment #1: Type: text/plain, Size: 1576 bytes --]

From 85c4ffffe32996fc262dd6f69d0ce272ae8e8350 Mon Sep 17 00:00:00 2001

From: Yu Wenjun <yuwenjun_yewu@cmss.chinamobile.com>

Date: Wed, 12 Jan 2022 15:01:10 +0800

Subject: [PATCH] net/bonding: fix RSS not work for bonding



RSS don39t work when upgrade to DPDK21.11.



e.g.:

examples/bond/main.c:

conf:

static struct rte_eth_conf port_conf = {

	.rxmode = {

		.mq_mode = RTE_ETH_MQ_RX_NONE,

		.split_hdr_size = 0,

	},

	.rx_adv_conf = {

		.rss_conf = {

			.rss_key = NULL,

			.rss_hf = RTE_ETH_RSS_IP,

		},

	},

	.txmode = {

		.mq_mode = RTE_ETH_MQ_TX_NONE,

	},

}



call chain:

rte_eth_bond_create()->rte_eth_dev_configure()->rte_eth_bond_slave_add()->rte_eth_dev_start()



Signed-off-by: Yu Wenjun <yuwenjun_yewu@cmss.chinamobile.com>

---

 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 84f4900ee5..31bcee15cf 100644

--- a/drivers/net/bonding/rte_eth_bond_pmd.c

+++ b/drivers/net/bonding/rte_eth_bond_pmd.c

@@ -3504,6 +3504,11 @@ bond_ethdev_configure(struct rte_eth_dev *dev)

 	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)",

-- 

2.32.0.windows.1




[-- Attachment #2: Type: text/html, Size: 2805 bytes --]

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

end of thread, other threads:[~2022-01-18  8:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-17 13:27 [PATCH] net/bonding: fix RSS not work for bonding in DPDK21.11 俞文俊_yewu
  -- strict thread matches above, loose matches on Subject: below --
2022-01-12  7:29 俞文俊_yewu
2022-01-14  0:59 ` Min Hu (Connor)
2022-01-14  7:11   ` 俞文俊_yewu
2022-01-14  8:50     ` Min Hu (Connor)
2022-01-14 11:14       ` 俞文俊_yewu
2022-01-15  1:06         ` Min Hu (Connor)
2022-01-17 10:15           ` Ferruh Yigit
2022-01-17 10:23             ` Ferruh Yigit
2022-01-15  1:07 ` Min Hu (Connor)

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).