patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [DPDK] net/iavf: fix Tx interrupt vertor configuration error
@ 2019-03-26  5:11 wei zhao
  0 siblings, 0 replies; 8+ messages in thread
From: wei zhao @ 2019-03-26  5:11 UTC (permalink / raw)
  To: qabuild; +Cc: Zhao Wei, stable

From: Zhao Wei <wei.zhao1@intel.com>

There is need to align to kernel iavf code when setting Tx
queue interrupt vector in messge VIRTCHNL_OP_CONFIG_IRQ_MAP,
if not it maybe cause restart iavf port error in some scenario.

Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>

---

v2:
update git log and add new work around

v3:
update git comment and change fix code as suggestion

v4:
add txq_map in struct avf_info to keep vector mapping info
---
 drivers/net/iavf/iavf.h        | 1 +
 drivers/net/iavf/iavf_ethdev.c | 9 +++++++++
 drivers/net/iavf/iavf_vchnl.c  | 2 +-
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h
index e6e3e8d..81d0054 100644
--- a/drivers/net/iavf/iavf.h
+++ b/drivers/net/iavf/iavf.h
@@ -107,6 +107,7 @@ struct iavf_info {
 	uint16_t msix_base; /* msix vector base from */
 	/* queue bitmask for each vector */
 	uint16_t rxq_map[IAVF_MAX_MSIX_VECTORS];
+	uint16_t txq_map[IAVF_MAX_MSIX_VECTORS];
 };
 
 #define IAVF_MAX_PKT_TYPE 256
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 846e604..187a31c 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -336,6 +336,8 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
 		/* map all queues to the same interrupt */
 		for (i = 0; i < dev->data->nb_rx_queues; i++)
 			vf->rxq_map[vf->msix_base] |= 1 << i;
+		for (i = 0; i < dev->data->nb_tx_queues; i++)
+			vf->txq_map[vf->msix_base] |= 1 << i;
 	} else {
 		if (!rte_intr_allow_others(intr_handle)) {
 			vf->nb_msix = 1;
@@ -344,6 +346,8 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
 				vf->rxq_map[vf->msix_base] |= 1 << i;
 				intr_handle->intr_vec[i] = IAVF_MISC_VEC_ID;
 			}
+			for (i = 0; i < dev->data->nb_tx_queues; i++)
+				vf->txq_map[vf->msix_base] |= 1 << i;
 			PMD_DRV_LOG(DEBUG,
 				    "vector %u are mapping to all Rx queues",
 				    vf->msix_base);
@@ -361,6 +365,11 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
 				if (vec >= vf->nb_msix)
 					vec = IAVF_RX_VEC_START;
 			}
+			for (i = 0; i < dev->data->nb_tx_queues; i++) {
+				vf->txq_map[vec++] |= 1 << i;
+				if (vec >= vf->nb_msix)
+					vec = IAVF_RX_VEC_START;
+			}
 			PMD_DRV_LOG(DEBUG,
 				    "%u vectors are mapping to %u Rx queues",
 				    vf->nb_msix, dev->data->nb_rx_queues);
diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 6381fb6..620e011 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -614,7 +614,7 @@ iavf_config_irq_map(struct iavf_adapter *adapter)
 		vecmap->vsi_id = vf->vsi_res->vsi_id;
 		vecmap->rxitr_idx = IAVF_ITR_INDEX_DEFAULT;
 		vecmap->vector_id = vf->msix_base + i;
-		vecmap->txq_map = 0;
+		vecmap->txq_map = vf->txq_map[vf->msix_base + i];
 		vecmap->rxq_map = vf->rxq_map[vf->msix_base + i];
 	}
 
-- 
2.7.5


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

* Re: [dpdk-stable] [DPDK] net/iavf: fix Tx interrupt vertor configuration error
  2019-03-29  7:39 Wei Zhao
@ 2019-03-29  8:14 ` David Marchand
  0 siblings, 0 replies; 8+ messages in thread
From: David Marchand @ 2019-03-29  8:14 UTC (permalink / raw)
  To: Wei Zhao; +Cc: qabuild, dpdk stable

On Fri, Mar 29, 2019 at 9:07 AM Wei Zhao <wei.zhao1@intel.com> wrote:

> From: Zhao Wei <wei.zhao1@intel.com>
>
> There is need to align to kernel iavf code when setting Tx
> queue interrupt vector in messge VIRTCHNL_OP_CONFIG_IRQ_MAP,
> if not it maybe cause restart iavf port error in some scenario.
>
> Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")
> Cc: stable@dpdk.org
>
> Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
>

This should be sent to dev@dpdk.org instead of qabuild@intel.com.
Or is there a reason to only send to stable ?


-- 
David Marchand

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

* [dpdk-stable] [DPDK] net/iavf: fix Tx interrupt vertor configuration error
@ 2019-03-29  7:39 Wei Zhao
  2019-03-29  8:14 ` David Marchand
  0 siblings, 1 reply; 8+ messages in thread
