Skip to contentSkip to conversation

igb: fix a typo in the configuration help menu

PATCH New Jεan Sacren 3 participants 13 messages Oct 12, 2015 – Oct 13, 2015

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

PATCH 1/8 igb: fix a typo in the configuration help menu

From: Jean Sacren <[email protected]>

'warming' should be 'warning'. Fix it so that the pertinent text in Direct Cache Access (DCA) Support menu would deliver the intended semantics.

---
 drivers/net/ethernet/intel/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/Kconfig +1 -1
index 4163b16489b3..1268a182d1a2 100644
@@ -124,7 +124,7 @@ config IGB_DCA
 	depends on IGB && DCA && !(IGB=y && DCA=m)
 	---help---
 	  Say Y here if you want to use Direct Cache Access (DCA) in the
-	  driver.  DCA is a method for warming the CPU cache before data
+	  driver.  DCA is a method for warning the CPU cache before data
 	  is used, with the intent of lessening the impact of cache misses.
 
 config IGBVF
#1 lore raw

PATCH 2/8 ixgbe: fix a typo in the configuration help menu

From: Jean Sacren <[email protected]>

'warming' should be 'warning'. Fix it so that the pertinent text in Direct Cache Access (DCA) Support menu would deliver the intended semantics.

---
 drivers/net/ethernet/intel/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/Kconfig +1 -1
index 1268a182d1a2..de699cd628f4 100644
@@ -215,7 +215,7 @@ config IXGBE_DCA
 	depends on IXGBE && DCA && !(IXGBE=y && DCA=m)
 	---help---
 	  Say Y here if you want to use Direct Cache Access (DCA) in the
-	  driver.  DCA is a method for warming the CPU cache before data
+	  driver.  DCA is a method for warning the CPU cache before data
 	  is used, with the intent of lessening the impact of cache misses.
 
 config IXGBE_DCB
NAK
#2 lore raw

PATCH 2/8 ixgbe: fix a typo in the configuration help menu

NAK, warming is correct.

Todd Fujinaka
Software Application Engineer
Networking Division (ND)
Intel Corporation
todd.fujinaka at intel.com
(503) 712-4565

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Jean Sacren
Sent: Sunday, October 11, 2015 11:00 PM
To: [email protected]
Subject: [Intel-wired-lan] [next-queue 2/8] ixgbe: fix a typo in the configuration help menu

From: Jean Sacren <[email protected]>

'warming' should be 'warning'. Fix it so that the pertinent text in Direct Cache Access (DCA) Support menu would deliver the intended semantics.

---
 drivers/net/ethernet/intel/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/Kconfig +1 -1
index 1268a182d1a2..de699cd628f4 100644
@@ -215,7 +215,7 @@ config IXGBE_DCA
 	depends on IXGBE && DCA && !(IXGBE=y && DCA=m)
 	---help---
 	  Say Y here if you want to use Direct Cache Access (DCA) in the
-	  driver.  DCA is a method for warming the CPU cache before data
+	  driver.  DCA is a method for warning the CPU cache before data
 	  is used, with the intent of lessening the impact of cache misses.
 
 config IXGBE_DCB

_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan at lists.osuosl.org
http://lists.osuosl.org/mailman/listinfo/intel-wired-lan

#3 lore raw

PATCH 2/8 ixgbe: fix a typo in the configuration help menu

In reply to Jεan Sacren
Quoted 23 lines · J?an Sacren

From: Jean Sacren <[email protected]>

'warming' should be 'warning'. Fix it so that the pertinent text in Direct Cache Access (DCA) Support menu would deliver the intended semantics.

---
drivers/net/ethernet/intel/Kconfig | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/Kconfig +1 -1
index 1268a182d1a2..de699cd628f4 100644
@@ -215,7 +215,7 @@ config IXGBE_DCA
 	depends on IXGBE && DCA && !(IXGBE=y && DCA=m)
 	---help---
 	  Say Y here if you want to use Direct Cache Access (DCA) in the
