All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [next PATCH S21 00/14] i40e/i40evf updates
@ 2015-11-06 23:25 Joshua Hay
  2015-11-06 23:25 ` [Intel-wired-lan] [next PATCH S21 01/14] i40evf: increase max number of queues Joshua Hay
                   ` (13 more replies)
  0 siblings, 14 replies; 31+ messages in thread
From: Joshua Hay @ 2015-11-06 23:25 UTC (permalink / raw)
  To: intel-wired-lan

Jesse Brandeburg uses priv flags to control packet split, and removes 
CONFIG_I40E_VXLAN.

Kiran Patil moves detection and recovery of TX queue hung logic
to service_task from tx_timeout, and fixes memory leaks and 
sideband filter programming.

Mitch Williams increases max number of queues, sets real number
of queues, removes duplicate string, removes atomic allocation,
fixes up error propagation and handling, changes uint32_t to
u32, fixes whitespaces, and corrects bitwise operator to logical.

Neerav Parikh removes separate functions gathering XOFF Rx stats.

 drivers/net/ethernet/intel/Kconfig                 |  11 -
 drivers/net/ethernet/intel/i40e/i40e.h             |   8 +-
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c     |  27 +++
 drivers/net/ethernet/intel/i40e/i40e_main.c        | 236 ++++++++++-----------
 drivers/net/ethernet/intel/i40e/i40e_txrx.c        |  23 +-
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c |  18 +-
 drivers/net/ethernet/intel/i40evf/i40e_txrx.c      |  33 +--
 drivers/net/ethernet/intel/i40evf/i40e_txrx.h      |  15 ++
 drivers/net/ethernet/intel/i40evf/i40evf.h         |   3 +-
 drivers/net/ethernet/intel/i40evf/i40evf_main.c    |  11 +-
 .../net/ethernet/intel/i40evf/i40evf_virtchnl.c    |  12 +-
 11 files changed, 217 insertions(+), 180 deletions(-)

-- 
2.1.0


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

* [Intel-wired-lan] [next PATCH S21 01/14] i40evf: increase max number of queues
  2015-11-06 23:25 [Intel-wired-lan] [next PATCH S21 00/14] i40e/i40evf updates Joshua Hay
@ 2015-11-06 23:25 ` Joshua Hay
  2015-11-09 17:48   ` Bowers, AndrewX
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 02/14] i40evf: set real num queues Joshua Hay
                   ` (12 subsequent siblings)
  13 siblings, 1 reply; 31+ messages in thread
From: Joshua Hay @ 2015-11-06 23:25 UTC (permalink / raw)
  To: intel-wired-lan

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

Future devices will allow for more queue pairs, so allocate a netdev
that can handle them. While we're at it, get rid of the separate
MAX_TX/MAX_RX defines. Since we always get matched queue pairs, having
these makes no sense.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Change-ID: I0e3556cd9a962506e509eb7c0afa36b329e8cb51
---
 drivers/net/ethernet/intel/i40evf/i40evf.h      | 3 +--
 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40evf/i40evf.h b/drivers/net/ethernet/intel/i40evf/i40evf.h
index a6318c4..be1b72b 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf.h
+++ b/drivers/net/ethernet/intel/i40evf/i40evf.h
@@ -97,8 +97,7 @@ struct i40e_vsi {
 #define I40E_TX_DESC(R, i) (&(((struct i40e_tx_desc *)((R)->desc))[i]))
 #define I40E_TX_CTXTDESC(R, i) \
 	(&(((struct i40e_tx_context_desc *)((R)->desc))[i]))
-#define MAX_RX_QUEUES 8
-#define MAX_TX_QUEUES MAX_RX_QUEUES
+#define MAX_QUEUES 16
 
 #define I40EVF_HKEY_ARRAY_SIZE ((I40E_VFQF_HKEY_MAX_INDEX + 1) * 4)
 #define I40EVF_HLUT_ARRAY_SIZE ((I40E_VFQF_HLUT_MAX_INDEX + 1) * 4)
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index 0776e67..74917ca 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -2615,8 +2615,7 @@ static int i40evf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	pci_set_master(pdev);
 
-	netdev = alloc_etherdev_mq(sizeof(struct i40evf_adapter),
-				   MAX_TX_QUEUES);
+	netdev = alloc_etherdev_mq(sizeof(struct i40evf_adapter), MAX_QUEUES);
 	if (!netdev) {
 		err = -ENOMEM;
 		goto err_alloc_etherdev;
-- 
2.1.0


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

* [Intel-wired-lan] [next PATCH S21 02/14] i40evf: set real num queues
  2015-11-06 23:25 [Intel-wired-lan] [next PATCH S21 00/14] i40e/i40evf updates Joshua Hay
  2015-11-06 23:25 ` [Intel-wired-lan] [next PATCH S21 01/14] i40evf: increase max number of queues Joshua Hay
