Skip to contentSkip to conversation

net/ixgbe: fix x550 reta set fail error

PATCH Superseded Wei Zhao 3 participants 10 messages Jul 22, 2019 – Jul 26, 2019 Network drivers

lore
Share & tools
lore

Wei Zhao

author
#0 lore raw

PATCH 1/1 net/ixgbe: fix x550 reta set fail error

There is a bug in function ixgbevf_dev_info_get(), it do not contain the reta table size get function for vf port, and this will cause error when update reta for x550 vf port.

Fixes 2144f6630fca ("ixgbe: add redirection table size in device info")
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/net/ixgbe/ixgbe_ethdev.c +5 -0
index 22c5b2c..773f667 100644
@@ -3927,6 +3927,8 @@ ixgbevf_dev_info_get(struct rte_eth_dev *dev,
 				     dev_info->rx_queue_offload_capa);
 	dev_info->tx_queue_offload_capa = ixgbe_get_tx_queue_offloads(dev);
 	dev_info->tx_offload_capa = ixgbe_get_tx_port_offloads(dev);
+	dev_info->hash_key_size = IXGBE_HKEY_MAX_INDEX * sizeof(uint32_t);
+	dev_info->reta_size = ixgbe_reta_size_get(hw->mac.type);
 
 	dev_info->default_rxconf = (struct rte_eth_rxconf) {
 		.rx_thresh = {
@@ -7438,6 +7440,9 @@ ixgbe_reta_size_get(enum ixgbe_mac_type mac_type) {
 	case ixgbe_mac_X550EM_x_vf:
 	case ixgbe_mac_X550EM_a_vf:
 		return ETH_RSS_RETA_SIZE_64;
+	case ixgbe_mac_X540_vf:
+	case ixgbe_mac_82599_vf:
+		return 0;
 	default:
 		return ETH_RSS_RETA_SIZE_128;
 	}
Signature · 1 line
2.7.5
author Tested-by Zhao HaiyangX on v1 1/1
#1 lore raw
Quoted 47 lines

-----Original Message-----
From: Zhao1, Wei
Sent: Monday, July 22, 2019 2:05 PM
To: [email protected]
Cc: [email protected]; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>
Subject: [PATCH] net/ixgbe: fix x550 reta set fail error

There is a bug in function ixgbevf_dev_info_get(), it do not contain the reta table size get function for vf port, and this will cause error when update reta for x550 vf port.

Fixes 2144f6630fca ("ixgbe: add redirection table size in device info")
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/net/ixgbe/ixgbe_ethdev.c +5 -0
index 22c5b2c..773f667 100644
@@ -3927,6 +3927,8 @@ ixgbevf_dev_info_get(struct rte_eth_dev *dev,
 				     dev_info->rx_queue_offload_capa);
 	dev_info->tx_queue_offload_capa = ixgbe_get_tx_queue_offloads(dev);
 	dev_info->tx_offload_capa = ixgbe_get_tx_port_offloads(dev);
+	dev_info->hash_key_size = IXGBE_HKEY_MAX_INDEX * sizeof(uint32_t);
+	dev_info->reta_size = ixgbe_reta_size_get(hw->mac.type);
 
 	dev_info->default_rxconf = (struct rte_eth_rxconf) {
 		.rx_thresh = {
@@ -7438,6 +7440,9 @@ ixgbe_reta_size_get(enum ixgbe_mac_type
 mac_type) {
 	case ixgbe_mac_X550EM_x_vf:
 	case ixgbe_mac_X550EM_a_vf:
 		return ETH_RSS_RETA_SIZE_64;
+	case ixgbe_mac_X540_vf:
+	case ixgbe_mac_82599_vf:
+		return 0;
 	default:
 		return ETH_RSS_RETA_SIZE_128;

}
--
2.7.5

author
#2 lore raw
In reply to Wei Zhao

Add cc HaiyangX

Quoted 58 lines

-----Original Message-----
From: Zhao1, Wei
Sent: Tuesday, July 23, 2019 11:21 AM
To: [email protected]
Cc: [email protected]; Zhang, Qi Z <[email protected]>
Subject: RE: [PATCH] net/ixgbe: fix x550 reta set fail error

Quoted 48 lines

-----Original Message-----
From: Zhao1, Wei
Sent: Monday, July 22, 2019 2:05 PM
To: [email protected]
Cc: [email protected]; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>
Subject: [PATCH] net/ixgbe: fix x550 reta set fail error

There is a bug in function ixgbevf_dev_info_get(), it do not contain the reta table size get function for vf port, and this will cause error when update reta for x550 vf port.

Fixes 2144f6630fca ("ixgbe: add redirection table size in device

info")

---
 drivers/net/ixgbe/ixgbe_ethdev.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/net/ixgbe/ixgbe_ethdev.c +5 -0
index 22c5b2c..773f667 100644
@@ -3927,6 +3927,8 @@ ixgbevf_dev_info_get(struct rte_eth_dev *dev,
 				     dev_info->rx_queue_offload_capa);
 	dev_info->tx_queue_offload_capa = ixgbe_get_tx_queue_offloads(dev);
 	dev_info->tx_offload_capa = ixgbe_get_tx_port_offloads(dev);
+	dev_info->hash_key_size = IXGBE_HKEY_MAX_INDEX * sizeof(uint32_t);
+	dev_info->reta_size = ixgbe_reta_size_get(hw->mac.type);
 
 	dev_info->default_rxconf = (struct rte_eth_rxconf) {
 		.rx_thresh = {
@@ -7438,6 +7440,9 @@ ixgbe_reta_size_get(enum ixgbe_mac_type
 mac_type) {
 	case ixgbe_mac_X550EM_x_vf:
 	case ixgbe_mac_X550EM_a_vf:
 		return ETH_RSS_RETA_SIZE_64;
+	case ixgbe_mac_X540_vf:
+	case ixgbe_mac_82599_vf:
+		return 0;
 	default:
 		return ETH_RSS_RETA_SIZE_128;

}
--
2.7.5

author
#3 lore raw

PATCH v2 1/1 net/ixgbe: fix x550 Reta set fail error

In reply to Wei Zhao

There is a bug in function ixgbevf_dev_info_get(), it do not contain the reta table size get function for vf port, and this will cause error when update reta for x550 vf port. And also when function is ixgbe_reta_size_get() called, it should return other ixgbe NIC vf reta support or not, not only x550.

Fixes 2144f6630fca ("ixgbe: add redirection table size in device info")
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/net/ixgbe/ixgbe_ethdev.c +5 -0
index 22c5b2c..773f667 100644
@@ -3927,6 +3927,8 @@ ixgbevf_dev_info_get(struct rte_eth_dev *dev,
 				     dev_info->rx_queue_offload_capa);
 	dev_info->tx_queue_offload_capa = ixgbe_get_tx_queue_offloads(dev);
 	dev_info->tx_offload_capa = ixgbe_get_tx_port_offloads(dev);
+	dev_info->hash_key_size = IXGBE_HKEY_MAX_INDEX * sizeof(uint32_t);
+	dev_info->reta_size = ixgbe_reta_size_get(hw->mac.type);
 
 	dev_info->default_rxconf = (struct rte_eth_rxconf) {
 		.rx_thresh = {
@@ -7438,6 +7440,9 @@ ixgbe_reta_size_get(enum ixgbe_mac_type mac_type) {
 	case ixgbe_mac_X550EM_x_vf:
 	case ixgbe_mac_X550EM_a_vf:
 		return ETH_RSS_RETA_SIZE_64;
+	case ixgbe_mac_X540_vf:
+	case ixgbe_mac_82599_vf:
+		return 0;
 	default:
 		return ETH_RSS_RETA_SIZE_128;
 	}
Signature · 1 line
2.7.5
author
#4 lore raw

PATCH v2 1/1 net/ixgbe: fix x550 Reta set fail error

In reply to Wei Zhao

There is a bug in function ixgbevf_dev_info_get(), it do not contain the reta table size get function for vf port, and this will cause error when update reta for x550 vf port. And also when function ixgbe_reta_size_get() is called, it should return other ixgbe NIC vf reta support or not, not only x550.

Fixes 2144f6630fca ("ixgbe: add redirection table size in device info")
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/net/ixgbe/ixgbe_ethdev.c +5 -0
index 22c5b2c..773f667 100644
@@ -3927,6 +3927,8 @@ ixgbevf_dev_info_get(struct rte_eth_dev *dev,
 				     dev_info->rx_queue_offload_capa);
 	dev_info->tx_queue_offload_capa = ixgbe_get_tx_queue_offloads(dev);
 	dev_info->tx_offload_capa = ixgbe_get_tx_port_offloads(dev);
+	dev_info->hash_key_size = IXGBE_HKEY_MAX_INDEX * sizeof(uint32_t);
+	dev_info->reta_size = ixgbe_reta_size_get(hw->mac.type);
 
 	dev_info->default_rxconf = (struct rte_eth_rxconf) {
 		.rx_thresh = {
@@ -7438,6 +7440,9 @@ ixgbe_reta_size_get(enum ixgbe_mac_type mac_type) {
 	case ixgbe_mac_X550EM_x_vf:
 	case ixgbe_mac_X550EM_a_vf:
 		return ETH_RSS_RETA_SIZE_64;
+	case ixgbe_mac_X540_vf:
+	case ixgbe_mac_82599_vf:
+		return 0;
 	default:
 		return ETH_RSS_RETA_SIZE_128;
 	}
Signature · 1 line
2.7.5
#5 lore raw

Re: [dpdk-dev] [PATCH v2] net/ixgbe: fix x550 Reta set fail error

Quoted 10 lines

-----Original Message-----
From: Zhao1, Wei
Sent: Tuesday, July 23, 2019 12:13 PM
To: [email protected]
Cc: [email protected]; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>
Subject: [PATCH v2] net/ixgbe: fix x550 Reta set fail error

Quoted 4 lines

There is a bug in function ixgbevf_dev_info_get(), it do not contain the reta table size get function for vf port, and this will cause error when update reta for x550 vf port. And also when function ixgbe_reta_size_get() is called, it should return other ixgbe NIC vf reta support or not, not only x550.

This commit log is a little bit misleading

Does below description OK for you?

Title:
net/ixgbe: fix reta size for VF

Filling correct reta table size at ixgbevf_dev_info_get, so reta table update will be supported for VF port. For X540_vf and 82599_vf, since they don't support reta table update, set reta size to 0.

Quoted 36 lines
Fixes 2144f6630fca ("ixgbe: add redirection table size in device info")
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/net/ixgbe/ixgbe_ethdev.c +5 -0
index 22c5b2c..773f667 100644
@@ -3927,6 +3927,8 @@ ixgbevf_dev_info_get(struct rte_eth_dev *dev,
 				     dev_info->rx_queue_offload_capa);
 	dev_info->tx_queue_offload_capa = ixgbe_get_tx_queue_offloads(dev);
 	dev_info->tx_offload_capa = ixgbe_get_tx_port_offloads(dev);
+	dev_info->hash_key_size = IXGBE_HKEY_MAX_INDEX * sizeof(uint32_t);
+	dev_info->reta_size = ixgbe_reta_size_get(hw->mac.type);
 
 	dev_info->default_rxconf = (struct rte_eth_rxconf) {
 		.rx_thresh = {
@@ -7438,6 +7440,9 @@ ixgbe_reta_size_get(enum ixgbe_mac_type
 mac_type) {
 	case ixgbe_mac_X550EM_x_vf:
 	case ixgbe_mac_X550EM_a_vf:
 		return ETH_RSS_RETA_SIZE_64;
+	case ixgbe_mac_X540_vf:
+	case ixgbe_mac_82599_vf:
+		return 0;
 	default:
 		return ETH_RSS_RETA_SIZE_128;

}
--
2.7.5

Reviewed-by on v2 1/1
#6 lore raw

Re: [dpdk-dev] [PATCH v2] net/ixgbe: fix x550 Reta set fail error

In reply to Wei Zhao
Quoted 10 lines · Wei Zhao

There is a bug in function ixgbevf_dev_info_get(), it do not contain the reta table size get function for vf port, and this will cause error when update reta for x550 vf port. And also when function ixgbe_reta_size_get() is called, it should return other ixgbe NIC vf reta support or not, not only x550.

Fixes 2144f6630fca ("ixgbe: add redirection table size in device info")

Minor nit about your signoff, the first letter of your name should be captial.

For the patch,

author
#7 lore raw

PATCH v3 1/1 net/ixgbe: fix Reta size for VF

In reply to Wei Zhao

Filling correct reta table size at ixgbevf_dev_info_get, so reta table update will be supported for VF port. For X540_vf and 82599_vf, since they don't support reta table update, set reta size to 0.

Fixes 2144f6630fca ("ixgbe: add redirection table size in device info")

---

v2:
--add more git log

v3:
--change headline and update git log

---
 drivers/net/ixgbe/ixgbe_ethdev.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/net/ixgbe/ixgbe_ethdev.c +5 -0
index 22c5b2c..773f667 100644
@@ -3927,6 +3927,8 @@ ixgbevf_dev_info_get(struct rte_eth_dev *dev,
 				     dev_info->rx_queue_offload_capa);
 	dev_info->tx_queue_offload_capa = ixgbe_get_tx_queue_offloads(dev);
 	dev_info->tx_offload_capa = ixgbe_get_tx_port_offloads(dev);
+	dev_info->hash_key_size = IXGBE_HKEY_MAX_INDEX * sizeof(uint32_t);
+	dev_info->reta_size = ixgbe_reta_size_get(hw->mac.type);
 
 	dev_info->default_rxconf = (struct rte_eth_rxconf) {
 		.rx_thresh = {
@@ -7438,6 +7440,9 @@ ixgbe_reta_size_get(enum ixgbe_mac_type mac_type) {
 	case ixgbe_mac_X550EM_x_vf:
 	case ixgbe_mac_X550EM_a_vf:
 		return ETH_RSS_RETA_SIZE_64;
+	case ixgbe_mac_X540_vf:
+	case ixgbe_mac_82599_vf:
+		return 0;
 	default:
 		return ETH_RSS_RETA_SIZE_128;
 	}
Signature · 1 line
2.7.5
Acked-by on v3 1/1 Applied
#8 lore raw

Re: [dpdk-dev] [PATCH v3] net/ixgbe: fix Reta size for VF

Quoted 15 lines

-----Original Message-----
From: Zhao1, Wei
Sent: Friday, July 26, 2019 9:38 AM
To: [email protected]
Cc: [email protected]; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>
Subject: [PATCH v3] net/ixgbe: fix Reta size for VF

Filling correct reta table size at ixgbevf_dev_info_get, so reta table update will be supported for VF port.
For X540_vf and 82599_vf, since they don't support reta table update, set reta size to 0.

Quoted 4 lines
Fixes 2144f6630fca ("ixgbe: add redirection table size in device info")

Please correct to "Wei Zhao" next time.

Quoted 2 lines

---

Applied to dpdk-next-net-intel.

Thanks
Qi

author
#9 lore raw

Re: [dpdk-dev] [PATCH v3] net/ixgbe: fix Reta size for VF

Ok.

Quoted 38 lines

-----Original Message-----
From: Zhang, Qi Z
Sent: Friday, July 26, 2019 12:55 PM
To: Zhao1, Wei <[email protected]>; [email protected]
Cc: [email protected]
Subject: RE: [PATCH v3] net/ixgbe: fix Reta size for VF

Quoted 13 lines

-----Original Message-----
From: Zhao1, Wei
Sent: Friday, July 26, 2019 9:38 AM
To: [email protected]
Cc: [email protected]; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>
Subject: [PATCH v3] net/ixgbe: fix Reta size for VF

Filling correct reta table size at ixgbevf_dev_info_get, so reta table update will be supported for VF port.
For X540_vf and 82599_vf, since they don't support reta table update, set reta size to 0.

Quoted 5 lines
Fixes 2144f6630fca ("ixgbe: add redirection table size in device

info")

Please correct to "Wei Zhao" next time.

Quoted 2 lines

---

Applied to dpdk-next-net-intel.

Thanks
Qi