-	  driver.  DCA is a method for warming the CPU cache before data
+	  driver.  DCA is a method for warning the CPU cache before data
 	  is used, with the intent of lessening the impact of cache misses.
 
Quoted 1 line

config IXGBE_DCB

NAK. This is not a typo! Caches are "warmed" by getting data into them that is expected to be accessed soon.

--
Mark Rustad, Networking Division, Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20151012/adcc398b/attachment.asc>

#4 lore raw

PATCH 3/8 i40evf: add missing kernel-doc argument

In reply to Jεan Sacren

From: Jean Sacren <[email protected]>

@flush has been missing since the inception of i40evf_irq_enable(). Add it for the kernel doc.

---
 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/intel/i40evf/i40evf_main.c +1 -0
index 186914fe64bc..3b638f68b249 100644
@@ -282,6 +282,7 @@ static void i40evf_fire_sw_int(struct i40evf_adapter *adapter, u32 mask)
 /**
  * i40evf_irq_enable - Enable default interrupt generation settings
  * @adapter: board private structure
+ * @flush: boolean value whether to run rd32()
  **/
 void i40evf_irq_enable(struct i40evf_adapter *adapter, bool flush)
 {
#5 lore raw

PATCH 4/8 i40e: add missing kernel-doc argument

In reply to Jεan Sacren

From: Jean Sacren <[email protected]>

The following kernell-doc arguments for their respective functions are missing:

1) @cd_type_cmd_tso_mss for i40e_tso();
2) @cd_type_cmd_tso_mss for i40e_tsyn();
3) @tx_ring for i40e_tx_enable_csum().

Add them all for the kernel-doc requirement.

---
 drivers/net/ethernet/intel/i40e/i40e_txrx.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/ethernet/intel/i40e/i40e_txrx.c +3 -0
index c9f7caf1d920..8db8b9b6cdcd 100644
@@ -2187,6 +2187,7 @@ out:
  * @tx_ring:  ptr to the ring to send
  * @skb:      ptr to the skb we're sending
  * @hdr_len:  ptr to the size of the packet header
+ * @cd_type_cmd_tso_mss: ptr to u64 object
  * @cd_tunneling: ptr to context descriptor bits
  *
  * Returns 0 if no TSO can happen, 1 if tso is going, or error