@ 2015-11-06 23:26 ` Joshua Hay
  2015-11-09 18:02   ` Bowers, AndrewX
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 03/14] i40evf: remove duplicate string Joshua Hay
                   ` (11 subsequent siblings)
  13 siblings, 1 reply; 31+ messages in thread
From: Joshua Hay @ 2015-11-06 23:26 UTC (permalink / raw)
  To: intel-wired-lan

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

Use the helper function to set the real number of RX queues, and also
set the real number of TX queues.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Change-ID: I67982799de3f248fb4158ccdc9b1a74385f42ddd
---
 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index 74917ca..33a08f8 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -1205,7 +1205,8 @@ static int i40evf_set_interrupt_capability(struct i40evf_adapter *adapter)
 	err = i40evf_acquire_msix_vectors(adapter, v_budget);
 
 out:
-	adapter->netdev->real_num_tx_queues = pairs;
+	netif_set_real_num_rx_queues(adapter->netdev, pairs);
+	netif_set_real_num_tx_queues(adapter->netdev, pairs);
 	return err;
 }
 
-- 
2.1.0


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

* [Intel-wired-lan] [next PATCH S21 03/14] i40evf: remove duplicate string
  2015-11-06 23:25 [Intel-wired-lan] [next PATCH S21 00/14] i40e/i40evf updates Joshua Hay
  2015-11-06 23:25 ` [Intel-wired-lan] [next PATCH S21 01/14] i40evf: increase max number of queues Joshua Hay
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 02/14] i40evf: set real num queues Joshua Hay
@ 2015-11-06 23:26 ` Joshua Hay
  2015-11-09 18:06   ` Bowers, AndrewX
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 04/14] i40e: Detection and recovery of TX queue hung logic moved to service_task from tx_timeout Joshua Hay
                   ` (10 subsequent siblings)
  13 siblings, 1 reply; 31+ messages in thread
From: Joshua Hay @ 2015-11-06 23:26 UTC (permalink / raw)
  To: intel-wired-lan

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

We already print the driver info string in probe, so don't print
it again in init. No need to repeat. No need to repeat.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Change-ID: Ief597997f580a8c54d5950e3a84c29f2075be66b
---
 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index 33a08f8..9f845fe 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -2512,7 +2512,6 @@ static void i40evf_init_task(struct work_struct *work)
 	if (netdev->features & NETIF_F_GRO)
 		dev_info(&pdev->dev, "GRO is enabled\n");
 
-	dev_info(&pdev->dev, "%s\n", i40evf_driver_string);
 	adapter->state = __I40EVF_DOWN;
 	set_bit(__I40E_DOWN, &adapter->vsi.state);
 	i40evf_misc_irq_enable(adapter);
-- 
2.1.0


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

* [Intel-wired-lan] [next PATCH S21 04/14] i40e: Detection and recovery of TX queue hung logic moved to service_task from tx_timeout
  2015-11-06 23:25 [Intel-wired-lan] [next PATCH S21 00/14] i40e/i40evf updates Joshua Hay
                   ` (2 preceding siblings ...)
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 03/14] i40evf: remove duplicate string Joshua Hay
@ 2015-11-06 23:26 ` Joshua Hay
  2015-11-09 18:47   ` Bowers, AndrewX
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 05/14] i40e: Fix memory leaks, sideband filter programming Joshua Hay
                   ` (9 subsequent siblings)
  13 siblings, 1 reply; 31+ messages in thread
From: Joshua Hay @ 2015-11-06 23:26 UTC (permalink / raw)
  To: intel-wired-lan

From: Kiran Patil <kiran.patil@intel.com>

This patch contains following changes:
   - detection and recovery logic (issue SW interrupt) has been moved to
     service_task from timeout function.
   - added some more debug info from tx_timeout.

Logic to detect and recover TX queue hung is now two step process:
  - service_task detects TX queue hung and sets a bit(hung_detected) if
    it was not set.
  - if bit was set (means this is back-back hung condition detected),
    issue SW interrupt and clear the bit.
  - napi_poll clears the bit unconditionally since it cleans TX/RX queues.

Signed-off-by: Kiran Patil <kiran.patil@intel.com>
Change-ID: Ieed03a48927c845a988b3ff375090bf37caeb903
---
 drivers/net/ethernet/intel/i40e/i40e.h        |  3 +++
 drivers/net/ethernet/intel/i40e/i40e_main.c   | 36 ++++++++++++++++++++++-----
 drivers/net/ethernet/intel/i40e/i40e_txrx.c   |  2 ++
 drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 21 ++++++++++------
 drivers/net/ethernet/intel/i40evf/i40e_txrx.h | 15 +++++++++++
 5 files changed, 64 insertions(+), 13 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
index d854a46..768a19b 100644
--- a/drivers/net/ethernet/intel/i40e/i40e.h
+++ b/drivers/net/ethernet/intel/i40e/i40e.h
@@ -579,6 +579,9 @@ struct i40e_q_vector {
 
 	u8 num_ringpairs;	/* total number of ring pairs in vector */
 
+#define I40E_Q_VECTOR_HUNG_DETECT 0 /* Bit Index for hung detection logic */
+	unsigned long hung_detected; /* Set/Reset for hung_detection logic */
+
 	cpumask_t affinity_mask;
 	struct rcu_head rcu;	/* to avoid race with update stats on free */
 	char name[I40E_INT_NAME_STR_LEN];
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 7759703..d748431 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -4366,17 +4366,41 @@ static void i40e_detect_recover_hung_queue(int q_idx, struct i40e_vsi *vsi)
 	else
 		val = rd32(&pf->hw, I40E_PFINT_DYN_CTL0);
 
+	/* Bail out if interrupts are disabled because napi_poll
+	 * execution in-progress or will get scheduled soon.
+	 * napi_poll cleans TX and RX queues and updates 'next_to_clean'.
+	 */
+	if (!(val & I40E_PFINT_DYN_CTLN_INTENA_MASK))
+		return;
+
 	head = i40e_get_head(tx_ring);
 
 	tx_pending = i40e_get_tx_pending(tx_ring);
 
-	/* Interrupts are disabled and TX pending is non-zero,
-	 * trigger the SW interrupt (don't wait). Worst case
-	 * there will be one extra interrupt which may result
-	 * into not cleaning any queues because queues are cleaned.
+	/* HW is done executing descriptors, updated HEAD write back,
+	 * but SW hasn't processed those descriptors. If interrupt is
+	 * not generated from this point ON, it could result into
+	 * dev_watchdog detecting timeout on those netdev_queue,
+	 * hence proactively trigger SW interrupt.
 	 */
-	if (tx_pending && (!(val & I40E_PFINT_DYN_CTLN_INTENA_MASK)))
-		i40e_force_wb(vsi, tx_ring->q_vector);
+	if (tx_pending) {
+		/* NAPI Poll didn't run and clear since it was set */
+		if (test_and_clear_bit(I40E_Q_VECTOR_HUNG_DETECT,
+				       &tx_ring->q_vector->hung_detected)) {
+			netdev_info(vsi->netdev, "VSI_seid %d, Hung TX queue %d, tx_pending: %d, NTC:0x%x, HWB: 0x%x, NTU: 0x%x, TAIL: 0x%x\n",
+				    vsi->seid, q_idx, tx_pending,
+				    tx_ring->next_to_clean, head,
+				    tx_ring->next_to_use,
+				    readl(tx_ring->tail));
+			netdev_info(vsi->netdev, "VSI_seid %d, Issuing force_wb for TX queue %d, Interrupt Reg: 0x%x\n",
+				    vsi->seid, q_idx, val);
+			i40e_force_wb(vsi, tx_ring->q_vector);
+		} else {
+			/* First Chance - detected possible hung */
+			set_bit(I40E_Q_VECTOR_HUNG_DETECT,
+				&tx_ring->q_vector->hung_detected);
+		}
+	}
 }
 
 /**
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index 494e6ef..9be0a90 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -1892,6 +1892,8 @@ int i40e_napi_poll(struct napi_struct *napi, int budget)
 		return 0;
 	}
 
+	/* Clear hung_detected bit */
+	clear_bit(I40E_Q_VECTOR_HUNG_DETECT, &q_vector->hung_detected);
 	/* Since the actual Tx work is minimal, we can give the Tx a larger
 	 * budget and be more aggressive about cleaning up the Tx descriptors.
 	 */
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
index 3725744..3a531fe 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
@@ -127,17 +127,24 @@ void i40evf_free_tx_resources(struct i40e_ring *tx_ring)
 }
 
 /**
- * i40e_get_head - Retrieve head from head writeback
- * @tx_ring:  tx ring to fetch head of
+ * i40evf_get_tx_pending - how many tx descriptors not processed
+ * @tx_ring: the ring of descriptors
  *
- * Returns value of Tx ring head based on value stored
- * in head write-back location
+ * Since there is no access to the ring head register
+ * in XL710, we need to use our local copies
  **/
-static inline u32 i40e_get_head(struct i40e_ring *tx_ring)
+u32 i40evf_get_tx_pending(struct i40e_ring *ring)
 {
-	void *head = (struct i40e_tx_desc *)tx_ring->desc + tx_ring->count;
+	u32 head, tail;
 
-	return le32_to_cpu(*(volatile __le32 *)head);
+	head = i40e_get_head(ring);
+	tail = readl(ring->tail);
+
+	if (head != tail)
+		return (head < tail) ?
+			tail - head : (tail + ring->count - head);
+
+	return 0;
 }
 
 #define WB_STRIDE 0x3
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.h b/drivers/net/ethernet/intel/i40evf/i40e_txrx.h
index 929ddd9..6640ea5 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.h
+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.h
@@ -324,4 +324,19 @@ int i40evf_setup_rx_descriptors(struct i40e_ring *rx_ring);
 void i40evf_free_tx_resources(struct i40e_ring *tx_ring);
 void i40evf_free_rx_resources(struct i40e_ring *rx_ring);
 int i40evf_napi_poll(struct napi_struct *napi, int budget);
+u32 i40evf_get_tx_pending(struct i40e_ring *ring);
+
+/**
+ * i40e_get_head - Retrieve head from head writeback
+ * @tx_ring:  tx ring to fetch head of
+ *
+ * Returns value of Tx ring head based on value stored
+ * in head write-back location
+ **/
+static inline u32 i40e_get_head(struct i40e_ring *tx_ring)
+{
+	void *head = (struct i40e_tx_desc *)tx_ring->desc + tx_ring->count;
+
+	return le32_to_cpu(*(volatile __le32 *)head);
+}
 #endif /* _I40E_TXRX_H_ */
-- 
2.1.0


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

* [Intel-wired-lan] [next PATCH S21 05/14] i40e: Fix memory leaks, sideband filter programming
  2015-11-06 23:25 [Intel-wired-lan] [next PATCH S21 00/14] i40e/i40evf updates Joshua Hay
                   ` (3 preceding siblings ...)
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 04/14] i40e: Detection and recovery of TX queue hung logic moved to service_task from tx_timeout Joshua Hay
@ 2015-11-06 23:26 ` Joshua Hay
  2015-11-09 19:02   ` Bowers, AndrewX
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 06/14] i40evf: don't use atomic allocation Joshua Hay
                   ` (8 subsequent siblings)
  13 siblings, 1 reply; 31+ messages in thread
From: Joshua Hay @ 2015-11-06 23:26 UTC (permalink / raw)
  To: intel-wired-lan

From: Kiran Patil <kiran.patil@intel.com>

This patch fixes the memory leak which would be seen otherwise when user
programs flow-director filter using ethtool (sideband filter programming).

When ethtool is used to program flow directory filter, 'raw_buf' gets
allocated and it is supposed to be freed as part of queue cleanup. But
check of 'tx_buffer->skb' was preventing it from being freed.

Signed-off-by: Kiran Patil <kiran.patil@intel.com>
Change-ID: Ief4f0a1a32a653180498bf6e987c1b4342ab8923
---
 drivers/net/ethernet/intel/i40e/i40e_txrx.c   | 19 ++++++++++++++-----
 drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 10 +++++-----
 2 files changed, 19 insertions(+), 10 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index 9be0a90..a22efca 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -235,6 +235,9 @@ static int i40e_add_del_fdir_udpv4(struct i40e_vsi *vsi,
 				 "Filter deleted for PCTYPE %d loc = %d\n",
 				 fd_data->pctype, fd_data->fd_id);
 	}
+	if (err)
+		kfree(raw_packet);
+
 	return err ? -EOPNOTSUPP : 0;
 }
 
@@ -312,6 +315,9 @@ static int i40e_add_del_fdir_tcpv4(struct i40e_vsi *vsi,
 				 fd_data->pctype, fd_data->fd_id);
 	}
 
+	if (err)
+		kfree(raw_packet);
+
 	return err ? -EOPNOTSUPP : 0;
 }
 
@@ -387,6 +393,9 @@ static int i40e_add_del_fdir_ipv4(struct i40e_vsi *vsi,
 		}
 	}
 
+	if (err)
+		kfree(raw_packet);
+
 	return err ? -EOPNOTSUPP : 0;
 }
 
@@ -526,11 +535,7 @@ static void i40e_unmap_and_free_tx_resource(struct i40e_ring *ring,
 					    struct i40e_tx_buffer *tx_buffer)
 {
 	if (tx_buffer->skb) {
-		if (tx_buffer->tx_flags & I40E_TX_FLAGS_FD_SB)
-			kfree(tx_buffer->raw_buf);
-		else
-			dev_kfree_skb_any(tx_buffer->skb);
-
+		dev_kfree_skb_any(tx_buffer->skb);
 		if (dma_unmap_len(tx_buffer, len))
 			dma_unmap_single(ring->dev,
 					 dma_unmap_addr(tx_buffer, dma),
@@ -542,6 +547,10 @@ static void i40e_unmap_and_free_tx_resource(struct i40e_ring *ring,
 			       dma_unmap_len(tx_buffer, len),
 			       DMA_TO_DEVICE);
 	}
+
+	if (tx_buffer->tx_flags & I40E_TX_FLAGS_FD_SB)
+		kfree(tx_buffer->raw_buf);
+
 	tx_buffer->next_to_watch = NULL;
 	tx_buffer->skb = NULL;
 	dma_unmap_len_set(tx_buffer, len, 0);
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
index 3a531fe..4e6aacb 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
@@ -51,11 +51,7 @@ static void i40e_unmap_and_free_tx_resource(struct i40e_ring *ring,
 					    struct i40e_tx_buffer *tx_buffer)
 {
 	if (tx_buffer->skb) {
-		if (tx_buffer->tx_flags & I40E_TX_FLAGS_FD_SB)
-			kfree(tx_buffer->raw_buf);
-		else
-			dev_kfree_skb_any(tx_buffer->skb);
-
+		dev_kfree_skb_any(tx_buffer->skb);
 		if (dma_unmap_len(tx_buffer, len))
 			dma_unmap_single(ring->dev,
 					 dma_unmap_addr(tx_buffer, dma),
@@ -67,6 +63,10 @@ static void i40e_unmap_and_free_tx_resource(struct i40e_ring *ring,
 			       dma_unmap_len(tx_buffer, len),
 			       DMA_TO_DEVICE);
 	}
+
+	if (tx_buffer->tx_flags & I40E_TX_FLAGS_FD_SB)
+		kfree(tx_buffer->raw_buf);
+
 	tx_buffer->next_to_watch = NULL;
 	tx_buffer->skb = NULL;
 	dma_unmap_len_set(tx_buffer, len, 0);
-- 
2.1.0


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

* [Intel-wired-lan] [next PATCH S21 06/14] i40evf: don't use atomic allocation
  2015-11-06 23:25 [Intel-wired-lan] [next PATCH S21 00/14] i40e/i40evf updates Joshua Hay
                   ` (4 preceding siblings ...)
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 05/14] i40e: Fix memory leaks, sideband filter programming Joshua Hay
@ 2015-11-06 23:26 ` Joshua Hay
  2015-11-09 19:05   ` Bowers, AndrewX
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 07/14] i40e: propagate properly Joshua Hay
                   ` (7 subsequent siblings)
  13 siblings, 1 reply; 31+ messages in thread
From: Joshua Hay @ 2015-11-06 23:26 UTC (permalink / raw)
  To: intel-wired-lan

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

These allocations don't need to be at atomic level. GFP_KERNEL is fine
and they'll reduce stress on the allocator when the system is starved
for memory.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Change-ID: I3561d0399a681de0ad25291b6c848b224c1fde12
---
 drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c b/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c
index 9b55576..3c9c008 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c
@@ -242,7 +242,7 @@ void i40evf_configure_queues(struct i40evf_adapter *adapter)
 	adapter->current_op = I40E_VIRTCHNL_OP_CONFIG_VSI_QUEUES;
 	len = sizeof(struct i40e_virtchnl_vsi_queue_config_info) +
 		       (sizeof(struct i40e_virtchnl_queue_pair_info) * pairs);
-	vqci = kzalloc(len, GFP_ATOMIC);
+	vqci = kzalloc(len, GFP_KERNEL);
 	if (!vqci)
 		return;
 
@@ -353,7 +353,7 @@ void i40evf_map_queues(struct i40evf_adapter *adapter)
 	len = sizeof(struct i40e_virtchnl_irq_map_info) +
 	      (adapter->num_msix_vectors *
 		sizeof(struct i40e_virtchnl_vector_map));
-	vimi = kzalloc(len, GFP_ATOMIC);
+	vimi = kzalloc(len, GFP_KERNEL);
 	if (!vimi)
 		return;
 
@@ -421,7 +421,7 @@ void i40evf_add_ether_addrs(struct i40evf_adapter *adapter)
 		more = true;
 	}
 
-	veal = kzalloc(len, GFP_ATOMIC);
+	veal = kzalloc(len, GFP_KERNEL);
 	if (!veal)
 		return;
 
@@ -483,7 +483,7 @@ void i40evf_del_ether_addrs(struct i40evf_adapter *adapter)
 		      (count * sizeof(struct i40e_virtchnl_ether_addr));
 		more = true;
 	}
-	veal = kzalloc(len, GFP_ATOMIC);
+	veal = kzalloc(len, GFP_KERNEL);
 	if (!veal)
 		return;
 
@@ -547,7 +547,7 @@ void i40evf_add_vlans(struct i40evf_adapter *adapter)
 		      (count * sizeof(u16));
 		more = true;
 	}
-	vvfl = kzalloc(len, GFP_ATOMIC);
+	vvfl = kzalloc(len, GFP_KERNEL);
 	if (!vvfl)
 		return;
 
@@ -609,7 +609,7 @@ void i40evf_del_vlans(struct i40evf_adapter *adapter)
 		      (count * sizeof(u16));
 		more = true;
 	}
-	vvfl = kzalloc(len, GFP_ATOMIC);
+	vvfl = kzalloc(len, GFP_KERNEL);
 	if (!vvfl)
 		return;
 
-- 
2.1.0


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

* [Intel-wired-lan] [next PATCH S21 07/14] i40e: propagate properly
  2015-11-06 23:25 [Intel-wired-lan] [next PATCH S21 00/14] i40e/i40evf updates Joshua Hay
                   ` (5 preceding siblings ...)
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 06/14] i40evf: don't use atomic allocation Joshua Hay
@ 2015-11-06 23:26 ` Joshua Hay
  2015-11-08 12:46   ` Jeff Kirsher
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 08/14] i40evf: use correct types Joshua Hay
                   ` (6 subsequent siblings)
  13 siblings, 1 reply; 31+ messages in thread
From: Joshua Hay @ 2015-11-06 23:26 UTC (permalink / raw)
  To: intel-wired-lan

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

i40e_sync_vsi_filters() is the surly teenager of this driver. It says
it's going to report errors, but it doesn't actually do that most of the
time. And when it does, it leaves a mess.

Change this function to have a common exit point so it will properly
release the busy lock on the VSI. Propagate errors to the callers.
Finally, adjust a few callers to check for and deal with errors from
this function.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Change-ID: Ic6af4956491e72402ebb3c538a3c31a0ad7f8667
---
 drivers/net/ethernet/intel/i40e/i40e_main.c        | 109 +++++++++++++--------
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c |  14 +--
 2 files changed, 75 insertions(+), 48 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index d748431..c6d4da4 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -1552,10 +1552,9 @@ static int i40e_set_mac(struct net_device *netdev, void *p)
 		spin_unlock_bh(&vsi->mac_filter_list_lock);
 	}
 
-	i40e_sync_vsi_filters(vsi, false);
 	ether_addr_copy(netdev->dev_addr, addr->sa_data);
 
-	return 0;
+	return i40e_sync_vsi_filters(vsi, false);
 }
 
 /**
@@ -1871,8 +1870,9 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi, bool grab_rtnl)
 	bool add_happened = false;
 	int filter_list_len = 0;
 	u32 changed_flags = 0;
+	i40e_status aq_ret = 0;
 	bool err_cond = false;
-	i40e_status ret = 0;
+	int retval = 0;
 	struct i40e_pf *pf;
 	int num_add = 0;
 	int num_del = 0;
@@ -1935,8 +1935,11 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi, bool grab_rtnl)
 		}
 		spin_unlock_bh(&vsi->mac_filter_list_lock);
 
-		if (err_cond)
+		if (err_cond) {
 			i40e_cleanup_add_list(&tmp_add_list);
+			retval = -ENOMEM;
+			goto out;
+		}
 	}
 
 	/* Now process 'del_list' outside the lock */
@@ -1954,7 +1957,8 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi, bool grab_rtnl)
 			i40e_undo_del_filter_entries(vsi, &tmp_del_list);
 			i40e_undo_add_filter_entries(vsi);
 			spin_unlock_bh(&vsi->mac_filter_list_lock);
-			return -ENOMEM;
+			retval = -ENOMEM;
+			goto out;
 		}
 
 		list_for_each_entry_safe(f, ftmp, &tmp_del_list, list) {
@@ -1972,18 +1976,22 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi, bool grab_rtnl)
 
 			/* flush a full buffer */
 			if (num_del == filter_list_len) {
-				ret = i40e_aq_remove_macvlan(&pf->hw,
-						  vsi->seid, del_list, num_del,
-						  NULL);
+				aq_ret = i40e_aq_remove_macvlan(&pf->hw,
+								vsi->seid,
+								del_list,
+								num_del,
+								NULL);
 				aq_err = pf->hw.aq.asq_last_status;
 				num_del = 0;
 				memset(del_list, 0, sizeof(*del_list));
 
-				if (ret && aq_err != I40E_AQ_RC_ENOENT)
+				if (aq_ret && aq_err != I40E_AQ_RC_ENOENT) {
+					retval = -EIO;
 					dev_err(&pf->pdev->dev,
 						"ignoring delete macvlan error, err %s, aq_err %s while flushing a full buffer\n",
-						i40e_stat_str(&pf->hw, ret),
+						i40e_stat_str(&pf->hw, aq_ret),
 						i40e_aq_str(&pf->hw, aq_err));
+				}
 			}
 			/* Release memory for MAC filter entries which were
 			 * synced up with HW.
@@ -1993,15 +2001,16 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi, bool grab_rtnl)
 		}
 
 		if (num_del) {
-			ret = i40e_aq_remove_macvlan(&pf->hw, vsi->seid,
-						     del_list, num_del, NULL);
+			aq_ret = i40e_aq_remove_macvlan(&pf->hw, vsi->seid,
+							del_list, num_del,
+							NULL);
 			aq_err = pf->hw.aq.asq_last_status;
 			num_del = 0;
 
-			if (ret && aq_err != I40E_AQ_RC_ENOENT)
+			if (aq_ret && aq_err != I40E_AQ_RC_ENOENT)
 				dev_info(&pf->pdev->dev,
 					 "ignoring delete macvlan error, err %s aq_err %s\n",
-					 i40e_stat_str(&pf->hw, ret),
+					 i40e_stat_str(&pf->hw, aq_ret),
 					 i40e_aq_str(&pf->hw, aq_err));
 		}
 
@@ -2025,7 +2034,8 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi, bool grab_rtnl)
 			spin_lock_bh(&vsi->mac_filter_list_lock);
 			i40e_undo_add_filter_entries(vsi);
 			spin_unlock_bh(&vsi->mac_filter_list_lock);
-			return -ENOMEM;
+			retval = -ENOMEM;
+			goto out;
 		}
 
 		list_for_each_entry_safe(f, ftmp, &tmp_add_list, list) {
@@ -2046,13 +2056,13 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi, bool grab_rtnl)
 
 			/* flush a full buffer */
 			if (num_add == filter_list_len) {
-				ret = i40e_aq_add_macvlan(&pf->hw, vsi->seid,
-							  add_list, num_add,
-							  NULL);
+				aq_ret = i40e_aq_add_macvlan(&pf->hw, vsi->seid,
+							     add_list, num_add,
+							     NULL);
 				aq_err = pf->hw.aq.asq_last_status;
 				num_add = 0;
 
-				if (ret)
+				if (aq_ret)
 					break;
 				memset(add_list, 0, sizeof(*add_list));
 			}
@@ -2064,18 +2074,19 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi, bool grab_rtnl)
 		}
 
 		if (num_add) {
-			ret = i40e_aq_add_macvlan(&pf->hw, vsi->seid,
-						  add_list, num_add, NULL);
+			aq_ret = i40e_aq_add_macvlan(&pf->hw, vsi->seid,
+						     add_list, num_add, NULL);
 			aq_err = pf->hw.aq.asq_last_status;
 			num_add = 0;
 		}
 		kfree(add_list);
 		add_list = NULL;
 
-		if (add_happened && ret && aq_err != I40E_AQ_RC_EINVAL) {
+		if (add_happened && aq_ret && aq_err != I40E_AQ_RC_EINVAL) {
+			retval = i40e_aq_rc_to_posix(aq_ret, aq_err);
 			dev_info(&pf->pdev->dev,
 				 "add filter failed, err %s aq_err %s\n",
-				 i40e_stat_str(&pf->hw, ret),
+				 i40e_stat_str(&pf->hw, aq_ret),
 				 i40e_aq_str(&pf->hw, aq_err));
 			if ((pf->hw.aq.asq_last_status == I40E_AQ_RC_ENOSPC) &&
 			    !test_bit(__I40E_FILTER_OVERFLOW_PROMISC,
@@ -2093,16 +2104,19 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi, bool grab_rtnl)
 		bool cur_multipromisc;
 
 		cur_multipromisc = !!(vsi->current_netdev_flags & IFF_ALLMULTI);
-		ret = i40e_aq_set_vsi_multicast_promiscuous(&vsi->back->hw,
-							    vsi->seid,
-							    cur_multipromisc,
-							    NULL);
-		if (ret)
+		aq_ret = i40e_aq_set_vsi_multicast_promiscuous(&vsi->back->hw,
+							       vsi->seid,
+							       cur_multipromisc,
+							       NULL);
+		if (aq_ret) {
+			retval = i40e_aq_rc_to_posix(aq_ret,
+						     pf->hw.aq.asq_last_status);
 			dev_info(&pf->pdev->dev,
 				 "set multi promisc failed, err %s aq_err %s\n",
-				 i40e_stat_str(&pf->hw, ret),
+				 i40e_stat_str(&pf->hw, aq_ret),
 				 i40e_aq_str(&pf->hw,
 					     pf->hw.aq.asq_last_status));
+		}
 	}
 	if ((changed_flags & IFF_PROMISC) || promisc_forced_on) {
 		bool cur_promisc;
@@ -2126,36 +2140,47 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi, bool grab_rtnl)
 						BIT(__I40E_PF_RESET_REQUESTED));
 			}
 		} else {
-			ret = i40e_aq_set_vsi_unicast_promiscuous(
+			aq_ret = i40e_aq_set_vsi_unicast_promiscuous(
 							  &vsi->back->hw,
 							  vsi->seid,
 							  cur_promisc, NULL);
-			if (ret)
+			if (aq_ret) {
+				retval =
+				i40e_aq_rc_to_posix(aq_ret,
+						    pf->hw.aq.asq_last_status);
 				dev_info(&pf->pdev->dev,
 					 "set unicast promisc failed, err %d, aq_err %d\n",
-					 ret, pf->hw.aq.asq_last_status);
-			ret = i40e_aq_set_vsi_multicast_promiscuous(
+					 aq_ret, pf->hw.aq.asq_last_status);
+			}
+			aq_ret = i40e_aq_set_vsi_multicast_promiscuous(
 							  &vsi->back->hw,
 							  vsi->seid,
 							  cur_promisc, NULL);
-			if (ret)
+			if (aq_ret) {
+				retval =
+				i40e_aq_rc_to_posix(aq_ret,
+						    pf->hw.aq.asq_last_status);
 				dev_info(&pf->pdev->dev,
 					 "set multicast promisc failed, err %d, aq_err %d\n",
-					 ret, pf->hw.aq.asq_last_status);
+					 aq_ret, pf->hw.aq.asq_last_status);
+			}
 		}
-		ret = i40e_aq_set_vsi_broadcast(&vsi->back->hw,
-						vsi->seid,
-						cur_promisc, NULL);
-		if (ret)
+		aq_ret = i40e_aq_set_vsi_broadcast(&vsi->back->hw,
+						   vsi->seid,
+						   cur_promisc, NULL);
+		if (aq_ret) {
+			retval = i40e_aq_rc_to_posix(aq_ret,
+						     pf->hw.aq.asq_last_status);
 			dev_info(&pf->pdev->dev,
 				 "set brdcast promisc failed, err %s, aq_err %s\n",
-				 i40e_stat_str(&pf->hw, ret),
+				 i40e_stat_str(&pf->hw, aq_ret),
 				 i40e_aq_str(&pf->hw,
 					     pf->hw.aq.asq_last_status));
+		}
 	}
-
+out:
 	clear_bit(__I40E_CONFIG_BUSY, &vsi->state);
-	return 0;
+	return retval;
 }
 
 /**
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index 26f247d..98aa9c6 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -1633,9 +1633,10 @@ static int i40e_vc_add_mac_addr_msg(struct i40e_vf *vf, u8 *msg, u16 msglen)
 	spin_unlock_bh(&vsi->mac_filter_list_lock);
 
 	/* program the updated filter list */
-	if (i40e_sync_vsi_filters(vsi, false))
-		dev_err(&pf->pdev->dev, "Unable to program VF %d MAC filters\n",
-			vf->vf_id);
+	ret = i40e_sync_vsi_filters(vsi, false);
+	if (ret)
+		dev_err(&pf->pdev->dev, "Unable to program VF %d MAC filters, error %d\n",
+			vf->vf_id, ret);
 
 error_param:
 	/* send the response to the VF */
@@ -1687,9 +1688,10 @@ static int i40e_vc_del_mac_addr_msg(struct i40e_vf *vf, u8 *msg, u16 msglen)
 	spin_unlock_bh(&vsi->mac_filter_list_lock);
 
 	/* program the updated filter list */
-	if (i40e_sync_vsi_filters(vsi, false))
-		dev_err(&pf->pdev->dev, "Unable to program VF %d MAC filters\n",
-			vf->vf_id);
+	ret = i40e_sync_vsi_filters(vsi, false);
+	if (ret)
+		dev_err(&pf->pdev->dev, "Unable to program VF %d MAC filters, error %d\n",
+			vf->vf_id, ret);
 
 error_param:
 	/* send the response to the VF */
-- 
2.1.0


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

* [Intel-wired-lan] [next PATCH S21 08/14] i40evf: use correct types
  2015-11-06 23:25 [Intel-wired-lan] [next PATCH S21 00/14] i40e/i40evf updates Joshua Hay
                   ` (6 preceding siblings ...)
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 07/14] i40e: propagate properly Joshua Hay
@ 2015-11-06 23:26 ` Joshua Hay
  2015-11-10 20:43   ` Bowers, AndrewX
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 09/14] i40e: use priv flags to control packet split Joshua Hay
                   ` (5 subsequent siblings)
  13 siblings, 1 reply; 31+ messages in thread
From: Joshua Hay @ 2015-11-06 23:26 UTC (permalink / raw)
  To: intel-wired-lan

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

Don't use uint32_t type the kernel. Use u32 instead. No functional
change.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Change-ID: I77bbf3b6464edaef747c7104b43534032a4dba63
---
 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index 9f845fe..fb170b3 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -259,7 +259,7 @@ static void i40evf_fire_sw_int(struct i40evf_adapter *adapter, u32 mask)
 {
 	struct i40e_hw *hw = &adapter->hw;
 	int i;
-	uint32_t dyn_ctl;
+	u32 dyn_ctl;
 
 	if (mask & 1) {
 		dyn_ctl = rd32(hw, I40E_VFINT_DYN_CTL01);
-- 
2.1.0


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

* [Intel-wired-lan] [next PATCH S21 09/14] i40e: use priv flags to control packet split
  2015-11-06 23:25 [Intel-wired-lan] [next PATCH S21 00/14] i40e/i40evf updates Joshua Hay
                   ` (7 preceding siblings ...)
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 08/14] i40evf: use correct types Joshua Hay
@ 2015-11-06 23:26 ` Joshua Hay
  2015-11-10 20:48   ` Bowers, AndrewX
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 10/14] i40e: remove CONFIG_I40E_VXLAN Joshua Hay
                   ` (4 subsequent siblings)
  13 siblings, 1 reply; 31+ messages in thread
From: Joshua Hay @ 2015-11-06 23:26 UTC (permalink / raw)
  To: intel-wired-lan

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

Ethtool priv flags implementation to enable or disable packet split, which
is a hardware feature that inspects headers and will put headers in a
separate DMA buffer from the payload data.  The driver was automatically
choosing to enable packet split in some cases and this gives the user the
ability to turn it off/on explicitly.

to query state:
ethtool --show-priv-flags ethx

to enable:
ethtool --set-priv-flags ethx packet-split on
to disable:
ethtool --set-priv-flags ethx packet-split off

Why would anyone want this?
	Because some environments benefit from header/data split in the receive
	buffer, and the driver defaults to one or the other depending on
	environment/kernel parameters.

Why didn't you implement a generic ethtool control for this feature?
	Because Intel hardware is the only hardware that supports header/data
	split.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Change-ID: I803121e1eecc9ccb2884031fd85dd1110b3af66d
---
 drivers/net/ethernet/intel/i40e/i40e.h         |  1 +
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 27 ++++++++++++++++++++++++++
 2 files changed, 28 insertions(+)

diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
index 768a19b..050fc0f 100644
--- a/drivers/net/ethernet/intel/i40e/i40e.h
+++ b/drivers/net/ethernet/intel/i40e/i40e.h
@@ -104,6 +104,7 @@
 #define I40E_PRIV_FLAGS_LINKPOLL_FLAG	BIT(1)
 #define I40E_PRIV_FLAGS_FD_ATR		BIT(2)
 #define I40E_PRIV_FLAGS_VEB_STATS	BIT(3)
+#define I40E_PRIV_FLAGS_PS		BIT(4)
 
 #define I40E_NVM_VERSION_LO_SHIFT  0
 #define I40E_NVM_VERSION_LO_MASK   (0xff << I40E_NVM_VERSION_LO_SHIFT)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index b52c509..d686041 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -231,6 +231,7 @@ static const char i40e_priv_flags_strings[][ETH_GSTRING_LEN] = {
 	"LinkPolling",
 	"flow-director-atr",
 	"veb-stats",
+	"packet-split",
 };
 
 #define I40E_PRIV_FLAGS_STR_LEN ARRAY_SIZE(i40e_priv_flags_strings)
@@ -2709,6 +2710,8 @@ static u32 i40e_get_priv_flags(struct net_device *dev)
 		I40E_PRIV_FLAGS_FD_ATR : 0;
 	ret_flags |= pf->flags & I40E_FLAG_VEB_STATS_ENABLED ?
 		I40E_PRIV_FLAGS_VEB_STATS : 0;
+	ret_flags |= pf->flags & I40E_FLAG_RX_PS_ENABLED ?
+		I40E_PRIV_FLAGS_PS : 0;
 
 	return ret_flags;
 }
@@ -2723,6 +2726,26 @@ static int i40e_set_priv_flags(struct net_device *dev, u32 flags)
 	struct i40e_netdev_priv *np = netdev_priv(dev);
 	struct i40e_vsi *vsi = np->vsi;
 	struct i40e_pf *pf = vsi->back;
+	bool reset_required = false;
+
+	/* NOTE: MFP is not settable */
+
+	/* allow the user to control the method of receive
+	 * buffer dma, whether the packet is split at header
+	 * boundaries into two separate buffers.  In some cases
+	 * one routine or the other will perform better.
+	 */
+	if ((flags & I40E_PRIV_FLAGS_PS) &&
+	    !(pf->flags & I40E_FLAG_RX_PS_ENABLED)) {
+		pf->flags |= I40E_FLAG_RX_PS_ENABLED;
+		pf->flags &= ~I40E_FLAG_RX_1BUF_ENABLED;
+		reset_required = true;
+	} else if (!(flags & I40E_PRIV_FLAGS_PS) &&
+		   (pf->flags & I40E_FLAG_RX_PS_ENABLED)) {
+		pf->flags &= ~I40E_FLAG_RX_PS_ENABLED;
+		pf->flags |= I40E_FLAG_RX_1BUF_ENABLED;
+		reset_required = true;
+	}
 
 	if (flags & I40E_PRIV_FLAGS_LINKPOLL_FLAG)
 		pf->flags |= I40E_FLAG_LINK_POLLING_ENABLED;
@@ -2745,6 +2768,10 @@ static int i40e_set_priv_flags(struct net_device *dev, u32 flags)
 	else
 		pf->flags &= ~I40E_FLAG_VEB_STATS_ENABLED;
 
+	/* if needed, issue reset to cause things to take effect */
+	if (reset_required)
+		i40e_do_reset(pf, BIT(__I40E_PF_RESET_REQUESTED));
+
 	return 0;
 }
 
-- 
2.1.0


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

* [Intel-wired-lan] [next PATCH S21 10/14] i40e: remove CONFIG_I40E_VXLAN
  2015-11-06 23:25 [Intel-wired-lan] [next PATCH S21 00/14] i40e/i40evf updates Joshua Hay
                   ` (8 preceding siblings ...)
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 09/14] i40e: use priv flags to control packet split Joshua Hay
@ 2015-11-06 23:26 ` Joshua Hay
  2015-11-10 18:04   ` Keller, Jacob E
                     ` (2 more replies)
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 11/14] i40e: Remove separate functions gathering XOFF Rx stats Joshua Hay
                   ` (3 subsequent siblings)
  13 siblings, 3 replies; 31+ messages in thread