From: Wei Zhao @ 2019-03-29  7:39 UTC (permalink / raw)
  To: qabuild; +Cc: Zhao Wei, stable

From: Zhao Wei <wei.zhao1@intel.com>

There is need to align to kernel iavf code when setting Tx
queue interrupt vector in messge VIRTCHNL_OP_CONFIG_IRQ_MAP,
if not it maybe cause restart iavf port error in some scenario.

Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>

---

v2:
update git log and add new work around

v3:
update git comment and change fix code as suggestion

v4:
add txq_map in struct avf_info to keep vector mapping info
---
 drivers/net/iavf/iavf.h        | 1 +
 drivers/net/iavf/iavf_ethdev.c | 9 +++++++++
 drivers/net/iavf/iavf_vchnl.c  | 2 +-
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h
index e6e3e8d..81d0054 100644
--- a/drivers/net/iavf/iavf.h
+++ b/drivers/net/iavf/iavf.h
@@ -107,6 +107,7 @@ struct iavf_info {
 	uint16_t msix_base; /* msix vector base from */
 	/* queue bitmask for each vector */
 	uint16_t rxq_map[IAVF_MAX_MSIX_VECTORS];
+	uint16_t txq_map[IAVF_MAX_MSIX_VECTORS];
 };
 
 #define IAVF_MAX_PKT_TYPE 256
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 846e604..187a31c 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -336,6 +336,8 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
 		/* map all queues to the same interrupt */
 		for (i = 0; i < dev->data->nb_rx_queues; i++)
 			vf->rxq_map[vf->msix_base] |= 1 << i;
+		for (i = 0; i < dev->data->nb_tx_queues; i++)
+			vf->txq_map[vf->msix_base] |= 1 << i;
 	} else {
 		if (!rte_intr_allow_others(intr_handle)) {
 			vf->nb_msix = 1;
@@ -344,6 +346,8 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
 				vf->rxq_map[vf->msix_base] |= 1 << i;
 				intr_handle->intr_vec[i] = IAVF_MISC_VEC_ID;
 			}
+			for (i = 0; i < dev->data->nb_tx_queues; i++)
+				vf->txq_map[vf->msix_base] |= 1 << i;
 			PMD_DRV_LOG(DEBUG,
 				    "vector %u are mapping to all Rx queues",
 				    vf->msix_base);
@@ -361,6 +365,11 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
 				if (vec >= vf->nb_msix)
 					vec = IAVF_RX_VEC_START;
 			}
+			for (i = 0; i < dev->data->nb_tx_queues; i++) {
+				vf->txq_map[vec++] |= 1 << i;
+				if (vec >= vf->nb_msix)
+					vec = IAVF_RX_VEC_START;
+			}
 			PMD_DRV_LOG(DEBUG,
 				    "%u vectors are mapping to %u Rx queues",
 				    vf->nb_msix, dev->data->nb_rx_queues);
diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 6381fb6..620e011 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -614,7 +614,7 @@ iavf_config_irq_map(struct iavf_adapter *adapter)
 		vecmap->vsi_id = vf->vsi_res->vsi_id;
 		vecmap->rxitr_idx = IAVF_ITR_INDEX_DEFAULT;
 		vecmap->vector_id = vf->msix_base + i;
-		vecmap->txq_map = 0;
+		vecmap->txq_map = vf->txq_map[vf->msix_base + i];
 		vecmap->rxq_map = vf->rxq_map[vf->msix_base + i];
 	}
 
-- 
2.7.5


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

* [dpdk-stable] [DPDK] net/iavf: fix Tx interrupt vertor configuration error
@ 2019-03-29  7:39 Wei Zhao
  0 siblings, 0 replies; 8+ messages in thread
From: Wei Zhao @ 2019-03-29  7:39 UTC (permalink / raw)
  To: qabuild; +Cc: Zhao Wei, stable

From: Zhao Wei <wei.zhao1@intel.com>

There is need to align to kernel iavf code when setting Tx
queue interrupt vector in messge VIRTCHNL_OP_CONFIG_IRQ_MAP,
if not it maybe cause restart iavf port error in some scenario.

Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>

---

v2:
update git log and add new work around

v3:
update git comment and change fix code as suggestion