@@ -2246,6 +2247,7 @@ static int i40e_tso(struct i40e_ring *tx_ring, struct sk_buff *skb,
  * @tx_ring:  ptr to the ring to send
  * @skb:      ptr to the skb we're sending
  * @tx_flags: the collected send information
+ * @cd_type_cmd_tso_mss: ptr to u64 object
  *
  * Returns 0 if no Tx timestamp can happen and 1 if the timestamp will happen
  **/
@@ -2288,6 +2290,7 @@ static int i40e_tsyn(struct i40e_ring *tx_ring, struct sk_buff *skb,
  * @tx_flags: pointer to Tx flags currently set
  * @td_cmd: Tx descriptor command bits to set
  * @td_offset: Tx descriptor header offsets to set
+ * @tx_ring: Tx descriptor ring
  * @cd_tunneling: ptr to context desc bits
  **/
 static void i40e_tx_enable_csum(struct sk_buff *skb, u32 *tx_flags,
#6 lore raw

PATCH 5/8 i40e: clean up the entire function exit path

In reply to Jεan Sacren

From: Jean Sacren <[email protected]>

In i40e_tsyn(), by using a label of 'no_timestamp', we will be able to clearly denote a slew of circumstances that return with 0, which is much better as a default exit than the one that returns with 1.

With the above change, in the last check, we will be able to spare the 'else' branch. Further, the whole branch for returning 1 shall be put together for clarity.

Add a comment next to returning 1 in comparison to no_timestamp label.

---
 drivers/net/ethernet/intel/i40e/i40e_txrx.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_txrx.c +9 -9
index 8db8b9b6cdcd..6cd091877731 100644
@@ -2257,31 +2257,31 @@ static int i40e_tsyn(struct i40e_ring *tx_ring, struct sk_buff *skb,
 	struct i40e_pf *pf;
 
 	if (likely(!(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)))
-		return 0;
+		goto no_timestamp;
 
 	/* Tx timestamps cannot be sampled when doing TSO */
 	if (tx_flags & I40E_TX_FLAGS_TSO)
-		return 0;
+		goto no_timestamp;
 
 	/* only timestamp the outbound packet if the user has requested it and
 	 * we are not already transmitting a packet to be timestamped
 	 */
 	pf = i40e_netdev_to_pf(tx_ring->netdev);
 	if (!(pf->flags & I40E_FLAG_PTP))
-		return 0;
+		goto no_timestamp;
 
 	if (pf->ptp_tx &&
 	    !test_and_set_bit_lock(__I40E_PTP_TX_IN_PROGRESS, &pf->state)) {
 		skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
 		pf->ptp_tx_skb = skb_get(skb);
-	} else {
-		return 0;
-	}
+		*cd_type_cmd_tso_mss |= (u64)I40E_TX_CTX_DESC_TSYN <<
+					I40E_TXD_CTX_QW1_CMD_SHIFT;
 
-	*cd_type_cmd_tso_mss |= (u64)I40E_TX_CTX_DESC_TSYN <<
-				I40E_TXD_CTX_QW1_CMD_SHIFT;
+		return 1; /* Tx timestamp will happen */
+	}
 
-	return 1;
+no_timestamp:
+	return 0;
 }
 
 /**
#7 lore raw

PATCH 6/8 i40evf: clean up local variable initialization

In reply to Jεan Sacren

From: Jean Sacren <[email protected]>

In i40evf_msix_aq(), the first two lines of rd32() are mainly to clear the registers. If we initialize 'val' at this point, it will be overwritten immediately. We shall simply discard the return value here.

When we initialize 'val', we might as well include the mask in one step.

---
 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/net/ethernet/intel/i40evf/i40evf_main.c +4 -4
index 3b638f68b249..7d6d30c53060 100644
@@ -308,11 +308,11 @@ static irqreturn_t i40evf_msix_aq(int irq, void *data)
 	u32 val;
 
 	/* handle non-queue interrupts, these reads clear the registers */
-	val = rd32(hw, I40E_VFINT_ICR01);
-	val = rd32(hw, I40E_VFINT_ICR0_ENA1);
+	rd32(hw, I40E_VFINT_ICR01);
+	rd32(hw, I40E_VFINT_ICR0_ENA1);
 
-	val = rd32(hw, I40E_VFINT_DYN_CTL01);
-	val = val | I40E_VFINT_DYN_CTL01_CLEARPBA_MASK;
+	val = rd32(hw, I40E_VFINT_DYN_CTL01) |
+	      I40E_VFINT_DYN_CTL01_CLEARPBA_MASK;
 	wr32(hw, I40E_VFINT_DYN_CTL01, val);
 
 	/* schedule work on the private workqueue */
#8 lore raw

PATCH 7/8 i40e: clean up local variable initialization

In reply to Jεan Sacren

From: Jean Sacren <[email protected]>

In both i40e_calc_nvm_checksum() and i40e_update_nvm_checksum(), the local variables designated by 'ret_code' are overwritten immediately. As such, they should merely be declared.

---
 drivers/net/ethernet/intel/i40e/i40e_nvm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_nvm.c +2 -2
index 58e384a372a0..1715358a8a6c 100644
@@ -484,7 +484,7 @@ static i40e_status i40e_write_nvm_aq(struct i40e_hw *hw, u8 module_pointer,
 static i40e_status i40e_calc_nvm_checksum(struct i40e_hw *hw,
 						    u16 *checksum)
 {
-	i40e_status ret_code = 0;
+	i40e_status ret_code;
 	struct i40e_virt_mem vmem;
 	u16 pcie_alt_module = 0;
 	u16 checksum_local = 0;
@@ -564,7 +564,7 @@ i40e_calc_nvm_checksum_exit:
  **/
 i40e_status i40e_update_nvm_checksum(struct i40e_hw *hw)
 {
-	i40e_status ret_code = 0;
+	i40e_status ret_code;
 	u16 checksum;
 	__le16 le_sum;
 
#9 lore raw

PATCH 8/8 i40e: fix unconditional execution of cpu_to_le16()

In reply to Jεan Sacren

From: Jean Sacren <[email protected]>

The commit 3092e5e4cc79 ("i40e: add little endian conversion for checksum") fixed the checksum bug on big-endian architecture.

But we should not execute cpu_to_le16() unconditionally. Thus, put cpu_to_le16() under certain condition.

Cc Jesse Brandeburg <[email protected]>
---
 drivers/net/ethernet/intel/i40e/i40e_nvm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_nvm.c +3 -2
index 1715358a8a6c..6100cdd9ad13 100644
@@ -569,10 +569,11 @@ i40e_status i40e_update_nvm_checksum(struct i40e_hw *hw)
 	__le16 le_sum;
 
 	ret_code = i40e_calc_nvm_checksum(hw, &checksum);
-	le_sum = cpu_to_le16(checksum);
-	if (!ret_code)
+	if (!ret_code) {
+		le_sum = cpu_to_le16(checksum);
 		ret_code = i40e_write_nvm_aq(hw, 0x00, I40E_SR_SW_CHECKSUM_WORD,
 					     1, &le_sum, true);
+	}
 
 	return ret_code;
 }
#10 lore raw

PATCH 1/8 igb: fix a typo in the configuration help menu

In reply to Jεan Sacren

NAK, no, it's warming.

Quoted 29 lines · J?an Sacren

From: Jean Sacren <[email protected]>

'warming' should be 'warning'. Fix it so that the pertinent text in Direct Cache Access (DCA) Support menu would deliver the intended semantics.

---
drivers/net/ethernet/intel/Kconfig | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/Kconfig +1 -1
index 4163b16489b3..1268a182d1a2 100644
@@ -124,7 +124,7 @@ config IGB_DCA
 	depends on IGB && DCA && !(IGB=y && DCA=m)
 	---help---
 	  Say Y here if you want to use Direct Cache Access (DCA) in the
-	  driver.  DCA is a method for warming the CPU cache before data
+	  driver.  DCA is a method for warning the CPU cache before data
 	  is used, with the intent of lessening the impact of cache misses.
 

config IGBVF
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan at lists.osuosl.org
http://lists.osuosl.org/mailman/listinfo/intel-wired-lan

Signature · 2 lines
Hisashi T Fujinaka - htodd at twofifty.com
BSEE + BSChem + BAEnglish + MSCS + $2.50 = coffee
#11 lore raw

PATCH 1/8 igb: fix a typo in the configuration help menu

From: Hisashi T Fujinaka <[email protected]>
Date: Mon, 12 Oct 2015 08:33:37 -0700

Quoted 2 lines

NAK, no, it's warming.

Thanks guys.

#12 lore raw

PATCH 1/8 igb: fix a typo in the configuration help menu

In reply to Jεan Sacren
Quoted 23 lines · J?an Sacren

From: Jean Sacren <[email protected]>

'warming' should be 'warning'. Fix it so that the pertinent text in Direct Cache Access (DCA) Support menu would deliver the intended semantics.

---
drivers/net/ethernet/intel/Kconfig | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/Kconfig +1 -1
index 4163b16489b3..1268a182d1a2 100644
@@ -124,7 +124,7 @@ config IGB_DCA
 	depends on IGB && DCA && !(IGB=y && DCA=m)
 	---help---
 	  Say Y here if you want to use Direct Cache Access (DCA) in the
-	  driver.  DCA is a method for warming the CPU cache before data
+	  driver.  DCA is a method for warning the CPU cache before data
 	  is used, with the intent of lessening the impact of cache misses.
 
Quoted 1 line

config IGBVF

NAK. This is not a typo! Caches are "warmed" by getting data into them that is expected to be accessed soon.

--
Mark Rustad, Networking Division, Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20151012/631e3371/attachment.asc>