Skip to contentSkip to conversation

net/ixgbe: fix Rx/Tx queue interrupt for x550 devices

PATCH Superseded Qiming Yang 4 participants 6 messages Jul 17, 2017 – Jul 19, 2017 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/ixgbe: fix Rx/Tx queue interrupt for x550 devices

x550 devices not do interrupt vector mapping before enable Rx/Tx queue interrupt, makes interrupt mode can't work neither with igb_uio or VFIO.

Fixes d2e72774e58c ("ixgbe/base: support X550")
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ixgbe/ixgbe_ethdev.c +2 -1
index 9b06ac1..8432482 100644
@@ -5611,7 +5611,8 @@ ixgbe_set_ivar_map(struct ixgbe_hw *hw, int8_t direction,
 		tmp |= (msix_vector << (8 * (queue & 0x3)));
 		IXGBE_WRITE_REG(hw, IXGBE_IVAR(idx), tmp);
 	} else if ((hw->mac.type == ixgbe_mac_82599EB) ||
-			(hw->mac.type == ixgbe_mac_X540)) {
+			(hw->mac.type == ixgbe_mac_X540)
+			(hw->mac.type == ixgbe_mac_X550)) {
 		if (direction == -1) {
 			/* other causes */
 			idx = ((queue & 1) * 8);
Signature · 1 line
2.7.4
#1 lore raw

Hi,Qiming:

Quoted 24 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Qiming Yang
Sent: Monday, July 17, 2017 1:35 PM
To: [email protected]
Cc: [email protected]; Lu, Wenzhuo <[email protected]>; Yang, Qiming <[email protected]>
Subject: [dpdk-dev] [PATCH] net/ixgbe: fix Rx/Tx queue interrupt for x550 devices

x550 devices not do interrupt vector mapping before enable Rx/Tx queue interrupt, makes interrupt mode can't work neither with igb_uio or VFIO.

Fixes d2e72774e58c ("ixgbe/base: support X550")
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ixgbe/ixgbe_ethdev.c +0 -0
index 9b06ac1..8432482 100644

drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_set_ivar_map(struct ixgbe_hw *hw, int8_t · line 5616

Quoted 7 lines
drivers/net/ixgbe/ixgbe_ethdev.c +2 -1
@@ -5611,7 +5611,8 @@ ixgbe_set_ivar_map(struct ixgbe_hw *hw, int8_t
 direction,
 		tmp |= (msix_vector << (8 * (queue & 0x3)));
 		IXGBE_WRITE_REG(hw, IXGBE_IVAR(idx), tmp);
 	} else if ((hw->mac.type == ixgbe_mac_82599EB) ||
-			(hw->mac.type == ixgbe_mac_X540)) {
+			(hw->mac.type == ixgbe_mac_X540)
+			(hw->mac.type == ixgbe_mac_X550)) {

It looks like that you forget to add "||"

Thanks
Zhiyong

Quoted 5 lines
drivers/net/ixgbe/ixgbe_ethdev.c +0 -0
 		if (direction == -1) {
 			/* other causes */

idx = ((queue & 1) * 8);
--
2.7.4

#2 lore raw

Yes, thanks. I'll send another patch with both fixed other issue.

Quoted 54 lines

-----Original Message-----
From: Yang, Zhiyong
Sent: Monday, July 17, 2017 2:09 PM
To: Yang, Qiming <[email protected]>; [email protected]
Cc: [email protected]; Lu, Wenzhuo <[email protected]>; Yang, Qiming <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] net/ixgbe: fix Rx/Tx queue interrupt for x550 devices

Hi,Qiming:

Quoted 25 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Qiming Yang
Sent: Monday, July 17, 2017 1:35 PM
To: [email protected]
Cc: [email protected]; Lu, Wenzhuo <[email protected]>; Yang, Qiming <[email protected]>
Subject: [dpdk-dev] [PATCH] net/ixgbe: fix Rx/Tx queue interrupt for x550 devices

x550 devices not do interrupt vector mapping before enable Rx/Tx queue interrupt, makes interrupt mode can't work neither with igb_uio or VFIO.

Fixes d2e72774e58c ("ixgbe/base: support X550")
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ixgbe/ixgbe_ethdev.c +0 -0
index 9b06ac1..8432482 100644

drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_set_ivar_map(struct ixgbe_hw *hw, int8_t · line 5616

Quoted 7 lines
drivers/net/ixgbe/ixgbe_ethdev.c +2 -1
@@ -5611,7 +5611,8 @@ ixgbe_set_ivar_map(struct ixgbe_hw *hw, int8_t
 direction,
 		tmp |= (msix_vector << (8 * (queue & 0x3)));
 		IXGBE_WRITE_REG(hw, IXGBE_IVAR(idx), tmp);
 	} else if ((hw->mac.type == ixgbe_mac_82599EB) ||
-			(hw->mac.type == ixgbe_mac_X540)) {
+			(hw->mac.type == ixgbe_mac_X540)
+			(hw->mac.type == ixgbe_mac_X550)) {

It looks like that you forget to add "||"

Thanks
Zhiyong

Quoted 5 lines
drivers/net/ixgbe/ixgbe_ethdev.c +0 -0
 		if (direction == -1) {
 			/* other causes */

idx = ((queue & 1) * 8);
--
2.7.4

#3 lore raw

PATCH v2 1/1 net/ixgbe: fix Rx/Tx queue interrupt for x550 devices

In reply to Qiming Yang

x550 devices not do interrupt vector mapping before enable Rx/Tx queue interrupt, makes interrupt mode can't work neither with igb_uio or VFIO.

Fixes d2e72774e58c ("ixgbe/base: support X550")

---
v2 changes:
* fixed other cause interrupt vector map and typo issue

---
 drivers/net/ixgbe/ixgbe_ethdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ixgbe/ixgbe_ethdev.c +3 -1
index 9b06ac1..0caafd5 100644
@@ -5611,7 +5611,8 @@ ixgbe_set_ivar_map(struct ixgbe_hw *hw, int8_t direction,
 		tmp |= (msix_vector << (8 * (queue & 0x3)));
 		IXGBE_WRITE_REG(hw, IXGBE_IVAR(idx), tmp);
 	} else if ((hw->mac.type == ixgbe_mac_82599EB) ||
-			(hw->mac.type == ixgbe_mac_X540)) {
+			(hw->mac.type == ixgbe_mac_X540) ||
+			(hw->mac.type == ixgbe_mac_X550)) {
 		if (direction == -1) {
 			/* other causes */
 			idx = ((queue & 1) * 8);
@@ -5719,6 +5720,7 @@ ixgbe_configure_msix(struct rte_eth_dev *dev)
 		break;
 	case ixgbe_mac_82599EB:
 	case ixgbe_mac_X540:
+	case ixgbe_mac_X550:
 		ixgbe_set_ivar_map(hw, -1, 1, IXGBE_MISC_VEC_ID);
 		break;
 	default:
Signature · 1 line
2.7.4
Acked-by on v2 1/1
#4 lore raw
Quoted 11 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Qiming Yang
Sent: Tuesday, July 18, 2017 10:29 AM
To: [email protected]
Cc: [email protected]; Lu, Wenzhuo <[email protected]>; Yang, Qiming <[email protected]>
Subject: [dpdk-dev] [PATCH v2] net/ixgbe: fix Rx/Tx queue interrupt for x550 devices

Quoted 6 lines

x550 devices not do interrupt vector mapping before enable Rx/Tx queue interrupt, makes interrupt mode can't work neither with igb_uio or VFIO.

Fixes d2e72774e58c ("ixgbe/base: support X550")

Have looked through datasheet of 82599, X540 and X550.

Quoted 33 lines

---
v2 changes:
* fixed other cause interrupt vector map and typo issue

---
 drivers/net/ixgbe/ixgbe_ethdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ixgbe/ixgbe_ethdev.c +2 -1
index 9b06ac1..0caafd5 100644
@@ -5611,7 +5611,8 @@ ixgbe_set_ivar_map(struct ixgbe_hw *hw, int8_t
 direction,
 		tmp |= (msix_vector << (8 * (queue & 0x3)));
 		IXGBE_WRITE_REG(hw, IXGBE_IVAR(idx), tmp);
 	} else if ((hw->mac.type == ixgbe_mac_82599EB) ||
-			(hw->mac.type == ixgbe_mac_X540)) {
+			(hw->mac.type == ixgbe_mac_X540) ||
+			(hw->mac.type == ixgbe_mac_X550)) {
 		if (direction == -1) {
 			/* other causes */
drivers/net/ixgbe/ixgbe_ethdev.c +1 -1
 			idx = ((queue & 1) * 8);
@@ -5719,6 +5720,7 @@ ixgbe_configure_msix(struct rte_eth_dev *dev)
 		break;
 	case ixgbe_mac_82599EB:
 	case ixgbe_mac_X540:
+	case ixgbe_mac_X550:
 		ixgbe_set_ivar_map(hw, -1, 1, IXGBE_MISC_VEC_ID);
 		break;
 	default:
--

2.7.4

Applied
#5 lore raw
Quoted 14 lines · Wei
Quoted 14 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Qiming Yang
Sent: Tuesday, July 18, 2017 10:29 AM
To: [email protected]
Cc: [email protected]; Lu, Wenzhuo <[email protected]>; Yang, Qiming <[email protected]>
Subject: [dpdk-dev] [PATCH v2] net/ixgbe: fix Rx/Tx queue interrupt for x550 devices

x550 devices not do interrupt vector mapping before enable Rx/Tx queue interrupt, makes interrupt mode can't work neither with igb_uio or VFIO.

Quoted 6 lines
Quoted 3 lines
Fixes d2e72774e58c ("ixgbe/base: support X550")

Have looked through datasheet of 82599, X540 and X550.

Applied to dpdk-next-net/master, thanks.