From: Joshua Hay @ 2015-11-06 23:26 UTC (permalink / raw)
  To: intel-wired-lan

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

Instead of having our own custom symbol, we can just rely
on whether or not the kernel has the feature enabled.

In this case use IS_ENABLED(CONFIG_VXLAN) in order to handle
built-in or module in the current BKM way.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Change-ID: I5890fbb518ff8ed6bb07c3362fb0a8a829f9b241
---
 drivers/net/ethernet/intel/Kconfig          | 11 -----------
 drivers/net/ethernet/intel/i40e/i40e.h      |  4 +---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 12 ++++++------
 3 files changed, 7 insertions(+), 20 deletions(-)

diff --git a/drivers/net/ethernet/intel/Kconfig b/drivers/net/ethernet/intel/Kconfig
index 4163b16..061e4e0 100644
--- a/drivers/net/ethernet/intel/Kconfig
+++ b/drivers/net/ethernet/intel/Kconfig
@@ -269,17 +269,6 @@ config I40E
 	  To compile this driver as a module, choose M here. The module
 	  will be called i40e.
 
-config I40E_VXLAN
-	bool "Virtual eXtensible Local Area Network Support"
-	default n
-	depends on I40E && VXLAN && !(I40E=y && VXLAN=m)
-	---help---
-	  This allows one to create VXLAN virtual interfaces that provide
-	  Layer 2 Networks over Layer 3 Networks. VXLAN is often used
-	  to tunnel virtual network infrastructure in virtualized environments.
-	  Say Y here if you want to use Virtual eXtensible Local Area Network
-	  (VXLAN) in the driver.
-
 config I40E_DCB
 	bool "Data Center Bridging (DCB) Support"
 	default n
diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
index 050fc0f..adfc450 100644
--- a/drivers/net/ethernet/intel/i40e/i40e.h
+++ b/drivers/net/ethernet/intel/i40e/i40e.h
@@ -282,7 +282,7 @@ struct i40e_pf {
 	u32 fd_atr_cnt;
 	u32 fd_tcp_rule;
 
-#ifdef CONFIG_I40E_VXLAN
+#if IS_ENABLED(CONFIG_VXLAN)
 	__be16  vxlan_ports[I40E_MAX_PF_UDP_OFFLOAD_PORTS];
 	u16 pending_vxlan_bitmap;
 
@@ -323,9 +323,7 @@ struct i40e_pf {
 #define I40E_FLAG_FD_ATR_ENABLED		BIT_ULL(22)
 #define I40E_FLAG_PTP				BIT_ULL(25)
 #define I40E_FLAG_MFP_ENABLED			BIT_ULL(26)
-#ifdef CONFIG_I40E_VXLAN
 #define I40E_FLAG_VXLAN_FILTER_SYNC		BIT_ULL(27)
-#endif
 #define I40E_FLAG_PORT_ID_VALID			BIT_ULL(28)
 #define I40E_FLAG_DCB_CAPABLE			BIT_ULL(29)
 #define I40E_FLAG_RSS_AQ_CAPABLE		BIT_ULL(31)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index c6d4da4..4db7966 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -27,7 +27,7 @@
 /* Local includes */
 #include "i40e.h"
 #include "i40e_diag.h"
-#ifdef CONFIG_I40E_VXLAN
+#if IS_ENABLED(CONFIG_VXLAN)
 #include <net/vxlan.h>
 #endif
 
@@ -5357,7 +5357,7 @@ int i40e_open(struct net_device *netdev)
 						       TCP_FLAG_CWR) >> 16);
 	wr32(&pf->hw, I40E_GLLAN_TSOMSK_L, be32_to_cpu(TCP_FLAG_CWR) >> 16);
 
