Skip to contentSkip to conversation

fix to use index to HW queue assigned to PF instead of queus 0 - nb_rx_queues which belong to VF in SR-IOV configuration

PATCH In review azelezniak 5 participants 6 messages Aug 26, 2016 – Sep 21, 2016 Network drivers

lore
Share & tools
lore

azelezniak

author
#0 lore raw

PATCH 1/1 fix to use index to HW queue assigned to PF instead of queus 0 - nb_rx_queues which belong to VF in SR-IOV configuration

From: Alex Zelezniak <[email protected]>

---
 drivers/net/ixgbe/ixgbe_ethdev.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
drivers/net/ixgbe/ixgbe_ethdev.c +8 -4
index bc2ad4b..d8d32f7 100644
@@ -1779,6 +1779,7 @@ ixgbe_vlan_hw_strip_disable_all(struct rte_eth_dev *dev)
 		IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	uint32_t ctrl;
 	uint16_t i;
+	struct ixgbe_rx_queue *rxq;
 
 	PMD_INIT_FUNC_TRACE();
 
@@ -1789,9 +1790,10 @@ ixgbe_vlan_hw_strip_disable_all(struct rte_eth_dev *dev)
 	} else {
 		/* Other 10G NIC, the VLAN strip can be setup per queue in RXDCTL */
 		for (i = 0; i < dev->data->nb_rx_queues; i++) {
-			ctrl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(i));
+			rxq = dev->data->rx_queues[i];
+			ctrl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(rxq->reg_idx));
 			ctrl &= ~IXGBE_RXDCTL_VME;
-			IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(i), ctrl);
+			IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(rxq->reg_idx), ctrl);
 
 			/* record those setting for HW strip per queue */
 			ixgbe_vlan_hw_strip_bitmap_set(dev, i, 0);
@@ -1806,6 +1808,7 @@ ixgbe_vlan_hw_strip_enable_all(struct rte_eth_dev *dev)
 		IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	uint32_t ctrl;
 	uint16_t i;
+	struct ixgbe_rx_queue *rxq;
 
 	PMD_INIT_FUNC_TRACE();
 
@@ -1816,9 +1819,10 @@ ixgbe_vlan_hw_strip_enable_all(struct rte_eth_dev *dev)
 	} else {
 		/* Other 10G NIC, the VLAN strip can be setup per queue in RXDCTL */
 		for (i = 0; i < dev->data->nb_rx_queues; i++) {
-			ctrl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(i));
+			rxq = dev->data->rx_queues[i];
+			ctrl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(rxq->reg_idx));
 			ctrl |= IXGBE_RXDCTL_VME;
-			IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(i), ctrl);
+			IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(rxq->reg_idx), ctrl);
 
 			/* record those setting for HW strip per queue */
 			ixgbe_vlan_hw_strip_bitmap_set(dev, i, 1);
Signature · 1 line
2.5.4 (Apple Git-61)
#1 lore raw

Hi Alex,

Quoted 4 lines · azelezniak

From: Alex Zelezniak <[email protected]>

---

Thank you for the patch, not related to the patch content but related to the patch format:
patch subject is too long, it is expected to be around 50 characters, can you please move some of information to the patch commit log?

Also since this is a fix, commit log requires a Fixes line.

More details on:
http://dpdk.org/doc/guides/contributing/patches.html#sending-patches

Thanks,
ferruh

#2 lore raw
Quoted 13 lines · On Fri, 26 Aug 2016 11:55:40 +0100 Ferruh Yigit <[email protected]> wrote:

Hi Alex,

Quoted 4 lines · azelezniak

From: Alex Zelezniak <[email protected]>

---

Thank you for the patch, not related to the patch content but related to the patch format:
patch subject is too long, it is expected to be around 50 characters, can you please move some of information to the patch commit log?

Quoted 8 lines

Also since this is a fix, commit log requires a Fixes line.

More details on:
http://dpdk.org/doc/guides/contributing/patches.html#sending-patches

Thanks,
ferruh

The subject line of the patch email becomes the first line of the git commit message. This also documented on 'git commit' man page.

DISCUSSION
Though not required, it’s a good idea to begin the commit message with a single short (less than 50 character) line summarizing the change, followed by a blank line and then a more thorough description.

Overly long summary lines are flagged as errors by tools like Debian lintian.

#3 lore raw

PATCH v2 1/1 net/ixgbe: use queues assigned to PF instad of VF

