netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next v2 00/14][pull request] Intel Wired LAN Driver Updates
@ 2014-03-28 14:08 Jeff Kirsher
  2014-03-28 14:08 ` [net-next v2 01/14] i40e: Delete ATR filter on RST Jeff Kirsher
                   ` (14 more replies)
  0 siblings, 15 replies; 27+ messages in thread
From: Jeff Kirsher @ 2014-03-28 14:08 UTC (permalink / raw)
  To: davem; +Cc: Jeff Kirsher, netdev, gospo, sassmann

This series contains updates to e1000e, igb, i40e and i40evf

Anjali provides i40e fix to remove the ATR filter on RST as well as FIN
packets.  Cleans up add_del_fdir() because it was used and implemented
only for the add, so change the name and drop a parameter.  Adds the
ability to drop a flow if we wanted to and adds a flow director
message level to be used for flow director specific messages.

Mitch fixes an issue on i40evf where the Tx watchdog handler was causing
an oops when sending an admin queue message to request a reset because
the admin queue functions use spinlocks.

Greg provides a change to i40e to make the alloc and free queue vector
calls orthogonal.

Shannon fixes i40e to verify the eeprom checksum and firmware CRC status
bits, and shutdown the driver if they fail.  This change stops the
processing of traffic, but does not kill the PF netdev so that the
NVMUpdate process still has a chance at fixing the image.  Also provides
a fix to make sure the VSI has a netdev before trying to use it in
the debugfs netdev_ops commands.

Jakub Kicinski provides patches for e1000e and igb to fix a number issues
found in the PTP code.

v2:
- drop patch 11 "i40e: Add a fallback debug flow for the driver" from the
  series based on feedback from David Miller

The following are changes since commit e1250037de22b99694ebfd37b867a3f591b0dc39:
  Merge branch 'mdio_reset-next'
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

Anjali Singhai Jain (5):
  i40e: Delete ATR filter on RST
  i40e: Cleanup in FDIR SB ethtool code
  i40e: Add functionality for FD SB to drop packets
  i40e/i40evf: Add an FD message level
  i40e: Use DEBUG_FD message level for an FD message

Greg Rose (1):
  i40e: Make the alloc and free queue vector calls orthogonal

Jakub Kicinski (4):
  e1000e: add timeout for TX HW time stamping work
  e1000e: remove redundant if clause from PTP work
  igb: never generate both software and hardware timestamps
  igb: fix race conditions on queuing skb for HW time stamp

Jesse Brandeburg (1):
  i40evf: remove double space after return

Mitch Williams (1):
  i40evf: fix oops in watchdog handler

Shannon Nelson (2):
  i40e: eeprom integrity check on load and empr
  i40e: check for netdev before debugfs use

 drivers/net/ethernet/intel/e1000e/e1000.h          |  2 +
 drivers/net/ethernet/intel/e1000e/ethtool.c        |  1 +
 drivers/net/ethernet/intel/e1000e/netdev.c         | 10 ++--
 drivers/net/ethernet/intel/i40e/i40e.h             |  1 +
 drivers/net/ethernet/intel/i40e/i40e_debugfs.c     | 35 +++++++-----
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c     | 39 +++++++-------
 drivers/net/ethernet/intel/i40e/i40e_main.c        | 62 +++++++++++++++++-----
 drivers/net/ethernet/intel/i40e/i40e_txrx.c        | 14 +++--
 drivers/net/ethernet/intel/i40e/i40e_type.h        |  1 +
 drivers/net/ethernet/intel/i40evf/i40e_prototype.h |  2 +-
 drivers/net/ethernet/intel/i40evf/i40e_type.h      |  1 +
 drivers/net/ethernet/intel/i40evf/i40evf.h         |  1 +
 drivers/net/ethernet/intel/i40evf/i40evf_main.c    | 10 ++--
 drivers/net/ethernet/intel/igb/igb.h               |  3 +-
 drivers/net/ethernet/intel/igb/igb_main.c          |  7 +--
 drivers/net/ethernet/intel/igb/igb_ptp.c           |  3 ++
 16 files changed, 131 insertions(+), 61 deletions(-)