-#ifdef CONFIG_I40E_VXLAN
+#if IS_ENABLED(CONFIG_VXLAN)
 	vxlan_get_rx_port(netdev);
 #endif
 
@@ -7053,7 +7053,7 @@ static void i40e_handle_mdd_event(struct i40e_pf *pf)
 	i40e_flush(hw);
 }
 
-#ifdef CONFIG_I40E_VXLAN
+#if IS_ENABLED(CONFIG_VXLAN)
 /**
  * i40e_sync_vxlan_filters_subtask - Sync the VSI filter list with HW
  * @pf: board private structure
@@ -7120,7 +7120,7 @@ static void i40e_service_task(struct work_struct *work)
 	i40e_watchdog_subtask(pf);
 	i40e_fdir_reinit_subtask(pf);
 	i40e_sync_filters_subtask(pf);
-#ifdef CONFIG_I40E_VXLAN
+#if IS_ENABLED(CONFIG_VXLAN)
 	i40e_sync_vxlan_filters_subtask(pf);
 #endif
 	i40e_clean_adminq_subtask(pf);
@@ -8496,7 +8496,7 @@ static int i40e_set_features(struct net_device *netdev,
 	return 0;
 }
 
-#ifdef CONFIG_I40E_VXLAN
+#if IS_ENABLED(CONFIG_VXLAN)
 /**
  * i40e_get_vxlan_port_idx - Lookup a possibly offloaded for Rx UDP port
  * @pf: board private structure
@@ -8816,7 +8816,7 @@ static const struct net_device_ops i40e_netdev_ops = {
 	.ndo_get_vf_config	= i40e_ndo_get_vf_config,
 	.ndo_set_vf_link_state	= i40e_ndo_set_vf_link_state,
 	.ndo_set_vf_spoofchk	= i40e_ndo_set_vf_spoofchk,
-#ifdef CONFIG_I40E_VXLAN
+#if IS_ENABLED(CONFIG_VXLAN)
 	.ndo_add_vxlan_port	= i40e_add_vxlan_port,
 	.ndo_del_vxlan_port	= i40e_del_vxlan_port,
 #endif
-- 
2.1.0


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

* [Intel-wired-lan] [next PATCH S21 11/14] i40e: Remove separate functions gathering XOFF Rx stats
  2015-11-06 23:25 [Intel-wired-lan] [next PATCH S21 00/14] i40e/i40evf updates Joshua Hay
                   ` (9 preceding siblings ...)
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 10/14] i40e: remove CONFIG_I40E_VXLAN Joshua Hay
@ 2015-11-06 23:26 ` Joshua Hay
  2015-11-10 21:08   ` Bowers, AndrewX
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 12/14] i40e: fix whitespace Joshua Hay
                   ` (2 subsequent siblings)
  13 siblings, 1 reply; 31+ messages in thread
From: Joshua Hay @ 2015-11-06 23:26 UTC (permalink / raw)
  To: intel-wired-lan

From: Neerav Parikh <neerav.parikh@intel.com>

The separate functions to gather Flow control Rx XOFF stats was to
determine if the Tx for a queue was paused due to Link Flow Control(LFC)
or Priority Flow Control(PFC).

But, with recent change in the i40e driver the logic for checking th Tx
hang has been removed and these functions don't do anything meaningful.
Hence, there is no need to keep these separate functions to gather Rx
XOFF stats for LFC or PFC.

This patch removes these functions and moves the stat collection for
XOFF Rx to the i40e_update_pf_stats() that collects all the PF stats.

Signed-off-by: Neerav Parikh <neerav.parikh@intel.com>
Change-ID: Iec1452dac3a6766f0d968e754cb407530d7c60cd
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 77 +++--------------------------
 1 file changed, 7 insertions(+), 70 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 4db7966..af0566c 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -792,75 +792,6 @@ static void i40e_update_fcoe_stats(struct i40e_vsi *vsi)
 
 #endif
 /**
- * i40e_update_link_xoff_rx - Update XOFF received in link flow control mode
- * @pf: the corresponding PF
- *
- * Update the Rx XOFF counter (PAUSE frames) in link flow control mode
- **/
-static void i40e_update_link_xoff_rx(struct i40e_pf *pf)
-{
-	struct i40e_hw_port_stats *osd = &pf->stats_offsets;
-	struct i40e_hw_port_stats *nsd = &pf->stats;
-	struct i40e_hw *hw = &pf->hw;
-	u64 xoff = 0;
-
-	if ((hw->fc.current_mode != I40E_FC_FULL) &&
-	    (hw->fc.current_mode != I40E_FC_RX_PAUSE))
-		return;
-
-	xoff = nsd->link_xoff_rx;
-	i40e_stat_update32(hw, I40E_GLPRT_LXOFFRXC(hw->port),
-			   pf->stat_offsets_loaded,
-			   &osd->link_xoff_rx, &nsd->link_xoff_rx);
-
-	/* No new LFC xoff rx */
-	if (!(nsd->link_xoff_rx - xoff))
-		return;
-
-}
-
-/**
- * i40e_update_prio_xoff_rx - Update XOFF received in PFC mode
- * @pf: the corresponding PF
- *
- * Update the Rx XOFF counter (PAUSE frames) in PFC mode
- **/
-static void i40e_update_prio_xoff_rx(struct i40e_pf *pf)
-{
-	struct i40e_hw_port_stats *osd = &pf->stats_offsets;
-	struct i40e_hw_port_stats *nsd = &pf->stats;
-	bool xoff[I40E_MAX_TRAFFIC_CLASS] = {false};
-	struct i40e_dcbx_config *dcb_cfg;
-	struct i40e_hw *hw = &pf->hw;
-	u16 i;
-	u8 tc;
-
-	dcb_cfg = &hw->local_dcbx_config;
-
-	/* Collect Link XOFF stats when PFC is disabled */
-	if (!dcb_cfg->pfc.pfcenable) {
-		i40e_update_link_xoff_rx(pf);
-		return;
-	}
-
-	for (i = 0; i < I40E_MAX_USER_PRIORITY; i++) {
-		u64 prio_xoff = nsd->priority_xoff_rx[i];
-
-		i40e_stat_update32(hw, I40E_GLPRT_PXOFFRXC(hw->port, i),
-				   pf->stat_offsets_loaded,
-				   &osd->priority_xoff_rx[i],
-				   &nsd->priority_xoff_rx[i]);
-
-		/* No new PFC xoff rx */
-		if (!(nsd->priority_xoff_rx[i] - prio_xoff))
-			continue;
-		/* Get the TC for given priority */
-		tc = dcb_cfg->etscfg.prioritytable[i];
-		xoff[tc] = true;
-	}
-}
-
-/**
  * i40e_update_vsi_stats - Update the vsi statistics counters.
  * @vsi: the VSI to be updated
  *
@@ -1054,12 +985,18 @@ static void i40e_update_pf_stats(struct i40e_pf *pf)
 	i40e_stat_update32(hw, I40E_GLPRT_LXONTXC(hw->port),
 			   pf->stat_offsets_loaded,
 			   &osd->link_xon_tx, &nsd->link_xon_tx);
-	i40e_update_prio_xoff_rx(pf);  /* handles I40E_GLPRT_LXOFFRXC */
+	i40e_stat_update32(hw, I40E_GLPRT_LXOFFRXC(hw->port),
+			   pf->stat_offsets_loaded,
+			   &osd->link_xoff_rx, &nsd->link_xoff_rx);
 	i40e_stat_update32(hw, I40E_GLPRT_LXOFFTXC(hw->port),
 			   pf->stat_offsets_loaded,
 			   &osd->link_xoff_tx, &nsd->link_xoff_tx);
 
 	for (i = 0; i < 8; i++) {
+		i40e_stat_update32(hw, I40E_GLPRT_PXOFFRXC(hw->port, i),
+				   pf->stat_offsets_loaded,
+				   &osd->priority_xoff_rx[i],
+				   &nsd->priority_xoff_rx[i]);
 		i40e_stat_update32(hw, I40E_GLPRT_PXONRXC(hw->port, i),
 				   pf->stat_offsets_loaded,
 				   &osd->priority_xon_rx[i],
-- 
2.1.0


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

* [Intel-wired-lan] [next PATCH S21 12/14] i40e: fix whitespace
  2015-11-06 23:25 [Intel-wired-lan] [next PATCH S21 00/14] i40e/i40evf updates Joshua Hay
                   ` (10 preceding siblings ...)
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 11/14] i40e: Remove separate functions gathering XOFF Rx stats Joshua Hay
@ 2015-11-06 23:26 ` Joshua Hay
  2015-11-10 21:09   ` Bowers, AndrewX
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 13/14] i40e/i40evf: use logical operator Joshua Hay
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 14/14] i40e/i40evf: Bump version to 1.4.7 for i40e and 1.4.3 for i40evf Joshua Hay
  13 siblings, 1 reply; 31+ messages in thread
From: Joshua Hay @ 2015-11-06 23:26 UTC (permalink / raw)
  To: intel-wired-lan

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

Operators should have spaces around them.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Change-ID: I64735e9aa8618b9a5059a87ace1c999d6d3bfcfb
---
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index 98aa9c6..0606ee1 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -290,8 +290,8 @@ static void i40e_config_irq_link_list(struct i40e_vf *vf, u16 vsi_id,
 	next_q = find_first_bit(&linklistmap,
 				(I40E_MAX_VSI_QP *
 				 I40E_VIRTCHNL_SUPPORTED_QTYPES));
-	vsi_queue_id = next_q/I40E_VIRTCHNL_SUPPORTED_QTYPES;
-	qtype = next_q%I40E_VIRTCHNL_SUPPORTED_QTYPES;
+	vsi_queue_id = next_q / I40E_VIRTCHNL_SUPPORTED_QTYPES;
+	qtype = next_q % I40E_VIRTCHNL_SUPPORTED_QTYPES;
 	pf_queue_id = i40e_vc_get_pf_queue_id(vf, vsi_id, vsi_queue_id);
 	reg = ((qtype << I40E_VPINT_LNKLSTN_FIRSTQ_TYPE_SHIFT) | pf_queue_id);
 
-- 
2.1.0


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

* [Intel-wired-lan] [next PATCH S21 13/14] i40e/i40evf: use logical operator
  2015-11-06 23:25 [Intel-wired-lan] [next PATCH S21 00/14] i40e/i40evf updates Joshua Hay
                   ` (11 preceding siblings ...)
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 12/14] i40e: fix whitespace Joshua Hay
@ 2015-11-06 23:26 ` Joshua Hay
  2015-11-10 21:14   ` Bowers, AndrewX
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 14/14] i40e/i40evf: Bump version to 1.4.7 for i40e and 1.4.3 for i40evf Joshua Hay
  13 siblings, 1 reply; 31+ messages in thread