In reply to azelezniak

From: azelezniak <[email protected]>

v2:
* shorten Subject line
* added more thorough description

v1:
this patch uses queues which belong to PF instead of queus 0 - nb_rx_queues which belong to VF0 in SR-IOV configuration

---
 drivers/net/ixgbe/ixgbe_ethdev.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
drivers/net/ixgbe/ixgbe_ethdev.c +8 -4
index bc2ad4b..d8d32f7 100644
@@ -1779,6 +1779,7 @@ ixgbe_vlan_hw_strip_disable_all(struct rte_eth_dev *dev)
 		IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	uint32_t ctrl;
 	uint16_t i;
+	struct ixgbe_rx_queue *rxq;
 
 	PMD_INIT_FUNC_TRACE();
 
@@ -1789,9 +1790,10 @@ ixgbe_vlan_hw_strip_disable_all(struct rte_eth_dev *dev)
 	} else {
 		/* Other 10G NIC, the VLAN strip can be setup per queue in RXDCTL */
 		for (i = 0; i < dev->data->nb_rx_queues; i++) {
-			ctrl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(i));
+			rxq = dev->data->rx_queues[i];
+			ctrl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(rxq->reg_idx));
 			ctrl &= ~IXGBE_RXDCTL_VME;
-			IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(i), ctrl);
+			IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(rxq->reg_idx), ctrl);
 
 			/* record those setting for HW strip per queue */
 			ixgbe_vlan_hw_strip_bitmap_set(dev, i, 0);
@@ -1806,6 +1808,7 @@ ixgbe_vlan_hw_strip_enable_all(struct rte_eth_dev *dev)
 		IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	uint32_t ctrl;
 	uint16_t i;
+	struct ixgbe_rx_queue *rxq;
 
 	PMD_INIT_FUNC_TRACE();
 
@@ -1816,9 +1819,10 @@ ixgbe_vlan_hw_strip_enable_all(struct rte_eth_dev *dev)
 	} else {
 		/* Other 10G NIC, the VLAN strip can be setup per queue in RXDCTL */
 		for (i = 0; i < dev->data->nb_rx_queues; i++) {
-			ctrl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(i));
+			rxq = dev->data->rx_queues[i];
+			ctrl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(rxq->reg_idx));
 			ctrl |= IXGBE_RXDCTL_VME;
-			IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(i), ctrl);
+			IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(rxq->reg_idx), ctrl);
 
 			/* record those setting for HW strip per queue */
 			ixgbe_vlan_hw_strip_bitmap_set(dev, i, 1);
Signature · 1 line
2.5.4 (Apple Git-61)
Acked-by on v2 1/1
#4 lore raw

Re: [PATCH v2] net/ixgbe: use queues assigned to PF instad of VF

Hi,

Quoted 13 lines

-----Original Message-----
From: Alex Zelezniak [mailto:[email protected]]
Sent: Tuesday, August 30, 2016 9:23 AM
To: [email protected]
Cc: Lu, Wenzhuo; Yigit, Ferruh; [email protected]; azelezniak
Subject: [PATCH v2] net/ixgbe: use queues assigned to PF instad of VF

From: azelezniak <[email protected]>

v2:
* shorten Subject line
* added more thorough description

Quoted 5 lines

v1:
this patch uses queues which belong to PF instead of queus 0 - nb_rx_queues which belong to VF0 in SR-IOV configuration

Thanks for the patch:)

#5 lore raw

Re: [PATCH v2] net/ixgbe: use queues assigned to PF instad of VF

Quoted 15 lines · Wenzhuo

Hi,

Quoted 13 lines

-----Original Message-----
From: Alex Zelezniak [mailto:[email protected]]
Sent: Tuesday, August 30, 2016 9:23 AM
To: [email protected]
Cc: Lu, Wenzhuo; Yigit, Ferruh; [email protected]; azelezniak
Subject: [PATCH v2] net/ixgbe: use queues assigned to PF instad of VF

From: azelezniak <[email protected]>

v2:
* shorten Subject line
* added more thorough description

Quoted 8 lines
Quoted 5 lines

v1:
this patch uses queues which belong to PF instead of queus 0 - nb_rx_queues which belong to VF0 in SR-IOV configuration

Thanks for the patch:)

Applied to dpdk-next-net/rel_16_11 with updated title "net/ixgbe: fix VF reset to apply to correct VF".

Regards,
/Bruce