DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/ixgbe: support multiqueue mode VMDq DCB with SRIOV
@ 2016-08-26  9:08 Bernard Iremonger
  2016-09-21 11:07 ` Remy Horton
  2016-10-14 13:29 ` [dpdk-dev] [PATCH v2] " Bernard Iremonger
  0 siblings, 2 replies; 35+ messages in thread
From: Bernard Iremonger @ 2016-08-26  9:08 UTC (permalink / raw)
  To: dev, rahul.r.shah, wenzhuo.lu; +Cc: Bernard Iremonger

modify ixgbe_dcb_tx_hw_config function.
modify ixgbe_dev_mq_rx_configure function.
modify ixgbe_configure_dcb function.

Signed-off-by: Rahul R Shah <rahul.r.shah@intel.com>
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c |  9 ++++-----
 drivers/net/ixgbe/ixgbe_rxtx.c   | 37 +++++++++++++++++++++----------------
 2 files changed, 25 insertions(+), 21 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index fb618ef..3e62e9e 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -1997,6 +1997,8 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev)
 		/* check multi-queue mode */
 		switch (dev_conf->rxmode.mq_mode) {
 		case ETH_MQ_RX_VMDQ_DCB:
+			PMD_INIT_LOG(INFO, "ETH_MQ_RX_VMDQ_DCB mode supported in SRIOV");
+			break;
 		case ETH_MQ_RX_VMDQ_DCB_RSS:
 			/* DCB/RSS VMDQ in SRIOV mode, not implement yet */
 			PMD_INIT_LOG(ERR, "SRIOV active,"
@@ -2032,11 +2034,8 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev)
 
 		switch (dev_conf->txmode.mq_mode) {
 		case ETH_MQ_TX_VMDQ_DCB:
-			/* DCB VMDQ in SRIOV mode, not implement yet */
-			PMD_INIT_LOG(ERR, "SRIOV is active,"
-					" unsupported VMDQ mq_mode tx %d.",
-					dev_conf->txmode.mq_mode);
-			return -EINVAL;
+			PMD_INIT_LOG(INFO, "ETH_MQ_TX_VMDQ_DCB mode supported in SRIOV");
+			break;
 		default: /* ETH_MQ_TX_VMDQ_ONLY or ETH_MQ_TX_NONE */
 			dev->data->dev_conf.txmode.mq_mode = ETH_MQ_TX_VMDQ_ONLY;
 			break;
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 8a306b0..bef5ef5 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  *
- *   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2010-2016 Intel Corporation. All rights reserved.
  *   Copyright 2014 6WIND S.A.
  *   All rights reserved.
  *
@@ -3312,15 +3312,16 @@ ixgbe_vmdq_dcb_configure(struct rte_eth_dev *dev)
 
 /**
  * ixgbe_dcb_config_tx_hw_config - Configure general DCB TX parameters
- * @hw: pointer to hardware structure
+ * @dev: pointer to eth_dev structure
  * @dcb_config: pointer to ixgbe_dcb_config structure
  */
 static void
-ixgbe_dcb_tx_hw_config(struct ixgbe_hw *hw,
+ixgbe_dcb_tx_hw_config(struct rte_eth_dev *dev,
 		       struct ixgbe_dcb_config *dcb_config)
 {
 	uint32_t reg;
 	uint32_t q;
+	struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 
 	PMD_INIT_FUNC_TRACE();
 	if (hw->mac.type != ixgbe_mac_82598EB) {
@@ -3338,11 +3339,17 @@ ixgbe_dcb_tx_hw_config(struct ixgbe_hw *hw,
 		if (dcb_config->vt_mode)
 			reg |= IXGBE_MTQC_VT_ENA;
 		IXGBE_WRITE_REG(hw, IXGBE_MTQC, reg);
-
-		/* Disable drop for all queues */
-		for (q = 0; q < 128; q++)
-			IXGBE_WRITE_REG(hw, IXGBE_QDE,
-				(IXGBE_QDE_WRITE | (q << IXGBE_QDE_IDX_SHIFT)));
+		if (RTE_ETH_DEV_SRIOV(dev).active == 0) {
+			/* Disable drop for all queues in VMDQ mode*/
+			for (q = 0; q < 128; q++)
+				IXGBE_WRITE_REG(hw, IXGBE_QDE,
+						(IXGBE_QDE_WRITE | (q << IXGBE_QDE_IDX_SHIFT) | IXGBE_QDE_ENABLE));
+		} else {
+			/* Enable drop for all queues in SRIOV mode */
+			for (q = 0; q < 128; q++)
+				IXGBE_WRITE_REG(hw, IXGBE_QDE,
+						(IXGBE_QDE_WRITE | (q << IXGBE_QDE_IDX_SHIFT)));
+		}
 
 		/* Enable the Tx desc arbiter */
 		reg = IXGBE_READ_REG(hw, IXGBE_RTTDCS);
@@ -3377,7 +3384,7 @@ ixgbe_vmdq_dcb_hw_tx_config(struct rte_eth_dev *dev,
 			vmdq_tx_conf->nb_queue_pools == ETH_16_POOLS ? 0xFFFF : 0xFFFFFFFF);
 
 	/*Configure general DCB TX parameters*/
-	ixgbe_dcb_tx_hw_config(hw, dcb_config);
+	ixgbe_dcb_tx_hw_config(dev, dcb_config);
 }
 
 static void
@@ -3660,7 +3667,7 @@ ixgbe_dcb_hw_configure(struct rte_eth_dev *dev,
 		/*get DCB TX configuration parameters from rte_eth_conf*/
 		ixgbe_dcb_tx_config(dev, dcb_config);
 		/*Configure general DCB TX parameters*/
-		ixgbe_dcb_tx_hw_config(hw, dcb_config);
+		ixgbe_dcb_tx_hw_config(dev, dcb_config);
 		break;
 	default:
 		PMD_INIT_LOG(ERR, "Incorrect DCB TX mode configuration");
@@ -3809,9 +3816,6 @@ void ixgbe_configure_dcb(struct rte_eth_dev *dev)
 	    (dev_conf->rxmode.mq_mode != ETH_MQ_RX_DCB_RSS))
 		return;
 
-	if (dev->data->nb_rx_queues != ETH_DCB_NUM_QUEUES)
-		return;
-
 	/** Configure DCB hardware **/
 	ixgbe_dcb_hw_configure(dev, dcb_cfg);
 }
@@ -4081,12 +4085,13 @@ ixgbe_dev_mq_rx_configure(struct rte_eth_dev *dev)
 		case ETH_MQ_RX_VMDQ_RSS:
 			ixgbe_config_vf_rss(dev);
 			break;
-
-		/* FIXME if support DCB/RSS together with VMDq & SRIOV */
 		case ETH_MQ_RX_VMDQ_DCB:
+			ixgbe_vmdq_dcb_configure(dev);
+			break;
+		/* FIXME if support DCB/RSS together with VMDq & SRIOV */
 		case ETH_MQ_RX_VMDQ_DCB_RSS:
 			PMD_INIT_LOG(ERR,
-				"Could not support DCB with VMDq & SRIOV");
+				"Could not support DCB/RSS with VMDq & SRIOV");
 			return -1;
 		default:
 			ixgbe_config_vf_default(dev);
-- 
2.9.0

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

end of thread, other threads:[~2016-11-07 15:56 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-26  9:08 [dpdk-dev] [PATCH] net/ixgbe: support multiqueue mode VMDq DCB with SRIOV Bernard Iremonger
2016-09-21 11:07 ` Remy Horton
2016-10-14 13:29 ` [dpdk-dev] [PATCH v2] " Bernard Iremonger
2016-10-17  6:12   ` Lu, Wenzhuo
2016-10-17 16:27     ` Iremonger, Bernard
2016-10-18  1:07       ` Lu, Wenzhuo
2016-10-18  8:58         ` Iremonger, Bernard
2016-10-19  0:39           ` Lu, Wenzhuo
2016-10-19 10:16             ` Iremonger, Bernard
2016-10-17 16:07   ` [dpdk-dev] [PATCH v3 0/2] net/ixgbe: " Bernard Iremonger
2016-10-17 17:01     ` [dpdk-dev] [PATCH v4 " Bernard Iremonger
2016-10-19 10:21       ` [dpdk-dev] [PATCH v5 " Bernard Iremonger
2016-10-25  0:31         ` Lu, Wenzhuo
2016-10-25 16:51         ` [dpdk-dev] [PATCH v6 " Bernard Iremonger
2016-10-25 16:51         ` [dpdk-dev] [PATCH v6 1/2] net/ixgbe: support multiqueue mode " Bernard Iremonger
2016-10-26 14:38           ` Wu, Jingjing
2016-10-26 15:29             ` Iremonger, Bernard
2016-10-26 16:09               ` Iremonger, Bernard
2016-10-26 16:33                 ` Wu, Jingjing
2016-10-25 16:51         ` [dpdk-dev] [PATCH v6 2/2] app/test_pmd: fix DCB configuration Bernard Iremonger
2016-10-26 14:30           ` Wu, Jingjing
2016-10-26 15:28           ` [dpdk-dev] [PATCH v7] net/ixgbe: support multiqueue mode VMDq DCB with SRIOV Bernard Iremonger
2016-10-26 15:41             ` Bruce Richardson
2016-10-28 14:40           ` [dpdk-dev] [PATCH v7] app/testpmd: fix DCB configuration Bernard Iremonger
2016-11-01 10:36             ` [dpdk-dev] [PATCH v8] " Bernard Iremonger
2016-11-03 17:35               ` [dpdk-dev] [PATCH v9] " Bernard Iremonger
2016-11-04  5:40                 ` Wu, Jingjing
2016-11-07 15:56                   ` Thomas Monjalon
2016-10-19 10:21       ` [dpdk-dev] [PATCH v5 1/2] net/ixgbe: support multiqueue mode VMDq DCB with SRIOV Bernard Iremonger
2016-10-20  1:24         ` Lu, Wenzhuo
2016-10-19 10:21       ` [dpdk-dev] [PATCH v5 2/2] app/test_pmd: fix DCB configuration Bernard Iremonger
2016-10-17 17:01     ` [dpdk-dev] [PATCH v4 1/2] net/ixgbe: support multiqueue mode VMDq DCB with SRIOV Bernard Iremonger
2016-10-17 17:01     ` [dpdk-dev] [PATCH v4 2/2] app/test_pmd: fix DCB configuration Bernard Iremonger
2016-10-17 16:07   ` [dpdk-dev] [PATCH v3 1/2] net/ixgbe: support multiqueue mode VMDq DCB with SRIOV Bernard Iremonger
2016-10-17 16:07   ` [dpdk-dev] [PATCH v3 2/2] app/test_pmd: fix DCB configuration Bernard Iremonger

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