From: Joshua Hay @ 2015-11-06 23:26 UTC (permalink / raw)
  To: intel-wired-lan

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

We shouldn't be using a bitwise operator here; it's not a bitwise
operation. Use a logical operator instead. Why doesn't c have a
logical-or-and-assign operator?

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Change-ID: Id84f3ca884910bed7073c84b1e16a102e958d0de
---
 drivers/net/ethernet/intel/i40e/i40e_txrx.c   | 2 +-
 drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index a22efca..d67ac85 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -1908,7 +1908,7 @@ int i40e_napi_poll(struct napi_struct *napi, int budget)
 	 */
 	i40e_for_each_ring(ring, q_vector->tx) {
 		clean_complete &= i40e_clean_tx_irq(ring, vsi->work_limit);
-		arm_wb |= ring->arm_wb;
+		arm_wb = arm_wb || ring->arm_wb;
 		ring->arm_wb = false;
 	}
 
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
index 4e6aacb..9a51ec1 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
@@ -1332,7 +1332,7 @@ int i40evf_napi_poll(struct napi_struct *napi, int budget)
 	 */
 	i40e_for_each_ring(ring, q_vector->tx) {
 		clean_complete &= i40e_clean_tx_irq(ring, vsi->work_limit);
-		arm_wb |= ring->arm_wb;
+		arm_wb = arm_wb || ring->arm_wb;
 		ring->arm_wb = false;
 	}
 
-- 
2.1.0


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

* [Intel-wired-lan] [next PATCH S21 14/14] i40e/i40evf: Bump version to 1.4.7 for i40e and 1.4.3 for i40evf
  2015-11-06 23:25 [Intel-wired-lan] [next PATCH S21 00/14] i40e/i40evf updates Joshua Hay
                   ` (12 preceding siblings ...)
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 13/14] i40e/i40evf: use logical operator Joshua Hay
@ 2015-11-06 23:26 ` Joshua Hay
  2015-11-10 21:15   ` Bowers, AndrewX
  13 siblings, 1 reply; 31+ messages in thread
From: Joshua Hay @ 2015-11-06 23:26 UTC (permalink / raw)
  To: intel-wired-lan

From: Catherine Sullivan <catherine.sullivan@intel.com>

Bump.

Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Change-ID: Id8c83c64c973349a722bab40d285ad8ded8c28f7
---
 drivers/net/ethernet/intel/i40e/i40e_main.c     | 2 +-
 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index af0566c..c59d146 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -39,7 +39,7 @@ static const char i40e_driver_string[] =
 
 #define DRV_VERSION_MAJOR 1
 #define DRV_VERSION_MINOR 4
-#define DRV_VERSION_BUILD 4
+#define DRV_VERSION_BUILD 7
 #define DRV_VERSION __stringify(DRV_VERSION_MAJOR) "." \
 	     __stringify(DRV_VERSION_MINOR) "." \
 	     __stringify(DRV_VERSION_BUILD)    DRV_KERN
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index fb170b3..7e207ed 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -34,7 +34,7 @@ char i40evf_driver_name[] = "i40evf";
 static const char i40evf_driver_string[] =
 	"Intel(R) XL710/X710 Virtual Function Network Driver";
 
-#define DRV_VERSION "1.4.1"
+#define DRV_VERSION "1.4.3"
 const char i40evf_driver_version[] = DRV_VERSION;
 static const char i40evf_copyright[] =
 	"Copyright (c) 2013 - 2015 Intel Corporation.";
-- 
2.1.0


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

* [Intel-wired-lan] [next PATCH S21 07/14] i40e: propagate properly
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 07/14] i40e: propagate properly Joshua Hay
@ 2015-11-08 12:46   ` Jeff Kirsher
  0 siblings, 0 replies; 31+ messages in thread
From: Jeff Kirsher @ 2015-11-08 12:46 UTC (permalink / raw)
  To: intel-wired-lan

On Fri, 2015-11-06 at 15:26 -0800, Joshua Hay wrote:
> From: Mitch Williams <mitch.a.williams@intel.com>
> 
> i40e_sync_vsi_filters() is the surly teenager of this driver. It says
> it's going to report errors, but it doesn't actually do that most of
> the
> time. And when it does, it leaves a mess.
> 
> Change this function to have a common exit point so it will properly
> release the busy lock on the VSI. Propagate errors to the callers.
> Finally, adjust a few callers to check for and deal with errors from
> this function.
> 
> Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
> Change-ID: Ic6af4956491e72402ebb3c538a3c31a0ad7f8667
> ---
> ?drivers/net/ethernet/intel/i40e/i40e_main.c??????? | 109
> +++++++++++++--------
> ?drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c |? 14 +--
> ?2 files changed, 75 insertions(+), 48 deletions(-)

This does not apply cleanly, so I am not applying this patch (or the
remaining patches in the series). ?Please send me an update to this
patch, which applies cleanly to me next-queue tree (dev-queue branch).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20151108/9e4bc7c5/attachment.asc>

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

* [Intel-wired-lan] [next PATCH S21 01/14] i40evf: increase max number of queues
  2015-11-06 23:25 ` [Intel-wired-lan] [next PATCH S21 01/14] i40evf: increase max number of queues Joshua Hay
@ 2015-11-09 17:48   ` Bowers, AndrewX
  0 siblings, 0 replies; 31+ messages in thread
From: Bowers, AndrewX @ 2015-11-09 17:48 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Joshua Hay
> Sent: Friday, November 06, 2015 3:26 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S21 01/14] i40evf: increase max
> number of queues
> 
> From: Mitch Williams <mitch.a.williams@intel.com>
> 
> Future devices will allow for more queue pairs, so allocate a netdev that can
> handle them. While we're at it, get rid of the separate MAX_TX/MAX_RX
> defines. Since we always get matched queue pairs, having these makes no
> sense.
> 
> Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
> Change-ID: I0e3556cd9a962506e509eb7c0afa36b329e8cb51
> ---
>  drivers/net/ethernet/intel/i40evf/i40evf.h      | 3 +--
>  drivers/net/ethernet/intel/i40evf/i40evf_main.c | 3 +--
>  2 files changed, 2 insertions(+), 4 deletions(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Patch code changes correctly applied

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

* [Intel-wired-lan] [next PATCH S21 02/14] i40evf: set real num queues
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 02/14] i40evf: set real num queues Joshua Hay
@ 2015-11-09 18:02   ` Bowers, AndrewX
  0 siblings, 0 replies; 31+ messages in thread
From: Bowers, AndrewX @ 2015-11-09 18:02 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Joshua Hay
> Sent: Friday, November 06, 2015 3:26 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S21 02/14] i40evf: set real num
> queues
> 
> From: Mitch Williams <mitch.a.williams@intel.com>
> 
> Use the helper function to set the real number of RX queues, and also set
> the real number of TX queues.
> 
> Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
> Change-ID: I67982799de3f248fb4158ccdc9b1a74385f42ddd
> ---
>  drivers/net/ethernet/intel/i40evf/i40evf_main.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Patch code changes correctly applied

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

* [Intel-wired-lan] [next PATCH S21 03/14] i40evf: remove duplicate string
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 03/14] i40evf: remove duplicate string Joshua Hay
@ 2015-11-09 18:06   ` Bowers, AndrewX
  0 siblings, 0 replies; 31+ messages in thread
From: Bowers, AndrewX @ 2015-11-09 18:06 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Joshua Hay
> Sent: Friday, November 06, 2015 3:26 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S21 03/14] i40evf: remove duplicate
> string
> 
> From: Mitch Williams <mitch.a.williams@intel.com>
> 
> We already print the driver info string in probe, so don't print it again in init.
> No need to repeat. No need to repeat.
> 
> Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
> Change-ID: Ief597997f580a8c54d5950e3a84c29f2075be66b
> ---
>  drivers/net/ethernet/intel/i40evf/i40evf_main.c | 1 -
>  1 file changed, 1 deletion(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Patch code changes correctly applied

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

* [Intel-wired-lan] [next PATCH S21 04/14] i40e: Detection and recovery of TX queue hung logic moved to service_task from tx_timeout
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 04/14] i40e: Detection and recovery of TX queue hung logic moved to service_task from tx_timeout Joshua Hay
@ 2015-11-09 18:47   ` Bowers, AndrewX
  0 siblings, 0 replies; 31+ messages in thread
From: Bowers, AndrewX @ 2015-11-09 18:47 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Joshua Hay
> Sent: Friday, November 06, 2015 3:26 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S21 04/14] i40e: Detection and
> recovery of TX queue hung logic moved to service_task from tx_timeout
> 
> From: Kiran Patil <kiran.patil@intel.com>
> 
> This patch contains following changes:
>    - detection and recovery logic (issue SW interrupt) has been moved to
>      service_task from timeout function.
>    - added some more debug info from tx_timeout.
> 
> Logic to detect and recover TX queue hung is now two step process:
>   - service_task detects TX queue hung and sets a bit(hung_detected) if
>     it was not set.
>   - if bit was set (means this is back-back hung condition detected),
>     issue SW interrupt and clear the bit.
>   - napi_poll clears the bit unconditionally since it cleans TX/RX queues.
> 
> Signed-off-by: Kiran Patil <kiran.patil@intel.com>
> Change-ID: Ieed03a48927c845a988b3ff375090bf37caeb903
> ---
>  drivers/net/ethernet/intel/i40e/i40e.h        |  3 +++
>  drivers/net/ethernet/intel/i40e/i40e_main.c   | 36
> ++++++++++++++++++++++-----
>  drivers/net/ethernet/intel/i40e/i40e_txrx.c   |  2 ++
>  drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 21 ++++++++++------
> drivers/net/ethernet/intel/i40evf/i40e_txrx.h | 15 +++++++++++
>  5 files changed, 64 insertions(+), 13 deletions(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Patch code changes correctly applied

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

* [Intel-wired-lan] [next PATCH S21 05/14] i40e: Fix memory leaks, sideband filter programming
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 05/14] i40e: Fix memory leaks, sideband filter programming Joshua Hay
@ 2015-11-09 19:02   ` Bowers, AndrewX
  0 siblings, 0 replies; 31+ messages in thread