v4:
add txq_map in struct avf_info to keep vector mapping info
---
 drivers/net/iavf/iavf.h        | 1 +
 drivers/net/iavf/iavf_ethdev.c | 9 +++++++++
 drivers/net/iavf/iavf_vchnl.c  | 2 +-
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h
index e6e3e8d..81d0054 100644
--- a/drivers/net/iavf/iavf.h
+++ b/drivers/net/iavf/iavf.h
@@ -107,6 +107,7 @@ struct iavf_info {
 	uint16_t msix_base; /* msix vector base from */
 	/* queue bitmask for each vector */
 	uint16_t rxq_map[IAVF_MAX_MSIX_VECTORS];
+	uint16_t txq_map[IAVF_MAX_MSIX_VECTORS];
 };
 
 #define IAVF_MAX_PKT_TYPE 256
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 846e604..187a31c 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -336,6 +336,8 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
 		/* map all queues to the same interrupt */
 		for (i = 0; i < dev->data->nb_rx_queues; i++)
 			vf->rxq_map[vf->msix_base] |= 1 << i;
+		for (i = 0; i < dev->data->nb_tx_queues; i++)
+			vf->txq_map[vf->msix_base] |= 1 << i;
 	} else {
 		if (!rte_intr_allow_others(intr_handle)) {
 			vf->nb_msix = 1;
@@ -344,6 +346,8 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
 				vf->rxq_map[vf->msix_base] |= 1 << i;
 				intr_handle->intr_vec[i] = IAVF_MISC_VEC_ID;
 			}
+			for (i = 0; i < dev->data->nb_tx_queues; i++)
+				vf->txq_map[vf->msix_base] |= 1 << i;
 			PMD_DRV_LOG(DEBUG,
 				    "vector %u are mapping to all Rx queues",
 				    vf->msix_base);
@@ -361,6 +365,11 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
 				if (vec >= vf->nb_msix)
 					vec = IAVF_RX_VEC_START;
 			}
+			for (i = 0; i < dev->data->nb_tx_queues; i++) {
+				vf->txq_map[vec++] |= 1 << i;
+				if (vec >= vf->nb_msix)
+					vec = IAVF_RX_VEC_START;
+			}
 			PMD_DRV_LOG(DEBUG,
 				    "%u vectors are mapping to %u Rx queues",
 				    vf->nb_msix, dev->data->nb_rx_queues);
diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 6381fb6..620e011 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -614,7 +614,7 @@ iavf_config_irq_map(struct iavf_adapter *adapter)
 		vecmap->vsi_id = vf->vsi_res->vsi_id;
 		vecmap->rxitr_idx = IAVF_ITR_INDEX_DEFAULT;
 		vecmap->vector_id = vf->msix_base + i;
-		vecmap->txq_map = 0;
+		vecmap->txq_map = vf->txq_map[vf->msix_base + i];
 		vecmap->rxq_map = vf->rxq_map[vf->msix_base + i];
 	}
 
-- 
2.7.5


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

* [dpdk-stable] [DPDK] net/iavf: fix Tx interrupt vertor configuration error
@ 2019-03-26  5:10 wei zhao
  0 siblings, 0 replies; 8+ messages in thread
From: wei zhao @ 2019-03-26  5:10 UTC (permalink / raw)
  To: qabuild; +Cc: Zhao Wei, stable

From: Zhao Wei <wei.zhao1@intel.com>

There is need to align to kernel iavf code when setting Tx
queue interrupt vector in messge VIRTCHNL_OP_CONFIG_IRQ_MAP,
if not it maybe cause restart iavf port error in some scenario.

Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>

---

v2:
update git log and add new work around

v3:
update git comment and change fix code as suggestion
---
---
 drivers/net/iavf/iavf_vchnl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 6381fb6..3f8c115 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -614,8 +614,8 @@ iavf_config_irq_map(struct iavf_adapter *adapter)
 		vecmap->vsi_id = vf->vsi_res->vsi_id;
 		vecmap->rxitr_idx = IAVF_ITR_INDEX_DEFAULT;
 		vecmap->vector_id = vf->msix_base + i;
-		vecmap->txq_map = 0;
 		vecmap->rxq_map = vf->rxq_map[vf->msix_base + i];
+		vecmap->txq_map = vecmap->rxq_map;
 	}
 
 	args.ops = VIRTCHNL_OP_CONFIG_IRQ_MAP;
-- 
2.7.5


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

* [dpdk-stable] [DPDK] net/iavf: fix Tx interrupt vertor configuration error
@ 2019-03-26  2:34 Zhao Wei
  0 siblings, 0 replies; 8+ messages in thread
