Skip to contentSkip to conversation

ixgbe: only check Tx queue enablement when debugging

PATCH New Emil Tantilov 2 participants 9 messages Jul 29, 2016 – Aug 3, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 ixgbe: only check Tx queue enablement when debugging

Following a write the TXDCTL.ENABLE bit is set only when the Tx queue is actually enabled, which may not happen during the configure phase even if we waited for it. Make this check debug only since this is causing confusion with users who notice the warning in dmesg.

---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +1 -1
index 7871f53..f687b76 100644
@@ -3224,7 +3224,7 @@ void ixgbe_configure_tx_ring(struct ixgbe_adapter *adapter,
 		txdctl = IXGBE_READ_REG(hw, IXGBE_TXDCTL(reg_idx));
 	} while (--wait_loop && !(txdctl & IXGBE_TXDCTL_ENABLE));
 	if (!wait_loop)
-		e_err(drv, "Could not enable Tx Queue %d\n", reg_idx);
+		hw_dbg(hw, "Could not enable Tx Queue %d\n", reg_idx);
 }
 
 static void ixgbe_setup_mtqc(struct ixgbe_adapter *adapter)
#1 lore raw

PATCH 2/3 ixgbevf: change hw_dbg to use netdev_dbg

Instead of the home brewed macro make use of netdev_dbg same as the ixgbe driver.

---
 drivers/net/ethernet/intel/ixgbevf/ixgbevf.h      |   11 ++++-------
 drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c |    1 +
 2 files changed, 5 insertions(+), 7 deletions(-)
drivers/net/ethernet/intel/ixgbevf/ixgbevf.h +4 -7
index be52f59..5639fbe 100644
@@ -502,12 +502,9 @@ extern void ixgbevf_write_eitr(struct ixgbevf_q_vector *q_vector);
 void ixgbe_napi_add_all(struct ixgbevf_adapter *adapter);
 void ixgbe_napi_del_all(struct ixgbevf_adapter *adapter);
 
-#ifdef DEBUG
-char *ixgbevf_get_hw_dev_name(struct ixgbe_hw *hw);
-#define hw_dbg(hw, format, arg...) \
-	printk(KERN_DEBUG "%s: " format, ixgbevf_get_hw_dev_name(hw), ##arg)
-#else
-#define hw_dbg(hw, format, arg...) do {} while (0)
-#endif
+#define ixgbevf_hw_to_netdev(hw) \
+	(((struct ixgbevf_adapter *)(hw)->back)->netdev)
 
+#define hw_dbg(hw, format, arg...) \
+	netdev_dbg(ixgbevf_hw_to_netdev(hw), format, ## arg)
 #endif /* _IXGBEVF_H_ */
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c +1 -0
index d9d6616..8d4f535 100644
@@ -2993,6 +2993,7 @@ static void ixgbevf_free_all_tx_resources(struct ixgbevf_adapter *adapter)
  **/
 int ixgbevf_setup_tx_resources(struct ixgbevf_ring *tx_ring)
 {
+	struct ixgbevf_adapter *adapter = netdev_priv(tx_ring->netdev);
 	int size;
 
 	size = sizeof(struct ixgbevf_tx_buffer) * tx_ring->count;
#2 lore raw

PATCH 2/3 ixgbevf: change hw_dbg to use netdev_dbg

Quoted 8 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Emil Tantilov
Sent: Friday, July 29, 2016 10:30 AM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH 2/3] ixgbevf: change hw_dbg to use netdev_dbg

Quoted 8 lines

Instead of the home brewed macro make use of netdev_dbg same as the ixgbe driver.

---
 drivers/net/ethernet/intel/ixgbevf/ixgbevf.h      |   11 ++++-------
 drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c |    1 +
 2 files changed, 5 insertions(+), 7 deletions(-)
#3 lore raw

PATCH 2/3 ixgbevf: change hw_dbg to use netdev_dbg

In reply to Emil Tantilov
Quoted 8 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Emil Tantilov
Sent: Friday, July 29, 2016 10:30 AM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH 2/3] ixgbevf: change hw_dbg to use netdev_dbg

Quoted 8 lines

Instead of the home brewed macro make use of netdev_dbg same as the ixgbe driver.

---
 drivers/net/ethernet/intel/ixgbevf/ixgbevf.h      |   11 ++++-------
 drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c |    1 +
 2 files changed, 5 insertions(+), 7 deletions(-)
#4 lore raw

PATCH 3/3 ixgbevf: only check Tx queue enablement when debugging

In reply to Emil Tantilov

Following a write the VFTXDCTL.ENABLE bit is set only when the Tx queue is actually enabled, which may not happen during the configure phase even if we waited for it. Make this check debug only since this is causing confusion with users who notice the warning in dmesg.

---
 drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c +1 -1
index 8d4f535..4044608 100644
@@ -1612,7 +1612,7 @@ static void ixgbevf_configure_tx_ring(struct ixgbevf_adapter *adapter,
 		txdctl = IXGBE_READ_REG(hw, IXGBE_VFTXDCTL(reg_idx));
 	}  while (--wait_loop && !(txdctl & IXGBE_TXDCTL_ENABLE));
 	if (!wait_loop)
-		pr_err("Could not enable Tx Queue %d\n", reg_idx);
+		hw_dbg(hw, "Could not enable Tx Queue %d\n", reg_idx);
 }
 
 /**
#5 lore raw

PATCH 3/3 ixgbevf: only check Tx queue enablement when debugging

Quoted 13 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Emil Tantilov
Sent: Friday, July 29, 2016 10:30 AM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH 3/3] ixgbevf: only check Tx queue enablement when debugging

Following a write the VFTXDCTL.ENABLE bit is set only when the Tx queue is actually enabled, which may not happen during the configure phase even if we waited for it. Make this check debug only since this is causing confusion with users who notice the warning in dmesg.

Quoted 4 lines
---
 drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
#6 lore raw

PATCH 3/3 ixgbevf: only check Tx queue enablement when debugging

In reply to Emil Tantilov
Quoted 13 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Emil Tantilov
Sent: Friday, July 29, 2016 10:30 AM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH 3/3] ixgbevf: only check Tx queue enablement when debugging

Following a write the VFTXDCTL.ENABLE bit is set only when the Tx queue is actually enabled, which may not happen during the configure phase even if we waited for it. Make this check debug only since this is causing confusion with users who notice the warning in dmesg.

Quoted 4 lines
---
 drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
#7 lore raw

PATCH 1/3 ixgbe: only check Tx queue enablement when debugging

In reply to Emil Tantilov
Quoted 13 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Emil Tantilov
Sent: Friday, July 29, 2016 10:30 AM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH 1/3] ixgbe: only check Tx queue enablement when debugging

Following a write the TXDCTL.ENABLE bit is set only when the Tx queue is actually enabled, which may not happen during the configure phase even if we waited for it. Make this check debug only since this is causing confusion with users who notice the warning in dmesg.

Quoted 4 lines
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
#8 lore raw

PATCH 1/3 ixgbe: only check Tx queue enablement when debugging

In reply to Emil Tantilov
Quoted 13 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Emil Tantilov
Sent: Friday, July 29, 2016 10:30 AM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH 1/3] ixgbe: only check Tx queue enablement when debugging

Following a write the TXDCTL.ENABLE bit is set only when the Tx queue is actually enabled, which may not happen during the configure phase even if we waited for it. Make this check debug only since this is causing confusion with users who notice the warning in dmesg.

Quoted 4 lines
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)