-- 
1.9.0

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [net-next v2 01/14] i40e: Delete ATR filter on RST
  2014-03-28 14:08 [net-next v2 00/14][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
@ 2014-03-28 14:08 ` Jeff Kirsher
  2014-03-28 14:08 ` [net-next v2 02/14] i40evf: fix oops in watchdog handler Jeff Kirsher
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 27+ messages in thread
From: Jeff Kirsher @ 2014-03-28 14:08 UTC (permalink / raw)
  To: davem
  Cc: Anjali Singhai Jain, netdev, gospo, sassmann, Catherine Sullivan,
	Jeff Kirsher

From: Anjali Singhai Jain <anjali.singhai@intel.com>

We currently delete ATR filter on FIN alone, delete on RST as well.

Change-ID: Ie7cae5d1046b9d1d4a0d6ef5bdbf41224c3dade6
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_txrx.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index 851f653..de25a32 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -1624,8 +1624,11 @@ static void i40e_atr(struct i40e_ring *tx_ring, struct sk_buff *skb,
 
 	tx_ring->atr_count++;
 
-	/* sample on all syn/fin packets or once every atr sample rate */
-	if (!th->fin && !th->syn && (tx_ring->atr_count < tx_ring->atr_sample_rate))
+	/* sample on all syn/fin/rst packets or once every atr sample rate */
+	if (!th->fin &&
+	    !th->syn &&
+	    !th->rst &&
+	    (tx_ring->atr_count < tx_ring->atr_sample_rate))
 		return;
 
 	tx_ring->atr_count = 0;
@@ -1649,7 +1652,7 @@ static void i40e_atr(struct i40e_ring *tx_ring, struct sk_buff *skb,
 
 	dtype_cmd = I40E_TX_DESC_DTYPE_FILTER_PROG;
 
-	dtype_cmd |= th->fin ?
+	dtype_cmd |= (th->fin || th->rst) ?
 		     (I40E_FILTER_PROGRAM_DESC_PCMD_REMOVE <<
 		      I40E_TXD_FLTR_QW1_PCMD_SHIFT) :
 		     (I40E_FILTER_PROGRAM_DESC_PCMD_ADD_UPDATE <<
-- 
1.9.0

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [net-next v2 02/14] i40evf: fix oops in watchdog handler
  2014-03-28 14:08 [net-next v2 00/14][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
  2014-03-28 14:08 ` [net-next v2 01/14] i40e: Delete ATR filter on RST Jeff Kirsher
@ 2014-03-28 14:08 ` Jeff Kirsher
  2014-03-28 14:08 ` [net-next v2 03/14] i40e: Make the alloc and free queue vector calls orthogonal Jeff Kirsher
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 27+ messages in thread
From: Jeff Kirsher @ 2014-03-28 14:08 UTC (permalink / raw)
  To: davem
  Cc: Mitch Williams, netdev, gospo, sassmann, Catherine Sullivan,
	Jeff Kirsher

From: Mitch Williams <mitch.a.williams@intel.com>

The Tx watchdog handler runs in interrupt context, so it would cause an
oops when sending an admin queue message to request a reset, because the
admin queue functions use spinlocks.

Instead, set a flag and let the reset task handle sending the request.

Change-ID: I65879470b72963d9c308edfb8f45ac4fbba2c14f
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40evf/i40evf.h      |  1 +
 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 10 +++++++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40evf/i40evf.h b/drivers/net/ethernet/intel/i40evf/i40evf.h
index ccb43d3..807807d 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf.h
+++ b/drivers/net/ethernet/intel/i40evf/i40evf.h
@@ -211,6 +211,7 @@ struct i40evf_adapter {
 #define I40EVF_FLAG_NEED_LINK_UPDATE             (u32)(1 << 7)
 #define I40EVF_FLAG_PF_COMMS_FAILED              (u32)(1 << 8)
 #define I40EVF_FLAG_RESET_PENDING                (u32)(1 << 9)
+#define I40EVF_FLAG_RESET_NEEDED                 (u32)(1 << 10)
 /* duplcates for common code */
 #define I40E_FLAG_FDIR_ATR_ENABLED		 0
 #define I40E_FLAG_DCB_ENABLED			 0
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index d3eafa3..51c84c1 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -169,9 +169,7 @@ static void i40evf_tx_timeout(struct net_device *netdev)
 	adapter->tx_timeout_count++;
 	dev_info(&adapter->pdev->dev, "TX timeout detected.\n");
 	if (!(adapter->flags & I40EVF_FLAG_RESET_PENDING)) {
-		dev_info(&adapter->pdev->dev, "Requesting reset from PF\n");
-		i40evf_request_reset(adapter);
-		adapter->flags |= I40EVF_FLAG_RESET_PENDING;
+		adapter->flags |= I40EVF_FLAG_RESET_NEEDED;
 		schedule_work(&adapter->reset_task);
 	}
 }
@@ -1484,6 +1482,12 @@ static void i40evf_reset_task(struct work_struct *work)
 	while (test_and_set_bit(__I40EVF_IN_CRITICAL_TASK,
 				&adapter->crit_section))
 		udelay(500);
+
+	if (adapter->flags & I40EVF_FLAG_RESET_NEEDED) {
+		dev_info(&adapter->pdev->dev, "Requesting reset from PF\n");
+		i40evf_request_reset(adapter);
+	}
+
 	/* poll until we see the reset actually happen */
 	for (i = 0; i < I40EVF_RESET_WAIT_COUNT; i++) {
 		rstat_val = rd32(hw, I40E_VFGEN_RSTAT) &
-- 
1.9.0

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [net-next v2 03/14] i40e: Make the alloc and free queue vector calls orthogonal
  2014-03-28 14:08 [net-next v2 00/14][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
  2014-03-28 14:08 ` [net-next v2 01/14] i40e: Delete ATR filter on RST Jeff Kirsher
  2014-03-28 14:08 ` [net-next v2 02/14] i40evf: fix oops in watchdog handler Jeff Kirsher
@ 2014-03-28 14:08 ` Jeff Kirsher
  2014-03-28 14:08 ` [net-next v2 04/14] i40e: eeprom integrity check on load and empr Jeff Kirsher
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 27+ messages in thread
From: Jeff Kirsher @ 2014-03-28 14:08 UTC (permalink / raw)
  To: davem
  Cc: Greg Rose, netdev, gospo, sassmann, Catherine Sullivan, Jeff Kirsher

From: Greg Rose <gregory.v.rose@intel.com>

It's annoying to search for a matching alloc and free set of function calls
when they don't use the same framework for the name of the functions.  Fix
that up in the case of alloc and free of vsi queue vectors.

i40e_vsi_free_q*
i40e_vsi_alloc_q*

Change-ID: I510eb863a0fbe405312bebea55c2846c76285e6d
Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 28df88e..91fd1f1 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -6111,13 +6111,13 @@ static int i40e_init_msix(struct i40e_pf *pf)
 }
 
 /**
- * i40e_alloc_q_vector - Allocate memory for a single interrupt vector
+ * i40e_vsi_alloc_q_vector - Allocate memory for a single interrupt vector
  * @vsi: the VSI being configured
  * @v_idx: index of the vector in the vsi struct
  *
  * We allocate one q_vector.  If allocation fails we return -ENOMEM.
  **/
-static int i40e_alloc_q_vector(struct i40e_vsi *vsi, int v_idx)
+static int i40e_vsi_alloc_q_vector(struct i40e_vsi *vsi, int v_idx)
 {
 	struct i40e_q_vector *q_vector;
 
@@ -6143,13 +6143,13 @@ static int i40e_alloc_q_vector(struct i40e_vsi *vsi, int v_idx)
 }
 
 /**
- * i40e_alloc_q_vectors - Allocate memory for interrupt vectors
+ * i40e_vsi_alloc_q_vectors - Allocate memory for interrupt vectors
  * @vsi: the VSI being configured
  *
  * We allocate one q_vector per queue interrupt.  If allocation fails we
  * return -ENOMEM.
  **/
-static int i40e_alloc_q_vectors(struct i40e_vsi *vsi)
+static int i40e_vsi_alloc_q_vectors(struct i40e_vsi *vsi)
 {
 	struct i40e_pf *pf = vsi->back;
 	int v_idx, num_q_vectors;
@@ -6164,7 +6164,7 @@ static int i40e_alloc_q_vectors(struct i40e_vsi *vsi)
 		return -EINVAL;
 
 	for (v_idx = 0; v_idx < num_q_vectors; v_idx++) {
-		err = i40e_alloc_q_vector(vsi, v_idx);
+		err = i40e_vsi_alloc_q_vector(vsi, v_idx);
 		if (err)
 			goto err_out;
 	}
@@ -7020,7 +7020,7 @@ static int i40e_vsi_setup_vectors(struct i40e_vsi *vsi)
 		return -EEXIST;
 	}
 
-	ret = i40e_alloc_q_vectors(vsi);
+	ret = i40e_vsi_alloc_q_vectors(vsi);
 	if (ret) {
 		dev_info(&pf->pdev->dev,
 			 "failed to allocate %d q_vector for VSI %d, ret=%d\n",
-- 
1.9.0

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [net-next v2 04/14] i40e: eeprom integrity check on load and empr
  2014-03-28 14:08 [net-next v2 00/14][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
                   ` (2 preceding siblings ...)
  2014-03-28 14:08 ` [net-next v2 03/14] i40e: Make the alloc and free queue vector calls orthogonal Jeff Kirsher
@ 2014-03-28 14:08 ` Jeff Kirsher
  2014-03-28 14:08 ` [net-next v2 05/14] i40e: Cleanup in FDIR SB ethtool code Jeff Kirsher
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 27+ messages in thread
From: Jeff Kirsher @ 2014-03-28 14:08 UTC (permalink / raw)
  To: davem
  Cc: Shannon Nelson, netdev, gospo, sassmann, Catherine Sullivan,
	Jeff Kirsher

From: Shannon Nelson <shannon.nelson@intel.com>

The driver needs to verify the eeprom checksum and firmware crc status bits,
and shutdown the driver if they fail. This code stops the processing of traffic,
but doesn't kill the PF netdev so that the NVMUpdate process should still have a
chance at fixing the image. The eeprom is checked on driver load and after an
EMP reset, the latter of which should be generated after an NVMUpdate.

Change-ID: I34deef21d2e16bf5a43c603cf8af27e6a29dc9d2
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e.h      |  1 +
 drivers/net/ethernet/intel/i40e/i40e_main.c | 50 +++++++++++++++++++++++++----
 2 files changed, 45 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
index 33cd8b6..beb7b43 100644
--- a/drivers/net/ethernet/intel/i40e/i40e.h
+++ b/drivers/net/ethernet/intel/i40e/i40e.h
@@ -136,6 +136,7 @@ enum i40e_state_t {
 	__I40E_EMP_RESET_REQUESTED,
 	__I40E_FILTER_OVERFLOW_PROMISC,
 	__I40E_SUSPENDED,
+	__I40E_BAD_EEPROM,
 };
 
 enum i40e_interrupt_policy {
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 91fd1f1..a1ec793 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -26,6 +26,7 @@
 
 /* Local includes */
 #include "i40e.h"
+#include "i40e_diag.h"
 #ifdef CONFIG_I40E_VXLAN
 #include <net/vxlan.h>
 #endif
@@ -2877,12 +2878,14 @@ static irqreturn_t i40e_intr(int irq, void *data)
 		val = rd32(hw, I40E_GLGEN_RSTAT);
 		val = (val & I40E_GLGEN_RSTAT_RESET_TYPE_MASK)
 		       >> I40E_GLGEN_RSTAT_RESET_TYPE_SHIFT;
-		if (val == I40E_RESET_CORER)
+		if (val == I40E_RESET_CORER) {
 			pf->corer_count++;
-		else if (val == I40E_RESET_GLOBR)
+		} else if (val == I40E_RESET_GLOBR) {
 			pf->globr_count++;
-		else if (val == I40E_RESET_EMPR)
+		} else if (val == I40E_RESET_EMPR) {
 			pf->empr_count++;
+			set_bit(__I40E_EMP_RESET_REQUESTED, &pf->state);
+		}
 	}
 
 	if (icr0 & I40E_PFINT_ICR0_HMC_ERR_MASK) {
@@ -4257,8 +4260,9 @@ static int i40e_open(struct net_device *netdev)
 	struct i40e_pf *pf = vsi->back;
 	int err;
 
-	/* disallow open during test */
-	if (test_bit(__I40E_TESTING, &pf->state))
+	/* disallow open during test or if eeprom is broken */
+	if (test_bit(__I40E_TESTING, &pf->state) ||
+	    test_bit(__I40E_BAD_EEPROM, &pf->state))
 		return -EBUSY;
 
 	netif_carrier_off(netdev);
@@ -5078,6 +5082,31 @@ static void i40e_clean_adminq_subtask(struct i40e_pf *pf)
 }
 
 /**
+ * i40e_verify_eeprom - make sure eeprom is good to use
+ * @pf: board private structure
+ **/
+static void i40e_verify_eeprom(struct i40e_pf *pf)
+{
+	int err;
+
+	err = i40e_diag_eeprom_test(&pf->hw);
+	if (err) {
+		/* retry in case of garbage read */
+		err = i40e_diag_eeprom_test(&pf->hw);
+		if (err) {
+			dev_info(&pf->pdev->dev, "eeprom check failed (%d), Tx/Rx traffic disabled\n",
+				 err);
+			set_bit(__I40E_BAD_EEPROM, &pf->state);
+		}
+	}
+
+	if (!err && test_bit(__I40E_BAD_EEPROM, &pf->state)) {
+		dev_info(&pf->pdev->dev, "eeprom check passed, Tx/Rx traffic enabled\n");
+		clear_bit(__I40E_BAD_EEPROM, &pf->state);
+	}
+}
+
+/**
  * i40e_reconstitute_veb - rebuild the VEB and anything connected to it
  * @veb: pointer to the VEB instance
  *
@@ -5386,6 +5415,12 @@ static void i40e_reset_and_rebuild(struct i40e_pf *pf, bool reinit)
 		goto end_core_reset;
 	}
 
+	/* re-verify the eeprom if we just had an EMP reset */
+	if (test_bit(__I40E_EMP_RESET_REQUESTED, &pf->state)) {
+		clear_bit(__I40E_EMP_RESET_REQUESTED, &pf->state);
+		i40e_verify_eeprom(pf);
+	}
+
 	ret = i40e_get_capabilities(pf);
 	if (ret) {
 		dev_info(&pf->pdev->dev, "i40e_get_capabilities failed, %d\n",
@@ -8157,6 +8192,8 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 		goto err_pf_reset;
 	}
 
+	i40e_verify_eeprom(pf);
+
 	i40e_clear_pxe_mode(hw);
 	err = i40e_get_capabilities(pf);
 	if (err)
@@ -8258,7 +8295,8 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	/* prep for VF support */
 	if ((pf->flags & I40E_FLAG_SRIOV_ENABLED) &&
-	    (pf->flags & I40E_FLAG_MSIX_ENABLED)) {
+	    (pf->flags & I40E_FLAG_MSIX_ENABLED) &&
+	    !test_bit(__I40E_BAD_EEPROM, &pf->state)) {
 		u32 val;
 
 		/* disable link interrupts for VFs */
-- 
1.9.0

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [net-next v2 05/14] i40e: Cleanup in FDIR SB ethtool code
  2014-03-28 14:08 [net-next v2 00/14][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
                   ` (3 preceding siblings ...)
  2014-03-28 14:08 ` [net-next v2 04/14] i40e: eeprom integrity check on load and empr Jeff Kirsher
@ 2014-03-28 14:08 ` Jeff Kirsher
  2014-03-28 14:08 ` [net-next v2 06/14] i40e: Add functionality for FD SB to drop packets Jeff Kirsher
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 27+ messages in thread
From: Jeff Kirsher @ 2014-03-28 14:08 UTC (permalink / raw)
  To: davem
  Cc: Anjali Singhai Jain, netdev, gospo, sassmann, Catherine Sullivan,
	Jeff Kirsher

From: Anjali Singhai Jain <anjali.singhai@intel.com>

Function add_del_fdir was used and implemented only for add. So change the name
and drop a parameter.

Change-ID: Icf2c6c3bbd4fd00cf8d9613a3f6d8c08e0f8e288
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 32 +++++++++++---------------
 1 file changed, 13 insertions(+), 19 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index 28da412..0461a72 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -62,8 +62,8 @@ static const struct i40e_stats i40e_gstrings_net_stats[] = {
 	I40E_NETDEV_STAT(rx_crc_errors),
 };
 
-static int i40e_add_del_fdir_ethtool(struct i40e_vsi *vsi,
-				     struct ethtool_rxnfc *cmd, bool add);
+static int i40e_add_fdir_ethtool(struct i40e_vsi *vsi,
+				 struct ethtool_rxnfc *cmd);
 
 /* These PF_STATs might look like duplicates of some NETDEV_STATs,
  * but they are separate.  This device supports Virtualization, and
@@ -1470,16 +1470,15 @@ static int i40e_del_fdir_entry(struct i40e_vsi *vsi,
 }
 
 /**
- * i40e_add_del_fdir_ethtool - Add/Remove Flow Director filters
+ * i40e_add_fdir_ethtool - Add/Remove Flow Director filters
  * @vsi: pointer to the targeted VSI
  * @cmd: command to get or set RX flow classification rules
- * @add: true adds a filter, false removes it
  *
- * Add/Remove Flow Director filters for a specific flow spec based on their
- * protocol.  Returns 0 if the filters were successfully added or removed.
+ * Add Flow Director filters for a specific flow spec based on their
+ * protocol.  Returns 0 if the filters were successfully added.
  **/
-static int i40e_add_del_fdir_ethtool(struct i40e_vsi *vsi,
-				     struct ethtool_rxnfc *cmd, bool add)
+static int i40e_add_fdir_ethtool(struct i40e_vsi *vsi,
+				 struct ethtool_rxnfc *cmd)
 {
 	struct ethtool_rx_flow_spec *fsp;
 	struct i40e_fdir_filter *input;
@@ -1494,7 +1493,7 @@ static int i40e_add_del_fdir_ethtool(struct i40e_vsi *vsi,
 	if (!(pf->flags & I40E_FLAG_FD_SB_ENABLED))
 		return -EOPNOTSUPP;
 
-	if (add && (pf->auto_disable_flags & I40E_FLAG_FD_SB_ENABLED))
+	if (pf->auto_disable_flags & I40E_FLAG_FD_SB_ENABLED)
 		return -ENOSPC;
 
 	fsp = (struct ethtool_rx_flow_spec *)&cmd->fs;
@@ -1504,7 +1503,7 @@ static int i40e_add_del_fdir_ethtool(struct i40e_vsi *vsi,
 		return -EINVAL;
 	}
 
-	if ((fsp->ring_cookie >= vsi->num_queue_pairs) && add)
+	if (fsp->ring_cookie >= vsi->num_queue_pairs)
 		return -EINVAL;
 
 	input = kzalloc(sizeof(*input), GFP_KERNEL);
@@ -1528,16 +1527,11 @@ static int i40e_add_del_fdir_ethtool(struct i40e_vsi *vsi,
 	input->src_ip[0] = fsp->h_u.tcp_ip4_spec.ip4src;
 	input->dst_ip[0] = fsp->h_u.tcp_ip4_spec.ip4dst;
 
-	ret = i40e_add_del_fdir(vsi, input, add);
-	if (ret) {
+	ret = i40e_add_del_fdir(vsi, input, true);
+	if (ret)
 		kfree(input);
-		return ret;
-	}
-
-	if (!ret && add)
-		i40e_update_ethtool_fdir_entry(vsi, input, fsp->location, NULL);
 	else
-		kfree(input);
+		i40e_update_ethtool_fdir_entry(vsi, input, fsp->location, NULL);
 
 	return ret;
 }
@@ -1561,7 +1555,7 @@ static int i40e_set_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *cmd)
 		ret = i40e_set_rss_hash_opt(pf, cmd);
 		break;
 	case ETHTOOL_SRXCLSRLINS:
-		ret = i40e_add_del_fdir_ethtool(vsi, cmd, true);
+		ret = i40e_add_fdir_ethtool(vsi, cmd);
 		break;
 	case ETHTOOL_SRXCLSRLDEL:
 		ret = i40e_del_fdir_entry(vsi, cmd);
-- 
1.9.0

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [net-next v2 06/14] i40e: Add functionality for FD SB to drop packets
  2014-03-28 14:08 [net-next v2 00/14][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
                   ` (4 preceding siblings ...)
  2014-03-28 14:08 ` [net-next v2 05/14] i40e: Cleanup in FDIR SB ethtool code Jeff Kirsher
@ 2014-03-28 14:08 ` Jeff Kirsher
  2014-03-28 14:08 ` [net-next v2 07/14] i40evf: remove double space after return Jeff Kirsher
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 27+ messages in thread
From: Jeff Kirsher @ 2014-03-28 14:08 UTC (permalink / raw)
  To: davem
  Cc: Anjali Singhai Jain, netdev, gospo, sassmann, Catherine Sullivan,
	Jeff Kirsher

From: Anjali Singhai Jain <anjali.singhai@intel.com>

With this change we can drop a flow if we wanted to.

Change-ID: I222b1ae960e61a31965bafe3159a95099e70c7d2
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index 0461a72..aa123f4 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -1513,11 +1513,16 @@ static int i40e_add_fdir_ethtool(struct i40e_vsi *vsi,
 
 	input->fd_id = fsp->location;
 
+	if (fsp->ring_cookie == RX_CLS_FLOW_DISC)
+		input->dest_ctl = I40E_FILTER_PROGRAM_DESC_DEST_DROP_PACKET;
+	else
+		input->dest_ctl =
+			     I40E_FILTER_PROGRAM_DESC_DEST_DIRECT_PACKET_QINDEX;
+
 	input->q_index = fsp->ring_cookie;
 	input->flex_off = 0;
 	input->pctype = 0;
 	input->dest_vsi = vsi->id;
-	input->dest_ctl = I40E_FILTER_PROGRAM_DESC_DEST_DIRECT_PACKET_QINDEX;
 	input->fd_status = I40E_FILTER_PROGRAM_DESC_FD_STATUS_FD_ID;
 	input->cnt_index = 0;
 	input->flow_type = fsp->flow_type;
-- 
1.9.0

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [net-next v2 07/14] i40evf: remove double space after return
  2014-03-28 14:08 [net-next v2 00/14][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
                   ` (5 preceding siblings ...)
  2014-03-28 14:08 ` [net-next v2 06/14] i40e: Add functionality for FD SB to drop packets Jeff Kirsher
@ 2014-03-28 14:08 ` Jeff Kirsher
  2014-03-28 19:58   ` Or Gerlitz
  2014-03-28 14:08 ` [net-next v2 08/14] i40e: check for netdev before debugfs use Jeff Kirsher
                   ` (7 subsequent siblings)
  14 siblings, 1 reply; 27+ messages in thread
From: Jeff Kirsher @ 2014-03-28 14:08 UTC (permalink / raw)
  To: davem
  Cc: Jesse Brandeburg, netdev, gospo, sassmann, Kevin Scott,
	Catherine Sullivan, Jeff Kirsher

From: Jesse Brandeburg <jesse.brandeburg@intel.com>

There were two spaces between return and the value, we only need one.

Change-ID: Iaa42c33f50d8d149cdf1a4c9c1902295bfd991c4
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Acked-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Kevin Scott <kevin.c.scott@intel.com>
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40evf/i40e_prototype.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/i40evf/i40e_prototype.h b/drivers/net/ethernet/intel/i40evf/i40e_prototype.h
index 862fcdf..97ab8c2 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_prototype.h
+++ b/drivers/net/ethernet/intel/i40evf/i40e_prototype.h
@@ -67,7 +67,7 @@ extern struct i40e_rx_ptype_decoded i40evf_ptype_lookup[];
 
 static inline struct i40e_rx_ptype_decoded decode_rx_desc_ptype(u8 ptype)
 {
-	return  i40evf_ptype_lookup[ptype];
+	return i40evf_ptype_lookup[ptype];
 }
 
 /* prototype for functions used for SW locks */
-- 
1.9.0

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [net-next v2 08/14] i40e: check for netdev before debugfs use
  2014-03-28 14:08 [net-next v2 00/14][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
                   ` (6 preceding siblings ...)
  2014-03-28 14:08 ` [net-next v2 07/14] i40evf: remove double space after return Jeff Kirsher
@ 2014-03-28 14:08 ` Jeff Kirsher
  2014-03-28 14:08 ` [net-next v2 09/14] i40e/i40evf: Add an FD message level Jeff Kirsher
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 27+ messages in thread
From: Jeff Kirsher @ 2014-03-28 14:08 UTC (permalink / raw)
  To: davem
  Cc: Shannon Nelson, netdev, gospo, sassmann, Catherine Sullivan,
	Jeff Kirsher

From: Shannon Nelson <shannon.nelson@intel.com>

Make sure the VSI has a netdev before trying to use it
in the debugfs netdev_ops commands.

Change-ID: I2d744fc0c32b3226534ce2cde171d9675c5440a6
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 35 ++++++++++++++++----------
 1 file changed, 22 insertions(+), 13 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
index afd43d7..3c37386 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
@@ -2087,9 +2087,13 @@ static ssize_t i40e_dbg_netdev_ops_write(struct file *filp,
 		if (!vsi) {
 			dev_info(&pf->pdev->dev,
 				 "tx_timeout: VSI %d not found\n", vsi_seid);
-			goto netdev_ops_write_done;
-		}
-		if (rtnl_trylock()) {
+		} else if (!vsi->netdev) {
+			dev_info(&pf->pdev->dev, "tx_timeout: no netdev for VSI %d\n",
+				 vsi_seid);
+		} else if (test_bit(__I40E_DOWN, &vsi->state)) {
+			dev_info(&pf->pdev->dev, "tx_timeout: VSI %d not UP\n",
+				 vsi_seid);
+		} else if (rtnl_trylock()) {
 			vsi->netdev->netdev_ops->ndo_tx_timeout(vsi->netdev);
 			rtnl_unlock();
 			dev_info(&pf->pdev->dev, "tx_timeout called\n");
@@ -2108,9 +2112,10 @@ static ssize_t i40e_dbg_netdev_ops_write(struct file *filp,
 		if (!vsi) {
 			dev_info(&pf->pdev->dev,
 				 "change_mtu: VSI %d not found\n", vsi_seid);
-			goto netdev_ops_write_done;
-		}
-		if (rtnl_trylock()) {
+		} else if (!vsi->netdev) {
+			dev_info(&pf->pdev->dev, "change_mtu: no netdev for VSI %d\n",
+				 vsi_seid);
+		} else if (rtnl_trylock()) {
 			vsi->netdev->netdev_ops->ndo_change_mtu(vsi->netdev,
 								mtu);
 			rtnl_unlock();
@@ -2129,9 +2134,10 @@ static ssize_t i40e_dbg_netdev_ops_write(struct file *filp,
 		if (!vsi) {
 			dev_info(&pf->pdev->dev,
 				 "set_rx_mode: VSI %d not found\n", vsi_seid);
-			goto netdev_ops_write_done;
-		}
-		if (rtnl_trylock()) {
+		} else if (!vsi->netdev) {
+			dev_info(&pf->pdev->dev, "set_rx_mode: no netdev for VSI %d\n",
+				 vsi_seid);
+		} else if (rtnl_trylock()) {
 			vsi->netdev->netdev_ops->ndo_set_rx_mode(vsi->netdev);
 			rtnl_unlock();
 			dev_info(&pf->pdev->dev, "set_rx_mode called\n");
@@ -2149,11 +2155,14 @@ static ssize_t i40e_dbg_netdev_ops_write(struct file *filp,
 		if (!vsi) {
 			dev_info(&pf->pdev->dev, "napi: VSI %d not found\n",
 				 vsi_seid);
-			goto netdev_ops_write_done;
+		} else if (!vsi->netdev) {
+			dev_info(&pf->pdev->dev, "napi: no netdev for VSI %d\n",
+				 vsi_seid);
+		} else {
+			for (i = 0; i < vsi->num_q_vectors; i++)
+				napi_schedule(&vsi->q_vectors[i]->napi);
+			dev_info(&pf->pdev->dev, "napi called\n");
 		}
-		for (i = 0; i < vsi->num_q_vectors; i++)
-			napi_schedule(&vsi->q_vectors[i]->napi);
-		dev_info(&pf->pdev->dev, "napi called\n");
 	} else {
 		dev_info(&pf->pdev->dev, "unknown command '%s'\n",
 			 i40e_dbg_netdev_ops_buf);
-- 
1.9.0

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [net-next v2 09/14] i40e/i40evf: Add an FD message level
  2014-03-28 14:08 [net-next v2 00/14][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
                   ` (7 preceding siblings ...)
  2014-03-28 14:08 ` [net-next v2 08/14] i40e: check for netdev before debugfs use Jeff Kirsher
@ 2014-03-28 14:08 ` Jeff Kirsher
  2014-03-28 14:08 ` [net-next v2 10/14] i40e: Use DEBUG_FD message level for an FD message Jeff Kirsher
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 27+ messages in thread
From: Jeff Kirsher @ 2014-03-28 14:08 UTC (permalink / raw)
  To: davem
  Cc: Anjali Singhai Jain, netdev, gospo, sassmann, Catherine Sullivan,
	Jeff Kirsher

From: Anjali Singhai Jain <anjali.singhai@intel.com>

To use for Flow Director specific messages.

Change-ID: I69e39a410aa2661f8fd1ed6af0126fa4c335cb77
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Acked-by: Shannon Nelson <shannon.nelson@intel.com>
Acked-by: Kevin Scott <kevin.c.scott@intel.com>
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_type.h   | 1 +
 drivers/net/ethernet/intel/i40evf/i40e_type.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_type.h b/drivers/net/ethernet/intel/i40e/i40e_type.h
index d2f0b95..71a968f 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_type.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_type.h
@@ -91,6 +91,7 @@ enum i40e_debug_mask {
 	I40E_DEBUG_FLOW			= 0x00000200,
 	I40E_DEBUG_DCB			= 0x00000400,
 	I40E_DEBUG_DIAG			= 0x00000800,
+	I40E_DEBUG_FD			= 0x00001000,
 
 	I40E_DEBUG_AQ_MESSAGE		= 0x01000000,
 	I40E_DEBUG_AQ_DESCRIPTOR	= 0x02000000,
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_type.h b/drivers/net/ethernet/intel/i40evf/i40e_type.h
index efe73ad..4673b33 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_type.h
+++ b/drivers/net/ethernet/intel/i40evf/i40e_type.h
@@ -88,6 +88,7 @@ enum i40e_debug_mask {
 	I40E_DEBUG_FLOW			= 0x00000200,
 	I40E_DEBUG_DCB			= 0x00000400,
 	I40E_DEBUG_DIAG			= 0x00000800,
+	I40E_DEBUG_FD			= 0x00001000,
 
 	I40E_DEBUG_AQ_MESSAGE		= 0x01000000,
 	I40E_DEBUG_AQ_DESCRIPTOR	= 0x02000000,
-- 
1.9.0

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [net-next v2 10/14] i40e: Use DEBUG_FD message level for an FD message
  2014-03-28 14:08 [net-next v2 00/14][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
                   ` (8 preceding siblings ...)
  2014-03-28 14:08 ` [net-next v2 09/14] i40e/i40evf: Add an FD message level Jeff Kirsher
@ 2014-03-28 14:08 ` Jeff Kirsher
  2014-03-28 14:08 ` [net-next v2 11/14] e1000e: add timeout for TX HW time stamping work Jeff Kirsher
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 27+ messages in thread
From: Jeff Kirsher @ 2014-03-28 14:08 UTC (permalink / raw)
  To: davem
  Cc: Anjali Singhai Jain, netdev, gospo, sassmann, Catherine Sullivan,
	Jeff Kirsher

From: Anjali Singhai Jain <anjali.singhai@intel.com>

We don't need to print this info unless at FD message level.

Change-ID: I329efdd8e754a0ea0669ec04d12e03db02e6b76e
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_txrx.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index de25a32..a329aac 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -482,8 +482,9 @@ static void i40e_fd_handle_status(struct i40e_ring *rx_ring,
 		}
 	} else if (error ==
 			  (0x1 << I40E_RX_PROG_STATUS_DESC_NO_FD_ENTRY_SHIFT)) {
-		netdev_info(rx_ring->vsi->netdev, "ntuple filter loc = %d, could not be removed\n",
-			    rx_desc->wb.qword0.hi_dword.fd_id);
+		if (I40E_DEBUG_FD & pf->hw.debug_mask)
+			dev_info(&pdev->dev, "ntuple filter loc = %d, could not be removed\n",
+				 rx_desc->wb.qword0.hi_dword.fd_id);
 	}
 }
 
-- 
1.9.0

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [net-next v2 11/14] e1000e: add timeout for TX HW time stamping work
  2014-03-28 14:08 [net-next v2 00/14][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
                   ` (9 preceding siblings ...)
  2014-03-28 14:08 ` [net-next v2 10/14] i40e: Use DEBUG_FD message level for an FD message Jeff Kirsher
@ 2014-03-28 14:08 ` Jeff Kirsher
  2014-03-28 14:08 ` [net-next v2 12/14] e1000e: remove redundant if clause from PTP work Jeff Kirsher
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 27+ messages in thread
From: Jeff Kirsher @ 2014-03-28 14:08 UTC (permalink / raw)
  To: davem; +Cc: Jakub Kicinski, netdev, gospo, sassmann, Jeff Kirsher

From: Jakub Kicinski <kubakici@wp.pl>

Hardware may fail to report time stamp e.g.:
 - when hardware time stamping is not enabled
 - when time stamp is requested shortly after ifup

Timeout time stamp reading work to prevent it from
scheduling itself indefinitely. Report timeout events
via system log and device stats.

Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/e1000e/e1000.h   | 2 ++
 drivers/net/ethernet/intel/e1000e/ethtool.c | 1 +
 drivers/net/ethernet/intel/e1000e/netdev.c  | 7 +++++++
 3 files changed, 10 insertions(+)

diff --git a/drivers/net/ethernet/intel/e1000e/e1000.h b/drivers/net/ethernet/intel/e1000e/e1000.h
index 5325e3e..1471c54 100644
--- a/drivers/net/ethernet/intel/e1000e/e1000.h
+++ b/drivers/net/ethernet/intel/e1000e/e1000.h
@@ -262,6 +262,7 @@ struct e1000_adapter {
 	u32 tx_head_addr;
 	u32 tx_fifo_size;
 	u32 tx_dma_failed;
+	u32 tx_hwtstamp_timeouts;
 
 	/* Rx */
 	bool (*clean_rx) (struct e1000_ring *ring, int *work_done,
@@ -334,6 +335,7 @@ struct e1000_adapter {
 	struct hwtstamp_config hwtstamp_config;
 	struct delayed_work systim_overflow_work;
 	struct sk_buff *tx_hwtstamp_skb;
+	unsigned long tx_hwtstamp_start;
 	struct work_struct tx_hwtstamp_work;
 	spinlock_t systim_lock;	/* protects SYSTIML/H regsters */
 	struct cyclecounter cc;
diff --git a/drivers/net/ethernet/intel/e1000e/ethtool.c b/drivers/net/ethernet/intel/e1000e/ethtool.c
index 3c2898d..cad250b 100644
--- a/drivers/net/ethernet/intel/e1000e/ethtool.c
+++ b/drivers/net/ethernet/intel/e1000e/ethtool.c
@@ -104,6 +104,7 @@ static const struct e1000_stats e1000_gstrings_stats[] = {
 	E1000_STAT("rx_hwtstamp_cleared", rx_hwtstamp_cleared),
 	E1000_STAT("uncorr_ecc_errors", uncorr_errors),
 	E1000_STAT("corr_ecc_errors", corr_errors),
+	E1000_STAT("tx_hwtstamp_timeouts", tx_hwtstamp_timeouts),
 };
 
 #define E1000_GLOBAL_STATS_LEN	ARRAY_SIZE(e1000_gstrings_stats)
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 6bd1832..b8d252f 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -1163,6 +1163,12 @@ static void e1000e_tx_hwtstamp_work(struct work_struct *work)
 		skb_tstamp_tx(adapter->tx_hwtstamp_skb, &shhwtstamps);
 		dev_kfree_skb_any(adapter->tx_hwtstamp_skb);
 		adapter->tx_hwtstamp_skb = NULL;
+	} else if (time_after(jiffies, adapter->tx_hwtstamp_start
+			      + adapter->tx_timeout_factor * HZ)) {
+		dev_kfree_skb_any(adapter->tx_hwtstamp_skb);
+		adapter->tx_hwtstamp_skb = NULL;
+		adapter->tx_hwtstamp_timeouts++;
+		e_warn("clearing Tx timestamp hang");
 	} else {
 		/* reschedule to check later */
 		schedule_work(&adapter->tx_hwtstamp_work);
@@ -5567,6 +5573,7 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
 			skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
 			tx_flags |= E1000_TX_FLAGS_HWTSTAMP;
 			adapter->tx_hwtstamp_skb = skb_get(skb);
+			adapter->tx_hwtstamp_start = jiffies;
 			schedule_work(&adapter->tx_hwtstamp_work);
 		} else {
 			skb_tx_timestamp(skb);
-- 
1.9.0

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [net-next v2 12/14] e1000e: remove redundant if clause from PTP work
  2014-03-28 14:08 [net-next v2 00/14][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
                   ` (10 preceding siblings ...)
  2014-03-28 14:08 ` [net-next v2 11/14] e1000e: add timeout for TX HW time stamping work Jeff Kirsher
@ 2014-03-28 14:08 ` Jeff Kirsher
  2014-03-28 14:08 ` [net-next v2 13/14] igb: never generate both software and hardware timestamps Jeff Kirsher
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 27+ messages in thread
From: Jeff Kirsher @ 2014-03-28 14:08 UTC (permalink / raw)
  To: davem; +Cc: Jakub Kicinski, netdev, gospo, sassmann, Jeff Kirsher

From: Jakub Kicinski <kubakici@wp.pl>

tx_hwtstamp_skb is always set before work is scheduled,
work is cancelled before tx_hwtstamp_skb is set to NULL.
PTP work cannot ever see tx_hwtstamp_skb set to NULL.

Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/e1000e/netdev.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index b8d252f..f1cce59 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -1148,9 +1148,6 @@ static void e1000e_tx_hwtstamp_work(struct work_struct *work)
 						     tx_hwtstamp_work);
 	struct e1000_hw *hw = &adapter->hw;
 
-	if (!adapter->tx_hwtstamp_skb)
-		return;
-
 	if (er32(TSYNCTXCTL) & E1000_TSYNCTXCTL_VALID) {
 		struct skb_shared_hwtstamps shhwtstamps;
 		u64 txstmp;
-- 
1.9.0

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [net-next v2 13/14] igb: never generate both software and hardware timestamps
  2014-03-28 14:08 [net-next v2 00/14][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
                   ` (11 preceding siblings ...)
  2014-03-28 14:08 ` [net-next v2 12/14] e1000e: remove redundant if clause from PTP work Jeff Kirsher
@ 2014-03-28 14:08 ` Jeff Kirsher
  2014-03-28 14:08 ` [net-next v2 14/14] igb: fix race conditions on queuing skb for HW time stamp Jeff Kirsher
  2014-03-28 18:45 ` [net-next v2 00/14][pull request] Intel Wired LAN Driver Updates David Miller
  14 siblings, 0 replies; 27+ messages in thread
From: Jeff Kirsher @ 2014-03-28 14:08 UTC (permalink / raw)
  To: davem; +Cc: Jakub Kicinski, netdev, gospo, sassmann, Jeff Kirsher

From: Jakub Kicinski <kubakici@wp.pl>

skb_tx_timestamp() does not report software time stamp
if SKBTX_IN_PROGRESS is set. According to timestamping.txt
software time stamps are a fallback and should not be
generated if hardware time stamp is provided.

Move call to skb_tx_timestamp() after setting
SKBTX_IN_PROGRESS.

Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/igb/igb_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index cd20409..1fdffa2 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -4980,8 +4980,6 @@ netdev_tx_t igb_xmit_frame_ring(struct sk_buff *skb,
 	first->bytecount = skb->len;
 	first->gso_segs = 1;
 
-	skb_tx_timestamp(skb);
-
 	if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)) {
 		struct igb_adapter *adapter = netdev_priv(tx_ring->netdev);
 
@@ -4996,6 +4994,8 @@ netdev_tx_t igb_xmit_frame_ring(struct sk_buff *skb,
 		}
 	}
 
+	skb_tx_timestamp(skb);
+
 	if (vlan_tx_tag_present(skb)) {
 		tx_flags |= IGB_TX_FLAGS_VLAN;
 		tx_flags |= (vlan_tx_tag_get(skb) << IGB_TX_FLAGS_VLAN_SHIFT);
-- 
1.9.0

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [net-next v2 14/14] igb: fix race conditions on queuing skb for HW time stamp
  2014-03-28 14:08 [net-next v2 00/14][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
                   ` (12 preceding siblings ...)
  2014-03-28 14:08 ` [net-next v2 13/14] igb: never generate both software and hardware timestamps Jeff Kirsher
@ 2014-03-28 14:08 ` Jeff Kirsher
  2014-03-28 18:45 ` [net-next v2 00/14][pull request] Intel Wired LAN Driver Updates David Miller
  14 siblings, 0 replies; 27+ messages in thread
From: Jeff Kirsher @ 2014-03-28 14:08 UTC (permalink / raw)
  To: davem; +Cc: Jakub Kicinski, netdev, gospo, sassmann, Jeff Kirsher

From: Jakub Kicinski <kubakici@wp.pl>

igb has a single set of TX time stamping resources per NIC.
Use a simple bit lock to avoid race conditions and leaking skbs
when multiple TX rings try to claim time stamping.

Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/igb/igb.h      | 3 ++-
 drivers/net/ethernet/intel/igb/igb_main.c | 3 ++-
 drivers/net/ethernet/intel/igb/igb_ptp.c  | 3 +++
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/igb/igb.h b/drivers/net/ethernet/intel/igb/igb.h
index 411b213..7fbe1e9 100644
--- a/drivers/net/ethernet/intel/igb/igb.h
+++ b/drivers/net/ethernet/intel/igb/igb.h
@@ -492,7 +492,8 @@ struct igb_adapter {
 enum e1000_state_t {
 	__IGB_TESTING,
 	__IGB_RESETTING,
-	__IGB_DOWN
+	__IGB_DOWN,
+	__IGB_PTP_TX_IN_PROGRESS,
 };
 
 enum igb_boards {
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 1fdffa2..55fc559 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -4983,7 +4983,8 @@ netdev_tx_t igb_xmit_frame_ring(struct sk_buff *skb,
 	if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)) {
 		struct igb_adapter *adapter = netdev_priv(tx_ring->netdev);
 
-		if (!(adapter->ptp_tx_skb)) {
+		if (!test_and_set_bit_lock(__IGB_PTP_TX_IN_PROGRESS,
+					   &adapter->state)) {
 			skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
 			tx_flags |= IGB_TX_FLAGS_TSTAMP;
 
diff --git a/drivers/net/ethernet/intel/igb/igb_ptp.c b/drivers/net/ethernet/intel/igb/igb_ptp.c
index da55fbb..2cca8fd 100644
--- a/drivers/net/ethernet/intel/igb/igb_ptp.c
+++ b/drivers/net/ethernet/intel/igb/igb_ptp.c
@@ -387,6 +387,7 @@ static void igb_ptp_tx_work(struct work_struct *work)
 				   IGB_PTP_TX_TIMEOUT)) {
 		dev_kfree_skb_any(adapter->ptp_tx_skb);
 		adapter->ptp_tx_skb = NULL;
+		clear_bit_unlock(__IGB_PTP_TX_IN_PROGRESS, &adapter->state);
 		adapter->tx_hwtstamp_timeouts++;
 		dev_warn(&adapter->pdev->dev, "clearing Tx timestamp hang");
 		return;
@@ -480,6 +481,7 @@ static void igb_ptp_tx_hwtstamp(struct igb_adapter *adapter)
 	skb_tstamp_tx(adapter->ptp_tx_skb, &shhwtstamps);
 	dev_kfree_skb_any(adapter->ptp_tx_skb);
 	adapter->ptp_tx_skb = NULL;
+	clear_bit_unlock(__IGB_PTP_TX_IN_PROGRESS, &adapter->state);
 }
 
 /**
@@ -857,6 +859,7 @@ void igb_ptp_stop(struct igb_adapter *adapter)
 	if (adapter->ptp_tx_skb) {
 		dev_kfree_skb_any(adapter->ptp_tx_skb);
 		adapter->ptp_tx_skb = NULL;
+		clear_bit_unlock(__IGB_PTP_TX_IN_PROGRESS, &adapter->state);
 	}
 
 	if (adapter->ptp_clock) {
-- 
1.9.0

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* Re: [net-next v2 00/14][pull request] Intel Wired LAN Driver Updates
  2014-03-28 14:08 [net-next v2 00/14][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
                   ` (13 preceding siblings ...)
  2014-03-28 14:08 ` [net-next v2 14/14] igb: fix race conditions on queuing skb for HW time stamp Jeff Kirsher
@ 2014-03-28 18:45 ` David Miller
  14 siblings, 0 replies; 27+ messages in thread
From: David Miller @ 2014-03-28 18:45 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, sassmann

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Fri, 28 Mar 2014 07:08:01 -0700

> This series contains updates to e1000e, igb, i40e and i40evf

Pulled, thanks a lot Jeff.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [net-next v2 07/14] i40evf: remove double space after return
  2014-03-28 14:08 ` [net-next v2 07/14] i40evf: remove double space after return Jeff Kirsher
@ 2014-03-28 19:58   ` Or Gerlitz
  2014-03-31 17:48     ` Jesse Brandeburg
  0 siblings, 1 reply; 27+ messages in thread
From: Or Gerlitz @ 2014-03-28 19:58 UTC (permalink / raw)
  To: Jeff Kirsher; +Cc: David Miller, netdev, gospo

On Fri, Mar 28, 2014 at 5:08 PM, Jeff Kirsher
<jeffrey.t.kirsher@intel.com> wrote:
> From: Jesse Brandeburg <jesse.brandeburg@intel.com>
>
> There were two spaces between return and the value, we only need one.
>
> Change-ID: Iaa42c33f50d8d149cdf1a4c9c1902295bfd991c4
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Acked-by: Shannon Nelson <shannon.nelson@intel.com>
> Signed-off-by: Kevin Scott <kevin.c.scott@intel.com>
> Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Just out of curiosity, any special reason for four of the maintainers
to sign on a patch that remove a space?

>
> ---
>  drivers/net/ethernet/intel/i40evf/i40e_prototype.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/intel/i40evf/i40e_prototype.h b/drivers/net/ethernet/intel/i40evf/i40e_prototype.h
> index 862fcdf..97ab8c2 100644
> --- a/drivers/net/ethernet/intel/i40evf/i40e_prototype.h
> +++ b/drivers/net/ethernet/intel/i40evf/i40e_prototype.h
> @@ -67,7 +67,7 @@ extern struct i40e_rx_ptype_decoded i40evf_ptype_lookup[];
>
>  static inline struct i40e_rx_ptype_decoded decode_rx_desc_ptype(u8 ptype)
>  {
> -       return  i40evf_ptype_lookup[ptype];
> +       return i40evf_ptype_lookup[ptype];
>  }
>
>  /* prototype for functions used for SW locks */
> --
> 1.9.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [net-next v2 07/14] i40evf: remove double space after return
  2014-03-28 19:58   ` Or Gerlitz
@ 2014-03-31 17:48     ` Jesse Brandeburg
  2014-03-31 18:18       ` Or Gerlitz
  0 siblings, 1 reply; 27+ messages in thread
From: Jesse Brandeburg @ 2014-03-31 17:48 UTC (permalink / raw)
  To: Or Gerlitz; +Cc: Jeff Kirsher, David Miller, netdev, gospo, jesse.brandeburg

On Fri, 28 Mar 2014 22:58:31 +0300
Or Gerlitz <or.gerlitz@gmail.com> wrote:
> Just out of curiosity, any special reason for four of the maintainers
> to sign on a patch that remove a space?

Yeah, seems like lots of overkill, in this case it is just an artifact
of all the people that handled the patch as it exited our process.

Thanks for the review.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [net-next v2 07/14] i40evf: remove double space after return
  2014-03-31 17:48     ` Jesse Brandeburg
@ 2014-03-31 18:18       ` Or Gerlitz
  2014-03-31 18:24         ` Jeff Kirsher
  0 siblings, 1 reply; 27+ messages in thread
From: Or Gerlitz @ 2014-03-31 18:18 UTC (permalink / raw)
  To: Jesse Brandeburg, Jeff Kirsher; +Cc: David Miller, netdev, gospo

On Mon, Mar 31, 2014 at 8:48 PM, Jesse Brandeburg
<jesse.brandeburg@intel.com> wrote:
> On Fri, 28 Mar 2014 22:58:31 +0300
> Or Gerlitz <or.gerlitz@gmail.com> wrote:
>> Just out of curiosity, any special reason for four of the maintainers
>> to sign on a patch that remove a space?
>
> Yeah, seems like lots of overkill, in this case it is just an artifact
> of all the people that handled the patch as it exited our process.
>
> Thanks for the review.

So beinh curios again, are you planning to change something based on
this feedback and your overkill comment?

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [net-next v2 07/14] i40evf: remove double space after return
  2014-03-31 18:18       ` Or Gerlitz
@ 2014-03-31 18:24         ` Jeff Kirsher
  0 siblings, 0 replies; 27+ messages in thread
From: Jeff Kirsher @ 2014-03-31 18:24 UTC (permalink / raw)
  To: Or Gerlitz; +Cc: Jesse Brandeburg, David Miller, netdev, gospo

[-- Attachment #1: Type: text/plain, Size: 922 bytes --]

On Mon, 2014-03-31 at 21:18 +0300, Or Gerlitz wrote:
> On Mon, Mar 31, 2014 at 8:48 PM, Jesse Brandeburg
> <jesse.brandeburg@intel.com> wrote:
> > On Fri, 28 Mar 2014 22:58:31 +0300
> > Or Gerlitz <or.gerlitz@gmail.com> wrote:
> >> Just out of curiosity, any special reason for four of the maintainers
> >> to sign on a patch that remove a space?
> >
> > Yeah, seems like lots of overkill, in this case it is just an artifact
> > of all the people that handled the patch as it exited our process.
> >
> > Thanks for the review.
> 
> So beinh curios again, are you planning to change something based on
> this feedback and your overkill comment?

Yeah, I will ensure that patches I send out won't have an overkill of
signatures.  I saw this when I went to push it upstream and thought
twice about trimming down the list.  I plan on keeping the author,
tested-by and my signatures on the patch for sure.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [net-next v2 00/14][pull request] Intel Wired LAN Driver Updates
  2014-03-14 23:34 Jeff Kirsher
@ 2014-03-15  2:19 ` David Miller
  0 siblings, 0 replies; 27+ messages in thread
From: David Miller @ 2014-03-15  2:19 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, sassmann

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Fri, 14 Mar 2014 16:34:21 -0700

> This series contains updates to igb, i40e and i40evf.
> 
> I provide a code comment fix which David Miller noticed in the last
> series of patches I submitted.
> 
> Shannon provides a patch to cleanup the NAPI structs when deleting the
> netdev.
> 
> Anjali provides several patches for i40e, first fixes a bug in the update
> filter logic which was causing a kernel panic.  Then provides a fix to
> rename an error bit to correctly indicate the error.  Adds a definition
> for a new state variable to keep track of features automatically disabled
> due to hardware resource limitations versus user enforced feature disabled.
> Anjali provides a patch to add code to handle when there is a filter
> programming error due to a full table, which also resolves a previous
> compile warning about an unused "*pf" variable introduced in the last i40e
> series patch submission.
> 
> Jesse provides three i40e patches to cleanup strings to make more
> consistent and to align with other Intel drivers.
> 
> Akeem cleans up a misleading function header comment for i40e.
> 
> Mitch provides a fix for i40e/i40evf to use the correctly reported number
> of MSI-X vectors in the PF an VF.  Then provides a patch to use
> dma_set_mask_and_coherent() which was introduced in v3.13 and simplifies
> the DMA mapping code a bit.
> 
> v2:
> - dropped the 2 ixgbe patches from Emil based on feedback from David Miller,
>   where the 2 fixes should be handled in the net core to fix all drivers

Pulled, thanks Jeff.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [net-next v2 00/14][pull request] Intel Wired LAN Driver Updates
@ 2014-03-14 23:34 Jeff Kirsher
  2014-03-15  2:19 ` David Miller
  0 siblings, 1 reply; 27+ messages in thread
From: Jeff Kirsher @ 2014-03-14 23:34 UTC (permalink / raw)
  To: davem; +Cc: Jeff Kirsher, netdev, gospo, sassmann

This series contains updates to igb, i40e and i40evf.

I provide a code comment fix which David Miller noticed in the last
series of patches I submitted.

Shannon provides a patch to cleanup the NAPI structs when deleting the
netdev.

Anjali provides several patches for i40e, first fixes a bug in the update
filter logic which was causing a kernel panic.  Then provides a fix to
rename an error bit to correctly indicate the error.  Adds a definition
for a new state variable to keep track of features automatically disabled
due to hardware resource limitations versus user enforced feature disabled.
Anjali provides a patch to add code to handle when there is a filter
programming error due to a full table, which also resolves a previous
compile warning about an unused "*pf" variable introduced in the last i40e
series patch submission.

Jesse provides three i40e patches to cleanup strings to make more
consistent and to align with other Intel drivers.

Akeem cleans up a misleading function header comment for i40e.

Mitch provides a fix for i40e/i40evf to use the correctly reported number
of MSI-X vectors in the PF an VF.  Then provides a patch to use
dma_set_mask_and_coherent() which was introduced in v3.13 and simplifies
the DMA mapping code a bit.

v2:
- dropped the 2 ixgbe patches from Emil based on feedback from David Miller,
  where the 2 fixes should be handled in the net core to fix all drivers

The following are changes since commit 177943260a6088bec51fc6c04643d84e43bef423:
  6lowpan: reassembly: un-export local functions
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

Akeem G Abodunrin (1):
  i40e: Fix function comments

Anjali Singhai Jain (6):
  i40e: Fix a bug in the update logic for FDIR SB filter.
  i40e/i40evf: Some flow director HW definition fixes
  i40e: Define a new state variable to keep track of feature auto
    disable
  i40e: Add code to handle FD table full condition
  i40e: Bug fix for FDIR replay logic
  i40e: Let MDD events be handled by MDD handler

Jeff Kirsher (1):
  igb: Fix code comment

Jesse Brandeburg (3):
  i40e: make string references to q be queue
  i40e: cleanup strings
  i40e: simplified init string

Mitch Williams (2):
  i40e/i40evf: Use correct number of VF vectors
  i40e/i40evf: Use dma_set_mask_and_coherent

Shannon Nelson (1):
  i40e: delete netdev after deleting napi and vectors

 drivers/net/ethernet/intel/i40e/i40e.h             |  10 +-
 drivers/net/ethernet/intel/i40e/i40e_debugfs.c     |  25 ++-
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c     |  37 +++-
 drivers/net/ethernet/intel/i40e/i40e_main.c        | 190 +++++++++++++++------
 drivers/net/ethernet/intel/i40e/i40e_txrx.c        |  60 ++++++-
 drivers/net/ethernet/intel/i40e/i40e_type.h        |   6 +-
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c |   9 +-
 drivers/net/ethernet/intel/i40evf/i40e_type.h      |   6 +-
 drivers/net/ethernet/intel/i40evf/i40evf_main.c    |  19 +--
 drivers/net/ethernet/intel/igb/igb_main.c          |   2 +-
 10 files changed, 269 insertions(+), 95 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [net-next v2 00/14][pull request] Intel Wired LAN Driver Updates
  2013-10-22 19:53 ` David Miller
@ 2013-10-22 20:00   ` Jeff Kirsher
  0 siblings, 0 replies; 27+ messages in thread
From: Jeff Kirsher @ 2013-10-22 20:00 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, gospo, sassmann

[-- Attachment #1: Type: text/plain, Size: 2010 bytes --]

On Tue, 2013-10-22 at 15:53 -0400, David Miller wrote:
> From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Date: Tue, 22 Oct 2013 07:22:23 -0700
> 
> > This series contains updates to i40e only.
> > 
> > Jesse provides 6 patches against i40e.  First is a patch to reduce
> > CPU utilization by reducing read-flush to read in the hot path.  Next
> > couple of patches resolve coverity issues reported by Hannes Frederic
> > Sowa <hannes@stressinduktion.org>.  Then Jesse refactored i40e to cleanup
> > functions which used cpu_to_xxx(foo) which caused a lot of line wrapping.
> > 
> > Mitch provides 2 i40e patches.  First fixes a panic when tx_rings[0]
> > are not allocated, his second patch corrects a math error when
> > assigning MSI-X vectors to VFs.  The vectors-per-vf value reported
> > by the hardware already conveniently reports one less than the actual
> > value.
> > 
> > Shannon provides 5 patches against i40e.  His first patch corrects a
> > number of little bugs in the error handling of irq setup, most of
> > which ended up panicing the kernel.  Next he fixes the overactive
> > IRQ issue seen in testing and allows the use of the legacy interrupt.
> > Shannon then provides a cleanup of the arguments declared at the
> > beginning of each function.  Then he provides a patch to make sure
> > that there are really rings and queues before trying to dump
> > information in them.  Lastly he simplifies the code by using an
> > already existing variable.
> > 
> > Catherine provides an i40e patch to bump the version.
> 
> Pulled, thanks Jeff.
> 
> Just a note for the future, and I decided not to push back this time when
> I saw it in this series.  When you have a construct like:
> 
> 	if (x)
> 		for( ... ) {
> 		}
> 
> Put the top-level condition in braces too as it's much easier to read
> and audit:
> 
> 	if (x) {
> 		for ( ... ) {
> 		}
> 	}
> 
> Thanks.

I agree, I will add that to my list of checks for the future.  Thanks
Dave.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [net-next v2 00/14][pull request] Intel Wired LAN Driver Updates
  2013-10-22 14:22 Jeff Kirsher
@ 2013-10-22 19:53 ` David Miller
  2013-10-22 20:00   ` Jeff Kirsher
  0 siblings, 1 reply; 27+ messages in thread
From: David Miller @ 2013-10-22 19:53 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, sassmann

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 22 Oct 2013 07:22:23 -0700

> This series contains updates to i40e only.
> 
> Jesse provides 6 patches against i40e.  First is a patch to reduce
> CPU utilization by reducing read-flush to read in the hot path.  Next
> couple of patches resolve coverity issues reported by Hannes Frederic
> Sowa <hannes@stressinduktion.org>.  Then Jesse refactored i40e to cleanup
> functions which used cpu_to_xxx(foo) which caused a lot of line wrapping.
> 
> Mitch provides 2 i40e patches.  First fixes a panic when tx_rings[0]
> are not allocated, his second patch corrects a math error when
> assigning MSI-X vectors to VFs.  The vectors-per-vf value reported
> by the hardware already conveniently reports one less than the actual
> value.
> 
> Shannon provides 5 patches against i40e.  His first patch corrects a
> number of little bugs in the error handling of irq setup, most of
> which ended up panicing the kernel.  Next he fixes the overactive
> IRQ issue seen in testing and allows the use of the legacy interrupt.
> Shannon then provides a cleanup of the arguments declared at the
> beginning of each function.  Then he provides a patch to make sure
> that there are really rings and queues before trying to dump
> information in them.  Lastly he simplifies the code by using an
> already existing variable.
> 
> Catherine provides an i40e patch to bump the version.

Pulled, thanks Jeff.

Just a note for the future, and I decided not to push back this time when
I saw it in this series.  When you have a construct like:

	if (x)
		for( ... ) {
		}

Put the top-level condition in braces too as it's much easier to read
and audit:

	if (x) {
		for ( ... ) {
		}
	}

Thanks.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [net-next v2 00/14][pull request] Intel Wired LAN Driver Updates
@ 2013-10-22 14:22 Jeff Kirsher
  2013-10-22 19:53 ` David Miller
  0 siblings, 1 reply; 27+ messages in thread
From: Jeff Kirsher @ 2013-10-22 14:22 UTC (permalink / raw)
  To: davem; +Cc: Jeff Kirsher, netdev, gospo, sassmann

This series contains updates to i40e only.

Jesse provides 6 patches against i40e.  First is a patch to reduce
CPU utilization by reducing read-flush to read in the hot path.  Next
couple of patches resolve coverity issues reported by Hannes Frederic
Sowa <hannes@stressinduktion.org>.  Then Jesse refactored i40e to cleanup
functions which used cpu_to_xxx(foo) which caused a lot of line wrapping.

Mitch provides 2 i40e patches.  First fixes a panic when tx_rings[0]
are not allocated, his second patch corrects a math error when
assigning MSI-X vectors to VFs.  The vectors-per-vf value reported
by the hardware already conveniently reports one less than the actual
value.

Shannon provides 5 patches against i40e.  His first patch corrects a
number of little bugs in the error handling of irq setup, most of
which ended up panicing the kernel.  Next he fixes the overactive
IRQ issue seen in testing and allows the use of the legacy interrupt.
Shannon then provides a cleanup of the arguments declared at the
beginning of each function.  Then he provides a patch to make sure
that there are really rings and queues before trying to dump
information in them.  Lastly he simplifies the code by using an
already existing variable.

Catherine provides an i40e patch to bump the version.

v2:
 - Remove unneeded parenthesis in patch 3 based on feedback from
   Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
 - Fix patch description for patch 11 based on feedback from
   Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

The following are changes since commit bda301c9dc545f81bd70c1eecb8572bfc5eb524c:
  Merge branch 'sit_tso'
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

Catherine Sullivan (1):
  i40e: Bump version

Jesse Brandeburg (6):
  i40e: do not flush after re-enabling interrupts
  i40e: debugfs fixups
  i40e: clamp debugfs nvm read command
  i40e: fix use of untrusted scalar value warning
  i40e: fix sign extension issue
  i40e: refactor fdir setup function

Mitch Williams (2):
  i40e: don't free nonexistent rings
  i40e: assign correct vector to VF

Shannon Nelson (5):
  i40e: fixup legacy interrupt handling
  i40e: tweaking icr0 handling for legacy irq
  i40e: reorder block declarations in debugfs
  i40e: check vsi ptrs before dumping them
  i40e: use pf_id for pf function id in qtx_ctl

 drivers/net/ethernet/intel/i40e/i40e.h             |   1 +
 drivers/net/ethernet/intel/i40e/i40e_debugfs.c     | 135 ++++++++++++---------
 drivers/net/ethernet/intel/i40e/i40e_main.c        |  50 ++++----
 drivers/net/ethernet/intel/i40e/i40e_txrx.c        |  83 ++++++-------
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c |   4 +-
 5 files changed, 146 insertions(+), 127 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [net-next v2 00/14][pull request] Intel Wired LAN Driver Updates
  2013-04-25  4:08 Jeff Kirsher
@ 2013-04-25  5:08 ` David Miller
  0 siblings, 0 replies; 27+ messages in thread
From: David Miller @ 2013-04-25  5:08 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, sassmann

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Wed, 24 Apr 2013 21:08:33 -0700

> This series contains updates to ixgbe, igb and pci.
> 
> The ixgbe changes contains a fix to a possible divide by zero by bailing
> out of the ixgbe_update_itr() function if the last interrupt timeslice is
> zero.  In addition, support is added for the new OCP x520 adapter as well
> as LX support for 82599 devices.  Jacob provides a patch to change
> variable wol_supported to wol_enabled to better reflect what the code
> is actually doing (i.e. checking if WoL is enabled).
> 
> Alex adds SRIOV helper function to pci that will determine if a PF
> has any VFs that are currently assigned to a guest.
> 
> The remaining 8 patches are against igb and contain the following changes:
> * implement SERDES loopback configuration for i210 devices by unsetting
>   sigdetect bit, so as to fix Ethtool loopback test failure
> * add support for the SMBI semaphore for I210/I211 devices
> * implement the new generic pci_vfs_assigned helper function (Alex's PCI
>   helper function)
> * display warning when link speed is downgraded due to Smartspeed
> * ensure that VLAN hardware filtering remains enabled when the device is
>   in promiscuous mode and VT mode simultaneously
> * cleanup dead code in igb
> * bump the driver version
> 
> v2: updated the PCI patch to add SRIOV helper function to remove extern
>     from the declaration of pci_vfs_assigned in pci.h and return 0 if
>     SR-IOV is disabled which is inline with other PCI SR-IOV functions

Pulled, thanks for getting the PCI review resolved.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [net-next v2 00/14][pull request] Intel Wired LAN Driver Updates
@ 2013-04-25  4:08 Jeff Kirsher
  2013-04-25  5:08 ` David Miller
  0 siblings, 1 reply; 27+ messages in thread
From: Jeff Kirsher @ 2013-04-25  4:08 UTC (permalink / raw)
  To: davem; +Cc: Jeff Kirsher, netdev, gospo, sassmann

This series contains updates to ixgbe, igb and pci.

The ixgbe changes contains a fix to a possible divide by zero by bailing
out of the ixgbe_update_itr() function if the last interrupt timeslice is
zero.  In addition, support is added for the new OCP x520 adapter as well
as LX support for 82599 devices.  Jacob provides a patch to change
variable wol_supported to wol_enabled to better reflect what the code
is actually doing (i.e. checking if WoL is enabled).

Alex adds SRIOV helper function to pci that will determine if a PF
has any VFs that are currently assigned to a guest.

The remaining 8 patches are against igb and contain the following changes:
* implement SERDES loopback configuration for i210 devices by unsetting
  sigdetect bit, so as to fix Ethtool loopback test failure
* add support for the SMBI semaphore for I210/I211 devices
* implement the new generic pci_vfs_assigned helper function (Alex's PCI
  helper function)
* display warning when link speed is downgraded due to Smartspeed
* ensure that VLAN hardware filtering remains enabled when the device is
  in promiscuous mode and VT mode simultaneously
* cleanup dead code in igb
* bump the driver version

v2: updated the PCI patch to add SRIOV helper function to remove extern
    from the declaration of pci_vfs_assigned in pci.h and return 0 if
    SR-IOV is disabled which is inline with other PCI SR-IOV functions

The following are changes since commit 01f27fc085574b301248d4da241e9d5ebd61e5c9:
  Merge branch 'bnx2x'
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

Akeem G. Abodunrin (1):
  igb: SERDES loopback sigdetect bit on i210 devices

Alexander Duyck (2):
  pci: Add SRIOV helper function to determine if VFs are assigned to
    guest
  igb: Use pci_vfs_assigned instead of igb_vfs_are_assigned

Carolyn Wyborny (2):
  igb: Remove id's that will not be productized for Linux.
  igb: Bump version of driver

Don Skidmore (3):
  ixgbe: fix possible divide by zero in ixgbe_update_itr
  ixgbe: add driver support for x520 OCP adapter.
  ixgbe: add SFP+ LX module support

Emil Tantilov (1):
  ixgbe: add WOL support for new subdevice ID

Greg Rose (1):
  igb: Retain HW VLAN filtering while in promiscuous + VT mode

Jacob Keller (1):
  ixgbe: rename wol_supported to more fitting wol_enabled

Koki Sanagi (1):
  igb: display a warning message when SmartSpeed works

Matthew Vick (2):
  igb: Add SMBI semaphore to I210/I211
  igb: Remove dead code path

 drivers/net/ethernet/intel/igb/e1000_82575.c     |   9 +-
 drivers/net/ethernet/intel/igb/e1000_hw.h        |   3 +-
 drivers/net/ethernet/intel/igb/e1000_i210.c      |  65 ++++++++-----
 drivers/net/ethernet/intel/igb/igb_ethtool.c     |   9 +-
 drivers/net/ethernet/intel/igb/igb_main.c        | 117 +++++++++++++++--------
 drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c   |   4 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c |  10 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c    |  16 +++-
 drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c     |  21 +++-
 drivers/net/ethernet/intel/ixgbe/ixgbe_type.h    |   6 +-
 drivers/pci/iov.c                                |  41 ++++++++
 include/linux/pci.h                              |   5 +
 12 files changed, 212 insertions(+), 94 deletions(-)

-- 
1.7.11.7

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2014-03-31 18:25 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-28 14:08 [net-next v2 00/14][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2014-03-28 14:08 ` [net-next v2 01/14] i40e: Delete ATR filter on RST Jeff Kirsher
2014-03-28 14:08 ` [net-next v2 02/14] i40evf: fix oops in watchdog handler Jeff Kirsher
2014-03-28 14:08 ` [net-next v2 03/14] i40e: Make the alloc and free queue vector calls orthogonal Jeff Kirsher
2014-03-28 14:08 ` [net-next v2 04/14] i40e: eeprom integrity check on load and empr Jeff Kirsher
2014-03-28 14:08 ` [net-next v2 05/14] i40e: Cleanup in FDIR SB ethtool code Jeff Kirsher
2014-03-28 14:08 ` [net-next v2 06/14] i40e: Add functionality for FD SB to drop packets Jeff Kirsher
2014-03-28 14:08 ` [net-next v2 07/14] i40evf: remove double space after return Jeff Kirsher
2014-03-28 19:58   ` Or Gerlitz
2014-03-31 17:48     ` Jesse Brandeburg
2014-03-31 18:18       ` Or Gerlitz
2014-03-31 18:24         ` Jeff Kirsher
2014-03-28 14:08 ` [net-next v2 08/14] i40e: check for netdev before debugfs use Jeff Kirsher
2014-03-28 14:08 ` [net-next v2 09/14] i40e/i40evf: Add an FD message level Jeff Kirsher
2014-03-28 14:08 ` [net-next v2 10/14] i40e: Use DEBUG_FD message level for an FD message Jeff Kirsher
2014-03-28 14:08 ` [net-next v2 11/14] e1000e: add timeout for TX HW time stamping work Jeff Kirsher
2014-03-28 14:08 ` [net-next v2 12/14] e1000e: remove redundant if clause from PTP work Jeff Kirsher
2014-03-28 14:08 ` [net-next v2 13/14] igb: never generate both software and hardware timestamps Jeff Kirsher
2014-03-28 14:08 ` [net-next v2 14/14] igb: fix race conditions on queuing skb for HW time stamp Jeff Kirsher
2014-03-28 18:45 ` [net-next v2 00/14][pull request] Intel Wired LAN Driver Updates David Miller
  -- strict thread matches above, loose matches on Subject: below --
2014-03-14 23:34 Jeff Kirsher
2014-03-15  2:19 ` David Miller
2013-10-22 14:22 Jeff Kirsher
2013-10-22 19:53 ` David Miller
2013-10-22 20:00   ` Jeff Kirsher
2013-04-25  4:08 Jeff Kirsher
2013-04-25  5:08 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).