From: Zhao Wei @ 2019-03-26  2:34 UTC (permalink / raw)
  To: qabuild; +Cc: Zhao Wei, stable

There is need to align to kernel iavf code when setting Tx
queue interrupt vector in messge VIRTCHNL_OP_CONFIG_IRQ_MAP,
if not it maybe cause restart iavf port error in some scenario.

Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>

---

v2:
update git log and add new work around

v3:
update git comment and change fix code as suggestion
---
---
 drivers/net/iavf/iavf_vchnl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 6381fb6..3f8c115 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -614,8 +614,8 @@ iavf_config_irq_map(struct iavf_adapter *adapter)
 		vecmap->vsi_id = vf->vsi_res->vsi_id;
 		vecmap->rxitr_idx = IAVF_ITR_INDEX_DEFAULT;
 		vecmap->vector_id = vf->msix_base + i;
-		vecmap->txq_map = 0;
 		vecmap->rxq_map = vf->rxq_map[vf->msix_base + i];
+		vecmap->txq_map = vecmap->rxq_map;
 	}
 
 	args.ops = VIRTCHNL_OP_CONFIG_IRQ_MAP;
-- 
2.7.5


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

* [dpdk-stable] [DPDK] net/iavf: fix Tx interrupt vertor configuration error
@ 2019-03-26  2:34 Zhao Wei
  0 siblings, 0 replies; 8+ messages in thread
From: Zhao Wei @ 2019-03-26  2:34 UTC (permalink / raw)
  To: qabuild; +Cc: Zhao Wei, stable

There is need to align to kernel iavf code when setting Tx
queue interrupt vector in messge VIRTCHNL_OP_CONFIG_IRQ_MAP,
if not it maybe cause restart iavf port error in some scenario.

Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>

---

v2:
update git log and add new work around

v3:
update git comment and change fix code as suggestion
---
---
 drivers/net/iavf/iavf_vchnl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 6381fb6..3f8c115 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -614,8 +614,8 @@ iavf_config_irq_map(struct iavf_adapter *adapter)
 		vecmap->vsi_id = vf->vsi_res->vsi_id;
 		vecmap->rxitr_idx = IAVF_ITR_INDEX_DEFAULT;
 		vecmap->vector_id = vf->msix_base + i;
-		vecmap->txq_map = 0;
 		vecmap->rxq_map = vf->rxq_map[vf->msix_base + i];
+		vecmap->txq_map = vecmap->rxq_map;
 	}
 
 	args.ops = VIRTCHNL_OP_CONFIG_IRQ_MAP;
-- 
2.7.5


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

* [dpdk-stable] [DPDK] net/iavf: fix Tx interrupt vertor configuration error
@ 2019-03-26  2:33 Zhao Wei
  0 siblings, 0 replies; 8+ messages in thread
From: Zhao Wei @ 2019-03-26  2:33 UTC (permalink / raw)
  To: qabuild; +Cc: Zhao Wei, stable

There is need to align to kernel iavf code when setting Tx
queue interrupt vector in messge VIRTCHNL_OP_CONFIG_IRQ_MAP,
if not it maybe cause restart iavf port error in some scenario.

Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>

---

v2:
update git log and add new work around

v3:
update git comment and change fix code as suggestion
---
---
 drivers/net/iavf/iavf_vchnl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 6381fb6..3f8c115 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -614,8 +614,8 @@ iavf_config_irq_map(struct iavf_adapter *adapter)
 		vecmap->vsi_id = vf->vsi_res->vsi_id;
 		vecmap->rxitr_idx = IAVF_ITR_INDEX_DEFAULT;
 		vecmap->vector_id = vf->msix_base + i;
-		vecmap->txq_map = 0;
 		vecmap->rxq_map = vf->rxq_map[vf->msix_base + i];
+		vecmap->txq_map = vecmap->rxq_map;
 	}
 
 	args.ops = VIRTCHNL_OP_CONFIG_IRQ_MAP;
-- 
2.7.5


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

end of thread, other threads:[~2019-03-29  8:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-26  5:11 [dpdk-stable] [DPDK] net/iavf: fix Tx interrupt vertor configuration error wei zhao
  -- strict thread matches above, loose matches on Subject: below --
2019-03-29  7:39 Wei Zhao
2019-03-29  8:14 ` David Marchand
2019-03-29  7:39 Wei Zhao
2019-03-26  5:10 wei zhao
2019-03-26  2:34 Zhao Wei
2019-03-26  2:34 Zhao Wei
2019-03-26  2:33 Zhao Wei

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