From: Bowers, AndrewX @ 2015-11-09 19:02 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Joshua Hay
> Sent: Friday, November 06, 2015 3:26 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S21 05/14] i40e: Fix memory leaks,
> sideband filter programming
> 
> From: Kiran Patil <kiran.patil@intel.com>
> 
> This patch fixes the memory leak which would be seen otherwise when user
> programs flow-director filter using ethtool (sideband filter programming).
> 
> When ethtool is used to program flow directory filter, 'raw_buf' gets
> allocated and it is supposed to be freed as part of queue cleanup. But check
> of 'tx_buffer->skb' was preventing it from being freed.
> 
> Signed-off-by: Kiran Patil <kiran.patil@intel.com>
> Change-ID: Ief4f0a1a32a653180498bf6e987c1b4342ab8923
> ---
>  drivers/net/ethernet/intel/i40e/i40e_txrx.c   | 19 ++++++++++++++-----
>  drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 10 +++++-----
>  2 files changed, 19 insertions(+), 10 deletions(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Patch code changes correctly applied, memory usage does not increase with repeated flow director filter/table changes.

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

* [Intel-wired-lan] [next PATCH S21 06/14] i40evf: don't use atomic allocation
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 06/14] i40evf: don't use atomic allocation Joshua Hay
@ 2015-11-09 19:05   ` Bowers, AndrewX
  0 siblings, 0 replies; 31+ messages in thread
From: Bowers, AndrewX @ 2015-11-09 19:05 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Joshua Hay
> Sent: Friday, November 06, 2015 3:26 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S21 06/14] i40evf: don't use atomic
> allocation
> 
> From: Mitch Williams <mitch.a.williams@intel.com>
> 
> These allocations don't need to be at atomic level. GFP_KERNEL is fine and
> they'll reduce stress on the allocator when the system is starved for memory.
> 
> Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
> Change-ID: I3561d0399a681de0ad25291b6c848b224c1fde12
> ---
>  drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Patch code changes correctly applied

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

* [Intel-wired-lan] [next PATCH S21 10/14] i40e: remove CONFIG_I40E_VXLAN
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 10/14] i40e: remove CONFIG_I40E_VXLAN Joshua Hay
@ 2015-11-10 18:04   ` Keller, Jacob E
  2015-11-10 21:00   ` Bowers, AndrewX
  2015-11-11  0:24   ` Singhai, Anjali
  2 siblings, 0 replies; 31+ messages in thread
From: Keller, Jacob E @ 2015-11-10 18:04 UTC (permalink / raw)
  To: intel-wired-lan

Hi,

On Fri, 2015-11-06 at 15:26 -0800, Joshua Hay wrote:
> From: Jesse Brandeburg <jesse.brandeburg@intel.com>
> 
> Instead of having our own custom symbol, we can just rely
> on whether or not the kernel has the feature enabled.
> 
> In this case use IS_ENABLED(CONFIG_VXLAN) in order to handle
> built-in or module in the current BKM way.

The reason a separate symbol exists is for the case where CONFIG_I40E=y
(built in) and CONFIG_VXLAN=m (module). This causes issues if you don't
use the separate symbol because the VXLAN code won't load at kernel
load time, but the i40e module will try to find the symbol and fail.

You could either keep it and drop the menu config (default the value to
y) so that I40E_VXLAN is enabled as long as CONFIG_VXLAN is enabled, or
you could force VXLAN enabled for i40e permanently when i40e is
enabled.

Using CONFIG_VXLAN directly in code will only work if you never want to
support built-in compile of i40e, in which case you should force that
in Kconfig.

Regards,
Jake

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

* [Intel-wired-lan] [next PATCH S21 08/14] i40evf: use correct types
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 08/14] i40evf: use correct types Joshua Hay
@ 2015-11-10 20:43   ` Bowers, AndrewX
  0 siblings, 0 replies; 31+ messages in thread
From: Bowers, AndrewX @ 2015-11-10 20:43 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Joshua Hay
> Sent: Friday, November 06, 2015 3:26 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S21 08/14] i40evf: use correct types
> 
> From: Mitch Williams <mitch.a.williams@intel.com>
> 
> Don't use uint32_t type the kernel. Use u32 instead. No functional change.
> 
> Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
> Change-ID: I77bbf3b6464edaef747c7104b43534032a4dba63
> ---
>  drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Patch code changes correctly applied

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

* [Intel-wired-lan] [next PATCH S21 09/14] i40e: use priv flags to control packet split
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 09/14] i40e: use priv flags to control packet split Joshua Hay
@ 2015-11-10 20:48   ` Bowers, AndrewX
  0 siblings, 0 replies; 31+ messages in thread
From: Bowers, AndrewX @ 2015-11-10 20:48 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Joshua Hay
> Sent: Friday, November 06, 2015 3:26 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S21 09/14] i40e: use priv flags to
> control packet split
> 
> From: Jesse Brandeburg <jesse.brandeburg@intel.com>
> 
> Ethtool priv flags implementation to enable or disable packet split, which is a
> hardware feature that inspects headers and will put headers in a separate
> DMA buffer from the payload data.  The driver was automatically choosing to
> enable packet split in some cases and this gives the user the ability to turn it
> off/on explicitly.
> 
> to query state:
> ethtool --show-priv-flags ethx
> 
> to enable:
> ethtool --set-priv-flags ethx packet-split on to disable:
> ethtool --set-priv-flags ethx packet-split off
> 
> Why would anyone want this?
> 	Because some environments benefit from header/data split in the
> receive
> 	buffer, and the driver defaults to one or the other depending on
> 	environment/kernel parameters.
> 
> Why didn't you implement a generic ethtool control for this feature?
> 	Because Intel hardware is the only hardware that supports
> header/data
> 	split.
> 
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Change-ID: I803121e1eecc9ccb2884031fd85dd1110b3af66d
> ---
>  drivers/net/ethernet/intel/i40e/i40e.h         |  1 +
>  drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 27
> ++++++++++++++++++++++++++
>  2 files changed, 28 insertions(+)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Patch code changes correctly applied, ethtool shows new priv-flags, prif-flags can be manipulated using ethtool.

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

* [Intel-wired-lan] [next PATCH S21 10/14] i40e: remove CONFIG_I40E_VXLAN
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 10/14] i40e: remove CONFIG_I40E_VXLAN Joshua Hay
  2015-11-10 18:04   ` Keller, Jacob E
@ 2015-11-10 21:00   ` Bowers, AndrewX
  2015-11-11  0:24   ` Singhai, Anjali
  2 siblings, 0 replies; 31+ messages in thread
From: Bowers, AndrewX @ 2015-11-10 21:00 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Joshua Hay
> Sent: Friday, November 06, 2015 3:26 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S21 10/14] i40e: remove
> CONFIG_I40E_VXLAN
> 
> From: Jesse Brandeburg <jesse.brandeburg@intel.com>
> 
> Instead of having our own custom symbol, we can just rely on whether or
> not the kernel has the feature enabled.
> 
> In this case use IS_ENABLED(CONFIG_VXLAN) in order to handle built-in or
> module in the current BKM way.
> 
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Change-ID: I5890fbb518ff8ed6bb07c3362fb0a8a829f9b241
> ---
>  drivers/net/ethernet/intel/Kconfig          | 11 -----------
>  drivers/net/ethernet/intel/i40e/i40e.h      |  4 +---
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 12 ++++++------
>  3 files changed, 7 insertions(+), 20 deletions(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Patch code changes altered by subesquent patch

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

* [Intel-wired-lan] [next PATCH S21 11/14] i40e: Remove separate functions gathering XOFF Rx stats
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 11/14] i40e: Remove separate functions gathering XOFF Rx stats Joshua Hay
@ 2015-11-10 21:08   ` Bowers, AndrewX
  0 siblings, 0 replies; 31+ messages in thread
From: Bowers, AndrewX @ 2015-11-10 21:08 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Joshua Hay
> Sent: Friday, November 06, 2015 3:26 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S21 11/14] i40e: Remove separate
> functions gathering XOFF Rx stats
> 
> From: Neerav Parikh <neerav.parikh@intel.com>
> 
> The separate functions to gather Flow control Rx XOFF stats was to
> determine if the Tx for a queue was paused due to Link Flow Control(LFC) or
> Priority Flow Control(PFC).
> 
> But, with recent change in the i40e driver the logic for checking th Tx hang
> has been removed and these functions don't do anything meaningful.
> Hence, there is no need to keep these separate functions to gather Rx XOFF
> stats for LFC or PFC.
> 
> This patch removes these functions and moves the stat collection for XOFF
> Rx to the i40e_update_pf_stats() that collects all the PF stats.
> 
> Signed-off-by: Neerav Parikh <neerav.parikh@intel.com>
> Change-ID: Iec1452dac3a6766f0d968e754cb407530d7c60cd
> ---
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 77 +++--------------------------
>  1 file changed, 7 insertions(+), 70 deletions(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Patch code changes correctly applied

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

* [Intel-wired-lan] [next PATCH S21 12/14] i40e: fix whitespace
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 12/14] i40e: fix whitespace Joshua Hay
@ 2015-11-10 21:09   ` Bowers, AndrewX
  0 siblings, 0 replies; 31+ messages in thread
From: Bowers, AndrewX @ 2015-11-10 21:09 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Joshua Hay
> Sent: Friday, November 06, 2015 3:26 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S21 12/14] i40e: fix whitespace
> 
> From: Mitch Williams <mitch.a.williams@intel.com>
> 
> Operators should have spaces around them.
> 
> Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
> Change-ID: I64735e9aa8618b9a5059a87ace1c999d6d3bfcfb
> ---
>  drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Patch code changes correctly applied

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

* [Intel-wired-lan] [next PATCH S21 13/14] i40e/i40evf: use logical operator
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 13/14] i40e/i40evf: use logical operator Joshua Hay
@ 2015-11-10 21:14   ` Bowers, AndrewX
  0 siblings, 0 replies; 31+ messages in thread
