Skip to contentSkip to conversation

net/ixgbe: fix dcb configuration issue

PATCH Superseded Qiming Yang 5 participants 7 messages May 17, 2018 – May 18, 2018 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/ixgbe: fix dcb configuration issue

This patch removed unnecessary check in ixgbe_check_mq_mode, fixed historical issue.

Fixes 27b609cbd1c6 ("ethdev: move the multi-queue mode check to specific drivers")
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 37 -------------------------------------
 1 file changed, 37 deletions(-)
drivers/net/ixgbe/ixgbe_ethdev.c +0 -37
index f5006bc..9e3ae95 100644
@@ -2300,43 +2300,6 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev)
 			}
 		}
 
-		/* For DCB mode check our configuration before we go further */
-		if (dev_conf->rxmode.mq_mode == ETH_MQ_RX_DCB) {
-			const struct rte_eth_dcb_rx_conf *conf;
-
-			if (nb_rx_q != IXGBE_DCB_NB_QUEUES) {
-				PMD_INIT_LOG(ERR, "DCB selected, nb_rx_q != %d.",
-						 IXGBE_DCB_NB_QUEUES);
-				return -EINVAL;
-			}
-			conf = &dev_conf->rx_adv_conf.dcb_rx_conf;
-			if (!(conf->nb_tcs == ETH_4_TCS ||
-			       conf->nb_tcs == ETH_8_TCS)) {
-				PMD_INIT_LOG(ERR, "DCB selected, nb_tcs != %d"
-						" and nb_tcs != %d.",
-						ETH_4_TCS, ETH_8_TCS);
-				return -EINVAL;
-			}
-		}
-
-		if (dev_conf->txmode.mq_mode == ETH_MQ_TX_DCB) {
-			const struct rte_eth_dcb_tx_conf *conf;
-
-			if (nb_tx_q != IXGBE_DCB_NB_QUEUES) {
-				PMD_INIT_LOG(ERR, "DCB, nb_tx_q != %d.",
-						 IXGBE_DCB_NB_QUEUES);
-				return -EINVAL;
-			}
-			conf = &dev_conf->tx_adv_conf.dcb_tx_conf;
-			if (!(conf->nb_tcs == ETH_4_TCS ||
-			       conf->nb_tcs == ETH_8_TCS)) {
-				PMD_INIT_LOG(ERR, "DCB selected, nb_tcs != %d"
-						" and nb_tcs != %d.",
-						ETH_4_TCS, ETH_8_TCS);
-				return -EINVAL;
-			}
-		}
-
 		/*
 		 * When DCB/VT is off, maximum number of queues changes,
 		 * except for 82598EB, which remains constant.
Signature · 1 line
2.9.5
#1 lore raw

Hi Qiming

Quoted 32 lines

-----Original Message-----
From: dev [mailto:[email protected]]
Sent: Thursday, May 17, 2018 9:23 PM
To: [email protected]
Cc: Wu, Jingjing <[email protected]>; Lu, Wenzhuo <[email protected]>; Yang, Qiming <[email protected]>; [email protected]
Subject: [dpdk-dev] [PATCH] net/ixgbe: fix dcb configuration issue

This patch removed unnecessary check in ixgbe_check_mq_mode, fixed historical issue.

Fixes 27b609cbd1c6 ("ethdev: move the multi-queue mode check to specific

drivers")
Cc: [email protected]

---
 drivers/net/ixgbe/ixgbe_ethdev.c | 37 -------------------------------------
 1 file changed, 37 deletions(-)
drivers/net/ixgbe/ixgbe_ethdev.c +0 -2
index f5006bc..9e3ae95 100644
@@ -2300,43 +2300,6 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev)
 			}
 		}
 
-		/* For DCB mode check our configuration before we go further */
-		if (dev_conf->rxmode.mq_mode == ETH_MQ_RX_DCB) {

drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_mq_mode(struct rte_eth_dev *dev) · line 2314

Quoted 10 lines
drivers/net/ixgbe/ixgbe_ethdev.c +0 -10
-			const struct rte_eth_dcb_rx_conf *conf;
-
-			if (nb_rx_q != IXGBE_DCB_NB_QUEUES) {
-				PMD_INIT_LOG(ERR, "DCB selected, nb_rx_q != %d.",
-						 IXGBE_DCB_NB_QUEUES);
-				return -EINVAL;
-			}
-			conf = &dev_conf->rx_adv_conf.dcb_rx_conf;
-			if (!(conf->nb_tcs == ETH_4_TCS ||
-			       conf->nb_tcs == ETH_8_TCS)) {

I guess, we should not remove all check, for nb_tcs, it still valid, right?

Quoted 8 lines
drivers/net/ixgbe/ixgbe_ethdev.c +0 -8
-				PMD_INIT_LOG(ERR, "DCB selected, nb_tcs != %d"
-						" and nb_tcs != %d.",
-						ETH_4_TCS, ETH_8_TCS);
-				return -EINVAL;
-			}
-		}
-
-		if (dev_conf->txmode.mq_mode == ETH_MQ_TX_DCB) {

drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_mq_mode(struct rte_eth_dev *dev) · line 2332

Quoted 10 lines
drivers/net/ixgbe/ixgbe_ethdev.c +0 -10
-			const struct rte_eth_dcb_tx_conf *conf;
-
-			if (nb_tx_q != IXGBE_DCB_NB_QUEUES) {
-				PMD_INIT_LOG(ERR, "DCB, nb_tx_q != %d.",
-						 IXGBE_DCB_NB_QUEUES);
-				return -EINVAL;
-			}
-			conf = &dev_conf->tx_adv_conf.dcb_tx_conf;
-			if (!(conf->nb_tcs == ETH_4_TCS ||
-			       conf->nb_tcs == ETH_8_TCS)) {

Same to rx.

Quoted 12 lines
drivers/net/ixgbe/ixgbe_ethdev.c +0 -8
-				PMD_INIT_LOG(ERR, "DCB selected, nb_tcs != %d"
-						" and nb_tcs != %d.",
-						ETH_4_TCS, ETH_8_TCS);
-				return -EINVAL;
-			}
-		}
-
 		/*
 		 * When DCB/VT is off, maximum number of queues changes,
 		 * except for 82598EB, which remains constant.
--

2.9.5

#2 lore raw

I'll send v2 later.

Quoted 93 lines

-----Original Message-----
From: Zhang, Qi Z
Sent: Thursday, May 17, 2018 9:19 PM
To: [email protected]
Cc: Wu, Jingjing <[email protected]>; Lu, Wenzhuo <[email protected]>; Yang, Qiming <[email protected]>; [email protected]
Subject: RE: [dpdk-dev] [PATCH] net/ixgbe: fix dcb configuration issue

Hi Qiming

Quoted 29 lines

-----Original Message-----
From: dev [mailto:[email protected]]
Sent: Thursday, May 17, 2018 9:23 PM
To: [email protected]
Cc: Wu, Jingjing <[email protected]>; Lu, Wenzhuo <[email protected]>; Yang, Qiming <[email protected]>; [email protected]
Subject: [dpdk-dev] [PATCH] net/ixgbe: fix dcb configuration issue

This patch removed unnecessary check in ixgbe_check_mq_mode, fixed historical issue.

Fixes 27b609cbd1c6 ("ethdev: move the multi-queue mode check to

specific
drivers")
Cc: [email protected]

---
 drivers/net/ixgbe/ixgbe_ethdev.c | 37
-------------------------------------
 1 file changed, 37 deletions(-)
drivers/net/ixgbe/ixgbe_ethdev.c +0 -0
index f5006bc..9e3ae95 100644

drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_mq_mode(struct rte_eth_dev *dev) · line 2303

Quoted 4 lines
drivers/net/ixgbe/ixgbe_ethdev.c +0 -1
@@ -2300,43 +2300,6 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev)
 			}
 		}
 
-		/* For DCB mode check our configuration before we go further

*/

drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_mq_mode(struct rte_eth_dev *dev)

Quoted 5 lines
drivers/net/ixgbe/ixgbe_ethdev.c +0 -5
-		if (dev_conf->rxmode.mq_mode == ETH_MQ_RX_DCB) {
-			const struct rte_eth_dcb_rx_conf *conf;
-
-			if (nb_rx_q != IXGBE_DCB_NB_QUEUES) {
-				PMD_INIT_LOG(ERR, "DCB selected,

nb_rx_q != %d.",

drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_mq_mode(struct rte_eth_dev *dev) · line 2314

Quoted 6 lines
drivers/net/ixgbe/ixgbe_ethdev.c +0 -6
-						 IXGBE_DCB_NB_QUEUES);
-				return -EINVAL;
-			}
-			conf = &dev_conf->rx_adv_conf.dcb_rx_conf;
-			if (!(conf->nb_tcs == ETH_4_TCS ||
-			       conf->nb_tcs == ETH_8_TCS)) {

I guess, we should not remove all check, for nb_tcs, it still valid, right?

drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_mq_mode(struct rte_eth_dev *dev) · line 2315

Quoted 1 line
drivers/net/ixgbe/ixgbe_ethdev.c +0 -1
-				PMD_INIT_LOG(ERR, "DCB selected,

nb_tcs != %d"

Quoted 7 lines
drivers/net/ixgbe/ixgbe_ethdev.c +0 -7
-						" and nb_tcs != %d.",
-						ETH_4_TCS, ETH_8_TCS);
-				return -EINVAL;
-			}
-		}
-
-		if (dev_conf->txmode.mq_mode == ETH_MQ_TX_DCB) {

drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_mq_mode(struct rte_eth_dev *dev) · line 2332

Quoted 10 lines
drivers/net/ixgbe/ixgbe_ethdev.c +0 -10
-			const struct rte_eth_dcb_tx_conf *conf;
-
-			if (nb_tx_q != IXGBE_DCB_NB_QUEUES) {
-				PMD_INIT_LOG(ERR, "DCB, nb_tx_q != %d.",
-						 IXGBE_DCB_NB_QUEUES);
-				return -EINVAL;
-			}
-			conf = &dev_conf->tx_adv_conf.dcb_tx_conf;
-			if (!(conf->nb_tcs == ETH_4_TCS ||
-			       conf->nb_tcs == ETH_8_TCS)) {

Same to rx.

drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_mq_mode(struct rte_eth_dev *dev) · line 2333

Quoted 1 line
drivers/net/ixgbe/ixgbe_ethdev.c +0 -1
-				PMD_INIT_LOG(ERR, "DCB selected,

nb_tcs != %d"

Quoted 11 lines
drivers/net/ixgbe/ixgbe_ethdev.c +0 -7
-						" and nb_tcs != %d.",
-						ETH_4_TCS, ETH_8_TCS);
-				return -EINVAL;
-			}
-		}
-
 		/*
 		 * When DCB/VT is off, maximum number of queues changes,
 		 * except for 82598EB, which remains constant.
--

2.9.5

#3 lore raw

PATCH v2 1/1 net/ixgbe: fix dcb configuration issue

In reply to Qiming Yang

This patch removed unnecessary check in ixgbe_check_mq_mode, fixed historical issue.

Fixes 27b609cbd1c6 ("ethdev: move the multi-queue mode check to specific drivers")
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 10 ----------
 1 file changed, 10 deletions(-)
drivers/net/ixgbe/ixgbe_ethdev.c +0 -10
index f5006bc..eb92893 100644
@@ -2304,11 +2304,6 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev)
 		if (dev_conf->rxmode.mq_mode == ETH_MQ_RX_DCB) {
 			const struct rte_eth_dcb_rx_conf *conf;
 
-			if (nb_rx_q != IXGBE_DCB_NB_QUEUES) {
-				PMD_INIT_LOG(ERR, "DCB selected, nb_rx_q != %d.",
-						 IXGBE_DCB_NB_QUEUES);
-				return -EINVAL;
-			}
 			conf = &dev_conf->rx_adv_conf.dcb_rx_conf;
 			if (!(conf->nb_tcs == ETH_4_TCS ||
 			       conf->nb_tcs == ETH_8_TCS)) {
@@ -2322,11 +2317,6 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev)
 		if (dev_conf->txmode.mq_mode == ETH_MQ_TX_DCB) {
 			const struct rte_eth_dcb_tx_conf *conf;
 
-			if (nb_tx_q != IXGBE_DCB_NB_QUEUES) {
-				PMD_INIT_LOG(ERR, "DCB, nb_tx_q != %d.",
-						 IXGBE_DCB_NB_QUEUES);
-				return -EINVAL;
-			}
 			conf = &dev_conf->tx_adv_conf.dcb_tx_conf;
 			if (!(conf->nb_tcs == ETH_4_TCS ||
 			       conf->nb_tcs == ETH_8_TCS)) {
Signature · 1 line
2.9.5
Acked-by on v2 1/1
#4 lore raw

Hi,

Quoted 8 lines

-----Original Message-----
From: dev [mailto:[email protected]]
Sent: Friday, May 18, 2018 5:52 PM
To: [email protected]
Cc: Zhang, Qi Z <[email protected]>; Yang, Qiming <[email protected]>; [email protected]
Subject: [dpdk-dev] [PATCH v2] net/ixgbe: fix dcb configuration issue

Quoted 8 lines

This patch removed unnecessary check in ixgbe_check_mq_mode, fixed historical issue.

Fixes 27b609cbd1c6 ("ethdev: move the multi-queue mode check to specific

drivers")
Cc: [email protected]

Applied
#5 lore raw
Quoted 23 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Lu, Wenzhuo
Sent: Friday, May 18, 2018 11:16 AM
To: dev; [email protected]
Cc: Zhang, Qi Z; Yang, Qiming; [email protected]
Subject: Re: [dpdk-dev] [PATCH v2] net/ixgbe: fix dcb configuration issue

Hi,

Quoted 11 lines

-----Original Message-----
From: dev [mailto:[email protected]]
Sent: Friday, May 18, 2018 5:52 PM
To: [email protected]
Cc: Zhang, Qi Z <[email protected]>; Yang, Qiming <[email protected]>; [email protected]
Subject: [dpdk-dev] [PATCH v2] net/ixgbe: fix dcb configuration issue

This patch removed unnecessary check in ixgbe_check_mq_mode, fixed historical issue.

Quoted 7 lines
Quoted 6 lines
Fixes 27b609cbd1c6 ("ethdev: move the multi-queue mode check to

specific
drivers")
Cc: [email protected]

Applied to dpdk-next-net-intel, thanks!

/Helin

#6 lore raw
In reply to Qiming Yang
Quoted 10 lines

-----Original Message-----
From: Yang, Qiming
Sent: Thursday, May 17, 2018 9:23 PM
To: [email protected]
Cc: Wu, Jingjing <[email protected]>; Lu, Wenzhuo <[email protected]>; Yang, Qiming <[email protected]>; [email protected]
Subject: [PATCH] net/ixgbe: fix dcb configuration issue

Quoted 3 lines

This patch removed unnecessary check in ixgbe_check_mq_mode, fixed historical issue.

Hi, Qiming

Sorry, I didn't understand why the check is unnecessary, amd what is the historical issue? Could you add a bit more comments here?

Thanks
Jingjing