From: Bowers, AndrewX @ 2015-11-10 21:14 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Joshua Hay
> Sent: Friday, November 06, 2015 3:26 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S21 13/14] i40e/i40evf: use logical
> operator
> 
> From: Mitch Williams <mitch.a.williams@intel.com>
> 
> We shouldn't be using a bitwise operator here; it's not a bitwise operation.
> Use a logical operator instead. Why doesn't c have a logical-or-and-assign
> operator?
> 
> Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
> Change-ID: Id84f3ca884910bed7073c84b1e16a102e958d0de
> ---
>  drivers/net/ethernet/intel/i40e/i40e_txrx.c   | 2 +-
>  drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Patch code changes correctly applied

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

* [Intel-wired-lan] [next PATCH S21 14/14] i40e/i40evf: Bump version to 1.4.7 for i40e and 1.4.3 for i40evf
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 14/14] i40e/i40evf: Bump version to 1.4.7 for i40e and 1.4.3 for i40evf Joshua Hay
@ 2015-11-10 21:15   ` Bowers, AndrewX
  0 siblings, 0 replies; 31+ messages in thread
From: Bowers, AndrewX @ 2015-11-10 21:15 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Joshua Hay
> Sent: Friday, November 06, 2015 3:26 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S21 14/14] i40e/i40evf: Bump version
> to 1.4.7 for i40e and 1.4.3 for i40evf
> 
> From: Catherine Sullivan <catherine.sullivan@intel.com>
> 
> Bump.
> 
> Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
> Change-ID: Id8c83c64c973349a722bab40d285ad8ded8c28f7
> ---
>  drivers/net/ethernet/intel/i40e/i40e_main.c     | 2 +-
>  drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Patch code changes correctly applied, drivers report correct versions.

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

* [Intel-wired-lan] [next PATCH S21 10/14] i40e: remove CONFIG_I40E_VXLAN
  2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 10/14] i40e: remove CONFIG_I40E_VXLAN Joshua Hay
  2015-11-10 18:04   ` Keller, Jacob E
  2015-11-10 21:00   ` Bowers, AndrewX
@ 2015-11-11  0:24   ` Singhai, Anjali
  2 siblings, 0 replies; 31+ messages in thread
From: Singhai, Anjali @ 2015-11-11  0:24 UTC (permalink / raw)
  To: intel-wired-lan

Please revert this patch, since it breaks the build when I40E is in built in the kernel and VXLAN is a module due to the fact the vxlan_get_rx_port is not defined.


The GENEVE/VXLAN patch series takes care of this issue by generalizing the call to udp_offload_get_port which is always defiend.

Anjali

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Joshua Hay
> Sent: Friday, November 06, 2015 3:26 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S21 10/14] i40e: remove
> CONFIG_I40E_VXLAN
> 
> From: Jesse Brandeburg <jesse.brandeburg@intel.com>
> 
> Instead of having our own custom symbol, we can just rely on whether or
> not the kernel has the feature enabled.
> 
> In this case use IS_ENABLED(CONFIG_VXLAN) in order to handle built-in or
> module in the current BKM way.
> 
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Change-ID: I5890fbb518ff8ed6bb07c3362fb0a8a829f9b241
> ---
>  drivers/net/ethernet/intel/Kconfig          | 11 -----------
>  drivers/net/ethernet/intel/i40e/i40e.h      |  4 +---
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 12 ++++++------
>  3 files changed, 7 insertions(+), 20 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/Kconfig
> b/drivers/net/ethernet/intel/Kconfig
> index 4163b16..061e4e0 100644
> --- a/drivers/net/ethernet/intel/Kconfig
> +++ b/drivers/net/ethernet/intel/Kconfig
> @@ -269,17 +269,6 @@ config I40E
>  	  To compile this driver as a module, choose M here. The module
>  	  will be called i40e.
> 
> -config I40E_VXLAN
> -	bool "Virtual eXtensible Local Area Network Support"
> -	default n
> -	depends on I40E && VXLAN && !(I40E=y && VXLAN=m)
> -	---help---
> -	  This allows one to create VXLAN virtual interfaces that provide
> -	  Layer 2 Networks over Layer 3 Networks. VXLAN is often used
> -	  to tunnel virtual network infrastructure in virtualized environments.
> -	  Say Y here if you want to use Virtual eXtensible Local Area Network
> -	  (VXLAN) in the driver.
> -
>  config I40E_DCB
>  	bool "Data Center Bridging (DCB) Support"
>  	default n
> diff --git a/drivers/net/ethernet/intel/i40e/i40e.h
> b/drivers/net/ethernet/intel/i40e/i40e.h
> index 050fc0f..adfc450 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e.h
> +++ b/drivers/net/ethernet/intel/i40e/i40e.h
> @@ -282,7 +282,7 @@ struct i40e_pf {
>  	u32 fd_atr_cnt;
>  	u32 fd_tcp_rule;
> 
> -#ifdef CONFIG_I40E_VXLAN
> +#if IS_ENABLED(CONFIG_VXLAN)
>  	__be16  vxlan_ports[I40E_MAX_PF_UDP_OFFLOAD_PORTS];
>  	u16 pending_vxlan_bitmap;
> 
> @@ -323,9 +323,7 @@ struct i40e_pf {
>  #define I40E_FLAG_FD_ATR_ENABLED		BIT_ULL(22)
>  #define I40E_FLAG_PTP				BIT_ULL(25)
>  #define I40E_FLAG_MFP_ENABLED			BIT_ULL(26)
> -#ifdef CONFIG_I40E_VXLAN
>  #define I40E_FLAG_VXLAN_FILTER_SYNC		BIT_ULL(27)
> -#endif
>  #define I40E_FLAG_PORT_ID_VALID			BIT_ULL(28)
>  #define I40E_FLAG_DCB_CAPABLE			BIT_ULL(29)
>  #define I40E_FLAG_RSS_AQ_CAPABLE		BIT_ULL(31)
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c
> b/drivers/net/ethernet/intel/i40e/i40e_main.c
> index c6d4da4..4db7966 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
> @@ -27,7 +27,7 @@
>  /* Local includes */
>  #include "i40e.h"
>  #include "i40e_diag.h"
> -#ifdef CONFIG_I40E_VXLAN
> +#if IS_ENABLED(CONFIG_VXLAN)
>  #include <net/vxlan.h>
>  #endif
> 
> @@ -5357,7 +5357,7 @@ int i40e_open(struct net_device *netdev)
>  						       TCP_FLAG_CWR) >> 16);
>  	wr32(&pf->hw, I40E_GLLAN_TSOMSK_L,
> be32_to_cpu(TCP_FLAG_CWR) >> 16);
> 
> -#ifdef CONFIG_I40E_VXLAN
> +#if IS_ENABLED(CONFIG_VXLAN)
>  	vxlan_get_rx_port(netdev);
>  #endif
> 
> @@ -7053,7 +7053,7 @@ static void i40e_handle_mdd_event(struct i40e_pf
> *pf)
>  	i40e_flush(hw);
>  }
> 
> -#ifdef CONFIG_I40E_VXLAN
> +#if IS_ENABLED(CONFIG_VXLAN)
>  /**
>   * i40e_sync_vxlan_filters_subtask - Sync the VSI filter list with HW
>   * @pf: board private structure
> @@ -7120,7 +7120,7 @@ static void i40e_service_task(struct work_struct
> *work)
>  	i40e_watchdog_subtask(pf);
>  	i40e_fdir_reinit_subtask(pf);
>  	i40e_sync_filters_subtask(pf);
> -#ifdef CONFIG_I40E_VXLAN
> +#if IS_ENABLED(CONFIG_VXLAN)
>  	i40e_sync_vxlan_filters_subtask(pf);
>  #endif
>  	i40e_clean_adminq_subtask(pf);
> @@ -8496,7 +8496,7 @@ static int i40e_set_features(struct net_device
> *netdev,
>  	return 0;
>  }
> 
> -#ifdef CONFIG_I40E_VXLAN
> +#if IS_ENABLED(CONFIG_VXLAN)
>  /**
>   * i40e_get_vxlan_port_idx - Lookup a possibly offloaded for Rx UDP port
>   * @pf: board private structure
> @@ -8816,7 +8816,7 @@ static const struct net_device_ops
> i40e_netdev_ops = {
>  	.ndo_get_vf_config	= i40e_ndo_get_vf_config,
>  	.ndo_set_vf_link_state	= i40e_ndo_set_vf_link_state,
>  	.ndo_set_vf_spoofchk	= i40e_ndo_set_vf_spoofchk,
> -#ifdef CONFIG_I40E_VXLAN
> +#if IS_ENABLED(CONFIG_VXLAN)
>  	.ndo_add_vxlan_port	= i40e_add_vxlan_port,
>  	.ndo_del_vxlan_port	= i40e_del_vxlan_port,
>  #endif
> --
> 2.1.0
> 
> _______________________________________________
> Intel-wired-lan mailing list
> Intel-wired-lan at lists.osuosl.org
> http://lists.osuosl.org/mailman/listinfo/intel-wired-lan

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

end of thread, other threads:[~2015-11-11  0:24 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-06 23:25 [Intel-wired-lan] [next PATCH S21 00/14] i40e/i40evf updates Joshua Hay
2015-11-06 23:25 ` [Intel-wired-lan] [next PATCH S21 01/14] i40evf: increase max number of queues Joshua Hay
2015-11-09 17:48   ` Bowers, AndrewX
2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 02/14] i40evf: set real num queues Joshua Hay
2015-11-09 18:02   ` Bowers, AndrewX
2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 03/14] i40evf: remove duplicate string Joshua Hay
2015-11-09 18:06   ` Bowers, AndrewX
2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 04/14] i40e: Detection and recovery of TX queue hung logic moved to service_task from tx_timeout Joshua Hay
2015-11-09 18:47   ` Bowers, AndrewX
2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 05/14] i40e: Fix memory leaks, sideband filter programming Joshua Hay
2015-11-09 19:02   ` Bowers, AndrewX
2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 06/14] i40evf: don't use atomic allocation Joshua Hay
2015-11-09 19:05   ` Bowers, AndrewX
2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 07/14] i40e: propagate properly Joshua Hay
2015-11-08 12:46   ` Jeff Kirsher
2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 08/14] i40evf: use correct types Joshua Hay
2015-11-10 20:43   ` Bowers, AndrewX
2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 09/14] i40e: use priv flags to control packet split Joshua Hay
2015-11-10 20:48   ` Bowers, AndrewX
2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 10/14] i40e: remove CONFIG_I40E_VXLAN Joshua Hay
2015-11-10 18:04   ` Keller, Jacob E
2015-11-10 21:00   ` Bowers, AndrewX
2015-11-11  0:24   ` Singhai, Anjali
2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 11/14] i40e: Remove separate functions gathering XOFF Rx stats Joshua Hay
2015-11-10 21:08   ` Bowers, AndrewX
2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 12/14] i40e: fix whitespace Joshua Hay
2015-11-10 21:09   ` Bowers, AndrewX
2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 13/14] i40e/i40evf: use logical operator Joshua Hay
2015-11-10 21:14   ` Bowers, AndrewX
2015-11-06 23:26 ` [Intel-wired-lan] [next PATCH S21 14/14] i40e/i40evf: Bump version to 1.4.7 for i40e and 1.4.3 for i40evf Joshua Hay
2015-11-10 21:15   ` Bowers, AndrewX

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.