All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan]  [net-next S4 00/15] i40e/i40evf updates
@ 2015-04-17  0:05 Catherine Sullivan
  2015-04-17  0:05 ` [Intel-wired-lan] [net-next S4 01/15] i40e: Collect PFC XOFF RX stats even in single TC case Catherine Sullivan
                   ` (15 more replies)
  0 siblings, 16 replies; 31+ messages in thread
From: Catherine Sullivan @ 2015-04-17  0:05 UTC (permalink / raw)
  To: intel-wired-lan

Anjali adds ATR support for tunneled TCP/IPv4/IPv6 packets, stats to count
tunnel ATR hits, and stats to track flow director ATR and side band dynamic
enable state in i40e. She also removes some unnecessary members from the pf
struct and set the flow director ATR and side band messages to a higher debug
level.

Greg disables offline diagnostics if VFs are enabled, and removes an unnecessary
TODO comment in i40e.

Jesse makes some transmit functions inline to improve performance in both i40e
and i40evf. He also adds skb->xmit_more support to i40evf and removes
time_stamp member from i40e since it is not being used.

Mitch fixes i40evf to restore state properly when a netdev is closed and a reset
occurs.

Neerav fixes i40e to collect PFC XOFF RX stats even when there is a single TC.

Pawel updates device/function capabilities in i40e to include information needed
for Flex-10 configurations.

Vasu fixes an error case that should never be reached to WARN ON instead of
printing an error message.

-- 
1.9.3


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

* [Intel-wired-lan] [net-next S4 01/15] i40e: Collect PFC XOFF RX stats even in single TC case
  2015-04-17  0:05 [Intel-wired-lan] [net-next S4 00/15] i40e/i40evf updates Catherine Sullivan
@ 2015-04-17  0:05 ` Catherine Sullivan
  2015-05-05 17:44   ` Young, James M
  2015-04-17  0:05 ` [Intel-wired-lan] [net-next S4 02/15] i40e: Disable offline diagnostics if VFs are enabled Catherine Sullivan
                   ` (14 subsequent siblings)
  15 siblings, 1 reply; 31+ messages in thread
From: Catherine Sullivan @ 2015-04-17  0:05 UTC (permalink / raw)
  To: intel-wired-lan

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

When PFC is enabled for any UP in single TC configuration the driver didn't
collect the PFC XOFF RX stats. Though a single TC with PFC enabled is not a
common scenario do not prevent the driver from collecting stats if firmware
indicates that PFC is enabled.

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

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 24481cd..c48c8d6 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -772,9 +772,8 @@ static void i40e_update_prio_xoff_rx(struct i40e_pf *pf)
 
 	dcb_cfg = &hw->local_dcbx_config;
 
-	/* See if DCB enabled with PFC TC */
-	if (!(pf->flags & I40E_FLAG_DCB_ENABLED) ||
-	    !(dcb_cfg->pfc.pfcenable)) {
+	/* Collect Link XOFF stats when PFC is disabled */
+	if (!dcb_cfg->pfc.pfcenable) {
 		i40e_update_link_xoff_rx(pf);
 		return;
 	}
-- 
1.9.3


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

* [Intel-wired-lan] [net-next S4 02/15] i40e: Disable offline diagnostics if VFs are enabled
  2015-04-17  0:05 [Intel-wired-lan] [net-next S4 00/15] i40e/i40evf updates Catherine Sullivan
  2015-04-17  0:05 ` [Intel-wired-lan] [net-next S4 01/15] i40e: Collect PFC XOFF RX stats even in single TC case Catherine Sullivan
@ 2015-04-17  0:05 ` Catherine Sullivan
  2015-05-05 17:53   ` Young, James M
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 03/15] i40e/i40evf: Add ATR support for tunneled TCP/IPv4/IPv6 packets Catherine Sullivan
                   ` (13 subsequent siblings)
  15 siblings, 1 reply; 31+ messages in thread
From: Catherine Sullivan @ 2015-04-17  0:05 UTC (permalink / raw)
  To: intel-wired-lan

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

Require the user to disable virtual functions before running the device
offline diagnostics.  The offline diagnostics are intended to ensure
basic operation of the device - it is beyond the scope of the diagnostic
test to handle the additional complexity of bringing all the virtual
functions offline and then back online for each test run.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Change-ID: Ic0b854851a09fc85df0c9e82c220e45885457c30
---
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c     | 27 ++++++++++++++++++++++
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c |  7 ++++++
 2 files changed, 34 insertions(+)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index 4cbaaeb..e77b6bd 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -1548,6 +1548,17 @@ static int i40e_loopback_test(struct net_device *netdev, u64 *data)
 	return *data;
 }
 
+static inline bool i40e_active_vfs(struct i40e_pf *pf)
+{
+	struct i40e_vf *vfs = pf->vf;
+	int i;
+
+	for (i = 0; i < pf->num_alloc_vfs; i++)
+		if (vfs[i].vf_states & I40E_VF_STAT_ACTIVE)
+			return true;
+	return false;
+}
+
 static void i40e_diag_test(struct net_device *netdev,
 			   struct ethtool_test *eth_test, u64 *data)
 {
@@ -1560,6 +1571,20 @@ static void i40e_diag_test(struct net_device *netdev,
 		netif_info(pf, drv, netdev, "offline testing starting\n");
 
 		set_bit(__I40E_TESTING, &pf->state);
+
+		if (i40e_active_vfs(pf)) {
+			dev_warn(&pf->pdev->dev,
+				 "Please take active VFS offline and restart the adapter before running NIC diagnostics\n");
+			data[I40E_ETH_TEST_REG]		= 1;
+			data[I40E_ETH_TEST_EEPROM]	= 1;
+			data[I40E_ETH_TEST_INTR]	= 1;
+			data[I40E_ETH_TEST_LOOPBACK]	= 1;
+			data[I40E_ETH_TEST_LINK]	= 1;
+			eth_test->flags |= ETH_TEST_FL_FAILED;
+			clear_bit(__I40E_TESTING, &pf->state);
+			goto skip_ol_tests;
+		}
+
 		/* If the device is online then take it offline */
 		if (if_running)
 			/* indicate we're in test mode */
@@ -1605,6 +1630,8 @@ static void i40e_diag_test(struct net_device *netdev,
 		data[I40E_ETH_TEST_LOOPBACK] = 0;
 	}
 
+skip_ol_tests:
+
 	netif_info(pf, drv, netdev, "testing finished\n");
 }
 
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index 78d1c4f..4653b6e 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -980,6 +980,13 @@ static int i40e_pci_sriov_enable(struct pci_dev *pdev, int num_vfs)
 	int pre_existing_vfs = pci_num_vf(pdev);
 	int err = 0;
 
+	if (pf->state & __I40E_TESTING) {
+		dev_warn(&pdev->dev,
+			 "Cannot enable SR-IOV virtual functions while the device is undergoing diagnostic testing\n");
+		err = -EPERM;
+		goto err_out;
+	}
+
 	dev_info(&pdev->dev, "Allocating %d VFs.\n", num_vfs);
 	if (pre_existing_vfs && pre_existing_vfs != num_vfs)
 		i40e_free_vfs(pf);
-- 
1.9.3


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

* [Intel-wired-lan] [net-next S4 03/15] i40e/i40evf: Add ATR support for tunneled TCP/IPv4/IPv6 packets.
  2015-04-17  0:05 [Intel-wired-lan] [net-next S4 00/15] i40e/i40evf updates Catherine Sullivan
  2015-04-17  0:05 ` [Intel-wired-lan] [net-next S4 01/15] i40e: Collect PFC XOFF RX stats even in single TC case Catherine Sullivan
  2015-04-17  0:05 ` [Intel-wired-lan] [net-next S4 02/15] i40e: Disable offline diagnostics if VFs are enabled Catherine Sullivan
@ 2015-04-17  0:06 ` Catherine Sullivan
  2015-05-08 19:24   ` Young, James M
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 04/15] i40e/i40evf: Add stats to count Tunnel ATR hits Catherine Sullivan
                   ` (12 subsequent siblings)
  15 siblings, 1 reply; 31+ messages in thread
From: Catherine Sullivan @ 2015-04-17  0:06 UTC (permalink / raw)
  To: intel-wired-lan

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

Without this RSS would have done inner header load balancing. Now we can get the
benefits of ATR for tunneled packets to better align TX and RX queues with the
right core/interrupt.

Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Change-ID: I07d0e0a192faf28fdd33b2f04c32b2a82ff97ddd
---
 drivers/net/ethernet/intel/i40e/i40e_txrx.c   | 77 +++++++++++++++------------
 drivers/net/ethernet/intel/i40e/i40e_txrx.h   |  1 +
 drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 34 ++++++------
 drivers/net/ethernet/intel/i40evf/i40e_txrx.h |  1 +
 4 files changed, 62 insertions(+), 51 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index 4bd3a80..f188790 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -1925,11 +1925,11 @@ int i40e_napi_poll(struct napi_struct *napi, int budget)
  * i40e_atr - Add a Flow Director ATR filter
  * @tx_ring:  ring to add programming descriptor to
  * @skb:      send buffer
- * @flags:    send flags
+ * @tx_flags: send tx flags
  * @protocol: wire protocol
  **/
 static void i40e_atr(struct i40e_ring *tx_ring, struct sk_buff *skb,
-		     u32 flags, __be16 protocol)
+		     u32 tx_flags, __be16 protocol)
 {
 	struct i40e_filter_program_desc *fdir_desc;
 	struct i40e_pf *pf = tx_ring->vsi->back;
@@ -1954,25 +1954,38 @@ static void i40e_atr(struct i40e_ring *tx_ring, struct sk_buff *skb,
 	if (!tx_ring->atr_sample_rate)
 		return;
 
-	/* snag network header to get L4 type and address */
-	hdr.network = skb_network_header(skb);
+	if (!(tx_flags & (I40E_TX_FLAGS_IPV4 | I40E_TX_FLAGS_IPV6)))
+		return;
 
-	/* Currently only IPv4/IPv6 with TCP is supported */
-	if (protocol == htons(ETH_P_IP)) {
-		if (hdr.ipv4->protocol != IPPROTO_TCP)
-			return;
+	if (!(tx_flags & I40E_TX_FLAGS_VXLAN_TUNNEL)) {
+		/* snag network header to get L4 type and address */
+		hdr.network = skb_network_header(skb);
 
-		/* access ihl as a u8 to avoid unaligned access on ia64 */
-		hlen = (hdr.network[0] & 0x0F) << 2;
-	} else if (protocol == htons(ETH_P_IPV6)) {
-		if (hdr.ipv6->nexthdr != IPPROTO_TCP)
+		/* Currently only IPv4/IPv6 with TCP is supported
+		 * access ihl as u8 to avoid unaligned access on ia64
+		 */
+		if (tx_flags & I40E_TX_FLAGS_IPV4)
+			hlen = (hdr.network[0] & 0x0F) << 2;
+		else if (protocol == htons(ETH_P_IPV6))
+			hlen = sizeof(struct ipv6hdr);
+		else
 			return;
-
-		hlen = sizeof(struct ipv6hdr);
 	} else {
-		return;
+		hdr.network = skb_inner_network_header(skb);
+		hlen = skb_inner_network_header_len(skb);
 	}
 
+	/* Currently only IPv4/IPv6 with TCP is supported
+	 * Note: tx_flags gets modified to reflect inner protocols in
+	 * tx_enable_csum function if encap is enabled.
+	 */
+	if ((tx_flags & I40E_TX_FLAGS_IPV4) &&
+	    (hdr.ipv4->protocol != IPPROTO_TCP))
+		return;
+	else if ((tx_flags & I40E_TX_FLAGS_IPV6) &&
+		 (hdr.ipv6->nexthdr != IPPROTO_TCP))
+		return;
+
 	th = (struct tcphdr *)(hdr.network + hlen);
 
 	/* Due to lack of space, no more new filters can be programmed */
@@ -2119,16 +2132,14 @@ out:
  * i40e_tso - set up the tso context descriptor
  * @tx_ring:  ptr to the ring to send
  * @skb:      ptr to the skb we're sending
- * @tx_flags: the collected send information
- * @protocol: the send protocol
  * @hdr_len:  ptr to the size of the packet header
  * @cd_tunneling: ptr to context descriptor bits
  *
  * Returns 0 if no TSO can happen, 1 if tso is going, or error
  **/
 static int i40e_tso(struct i40e_ring *tx_ring, struct sk_buff *skb,
-		    u32 tx_flags, __be16 protocol, u8 *hdr_len,
-		    u64 *cd_type_cmd_tso_mss, u32 *cd_tunneling)
+		    u8 *hdr_len, u64 *cd_type_cmd_tso_mss,
+		    u32 *cd_tunneling)
 {
 	u32 cd_cmd, cd_tso_len, cd_mss;
 	struct ipv6hdr *ipv6h;
@@ -2220,12 +2231,12 @@ static int i40e_tsyn(struct i40e_ring *tx_ring, struct sk_buff *skb,
 /**
  * i40e_tx_enable_csum - Enable Tx checksum offloads
  * @skb: send buffer
- * @tx_flags: Tx flags currently set
+ * @tx_flags: pointer to Tx flags currently set
  * @td_cmd: Tx descriptor command bits to set
  * @td_offset: Tx descriptor header offsets to set
  * @cd_tunneling: ptr to context desc bits
  **/
-static void i40e_tx_enable_csum(struct sk_buff *skb, u32 tx_flags,
+static void i40e_tx_enable_csum(struct sk_buff *skb, u32 *tx_flags,
 				u32 *td_cmd, u32 *td_offset,
 				struct i40e_ring *tx_ring,
 				u32 *cd_tunneling)
@@ -2241,6 +2252,7 @@ static void i40e_tx_enable_csum(struct sk_buff *skb, u32 tx_flags,
 		switch (ip_hdr(skb)->protocol) {
 		case IPPROTO_UDP:
 			l4_tunnel = I40E_TXD_CTX_UDP_TUNNELING;
+			*tx_flags |= I40E_TX_FLAGS_VXLAN_TUNNEL;
 			break;
 		default:
 			return;
@@ -2250,18 +2262,17 @@ static void i40e_tx_enable_csum(struct sk_buff *skb, u32 tx_flags,
 		this_ipv6_hdr = inner_ipv6_hdr(skb);
 		this_tcp_hdrlen = inner_tcp_hdrlen(skb);
 
-		if (tx_flags & I40E_TX_FLAGS_IPV4) {
-
-			if (tx_flags & I40E_TX_FLAGS_TSO) {
+		if (*tx_flags & I40E_TX_FLAGS_IPV4) {
+			if (*tx_flags & I40E_TX_FLAGS_TSO) {
 				*cd_tunneling |= I40E_TX_CTX_EXT_IP_IPV4;
 				ip_hdr(skb)->check = 0;
 			} else {
 				*cd_tunneling |=
 					 I40E_TX_CTX_EXT_IP_IPV4_NO_CSUM;
 			}
-		} else if (tx_flags & I40E_TX_FLAGS_IPV6) {
+		} else if (*tx_flags & I40E_TX_FLAGS_IPV6) {
 			*cd_tunneling |= I40E_TX_CTX_EXT_IP_IPV6;
-			if (tx_flags & I40E_TX_FLAGS_TSO)
+			if (*tx_flags & I40E_TX_FLAGS_TSO)
 				ip_hdr(skb)->check = 0;
 		}
 
@@ -2273,8 +2284,8 @@ static void i40e_tx_enable_csum(struct sk_buff *skb, u32 tx_flags,
 					skb_transport_offset(skb)) >> 1) <<
 				   I40E_TXD_CTX_QW0_NATLEN_SHIFT;
 		if (this_ip_hdr->version == 6) {
-			tx_flags &= ~I40E_TX_FLAGS_IPV4;
-			tx_flags |= I40E_TX_FLAGS_IPV6;
+			*tx_flags &= ~I40E_TX_FLAGS_IPV4;
+			*tx_flags |= I40E_TX_FLAGS_IPV6;
 		}
 	} else {
 		network_hdr_len = skb_network_header_len(skb);
@@ -2284,12 +2295,12 @@ static void i40e_tx_enable_csum(struct sk_buff *skb, u32 tx_flags,
 	}
 
 	/* Enable IP checksum offloads */
-	if (tx_flags & I40E_TX_FLAGS_IPV4) {
+	if (*tx_flags & I40E_TX_FLAGS_IPV4) {
 		l4_hdr = this_ip_hdr->protocol;
 		/* the stack computes the IP header already, the only time we
 		 * need the hardware to recompute it is in the case of TSO.
 		 */
-		if (tx_flags & I40E_TX_FLAGS_TSO) {
+		if (*tx_flags & I40E_TX_FLAGS_TSO) {
 			*td_cmd |= I40E_TX_DESC_CMD_IIPT_IPV4_CSUM;
 			this_ip_hdr->check = 0;
 		} else {
@@ -2298,7 +2309,7 @@ static void i40e_tx_enable_csum(struct sk_buff *skb, u32 tx_flags,
 		/* Now set the td_offset for IP header length */
 		*td_offset = (network_hdr_len >> 2) <<
 			      I40E_TX_DESC_LENGTH_IPLEN_SHIFT;
-	} else if (tx_flags & I40E_TX_FLAGS_IPV6) {
+	} else if (*tx_flags & I40E_TX_FLAGS_IPV6) {
 		l4_hdr = this_ipv6_hdr->nexthdr;
 		*td_cmd |= I40E_TX_DESC_CMD_IIPT_IPV6;
 		/* Now set the td_offset for IP header length */
@@ -2711,7 +2722,7 @@ static netdev_tx_t i40e_xmit_frame_ring(struct sk_buff *skb,
 	else if (protocol == htons(ETH_P_IPV6))
 		tx_flags |= I40E_TX_FLAGS_IPV6;
 
-	tso = i40e_tso(tx_ring, skb, tx_flags, protocol, &hdr_len,
+	tso = i40e_tso(tx_ring, skb, &hdr_len,
 		       &cd_type_cmd_tso_mss, &cd_tunneling);
 
 	if (tso < 0)
@@ -2737,7 +2748,7 @@ static netdev_tx_t i40e_xmit_frame_ring(struct sk_buff *skb,
 	if (skb->ip_summed == CHECKSUM_PARTIAL) {
 		tx_flags |= I40E_TX_FLAGS_CSUM;
 
-		i40e_tx_enable_csum(skb, tx_flags, &td_cmd, &td_offset,
+		i40e_tx_enable_csum(skb, &tx_flags, &td_cmd, &td_offset,
 				    tx_ring, &cd_tunneling);
 	}
 
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.h b/drivers/net/ethernet/intel/i40e/i40e_txrx.h
index 4b0b810..ea1df3b 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.h
@@ -139,6 +139,7 @@ enum i40e_dyn_idx_t {
 #define I40E_TX_FLAGS_FSO		(u32)(1 << 7)
 #define I40E_TX_FLAGS_TSYN		(u32)(1 << 8)
 #define I40E_TX_FLAGS_FD_SB		(u32)(1 << 9)
+#define I40E_TX_FLAGS_VXLAN_TUNNEL	(u32)(1 << 10)
 #define I40E_TX_FLAGS_VLAN_MASK		0xffff0000
 #define I40E_TX_FLAGS_VLAN_PRIO_MASK	0xe0000000
 #define I40E_TX_FLAGS_VLAN_PRIO_SHIFT	29
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
index b077e02..362d6e1 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
@@ -1408,16 +1408,14 @@ out:
  * i40e_tso - set up the tso context descriptor
  * @tx_ring:  ptr to the ring to send
  * @skb:      ptr to the skb we're sending
- * @tx_flags: the collected send information
- * @protocol: the send protocol
  * @hdr_len:  ptr to the size of the packet header
  * @cd_tunneling: ptr to context descriptor bits
  *
  * Returns 0 if no TSO can happen, 1 if tso is going, or error
  **/
 static int i40e_tso(struct i40e_ring *tx_ring, struct sk_buff *skb,
-		    u32 tx_flags, __be16 protocol, u8 *hdr_len,
-		    u64 *cd_type_cmd_tso_mss, u32 *cd_tunneling)
+		    u8 *hdr_len, u64 *cd_type_cmd_tso_mss,
+		    u32 *cd_tunneling)
 {
 	u32 cd_cmd, cd_tso_len, cd_mss;
 	struct ipv6hdr *ipv6h;
@@ -1468,12 +1466,12 @@ static int i40e_tso(struct i40e_ring *tx_ring, struct sk_buff *skb,
 /**
  * i40e_tx_enable_csum - Enable Tx checksum offloads
  * @skb: send buffer
- * @tx_flags: Tx flags currently set
+ * @tx_flags: pointer to Tx flags currently set
  * @td_cmd: Tx descriptor command bits to set
  * @td_offset: Tx descriptor header offsets to set
  * @cd_tunneling: ptr to context desc bits
  **/
-static void i40e_tx_enable_csum(struct sk_buff *skb, u32 tx_flags,
+static void i40e_tx_enable_csum(struct sk_buff *skb, u32 *tx_flags,
 				u32 *td_cmd, u32 *td_offset,
 				struct i40e_ring *tx_ring,
 				u32 *cd_tunneling)
@@ -1489,6 +1487,7 @@ static void i40e_tx_enable_csum(struct sk_buff *skb, u32 tx_flags,
 		switch (ip_hdr(skb)->protocol) {
 		case IPPROTO_UDP:
 			l4_tunnel = I40E_TXD_CTX_UDP_TUNNELING;
+			*tx_flags |= I40E_TX_FLAGS_VXLAN_TUNNEL;
 			break;
 		default:
 			return;
@@ -1498,18 +1497,17 @@ static void i40e_tx_enable_csum(struct sk_buff *skb, u32 tx_flags,
 		this_ipv6_hdr = inner_ipv6_hdr(skb);
 		this_tcp_hdrlen = inner_tcp_hdrlen(skb);
 
-		if (tx_flags & I40E_TX_FLAGS_IPV4) {
-
-			if (tx_flags & I40E_TX_FLAGS_TSO) {
+		if (*tx_flags & I40E_TX_FLAGS_IPV4) {
+			if (*tx_flags & I40E_TX_FLAGS_TSO) {
 				*cd_tunneling |= I40E_TX_CTX_EXT_IP_IPV4;
 				ip_hdr(skb)->check = 0;
 			} else {
 				*cd_tunneling |=
 					 I40E_TX_CTX_EXT_IP_IPV4_NO_CSUM;
 			}
-		} else if (tx_flags & I40E_TX_FLAGS_IPV6) {
+		} else if (*tx_flags & I40E_TX_FLAGS_IPV6) {
 			*cd_tunneling |= I40E_TX_CTX_EXT_IP_IPV6;
-			if (tx_flags & I40E_TX_FLAGS_TSO)
+			if (*tx_flags & I40E_TX_FLAGS_TSO)
 				ip_hdr(skb)->check = 0;
 		}
 
@@ -1521,8 +1519,8 @@ static void i40e_tx_enable_csum(struct sk_buff *skb, u32 tx_flags,
 					skb_transport_offset(skb)) >> 1) <<
 				   I40E_TXD_CTX_QW0_NATLEN_SHIFT;
 		if (this_ip_hdr->version == 6) {
-			tx_flags &= ~I40E_TX_FLAGS_IPV4;
-			tx_flags |= I40E_TX_FLAGS_IPV6;
+			*tx_flags &= ~I40E_TX_FLAGS_IPV4;
+			*tx_flags |= I40E_TX_FLAGS_IPV6;
 		}
 
 
@@ -1534,12 +1532,12 @@ static void i40e_tx_enable_csum(struct sk_buff *skb, u32 tx_flags,
 	}
 
 	/* Enable IP checksum offloads */
-	if (tx_flags & I40E_TX_FLAGS_IPV4) {
+	if (*tx_flags & I40E_TX_FLAGS_IPV4) {
 		l4_hdr = this_ip_hdr->protocol;
 		/* the stack computes the IP header already, the only time we
 		 * need the hardware to recompute it is in the case of TSO.
 		 */
-		if (tx_flags & I40E_TX_FLAGS_TSO) {
+		if (*tx_flags & I40E_TX_FLAGS_TSO) {
 			*td_cmd |= I40E_TX_DESC_CMD_IIPT_IPV4_CSUM;
 			this_ip_hdr->check = 0;
 		} else {
@@ -1548,7 +1546,7 @@ static void i40e_tx_enable_csum(struct sk_buff *skb, u32 tx_flags,
 		/* Now set the td_offset for IP header length */
 		*td_offset = (network_hdr_len >> 2) <<
 			      I40E_TX_DESC_LENGTH_IPLEN_SHIFT;
-	} else if (tx_flags & I40E_TX_FLAGS_IPV6) {
+	} else if (*tx_flags & I40E_TX_FLAGS_IPV6) {
 		l4_hdr = this_ipv6_hdr->nexthdr;
 		*td_cmd |= I40E_TX_DESC_CMD_IIPT_IPV6;
 		/* Now set the td_offset for IP header length */
@@ -1942,7 +1940,7 @@ static netdev_tx_t i40e_xmit_frame_ring(struct sk_buff *skb,
 	else if (protocol == htons(ETH_P_IPV6))
 		tx_flags |= I40E_TX_FLAGS_IPV6;
 
-	tso = i40e_tso(tx_ring, skb, tx_flags, protocol, &hdr_len,
+	tso = i40e_tso(tx_ring, skb, &hdr_len,
 		       &cd_type_cmd_tso_mss, &cd_tunneling);
 
 	if (tso < 0)
@@ -1963,7 +1961,7 @@ static netdev_tx_t i40e_xmit_frame_ring(struct sk_buff *skb,
 	if (skb->ip_summed == CHECKSUM_PARTIAL) {
 		tx_flags |= I40E_TX_FLAGS_CSUM;
 
-		i40e_tx_enable_csum(skb, tx_flags, &td_cmd, &td_offset,
+		i40e_tx_enable_csum(skb, &tx_flags, &td_cmd, &td_offset,
 				    tx_ring, &cd_tunneling);
 	}
 
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.h b/drivers/net/ethernet/intel/i40evf/i40e_txrx.h
index 1e49bb1..a23f5e8 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.h
+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.h
@@ -138,6 +138,7 @@ enum i40e_dyn_idx_t {
 #define I40E_TX_FLAGS_FCCRC		(u32)(1 << 6)
 #define I40E_TX_FLAGS_FSO		(u32)(1 << 7)
 #define I40E_TX_FLAGS_FD_SB		(u32)(1 << 9)
+#define I40E_TX_FLAGS_VXLAN_TUNNEL	(u32)(1 << 10)
 #define I40E_TX_FLAGS_VLAN_MASK		0xffff0000
 #define I40E_TX_FLAGS_VLAN_PRIO_MASK	0xe0000000
 #define I40E_TX_FLAGS_VLAN_PRIO_SHIFT	29
-- 
1.9.3


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

* [Intel-wired-lan] [net-next S4 04/15] i40e/i40evf: Add stats to count Tunnel ATR hits
  2015-04-17  0:05 [Intel-wired-lan] [net-next S4 00/15] i40e/i40evf updates Catherine Sullivan
                   ` (2 preceding siblings ...)
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 03/15] i40e/i40evf: Add ATR support for tunneled TCP/IPv4/IPv6 packets Catherine Sullivan
@ 2015-04-17  0:06 ` Catherine Sullivan
  2015-05-08 17:56   ` Young, James M
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 05/15] i40e: Remove unnecessary pf members Catherine Sullivan
                   ` (11 subsequent siblings)
  15 siblings, 1 reply; 31+ messages in thread
From: Catherine Sullivan @ 2015-04-17  0:06 UTC (permalink / raw)
  To: intel-wired-lan

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

Add a 3rd dynamic filter counter to track Tunneled ATR hits separately.
Ethtool port stat "fdir_atr_tunnel_match"

Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Change-ID: Idd978b6db2a462b5722397cd2ffd04ef055f8655
---
 drivers/net/ethernet/intel/i40e/i40e.h         |  3 +++
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c |  1 +
 drivers/net/ethernet/intel/i40e/i40e_main.c    |  4 ++++
 drivers/net/ethernet/intel/i40e/i40e_txrx.c    | 13 ++++++++++---
 drivers/net/ethernet/intel/i40e/i40e_type.h    |  1 +
 drivers/net/ethernet/intel/i40evf/i40e_type.h  |  1 +
 6 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
index 33c35d3..0bfa5a0 100644
--- a/drivers/net/ethernet/intel/i40e/i40e.h
+++ b/drivers/net/ethernet/intel/i40e/i40e.h
@@ -182,6 +182,7 @@ struct i40e_lump_tracking {
 enum i40e_fd_stat_idx {
 	I40E_FD_STAT_ATR,
 	I40E_FD_STAT_SB,
+	I40E_FD_STAT_ATR_TUNNEL,
 	I40E_FD_STAT_PF_COUNT
 };
 #define I40E_FD_STAT_PF_IDX(pf_id) ((pf_id) * I40E_FD_STAT_PF_COUNT)
@@ -189,6 +190,8 @@ enum i40e_fd_stat_idx {
 			(I40E_FD_STAT_PF_IDX(pf_id) + I40E_FD_STAT_ATR)
 #define I40E_FD_SB_STAT_IDX(pf_id)  \
 			(I40E_FD_STAT_PF_IDX(pf_id) + I40E_FD_STAT_SB)
+#define I40E_FD_ATR_TUNNEL_STAT_IDX(pf_id) \
+			(I40E_FD_STAT_PF_IDX(pf_id) + I40E_FD_STAT_ATR_TUNNEL)
 
 struct i40e_fdir_filter {
 	struct hlist_node fdir_node;
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index e77b6bd..c568c90 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -147,6 +147,7 @@ static struct i40e_stats i40e_gstrings_stats[] = {
 	I40E_PF_STAT("rx_hwtstamp_cleared", rx_hwtstamp_cleared),
 	I40E_PF_STAT("fdir_flush_cnt", fd_flush_cnt),
 	I40E_PF_STAT("fdir_atr_match", stats.fd_atr_match),
+	I40E_PF_STAT("fdir_atr_tunnel_match", stats.fd_atr_tunnel_match),
 	I40E_PF_STAT("fdir_sb_match", stats.fd_sb_match),
 
 	/* LPI stats */
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index c48c8d6..35a571d 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -1102,6 +1102,10 @@ static void i40e_update_pf_stats(struct i40e_pf *pf)
 	i40e_stat_update32(hw, I40E_GLQF_PCNT(pf->fd_sb_cnt_idx),
 			   pf->stat_offsets_loaded,
 			   &osd->fd_sb_match, &nsd->fd_sb_match);
+	i40e_stat_update32(hw,
+		      I40E_GLQF_PCNT(I40E_FD_ATR_TUNNEL_STAT_IDX(pf->hw.pf_id)),
+		      pf->stat_offsets_loaded,
+		      &osd->fd_atr_tunnel_match, &nsd->fd_atr_tunnel_match);
 
 	val = rd32(hw, I40E_PRTPM_EEE_STAT);
 	nsd->tx_lpi_status =
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index f188790..268da01 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -2035,9 +2035,16 @@ static void i40e_atr(struct i40e_ring *tx_ring, struct sk_buff *skb,
 		     I40E_TXD_FLTR_QW1_FD_STATUS_SHIFT;
 
 	dtype_cmd |= I40E_TXD_FLTR_QW1_CNT_ENA_MASK;
-	dtype_cmd |=
-		((u32)pf->fd_atr_cnt_idx << I40E_TXD_FLTR_QW1_CNTINDEX_SHIFT) &
-		I40E_TXD_FLTR_QW1_CNTINDEX_MASK;
+	if (!(tx_flags & I40E_TX_FLAGS_VXLAN_TUNNEL))
+		dtype_cmd |=
+			((u32)I40E_FD_ATR_STAT_IDX(pf->hw.pf_id) <<
+			I40E_TXD_FLTR_QW1_CNTINDEX_SHIFT) &
+			I40E_TXD_FLTR_QW1_CNTINDEX_MASK;
+	else
+		dtype_cmd |=
+			((u32)I40E_FD_ATR_TUNNEL_STAT_IDX(pf->hw.pf_id) <<
+			I40E_TXD_FLTR_QW1_CNTINDEX_SHIFT) &
+			I40E_TXD_FLTR_QW1_CNTINDEX_MASK;
 
 	fdir_desc->qindex_flex_ptype_vsi = cpu_to_le32(flex_ptype);
 	fdir_desc->rsvd = cpu_to_le32(0);
diff --git a/drivers/net/ethernet/intel/i40e/i40e_type.h b/drivers/net/ethernet/intel/i40e/i40e_type.h
index 568e855..9a5a75b 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_type.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_type.h
@@ -1133,6 +1133,7 @@ struct i40e_hw_port_stats {
 	/* flow director stats */
 	u64 fd_atr_match;
 	u64 fd_sb_match;
+	u64 fd_atr_tunnel_match;
 	/* EEE LPI */
 	u32 tx_lpi_status;
 	u32 rx_lpi_status;
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_type.h b/drivers/net/ethernet/intel/i40evf/i40e_type.h
index ec9d83a..c463ec4 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_type.h
+++ b/drivers/net/ethernet/intel/i40evf/i40e_type.h
@@ -1108,6 +1108,7 @@ struct i40e_hw_port_stats {
 	/* flow director stats */
 	u64 fd_atr_match;
 	u64 fd_sb_match;
+	u64 fd_atr_tunnel_match;
 	/* EEE LPI */
 	u32 tx_lpi_status;
 	u32 rx_lpi_status;
-- 
1.9.3


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

* [Intel-wired-lan] [net-next S4 05/15] i40e: Remove unnecessary pf members
  2015-04-17  0:05 [Intel-wired-lan] [net-next S4 00/15] i40e/i40evf updates Catherine Sullivan
                   ` (3 preceding siblings ...)
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 04/15] i40e/i40evf: Add stats to count Tunnel ATR hits Catherine Sullivan
@ 2015-04-17  0:06 ` Catherine Sullivan
  2015-05-06 16:33   ` Young, James M
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 06/15] i40e/i40evf: Remove unneeded TODO Catherine Sullivan
                   ` (10 subsequent siblings)
  15 siblings, 1 reply; 31+ messages in thread
From: Catherine Sullivan @ 2015-04-17  0:06 UTC (permalink / raw)
  To: intel-wired-lan

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

We can use the stat index macro directly, a variable is not required.

Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Change-ID: I19f08ac16353dc0cd87a1a8248d714e15a54aa8a
---
 drivers/net/ethernet/intel/i40e/i40e.h         |  2 --
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c |  2 +-
 drivers/net/ethernet/intel/i40e/i40e_main.c    | 10 ++++------
 3 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
index 0bfa5a0..aca9cef 100644
--- a/drivers/net/ethernet/intel/i40e/i40e.h
+++ b/drivers/net/ethernet/intel/i40e/i40e.h
@@ -266,8 +266,6 @@ struct i40e_pf {
 
 	struct hlist_head fdir_filter_list;
 	u16 fdir_pf_active_filters;
-	u16 fd_sb_cnt_idx;
-	u16 fd_atr_cnt_idx;
 	unsigned long fd_flush_timestamp;
 	u32 fd_flush_cnt;
 	u32 fd_add_err;
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index c568c90..9a68c65 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -2293,7 +2293,7 @@ static int i40e_add_fdir_ethtool(struct i40e_vsi *vsi,
 	input->pctype = 0;
 	input->dest_vsi = vsi->id;
 	input->fd_status = I40E_FILTER_PROGRAM_DESC_FD_STATUS_FD_ID;
-	input->cnt_index  = pf->fd_sb_cnt_idx;
+	input->cnt_index  = I40E_FD_SB_STAT_IDX(pf->hw.pf_id);
 	input->flow_type = fsp->flow_type;
 	input->ip4_proto = fsp->h_u.usr_ip4_spec.proto;
 
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 35a571d..a5c13de 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -1096,10 +1096,12 @@ static void i40e_update_pf_stats(struct i40e_pf *pf)
 			   &osd->rx_jabber, &nsd->rx_jabber);
 
 	/* FDIR stats */
-	i40e_stat_update32(hw, I40E_GLQF_PCNT(pf->fd_atr_cnt_idx),
+	i40e_stat_update32(hw,
+			   I40E_GLQF_PCNT(I40E_FD_ATR_STAT_IDX(pf->hw.pf_id)),
 			   pf->stat_offsets_loaded,
 			   &osd->fd_atr_match, &nsd->fd_atr_match);
-	i40e_stat_update32(hw, I40E_GLQF_PCNT(pf->fd_sb_cnt_idx),
+	i40e_stat_update32(hw,
+			   I40E_GLQF_PCNT(I40E_FD_SB_STAT_IDX(pf->hw.pf_id)),
 			   pf->stat_offsets_loaded,
 			   &osd->fd_sb_match, &nsd->fd_sb_match);
 	i40e_stat_update32(hw,
@@ -7679,12 +7681,8 @@ static int i40e_sw_init(struct i40e_pf *pf)
 	    (pf->hw.func_caps.fd_filters_best_effort > 0)) {
 		pf->flags |= I40E_FLAG_FD_ATR_ENABLED;
 		pf->atr_sample_rate = I40E_DEFAULT_ATR_SAMPLE_RATE;
-		/* Setup a counter for fd_atr per PF */
-		pf->fd_atr_cnt_idx = I40E_FD_ATR_STAT_IDX(pf->hw.pf_id);
 		if (!(pf->flags & I40E_FLAG_MFP_ENABLED)) {
 			pf->flags |= I40E_FLAG_FD_SB_ENABLED;
-			/* Setup a counter for fd_sb per PF */
-			pf->fd_sb_cnt_idx = I40E_FD_SB_STAT_IDX(pf->hw.pf_id);
 		} else {
 			dev_info(&pf->pdev->dev,
 				 "Flow Director Sideband mode Disabled in MFP mode\n");
-- 
1.9.3


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

* [Intel-wired-lan] [net-next S4 06/15] i40e/i40evf: Remove unneeded TODO
  2015-04-17  0:05 [Intel-wired-lan] [net-next S4 00/15] i40e/i40evf updates Catherine Sullivan
                   ` (4 preceding siblings ...)
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 05/15] i40e: Remove unnecessary pf members Catherine Sullivan
@ 2015-04-17  0:06 ` Catherine Sullivan
  2015-05-05 17:51   ` Young, James M
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 07/15] i40evf: restore state Catherine Sullivan
                   ` (9 subsequent siblings)
  15 siblings, 1 reply; 31+ messages in thread
From: Catherine Sullivan @ 2015-04-17  0:06 UTC (permalink / raw)
  To: intel-wired-lan

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

There's no need for a counter so remove the TODO comment.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Change-ID: I3321dda04934c4f5fda9b279ab666192bda44214
---
 drivers/net/ethernet/intel/i40e/i40e_txrx.c   | 3 ---
 drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 3 ---
 2 files changed, 6 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index 268da01..d781a86 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -1653,9 +1653,6 @@ static int i40e_clean_rx_irq_ps(struct i40e_ring *rx_ring, int budget)
 		/* ERR_MASK will only have valid bits if EOP set */
 		if (unlikely(rx_error & (1 << I40E_RX_DESC_ERROR_RXE_SHIFT))) {
 			dev_kfree_skb_any(skb);
-			/* TODO: shouldn't we increment a counter indicating the
-			 * drop?
-			 */
 			continue;
 		}
 
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
index 362d6e1..e1a44dd 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
@@ -1128,9 +1128,6 @@ static int i40e_clean_rx_irq_ps(struct i40e_ring *rx_ring, int budget)
 		/* ERR_MASK will only have valid bits if EOP set */
 		if (unlikely(rx_error & (1 << I40E_RX_DESC_ERROR_RXE_SHIFT))) {
 			dev_kfree_skb_any(skb);
-			/* TODO: shouldn't we increment a counter indicating the
-			 * drop?
-			 */
 			continue;
 		}
 
-- 
1.9.3


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

* [Intel-wired-lan]  [net-next S4 07/15] i40evf: restore state
  2015-04-17  0:05 [Intel-wired-lan] [net-next S4 00/15] i40e/i40evf updates Catherine Sullivan
                   ` (5 preceding siblings ...)
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 06/15] i40e/i40evf: Remove unneeded TODO Catherine Sullivan
@ 2015-04-17  0:06 ` Catherine Sullivan
  2015-05-05 17:35   ` Young, James M
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 08/15] i40e: fix unrecognized FCOE EOF case Catherine Sullivan
                   ` (8 subsequent siblings)
  15 siblings, 1 reply; 31+ messages in thread
From: Catherine Sullivan @ 2015-04-17  0:06 UTC (permalink / raw)
  To: intel-wired-lan

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

If the netdev is closed when a reset occurs, the adapter state will be
left in the RESETTING state incorrectly. Correct this deficiency.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Change-ID: Ia0c5bf0449f7c81609f6f646e6b805f030d3360d
---
 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 7c53aca..37e66ec 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -1624,7 +1624,8 @@ continue_reset:
 			goto reset_err;
 
 		i40evf_irq_enable(adapter, true);
-	}
+	} else
+		adapter->state = __I40EVF_DOWN;
 	return;
 reset_err:
 	dev_err(&adapter->pdev->dev, "failed to allocate resources during reinit\n");
-- 
1.9.3


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

* [Intel-wired-lan] [net-next S4 08/15] i40e: fix unrecognized FCOE EOF case
  2015-04-17  0:05 [Intel-wired-lan] [net-next S4 00/15] i40e/i40evf updates Catherine Sullivan
                   ` (6 preceding siblings ...)
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 07/15] i40evf: restore state Catherine Sullivan
@ 2015-04-17  0:06 ` Catherine Sullivan
  2015-05-05 16:15   ` Young, James M
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 09/15] i40e: Move the FD ATR/SB messages to a higher debug level Catherine Sullivan
                   ` (7 subsequent siblings)
  15 siblings, 1 reply; 31+ messages in thread
From: Catherine Sullivan @ 2015-04-17  0:06 UTC (permalink / raw)
  To: intel-wired-lan

From: Vasu Dev <vasu.dev@intel.com>

Because i40e_fcoe_ctxt_eof should never be called without i40e_fcoe_eof_is_supported
being called first, the EOF in fcoe_ctxt_eof should always be valid and therefore
we do not need to print an error if it is not valid.

However, a WARN ON to easily catch any calls to i40e_fcoe_ctxt_eof that aren't
preceded with a call to i40e_fcoe_eof_is_supported is helpful.

Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Change-ID: I3b536b1981ec0bce80576a74440b7dea3908bdb9
---
 drivers/net/ethernet/intel/i40e/i40e_fcoe.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_fcoe.c b/drivers/net/ethernet/intel/i40e/i40e_fcoe.c
index 1803afe..c8b621e 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_fcoe.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_fcoe.c
@@ -118,7 +118,7 @@ static inline int i40e_fcoe_fc_eof(struct sk_buff *skb, u8 *eof)
  *
  * The FC EOF is converted to the value understood by HW for descriptor
  * programming. Never call this w/o calling i40e_fcoe_eof_is_supported()
- * first.
+ * first and that already checks for all supported valid eof values.
  **/
 static inline u32 i40e_fcoe_ctxt_eof(u8 eof)
 {
@@ -132,9 +132,12 @@ static inline u32 i40e_fcoe_ctxt_eof(u8 eof)
 	case FC_EOF_A:
 		return I40E_TX_DESC_CMD_L4T_EOFT_EOF_A;
 	default:
-		/* FIXME: still returns 0 */
-		pr_err("Unrecognized EOF %x\n", eof);
-		return 0;
+		/* Supported valid eof shall be already checked by
+		 * calling i40e_fcoe_eof_is_supported() first,
+		 * therefore this default case shall never hit.
+		 */
+		WARN_ON(1);
+		return -EINVAL;
 	}
 }
 
-- 
1.9.3


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

* [Intel-wired-lan] [net-next S4 09/15] i40e: Move the FD ATR/SB messages to a higher debug level
  2015-04-17  0:05 [Intel-wired-lan] [net-next S4 00/15] i40e/i40evf updates Catherine Sullivan
                   ` (7 preceding siblings ...)
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 08/15] i40e: fix unrecognized FCOE EOF case Catherine Sullivan
@ 2015-04-17  0:06 ` Catherine Sullivan
  2015-05-09  0:06   ` Young, James M
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 10/15] i40e/i40evf: Add stats to track FD ATR and SB dynamic enable state Catherine Sullivan
                   ` (6 subsequent siblings)
  15 siblings, 1 reply; 31+ messages in thread
From: Catherine Sullivan @ 2015-04-17  0:06 UTC (permalink / raw)
  To: intel-wired-lan

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

These are not useful unless SV is happening as there is a FD flush counter
that tracks this.

Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Change-ID: If2655b5a29687247d03a51d35f69854bbeb711ce
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 18 ++++++++++++------
 drivers/net/ethernet/intel/i40e/i40e_txrx.c |  9 ++++++---
 2 files changed, 18 insertions(+), 9 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index a5c13de..567303e 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -4744,7 +4744,8 @@ static int i40e_up_complete(struct i40e_vsi *vsi)
 		pf->fd_add_err = pf->fd_atr_cnt = 0;
 		if (pf->fd_tcp_rule > 0) {
 			pf->flags &= ~I40E_FLAG_FD_ATR_ENABLED;
-			dev_info(&pf->pdev->dev, "Forcing ATR off, sideband rules for TCP/IPv4 exist\n");
+			if (I40E_DEBUG_FD & pf->hw.debug_mask)
+				dev_info(&pf->pdev->dev, "Forcing ATR off, sideband rules for TCP/IPv4 exist\n");
 			pf->fd_tcp_rule = 0;
 		}
 		i40e_fdir_filter_restore(vsi);
@@ -5433,7 +5434,8 @@ void i40e_fdir_check_and_reenable(struct i40e_pf *pf)
 		if ((pf->flags & I40E_FLAG_FD_SB_ENABLED) &&
 		    (pf->auto_disable_flags & I40E_FLAG_FD_SB_ENABLED)) {
 			pf->auto_disable_flags &= ~I40E_FLAG_FD_SB_ENABLED;
-			dev_info(&pf->pdev->dev, "FD Sideband/ntuple is being enabled since we have space in the table now\n");
+			if (I40E_DEBUG_FD & pf->hw.debug_mask)
+				dev_info(&pf->pdev->dev, "FD Sideband/ntuple is being enabled since we have space in the table now\n");
 		}
 	}
 	/* Wait for some more space to be available to turn on ATR */
@@ -5441,7 +5443,8 @@ void i40e_fdir_check_and_reenable(struct i40e_pf *pf)
 		if ((pf->flags & I40E_FLAG_FD_ATR_ENABLED) &&
 		    (pf->auto_disable_flags & I40E_FLAG_FD_ATR_ENABLED)) {
 			pf->auto_disable_flags &= ~I40E_FLAG_FD_ATR_ENABLED;
-			dev_info(&pf->pdev->dev, "ATR is being enabled since we have space in the table now\n");
+			if (I40E_DEBUG_FD & pf->hw.debug_mask)
+				dev_info(&pf->pdev->dev, "ATR is being enabled since we have space in the table now\n");
 		}
 	}
 }
@@ -5474,7 +5477,8 @@ static void i40e_fdir_flush_and_replay(struct i40e_pf *pf)
 
 		if (!(time_after(jiffies, min_flush_time)) &&
 		    (fd_room < I40E_FDIR_BUFFER_HEAD_ROOM_FOR_ATR)) {
-			dev_info(&pf->pdev->dev, "ATR disabled, not enough FD filter space.\n");
+			if (I40E_DEBUG_FD & pf->hw.debug_mask)
+				dev_info(&pf->pdev->dev, "ATR disabled, not enough FD filter space.\n");
 			disable_atr = true;
 		}
 
@@ -5501,7 +5505,8 @@ static void i40e_fdir_flush_and_replay(struct i40e_pf *pf)
 			if (!disable_atr)
 				pf->flags |= I40E_FLAG_FD_ATR_ENABLED;
 			clear_bit(__I40E_FD_FLUSH_REQUESTED, &pf->state);
-			dev_info(&pf->pdev->dev, "FD Filter table flushed and FD-SB replayed.\n");
+			if (I40E_DEBUG_FD & pf->hw.debug_mask)
+				dev_info(&pf->pdev->dev, "FD Filter table flushed and FD-SB replayed.\n");
 		}
 	}
 }
@@ -7772,7 +7777,8 @@ bool i40e_set_ntuple(struct i40e_pf *pf, netdev_features_t features)
 		pf->fd_add_err = pf->fd_atr_cnt = pf->fd_tcp_rule = 0;
 		pf->fdir_pf_active_filters = 0;
 		pf->flags |= I40E_FLAG_FD_ATR_ENABLED;
-		dev_info(&pf->pdev->dev, "ATR re-enabled.\n");
+		if (I40E_DEBUG_FD & pf->hw.debug_mask)
+			dev_info(&pf->pdev->dev, "ATR re-enabled.\n");
 		/* if ATR was auto disabled it can be re-enabled. */
 		if ((pf->flags & I40E_FLAG_FD_ATR_ENABLED) &&
 		    (pf->auto_disable_flags & I40E_FLAG_FD_ATR_ENABLED))
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index d781a86..d6ad42b 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -283,7 +283,8 @@ static int i40e_add_del_fdir_tcpv4(struct i40e_vsi *vsi,
 	if (add) {
 		pf->fd_tcp_rule++;
 		if (pf->flags & I40E_FLAG_FD_ATR_ENABLED) {
-			dev_info(&pf->pdev->dev, "Forcing ATR off, sideband rules for TCP/IPv4 flow being applied\n");
+			if (I40E_DEBUG_FD & pf->hw.debug_mask)
+				dev_info(&pf->pdev->dev, "Forcing ATR off, sideband rules for TCP/IPv4 flow being applied\n");
 			pf->flags &= ~I40E_FLAG_FD_ATR_ENABLED;
 		}
 	} else {
@@ -291,7 +292,8 @@ static int i40e_add_del_fdir_tcpv4(struct i40e_vsi *vsi,
 				  (pf->fd_tcp_rule - 1) : 0;
 		if (pf->fd_tcp_rule == 0) {
 			pf->flags |= I40E_FLAG_FD_ATR_ENABLED;
-			dev_info(&pf->pdev->dev, "ATR re-enabled due to no sideband TCP/IPv4 rules\n");
+			if (I40E_DEBUG_FD & pf->hw.debug_mask)
+				dev_info(&pf->pdev->dev, "ATR re-enabled due to no sideband TCP/IPv4 rules\n");
 		}
 	}
 
@@ -501,7 +503,8 @@ static void i40e_fd_handle_status(struct i40e_ring *rx_ring,
 			if ((pf->flags & I40E_FLAG_FD_SB_ENABLED) &&
 			    !(pf->auto_disable_flags &
 				     I40E_FLAG_FD_SB_ENABLED)) {
-				dev_warn(&pdev->dev, "FD filter space full, new ntuple rules will not be added\n");
+				if (I40E_DEBUG_FD & pf->hw.debug_mask)
+					dev_warn(&pdev->dev, "FD filter space full, new ntuple rules will not be added\n");
 				pf->auto_disable_flags |=
 							I40E_FLAG_FD_SB_ENABLED;
 			}
-- 
1.9.3


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

* [Intel-wired-lan] [net-next S4 10/15] i40e/i40evf: Add stats to track FD ATR and SB dynamic enable state
  2015-04-17  0:05 [Intel-wired-lan] [net-next S4 00/15] i40e/i40evf updates Catherine Sullivan
                   ` (8 preceding siblings ...)
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 09/15] i40e: Move the FD ATR/SB messages to a higher debug level Catherine Sullivan
@ 2015-04-17  0:06 ` Catherine Sullivan
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 11/15] i40e/i40evf: Update Flex-10 related device/function capabilities Catherine Sullivan
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 31+ messages in thread
From: Catherine Sullivan @ 2015-04-17  0:06 UTC (permalink / raw)
  To: intel-wired-lan

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

Since the driver can dynamically enable/disable FD ATR and SB features,
these stats help keep track of the current state and along with
fd_flush count provide a means to debug what could be going on
with the flow director filters. This will take away the need for
being verbose in our debug logs with respect to FD.

Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Change-ID: I29224f750fe6602391043655d18996570720377d
---
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c |  2 ++
 drivers/net/ethernet/intel/i40e/i40e_main.c    | 12 ++++++++++++
 drivers/net/ethernet/intel/i40e/i40e_type.h    |  2 ++
 drivers/net/ethernet/intel/i40evf/i40e_type.h  |  2 ++
 4 files changed, 18 insertions(+)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index 9a68c65..0b68f61 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -148,7 +148,9 @@ static struct i40e_stats i40e_gstrings_stats[] = {
 	I40E_PF_STAT("fdir_flush_cnt", fd_flush_cnt),
 	I40E_PF_STAT("fdir_atr_match", stats.fd_atr_match),
 	I40E_PF_STAT("fdir_atr_tunnel_match", stats.fd_atr_tunnel_match),
+	I40E_PF_STAT("fdir_atr_status", stats.fd_atr_status),
 	I40E_PF_STAT("fdir_sb_match", stats.fd_sb_match),
+	I40E_PF_STAT("fdir_sb_status", stats.fd_sb_status),
 
 	/* LPI stats */
 	I40E_PF_STAT("tx_lpi_status", stats.tx_lpi_status),
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 567303e..44e905b 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -1123,6 +1123,18 @@ static void i40e_update_pf_stats(struct i40e_pf *pf)
 			   pf->stat_offsets_loaded,
 			   &osd->rx_lpi_count, &nsd->rx_lpi_count);
 
+	if (pf->flags & I40E_FLAG_FD_SB_ENABLED &
+	    !(pf->auto_disable_flags & I40E_FLAG_FD_SB_ENABLED))
+		nsd->fd_sb_status = true;
+	else
+		nsd->fd_sb_status = false;
+
+	if (pf->flags & I40E_FLAG_FD_ATR_ENABLED &
+	    !(pf->auto_disable_flags & I40E_FLAG_FD_ATR_ENABLED))
+		nsd->fd_atr_status = true;
+	else
+		nsd->fd_atr_status = false;
+
 	pf->stat_offsets_loaded = true;
 }
 
diff --git a/drivers/net/ethernet/intel/i40e/i40e_type.h b/drivers/net/ethernet/intel/i40e/i40e_type.h
index 9a5a75b..350c5ee 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_type.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_type.h
@@ -1134,6 +1134,8 @@ struct i40e_hw_port_stats {
 	u64 fd_atr_match;
 	u64 fd_sb_match;
 	u64 fd_atr_tunnel_match;
+	u32 fd_atr_status;
+	u32 fd_sb_status;
 	/* EEE LPI */
 	u32 tx_lpi_status;
 	u32 rx_lpi_status;
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_type.h b/drivers/net/ethernet/intel/i40evf/i40e_type.h
index c463ec4..068813d 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_type.h
+++ b/drivers/net/ethernet/intel/i40evf/i40e_type.h
@@ -1109,6 +1109,8 @@ struct i40e_hw_port_stats {
 	u64 fd_atr_match;
 	u64 fd_sb_match;
 	u64 fd_atr_tunnel_match;
+	u32 fd_atr_status;
+	u32 fd_sb_status;
 	/* EEE LPI */
 	u32 tx_lpi_status;
 	u32 rx_lpi_status;
-- 
1.9.3


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

* [Intel-wired-lan] [net-next S4 11/15] i40e/i40evf: Update Flex-10 related device/function capabilities
  2015-04-17  0:05 [Intel-wired-lan] [net-next S4 00/15] i40e/i40evf updates Catherine Sullivan
                   ` (9 preceding siblings ...)
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 10/15] i40e/i40evf: Add stats to track FD ATR and SB dynamic enable state Catherine Sullivan
@ 2015-04-17  0:06 ` Catherine Sullivan
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 12/15] i40evf: skb->xmit_more support Catherine Sullivan
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 31+ messages in thread
From: Catherine Sullivan @ 2015-04-17  0:06 UTC (permalink / raw)
  To: intel-wired-lan

From: Pawel Orlowski <pawel.orlowski@intel.com>

The Flex10 device/function capability has been upgraded to include
information needed to support Flex-10 configurations. This patch adds new
fields to the i40e_hw_capabilities structure and updates
i40e_parse_discover_capabilities functions to extract them from the AQ response.
Naming convention has changed to use flex10 mode instead of existing mfp_mode_1.

Signed-off-by: Pawel Orlowski <pawel.orlowski@intel.com>
Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
Change-ID: I305dd888866985a30293acb3fb14fa43ca6b79ea
---
 drivers/net/ethernet/intel/i40e/i40e_common.c | 24 +++++++++++++++++++-----
 drivers/net/ethernet/intel/i40e/i40e_main.c   |  2 +-
 drivers/net/ethernet/intel/i40e/i40e_type.h   | 12 +++++++++++-
 drivers/net/ethernet/intel/i40evf/i40e_type.h | 12 +++++++++++-
 4 files changed, 42 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c
index 0bae22d..6c90d3d 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_common.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_common.c
@@ -2391,7 +2391,7 @@ i40e_aq_erase_nvm_exit:
 #define I40E_DEV_FUNC_CAP_MSIX_VF	0x44
 #define I40E_DEV_FUNC_CAP_FLOW_DIRECTOR	0x45
 #define I40E_DEV_FUNC_CAP_IEEE_1588	0x46
-#define I40E_DEV_FUNC_CAP_MFP_MODE_1	0xF1
+#define I40E_DEV_FUNC_CAP_FLEX10	0xF1
 #define I40E_DEV_FUNC_CAP_CEM		0xF2
 #define I40E_DEV_FUNC_CAP_IWARP		0x51
 #define I40E_DEV_FUNC_CAP_LED		0x61
@@ -2415,6 +2415,7 @@ static void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
 	struct i40e_aqc_list_capabilities_element_resp *cap;
 	u32 valid_functions, num_functions;
 	u32 number, logical_id, phys_id;
+	u8 major_rev;
 	struct i40e_hw_capabilities *p;
 	u32 i = 0;
 	u16 id;
@@ -2433,6 +2434,7 @@ static void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
 		number = le32_to_cpu(cap->number);
 		logical_id = le32_to_cpu(cap->logical_id);
 		phys_id = le32_to_cpu(cap->phys_id);
+		major_rev = cap->major_rev;
 
 		switch (id) {
 		case I40E_DEV_FUNC_CAP_SWITCH_MODE:
@@ -2507,9 +2509,21 @@ static void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
 		case I40E_DEV_FUNC_CAP_MSIX_VF:
 			p->num_msix_vectors_vf = number;
 			break;
-		case I40E_DEV_FUNC_CAP_MFP_MODE_1:
-			if (number == 1)
-				p->mfp_mode_1 = true;
+		case I40E_DEV_FUNC_CAP_FLEX10:
+			if (major_rev == 1) {
+				if (number == 1) {
+					p->flex10_enable = true;
+					p->flex10_capable = true;
+				}
+			} else {
+				/* Capability revision >= 2 */
+				if (number & 1)
+					p->flex10_enable = true;
+				if (number & 2)
+					p->flex10_capable = true;
+			}
+			p->flex10_mode = logical_id;
+			p->flex10_status = phys_id;
 			break;
 		case I40E_DEV_FUNC_CAP_CEM:
 			if (number == 1)
@@ -2557,7 +2571,7 @@ static void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
 	/* Software override ensuring FCoE is disabled if npar or mfp
 	 * mode because it is not supported in these modes.
 	 */
-	if (p->npar_enable || p->mfp_mode_1)
+	if (p->npar_enable || p->flex10_enable)
 		p->fcoe = false;
 
 	/* count the enabled ports (aka the "not disabled" ports) */
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 44e905b..b276793 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -7681,7 +7681,7 @@ static int i40e_sw_init(struct i40e_pf *pf)
 	}
 
 	/* MFP mode enabled */
-	if (pf->hw.func_caps.npar_enable || pf->hw.func_caps.mfp_mode_1) {
+	if (pf->hw.func_caps.npar_enable || pf->hw.func_caps.flex10_enable) {
 		pf->flags |= I40E_FLAG_MFP_ENABLED;
 		dev_info(&pf->pdev->dev, "MFP mode Enabled\n");
 		if (i40e_get_npar_bw_setting(pf))
diff --git a/drivers/net/ethernet/intel/i40e/i40e_type.h b/drivers/net/ethernet/intel/i40e/i40e_type.h
index 350c5ee..220371e 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_type.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_type.h
@@ -213,7 +213,17 @@ struct i40e_hw_capabilities {
 	bool dcb;
 	bool fcoe;
 	bool iscsi; /* Indicates iSCSI enabled */
-	bool mfp_mode_1;
+	bool flex10_enable;
+	bool flex10_capable;
+	u32  flex10_mode;
+#define I40E_FLEX10_MODE_UNKNOWN	0x0
+#define I40E_FLEX10_MODE_DCC		0x1
+#define I40E_FLEX10_MODE_DCI		0x2
+
+	u32 flex10_status;
+#define I40E_FLEX10_STATUS_DCC_ERROR	0x1
+#define I40E_FLEX10_STATUS_VC_MODE	0x2
+
 	bool mgmt_cem;
 	bool ieee_1588;
 	bool iwarp;
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_type.h b/drivers/net/ethernet/intel/i40evf/i40e_type.h
index 068813d..3969c65 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_type.h
+++ b/drivers/net/ethernet/intel/i40evf/i40e_type.h
@@ -213,7 +213,17 @@ struct i40e_hw_capabilities {
 	bool dcb;
 	bool fcoe;
 	bool iscsi; /* Indicates iSCSI enabled */
-	bool mfp_mode_1;
+	bool flex10_enable;
+	bool flex10_capable;
+	u32  flex10_mode;
+#define I40E_FLEX10_MODE_UNKNOWN	0x0
+#define I40E_FLEX10_MODE_DCC		0x1
+#define I40E_FLEX10_MODE_DCI		0x2
+
+	u32 flex10_status;
+#define I40E_FLEX10_STATUS_DCC_ERROR	0x1
+#define I40E_FLEX10_STATUS_VC_MODE	0x2
+
 	bool mgmt_cem;
 	bool ieee_1588;
 	bool iwarp;
-- 
1.9.3


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

* [Intel-wired-lan] [net-next S4 12/15] i40evf: skb->xmit_more support
  2015-04-17  0:05 [Intel-wired-lan] [net-next S4 00/15] i40e/i40evf updates Catherine Sullivan
                   ` (10 preceding siblings ...)
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 11/15] i40e/i40evf: Update Flex-10 related device/function capabilities Catherine Sullivan
@ 2015-04-17  0:06 ` Catherine Sullivan
  2015-05-05 17:27   ` Alexander Duyck
  2015-05-09  0:21   ` Young, James M
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 13/15] i40e/i40evf: force inline transmit functions Catherine Sullivan
                   ` (3 subsequent siblings)
  15 siblings, 2 replies; 31+ messages in thread
From: Catherine Sullivan @ 2015-04-17  0:06 UTC (permalink / raw)
  To: intel-wired-lan

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

Eric added support for skb->xmit_more in i40e, this ports that into i40evf as well.

Support skb->xmit_more in i40evf is straightforward; we need to move
around i40e_maybe_stop_tx() call to correctly test netif_xmit_stopped()
before taking the decision to not kick the NIC.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Change-ID: Idddda6a2e4a7ab335631c91ced51f55b25eb8468
---
 drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 88 ++++++++++++++-------------
 1 file changed, 47 insertions(+), 41 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
index e1a44dd..4f77d38 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
@@ -1672,6 +1672,47 @@ linearize_chk_done:
 }
 
 /**
+ * __i40evf_maybe_stop_tx - 2nd level check for tx stop conditions
+ * @tx_ring: the ring to be checked
+ * @size:    the size buffer we want to assure is available
+ *
+ * Returns -EBUSY if a stop is needed, else 0
+ **/
+static inline int __i40evf_maybe_stop_tx(struct i40e_ring *tx_ring, int size)
+{
+	netif_stop_subqueue(tx_ring->netdev, tx_ring->queue_index);
+	/* Memory barrier before checking head and tail */
+	smp_mb();
+
+	/* Check again in a case another CPU has just made room available. */
+	if (likely(I40E_DESC_UNUSED(tx_ring) < size))
+		return -EBUSY;
+
+	/* A reprieve! - use start_queue because it doesn't call schedule */
+	netif_start_subqueue(tx_ring->netdev, tx_ring->queue_index);
+	++tx_ring->tx_stats.restart_queue;
+	return 0;
+}
+
+/**
+ * i40evf_maybe_stop_tx - 1st level check for tx stop conditions
+ * @tx_ring: the ring to be checked
+ * @size:    the size buffer we want to assure is available
+ *
+ * Returns 0 if stop is not needed
+ **/
+#ifdef I40E_FCOE
+int i40evf_maybe_stop_tx(struct i40e_ring *tx_ring, int size)
+#else
+static int i40evf_maybe_stop_tx(struct i40e_ring *tx_ring, int size)
+#endif
+{
+	if (likely(I40E_DESC_UNUSED(tx_ring) >= size))
+		return 0;
+	return __i40evf_maybe_stop_tx(tx_ring, size);
+}
+
+/**
  * i40e_tx_map - Build the Tx descriptor
  * @tx_ring:  ring to send buffer on
  * @skb:      send buffer
@@ -1808,8 +1849,12 @@ static void i40e_tx_map(struct i40e_ring *tx_ring, struct sk_buff *skb,
 
 	tx_ring->next_to_use = i;
 
+	i40evf_maybe_stop_tx(tx_ring, DESC_NEEDED);
 	/* notify HW of packet */
-	writel(i, tx_ring->tail);
+	if (!skb->xmit_more ||
+	    netif_xmit_stopped(netdev_get_tx_queue(tx_ring->netdev,
+						   tx_ring->queue_index)))
+		writel(i, tx_ring->tail);
 
 	return;
 
@@ -1831,43 +1876,6 @@ dma_error:
 }
 
 /**
- * __i40e_maybe_stop_tx - 2nd level check for tx stop conditions
- * @tx_ring: the ring to be checked
- * @size:    the size buffer we want to assure is available
- *
- * Returns -EBUSY if a stop is needed, else 0
- **/
-static inline int __i40e_maybe_stop_tx(struct i40e_ring *tx_ring, int size)
-{
-	netif_stop_subqueue(tx_ring->netdev, tx_ring->queue_index);
-	/* Memory barrier before checking head and tail */
-	smp_mb();
-
-	/* Check again in a case another CPU has just made room available. */
-	if (likely(I40E_DESC_UNUSED(tx_ring) < size))
-		return -EBUSY;
-
-	/* A reprieve! - use start_queue because it doesn't call schedule */
-	netif_start_subqueue(tx_ring->netdev, tx_ring->queue_index);
-	++tx_ring->tx_stats.restart_queue;
-	return 0;
-}
-
-/**
- * i40e_maybe_stop_tx - 1st level check for tx stop conditions
- * @tx_ring: the ring to be checked
- * @size:    the size buffer we want to assure is available
- *
- * Returns 0 if stop is not needed
- **/
-static int i40e_maybe_stop_tx(struct i40e_ring *tx_ring, int size)
-{
-	if (likely(I40E_DESC_UNUSED(tx_ring) >= size))
-		return 0;
-	return __i40e_maybe_stop_tx(tx_ring, size);
-}
-
-/**
  * i40e_xmit_descriptor_count - calculate number of tx descriptors needed
  * @skb:     send buffer
  * @tx_ring: ring to send buffer on
@@ -1892,7 +1900,7 @@ static int i40e_xmit_descriptor_count(struct sk_buff *skb,
 		count += TXD_USE_COUNT(skb_shinfo(skb)->frags[f].size);
 
 	count += TXD_USE_COUNT(skb_headlen(skb));
-	if (i40e_maybe_stop_tx(tx_ring, count + 4 + 1)) {
+	if (i40evf_maybe_stop_tx(tx_ring, count + 4 + 1)) {
 		tx_ring->tx_stats.tx_busy++;
 		return 0;
 	}
@@ -1968,8 +1976,6 @@ static netdev_tx_t i40e_xmit_frame_ring(struct sk_buff *skb,
 	i40e_tx_map(tx_ring, skb, first, tx_flags, hdr_len,
 		    td_cmd, td_offset);
 
-	i40e_maybe_stop_tx(tx_ring, DESC_NEEDED);
-
 	return NETDEV_TX_OK;
 
 out_drop:
-- 
1.9.3


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

* [Intel-wired-lan] [net-next S4 13/15] i40e/i40evf: force inline transmit functions
  2015-04-17  0:05 [Intel-wired-lan] [net-next S4 00/15] i40e/i40evf updates Catherine Sullivan
                   ` (11 preceding siblings ...)
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 12/15] i40evf: skb->xmit_more support Catherine Sullivan
@ 2015-04-17  0:06 ` Catherine Sullivan
  2015-05-05 16:12   ` Young, James M
  2015-05-05 16:55   ` Alexander Duyck
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 14/15] i40e/i40evf: remove time_stamp member Catherine Sullivan
                   ` (2 subsequent siblings)
  15 siblings, 2 replies; 31+ messages in thread
From: Catherine Sullivan @ 2015-04-17  0:06 UTC (permalink / raw)
  To: intel-wired-lan

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

Inlining these functions gives us about 15% more 64 byte packets per
second when using pktgen. 13.3 million to 15 million with a single
queue.

Also fix the function names in i40evf to i40evf not i40e while we are
touching the function header.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Change-ID: I3294ae9b085cf438672b6db5f9af122490ead9d0
---
 drivers/net/ethernet/intel/i40e/i40e_txrx.c   | 32 ++++++++++++------------
 drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 36 ++++++++++++---------------
 2 files changed, 32 insertions(+), 36 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index d6ad42b..ca21f9a 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -2065,13 +2065,13 @@ static void i40e_atr(struct i40e_ring *tx_ring, struct sk_buff *skb,
  * otherwise  returns 0 to indicate the flags has been set properly.
  **/
 #ifdef I40E_FCOE
-int i40e_tx_prepare_vlan_flags(struct sk_buff *skb,
-			       struct i40e_ring *tx_ring,
-			       u32 *flags)
-#else
-static int i40e_tx_prepare_vlan_flags(struct sk_buff *skb,
+inline int i40e_tx_prepare_vlan_flags(struct sk_buff *skb,
 				      struct i40e_ring *tx_ring,
 				      u32 *flags)
+#else
+static inline int i40e_tx_prepare_vlan_flags(struct sk_buff *skb,
+					     struct i40e_ring *tx_ring,
+					     u32 *flags)
 #endif
 {
 	__be16 protocol = skb->protocol;
@@ -2414,9 +2414,9 @@ static inline int __i40e_maybe_stop_tx(struct i40e_ring *tx_ring, int size)
  * Returns 0 if stop is not needed
  **/
 #ifdef I40E_FCOE
-int i40e_maybe_stop_tx(struct i40e_ring *tx_ring, int size)
+inline int i40e_maybe_stop_tx(struct i40e_ring *tx_ring, int size)
 #else
-static int i40e_maybe_stop_tx(struct i40e_ring *tx_ring, int size)
+static inline int i40e_maybe_stop_tx(struct i40e_ring *tx_ring, int size)
 #endif
 {
 	if (likely(I40E_DESC_UNUSED(tx_ring) >= size))
@@ -2496,13 +2496,13 @@ linearize_chk_done:
  * @td_offset: offset for checksum or crc
  **/
 #ifdef I40E_FCOE
-void i40e_tx_map(struct i40e_ring *tx_ring, struct sk_buff *skb,
-		 struct i40e_tx_buffer *first, u32 tx_flags,
-		 const u8 hdr_len, u32 td_cmd, u32 td_offset)
-#else
-static void i40e_tx_map(struct i40e_ring *tx_ring, struct sk_buff *skb,
+inline void i40e_tx_map(struct i40e_ring *tx_ring, struct sk_buff *skb,
 			struct i40e_tx_buffer *first, u32 tx_flags,
 			const u8 hdr_len, u32 td_cmd, u32 td_offset)
+#else
+static inline void i40e_tx_map(struct i40e_ring *tx_ring, struct sk_buff *skb,
+			       struct i40e_tx_buffer *first, u32 tx_flags,
+			       const u8 hdr_len, u32 td_cmd, u32 td_offset)
 #endif
 {
 	unsigned int data_len = skb->data_len;
@@ -2663,11 +2663,11 @@ dma_error:
  * one descriptor.
  **/
 #ifdef I40E_FCOE
-int i40e_xmit_descriptor_count(struct sk_buff *skb,
-			       struct i40e_ring *tx_ring)
-#else
-static int i40e_xmit_descriptor_count(struct sk_buff *skb,
+inline int i40e_xmit_descriptor_count(struct sk_buff *skb,
 				      struct i40e_ring *tx_ring)
+#else
+static inline int i40e_xmit_descriptor_count(struct sk_buff *skb,
+					     struct i40e_ring *tx_ring)
 #endif
 {
 	unsigned int f;
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
index 4f77d38..fa2458b 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
@@ -1349,7 +1349,7 @@ int i40evf_napi_poll(struct napi_struct *napi, int budget)
 }
 
 /**
- * i40e_tx_prepare_vlan_flags - prepare generic TX VLAN tagging flags for HW
+ * i40evf_tx_prepare_vlan_flags - prepare generic TX VLAN tagging flags for HW
  * @skb:     send buffer
  * @tx_ring: ring to send buffer on
  * @flags:   the tx flags to be set
@@ -1360,9 +1360,9 @@ int i40evf_napi_poll(struct napi_struct *napi, int budget)
  * Returns error code indicate the frame should be dropped upon error and the
  * otherwise  returns 0 to indicate the flags has been set properly.
  **/
-static int i40e_tx_prepare_vlan_flags(struct sk_buff *skb,
-				      struct i40e_ring *tx_ring,
-				      u32 *flags)
+static inline int i40evf_tx_prepare_vlan_flags(struct sk_buff *skb,
+					       struct i40e_ring *tx_ring,
+					       u32 *flags)
 {
 	__be16 protocol = skb->protocol;
 	u32  tx_flags = 0;
@@ -1701,11 +1701,7 @@ static inline int __i40evf_maybe_stop_tx(struct i40e_ring *tx_ring, int size)
  *
  * Returns 0 if stop is not needed
  **/
-#ifdef I40E_FCOE
-int i40evf_maybe_stop_tx(struct i40e_ring *tx_ring, int size)
-#else
-static int i40evf_maybe_stop_tx(struct i40e_ring *tx_ring, int size)
-#endif
+static inline int i40evf_maybe_stop_tx(struct i40e_ring *tx_ring, int size)
 {
 	if (likely(I40E_DESC_UNUSED(tx_ring) >= size))
 		return 0;
@@ -1713,7 +1709,7 @@ static int i40evf_maybe_stop_tx(struct i40e_ring *tx_ring, int size)
 }
 
 /**
- * i40e_tx_map - Build the Tx descriptor
+ * i40evf_tx_map - Build the Tx descriptor
  * @tx_ring:  ring to send buffer on
  * @skb:      send buffer
  * @first:    first buffer info buffer to use
@@ -1722,9 +1718,9 @@ static int i40evf_maybe_stop_tx(struct i40e_ring *tx_ring, int size)
  * @td_cmd:   the command field in the descriptor
  * @td_offset: offset for checksum or crc
  **/
-static void i40e_tx_map(struct i40e_ring *tx_ring, struct sk_buff *skb,
-			struct i40e_tx_buffer *first, u32 tx_flags,
-			const u8 hdr_len, u32 td_cmd, u32 td_offset)
+static inline void i40evf_tx_map(struct i40e_ring *tx_ring, struct sk_buff *skb,
+				 struct i40e_tx_buffer *first, u32 tx_flags,
+				 const u8 hdr_len, u32 td_cmd, u32 td_offset)
 {
 	unsigned int data_len = skb->data_len;
 	unsigned int size = skb_headlen(skb);
@@ -1876,7 +1872,7 @@ dma_error:
 }
 
 /**
- * i40e_xmit_descriptor_count - calculate number of tx descriptors needed
+ * i40evf_xmit_descriptor_count - calculate number of tx descriptors needed
  * @skb:     send buffer
  * @tx_ring: ring to send buffer on
  *
@@ -1884,8 +1880,8 @@ dma_error:
  * there is not enough descriptors available in this ring since we need at least
  * one descriptor.
  **/
-static int i40e_xmit_descriptor_count(struct sk_buff *skb,
-				      struct i40e_ring *tx_ring)
+static inline int i40evf_xmit_descriptor_count(struct sk_buff *skb,
+					       struct i40e_ring *tx_ring)
 {
 	unsigned int f;
 	int count = 0;
@@ -1926,11 +1922,11 @@ static netdev_tx_t i40e_xmit_frame_ring(struct sk_buff *skb,
 	u32 td_cmd = 0;
 	u8 hdr_len = 0;
 	int tso;
-	if (0 == i40e_xmit_descriptor_count(skb, tx_ring))
+	if (0 == i40evf_xmit_descriptor_count(skb, tx_ring))
 		return NETDEV_TX_BUSY;
 
 	/* prepare the xmit flags */
-	if (i40e_tx_prepare_vlan_flags(skb, tx_ring, &tx_flags))
+	if (i40evf_tx_prepare_vlan_flags(skb, tx_ring, &tx_flags))
 		goto out_drop;
 
 	/* obtain protocol of skb */
@@ -1973,8 +1969,8 @@ static netdev_tx_t i40e_xmit_frame_ring(struct sk_buff *skb,
 	i40e_create_tx_ctx(tx_ring, cd_type_cmd_tso_mss,
 			   cd_tunneling, cd_l2tag2);
 
-	i40e_tx_map(tx_ring, skb, first, tx_flags, hdr_len,
-		    td_cmd, td_offset);
+	i40evf_tx_map(tx_ring, skb, first, tx_flags, hdr_len,
+		      td_cmd, td_offset);
 
 	return NETDEV_TX_OK;
 
-- 
1.9.3


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

* [Intel-wired-lan] [net-next S4 14/15] i40e/i40evf: remove time_stamp member
  2015-04-17  0:05 [Intel-wired-lan] [net-next S4 00/15] i40e/i40evf updates Catherine Sullivan
                   ` (12 preceding siblings ...)
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 13/15] i40e/i40evf: force inline transmit functions Catherine Sullivan
@ 2015-04-17  0:06 ` Catherine Sullivan
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 15/15] i40e: Bump version to 1.3.4 Catherine Sullivan
  2015-04-17 18:53 ` [Intel-wired-lan] [net-next S4 00/15] i40e/i40evf updates Jeff Kirsher
  15 siblings, 0 replies; 31+ messages in thread
From: Catherine Sullivan @ 2015-04-17  0:06 UTC (permalink / raw)
  To: intel-wired-lan

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

The driver doesn't use the time_stamp member to determine if there is a
tx_hang any more. There really isn't any point to the variable at all
so just remove it. It was left over from a previous tx_hang design.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Change-ID: I4c814827e1bcb46e45118fe37acdcfa814fb62a0
---
 drivers/net/ethernet/intel/i40e/i40e_txrx.c   | 10 ----------
 drivers/net/ethernet/intel/i40e/i40e_txrx.h   |  1 -
 drivers/net/ethernet/intel/i40evf/i40e_txrx.c |  7 -------
 drivers/net/ethernet/intel/i40evf/i40e_txrx.h |  1 -
 4 files changed, 19 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index ca21f9a..e1596dc 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -165,9 +165,6 @@ int i40e_program_fdir_filter(struct i40e_fdir_filter *fdir_data, u8 *raw_packet,
 	tx_desc->cmd_type_offset_bsz =
 		build_ctob(td_cmd, 0, I40E_FDIR_MAX_RAW_PACKET_SIZE, 0);
 
-	/* set the timestamp */
-	tx_buf->time_stamp = jiffies;
-
 	/* Force memory writes to complete before letting h/w
 	 * know there are new descriptors to fetch.
 	 */
@@ -810,10 +807,6 @@ static bool i40e_clean_tx_irq(struct i40e_ring *tx_ring, int budget)
 			 tx_ring->vsi->seid,
 			 tx_ring->queue_index,
 			 tx_ring->next_to_use, i);
-		dev_info(tx_ring->dev, "tx_bi[next_to_clean]\n"
-			 "  time_stamp           <%lx>\n"
-			 "  jiffies              <%lx>\n",
-			 tx_ring->tx_bi[i].time_stamp, jiffies);
 
 		netif_stop_subqueue(tx_ring->netdev, tx_ring->queue_index);
 
@@ -2608,9 +2601,6 @@ static inline void i40e_tx_map(struct i40e_ring *tx_ring, struct sk_buff *skb,
 						 tx_ring->queue_index),
 			     first->bytecount);
 
-	/* set the timestamp */
-	first->time_stamp = jiffies;
-
 	/* Force memory writes to complete before letting h/w
 	 * know there are new descriptors to fetch.  (Only
 	 * applicable for weak-ordered memory model archs,
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.h b/drivers/net/ethernet/intel/i40e/i40e_txrx.h
index ea1df3b..0dc48dc 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.h
@@ -147,7 +147,6 @@ enum i40e_dyn_idx_t {
 
 struct i40e_tx_buffer {
 	struct i40e_tx_desc *next_to_watch;
-	unsigned long time_stamp;
 	union {
 		struct sk_buff *skb;
 		void *raw_buf;
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
index fa2458b..11de5a5 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
@@ -322,10 +322,6 @@ static bool i40e_clean_tx_irq(struct i40e_ring *tx_ring, int budget)
 			 tx_ring->vsi->seid,
 			 tx_ring->queue_index,
 			 tx_ring->next_to_use, i);
-		dev_info(tx_ring->dev, "tx_bi[next_to_clean]\n"
-			 "  time_stamp           <%lx>\n"
-			 "  jiffies              <%lx>\n",
-			 tx_ring->tx_bi[i].time_stamp, jiffies);
 
 		netif_stop_subqueue(tx_ring->netdev, tx_ring->queue_index);
 
@@ -1826,9 +1822,6 @@ static inline void i40evf_tx_map(struct i40e_ring *tx_ring, struct sk_buff *skb,
 						 tx_ring->queue_index),
 			     first->bytecount);
 
-	/* set the timestamp */
-	first->time_stamp = jiffies;
-
 	/* Force memory writes to complete before letting h/w
 	 * know there are new descriptors to fetch.  (Only
 	 * applicable for weak-ordered memory model archs,
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.h b/drivers/net/ethernet/intel/i40evf/i40e_txrx.h
index a23f5e8..e7a34f8 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.h
+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.h
@@ -146,7 +146,6 @@ enum i40e_dyn_idx_t {
 
 struct i40e_tx_buffer {
 	struct i40e_tx_desc *next_to_watch;
-	unsigned long time_stamp;
 	union {
 		struct sk_buff *skb;
 		void *raw_buf;
-- 
1.9.3


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

* [Intel-wired-lan] [net-next S4 15/15] i40e: Bump version to 1.3.4
  2015-04-17  0:05 [Intel-wired-lan] [net-next S4 00/15] i40e/i40evf updates Catherine Sullivan
                   ` (13 preceding siblings ...)
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 14/15] i40e/i40evf: remove time_stamp member Catherine Sullivan
@ 2015-04-17  0:06 ` Catherine Sullivan
  2015-05-05 16:11   ` Young, James M
  2015-04-17 18:53 ` [Intel-wired-lan] [net-next S4 00/15] i40e/i40evf updates Jeff Kirsher
  15 siblings, 1 reply; 31+ messages in thread
From: Catherine Sullivan @ 2015-04-17  0:06 UTC (permalink / raw)
  To: intel-wired-lan

Bump.

Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Change-ID: I54ec2787a9fead5e18447078f26e5dd27f01da44
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index b276793..861c8d5 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 3
-#define DRV_VERSION_BUILD 2
+#define DRV_VERSION_BUILD 4
 #define DRV_VERSION __stringify(DRV_VERSION_MAJOR) "." \
 	     __stringify(DRV_VERSION_MINOR) "." \
 	     __stringify(DRV_VERSION_BUILD)    DRV_KERN
-- 
1.9.3


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

* [Intel-wired-lan] [net-next S4 00/15] i40e/i40evf updates
  2015-04-17  0:05 [Intel-wired-lan] [net-next S4 00/15] i40e/i40evf updates Catherine Sullivan
                   ` (14 preceding siblings ...)
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 15/15] i40e: Bump version to 1.3.4 Catherine Sullivan
@ 2015-04-17 18:53 ` Jeff Kirsher
  15 siblings, 0 replies; 31+ messages in thread
From: Jeff Kirsher @ 2015-04-17 18:53 UTC (permalink / raw)
  To: intel-wired-lan

On Thu, 2015-04-16 at 20:05 -0400, Catherine Sullivan wrote:
> Anjali adds ATR support for tunneled TCP/IPv4/IPv6 packets, stats to
> count
> tunnel ATR hits, and stats to track flow director ATR and side band
> dynamic
> enable state in i40e. She also removes some unnecessary members from
> the pf
> struct and set the flow director ATR and side band messages to a
> higher debug
> level.
> 
> Greg disables offline diagnostics if VFs are enabled, and removes an
> unnecessary
> TODO comment in i40e.
> 
> Jesse makes some transmit functions inline to improve performance in
> both i40e
> and i40evf. He also adds skb->xmit_more support to i40evf and removes
> time_stamp member from i40e since it is not being used.
> 
> Mitch fixes i40evf to restore state properly when a netdev is closed
> and a reset
> occurs.
> 
> Neerav fixes i40e to collect PFC XOFF RX stats even when there is a
> single TC.
> 
> Pawel updates device/function capabilities in i40e to include
> information needed
> for Flex-10 configurations.
> 
> Vasu fixes an error case that should never be reached to WARN ON
> instead of
> printing an error message.

Thanks Catherine, I have applied your series.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue
-------------- 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/20150417/b5507cb1/attachment.asc>

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

* [Intel-wired-lan] [net-next S4 15/15] i40e: Bump version to 1.3.4
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 15/15] i40e: Bump version to 1.3.4 Catherine Sullivan
@ 2015-05-05 16:11   ` Young, James M
  0 siblings, 0 replies; 31+ messages in thread
From: Young, James M @ 2015-05-05 16:11 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 Catherine Sullivan
> Sent: Thursday, April 16, 2015 5:06 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [net-next S4 15/15] i40e: Bump version to 1.3.4
> 
> Bump.
> 
> Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
> Change-ID: I54ec2787a9fead5e18447078f26e5dd27f01da44
> ---
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Tested-by: Jim Young <james.m.young@intel.com>


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

* [Intel-wired-lan] [net-next S4 13/15] i40e/i40evf: force inline transmit functions
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 13/15] i40e/i40evf: force inline transmit functions Catherine Sullivan
@ 2015-05-05 16:12   ` Young, James M
  2015-05-05 16:55   ` Alexander Duyck
  1 sibling, 0 replies; 31+ messages in thread
From: Young, James M @ 2015-05-05 16:12 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 Catherine Sullivan
> Sent: Thursday, April 16, 2015 5:06 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [net-next S4 13/15] i40e/i40evf: force inline
> transmit functions
> 
> From: Jesse Brandeburg <jesse.brandeburg@intel.com>
> 
> Inlining these functions gives us about 15% more 64 byte packets per second
> when using pktgen. 13.3 million to 15 million with a single queue.
> 
> Also fix the function names in i40evf to i40evf not i40e while we are touching
> the function header.
> 
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
> Change-ID: I3294ae9b085cf438672b6db5f9af122490ead9d0
> ---
>  drivers/net/ethernet/intel/i40e/i40e_txrx.c   | 32 ++++++++++++------------
>  drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 36 ++++++++++++------------
> ---
>  2 files changed, 32 insertions(+), 36 deletions(-)

Tested-by: Jim Young <james.m.young@intel.com>


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

* [Intel-wired-lan] [net-next S4 08/15] i40e: fix unrecognized FCOE EOF case
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 08/15] i40e: fix unrecognized FCOE EOF case Catherine Sullivan
@ 2015-05-05 16:15   ` Young, James M
  0 siblings, 0 replies; 31+ messages in thread
From: Young, James M @ 2015-05-05 16: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 Catherine Sullivan
> Sent: Thursday, April 16, 2015 5:06 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [net-next S4 08/15] i40e: fix unrecognized FCOE
> EOF case
> 
> From: Vasu Dev <vasu.dev@intel.com>
> 
> Because i40e_fcoe_ctxt_eof should never be called without
> i40e_fcoe_eof_is_supported being called first, the EOF in fcoe_ctxt_eof
> should always be valid and therefore we do not need to print an error if it is
> not valid.
> 
> However, a WARN ON to easily catch any calls to i40e_fcoe_ctxt_eof that
> aren't preceded with a call to i40e_fcoe_eof_is_supported is helpful.
> 
> Signed-off-by: Vasu Dev <vasu.dev@intel.com>
> Change-ID: I3b536b1981ec0bce80576a74440b7dea3908bdb9
> ---
>  drivers/net/ethernet/intel/i40e/i40e_fcoe.c | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)

Tested-by: Jim Young <james.m.young@intel.com>
	No FCOE feature tested by my, base driver only, this patch does not affect base driver function. 


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

* [Intel-wired-lan] [net-next S4 13/15] i40e/i40evf: force inline transmit functions
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 13/15] i40e/i40evf: force inline transmit functions Catherine Sullivan
  2015-05-05 16:12   ` Young, James M
@ 2015-05-05 16:55   ` Alexander Duyck
  1 sibling, 0 replies; 31+ messages in thread
From: Alexander Duyck @ 2015-05-05 16:55 UTC (permalink / raw)
  To: intel-wired-lan

On 04/16/2015 05:06 PM, Catherine Sullivan wrote:
> From: Jesse Brandeburg <jesse.brandeburg@intel.com>
>
> Inlining these functions gives us about 15% more 64 byte packets per
> second when using pktgen. 13.3 million to 15 million with a single
> queue.
>
> Also fix the function names in i40evf to i40evf not i40e while we are
> touching the function header.
>
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
> Change-ID: I3294ae9b085cf438672b6db5f9af122490ead9d0
> ---

The code below is ugly.  If you are going to inline it anyway you might 
as well just move the inline functions to a header file so that they can 
all be static inline.  Also what is the difference in size between the 
before/after with FCoE for this part enabled?  It would be useful to 
have that info in the patch description.  I suspect the change is fairly 
significant since you are doubling the map function which is fairly sizable.

I suspect most of these changes are only showing gains in the FCoE 
case.  Really you guys should look at reachitecting things rather than 
bloating the driver by doubling up the xmit path.  You could probably do 
a quick check against the netdev and then just call some FCoE specific 
offload path before getting back to i40e_tx_map.

Comments inline below.

- Alex

>   drivers/net/ethernet/intel/i40e/i40e_txrx.c   | 32 ++++++++++++------------
>   drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 36 ++++++++++++---------------
>   2 files changed, 32 insertions(+), 36 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> index d6ad42b..ca21f9a 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> @@ -2065,13 +2065,13 @@ static void i40e_atr(struct i40e_ring *tx_ring, struct sk_buff *skb,
>    * otherwise  returns 0 to indicate the flags has been set properly.
>    **/
>   #ifdef I40E_FCOE
> -int i40e_tx_prepare_vlan_flags(struct sk_buff *skb,
> -			       struct i40e_ring *tx_ring,
> -			       u32 *flags)
> -#else
> -static int i40e_tx_prepare_vlan_flags(struct sk_buff *skb,
> +inline int i40e_tx_prepare_vlan_flags(struct sk_buff *skb,
>   				      struct i40e_ring *tx_ring,
>   				      u32 *flags)
> +#else
> +static inline int i40e_tx_prepare_vlan_flags(struct sk_buff *skb,
> +					     struct i40e_ring *tx_ring,
> +					     u32 *flags)
>   #endif
>   {
>   	__be16 protocol = skb->protocol;
> @@ -2414,9 +2414,9 @@ static inline int __i40e_maybe_stop_tx(struct i40e_ring *tx_ring, int size)
>    * Returns 0 if stop is not needed
>    **/
>   #ifdef I40E_FCOE
> -int i40e_maybe_stop_tx(struct i40e_ring *tx_ring, int size)
> +inline int i40e_maybe_stop_tx(struct i40e_ring *tx_ring, int size)
>   #else
> -static int i40e_maybe_stop_tx(struct i40e_ring *tx_ring, int size)
> +static inline int i40e_maybe_stop_tx(struct i40e_ring *tx_ring, int size)
>   #endif
>   {
>   	if (likely(I40E_DESC_UNUSED(tx_ring) >= size))
> @@ -2496,13 +2496,13 @@ linearize_chk_done:
>    * @td_offset: offset for checksum or crc
>    **/
>   #ifdef I40E_FCOE
> -void i40e_tx_map(struct i40e_ring *tx_ring, struct sk_buff *skb,
> -		 struct i40e_tx_buffer *first, u32 tx_flags,
> -		 const u8 hdr_len, u32 td_cmd, u32 td_offset)
> -#else
> -static void i40e_tx_map(struct i40e_ring *tx_ring, struct sk_buff *skb,
> +inline void i40e_tx_map(struct i40e_ring *tx_ring, struct sk_buff *skb,
>   			struct i40e_tx_buffer *first, u32 tx_flags,
>   			const u8 hdr_len, u32 td_cmd, u32 td_offset)
> +#else
> +static inline void i40e_tx_map(struct i40e_ring *tx_ring, struct sk_buff *skb,
> +			       struct i40e_tx_buffer *first, u32 tx_flags,
> +			       const u8 hdr_len, u32 td_cmd, u32 td_offset)
>   #endif
>   {
>   	unsigned int data_len = skb->data_len;

Inlining i40e_tx_map is kind of overkill isn't it?  Isn't this most of 
the code for the xmit path?

> @@ -2663,11 +2663,11 @@ dma_error:
>    * one descriptor.
>    **/
>   #ifdef I40E_FCOE
> -int i40e_xmit_descriptor_count(struct sk_buff *skb,
> -			       struct i40e_ring *tx_ring)
> -#else
> -static int i40e_xmit_descriptor_count(struct sk_buff *skb,
> +inline int i40e_xmit_descriptor_count(struct sk_buff *skb,
>   				      struct i40e_ring *tx_ring)
> +#else
> +static inline int i40e_xmit_descriptor_count(struct sk_buff *skb,
> +					     struct i40e_ring *tx_ring)
>   #endif
>   {
>   	unsigned int f;

So the VF code is just a copy of this w/ some renaming so I dropped it.  
I'm assuming the actual gains are none for this patch on the VF, do I 
have that correct?  I'm assuming the compiler is smart enough to realize 
it can inline static functions that are only called once.

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

* [Intel-wired-lan] [net-next S4 12/15] i40evf: skb->xmit_more support
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 12/15] i40evf: skb->xmit_more support Catherine Sullivan
@ 2015-05-05 17:27   ` Alexander Duyck
  2015-05-09  0:21   ` Young, James M
  1 sibling, 0 replies; 31+ messages in thread
From: Alexander Duyck @ 2015-05-05 17:27 UTC (permalink / raw)
  To: intel-wired-lan

On 04/16/2015 05:06 PM, Catherine Sullivan wrote:
> From: Jesse Brandeburg <jesse.brandeburg@intel.com>
>
> Eric added support for skb->xmit_more in i40e, this ports that into i40evf as well.
>
> Support skb->xmit_more in i40evf is straightforward; we need to move
> around i40e_maybe_stop_tx() call to correctly test netif_xmit_stopped()
> before taking the decision to not kick the NIC.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Change-ID: Idddda6a2e4a7ab335631c91ced51f55b25eb8468
> ---

This patch description is confusing.  Maybe you should include and 
indent the original patch description from what you are porting into the 
VF rather than just including the Signed-off-by from the original 
patch.  At first I thought Eric was helping to port the patch and had 
contributed code to the porting effort.  Also Daniel's email address is 
no longer valid so you probably shouldn't be Ccing the message to him.

>   drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 88 ++++++++++++++-------------
>   1 file changed, 47 insertions(+), 41 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
> index e1a44dd..4f77d38 100644
> --- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
> +++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
> @@ -1672,6 +1672,47 @@ linearize_chk_done:
>   }
>   
>   /**
> + * __i40evf_maybe_stop_tx - 2nd level check for tx stop conditions
> + * @tx_ring: the ring to be checked
> + * @size:    the size buffer we want to assure is available
> + *
> + * Returns -EBUSY if a stop is needed, else 0
> + **/
> +static inline int __i40evf_maybe_stop_tx(struct i40e_ring *tx_ring, int size)
> +{
> +	netif_stop_subqueue(tx_ring->netdev, tx_ring->queue_index);
> +	/* Memory barrier before checking head and tail */
> +	smp_mb();
> +
> +	/* Check again in a case another CPU has just made room available. */
> +	if (likely(I40E_DESC_UNUSED(tx_ring) < size))
> +		return -EBUSY;
> +
> +	/* A reprieve! - use start_queue because it doesn't call schedule */
> +	netif_start_subqueue(tx_ring->netdev, tx_ring->queue_index);
> +	++tx_ring->tx_stats.restart_queue;
> +	return 0;
> +}
> +
> +/**
> + * i40evf_maybe_stop_tx - 1st level check for tx stop conditions
> + * @tx_ring: the ring to be checked
> + * @size:    the size buffer we want to assure is available
> + *
> + * Returns 0 if stop is not needed
> + **/
> +#ifdef I40E_FCOE
> +int i40evf_maybe_stop_tx(struct i40e_ring *tx_ring, int size)
> +#else
> +static int i40evf_maybe_stop_tx(struct i40e_ring *tx_ring, int size)
> +#endif
> +{
> +	if (likely(I40E_DESC_UNUSED(tx_ring) >= size))
> +		return 0;
> +	return __i40evf_maybe_stop_tx(tx_ring, size);
> +}
> +
> +/**

I didn't think the VF could do FCoE can it?

>    * i40e_tx_map - Build the Tx descriptor
>    * @tx_ring:  ring to send buffer on
>    * @skb:      send buffer
> @@ -1808,8 +1849,12 @@ static void i40e_tx_map(struct i40e_ring *tx_ring, struct sk_buff *skb,
>   
>   	tx_ring->next_to_use = i;
>   
> +	i40evf_maybe_stop_tx(tx_ring, DESC_NEEDED);
>   	/* notify HW of packet */
> -	writel(i, tx_ring->tail);
> +	if (!skb->xmit_more ||
> +	    netif_xmit_stopped(netdev_get_tx_queue(tx_ring->netdev,
> +						   tx_ring->queue_index)))
> +		writel(i, tx_ring->tail);
>   
>   	return;
>   

You might want to just add a helper macro to take care of all of the 
netdev_get_tx_queue stuff, it would help readability.

> @@ -1831,43 +1876,6 @@ dma_error:
>   }
>   
>   /**
> - * __i40e_maybe_stop_tx - 2nd level check for tx stop conditions
> - * @tx_ring: the ring to be checked
> - * @size:    the size buffer we want to assure is available
> - *
> - * Returns -EBUSY if a stop is needed, else 0
> - **/
> -static inline int __i40e_maybe_stop_tx(struct i40e_ring *tx_ring, int size)
> -{
> -	netif_stop_subqueue(tx_ring->netdev, tx_ring->queue_index);
> -	/* Memory barrier before checking head and tail */
> -	smp_mb();
> -
> -	/* Check again in a case another CPU has just made room available. */
> -	if (likely(I40E_DESC_UNUSED(tx_ring) < size))
> -		return -EBUSY;
> -
> -	/* A reprieve! - use start_queue because it doesn't call schedule */
> -	netif_start_subqueue(tx_ring->netdev, tx_ring->queue_index);
> -	++tx_ring->tx_stats.restart_queue;
> -	return 0;
> -}
> -
> -/**
> - * i40e_maybe_stop_tx - 1st level check for tx stop conditions
> - * @tx_ring: the ring to be checked
> - * @size:    the size buffer we want to assure is available
> - *
> - * Returns 0 if stop is not needed
> - **/
> -static int i40e_maybe_stop_tx(struct i40e_ring *tx_ring, int size)
> -{
> -	if (likely(I40E_DESC_UNUSED(tx_ring) >= size))
> -		return 0;
> -	return __i40e_maybe_stop_tx(tx_ring, size);
> -}
> -
> -/**
>    * i40e_xmit_descriptor_count - calculate number of tx descriptors needed
>    * @skb:     send buffer
>    * @tx_ring: ring to send buffer on
> @@ -1892,7 +1900,7 @@ static int i40e_xmit_descriptor_count(struct sk_buff *skb,
>   		count += TXD_USE_COUNT(skb_shinfo(skb)->frags[f].size);
>   
>   	count += TXD_USE_COUNT(skb_headlen(skb));
> -	if (i40e_maybe_stop_tx(tx_ring, count + 4 + 1)) {
> +	if (i40evf_maybe_stop_tx(tx_ring, count + 4 + 1)) {
>   		tx_ring->tx_stats.tx_busy++;
>   		return 0;
>   	}
> @@ -1968,8 +1976,6 @@ static netdev_tx_t i40e_xmit_frame_ring(struct sk_buff *skb,
>   	i40e_tx_map(tx_ring, skb, first, tx_flags, hdr_len,
>   		    td_cmd, td_offset);
>   
> -	i40e_maybe_stop_tx(tx_ring, DESC_NEEDED);
> -
>   	return NETDEV_TX_OK;
>   
>   out_drop:


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

* [Intel-wired-lan] [net-next S4 07/15] i40evf: restore state
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 07/15] i40evf: restore state Catherine Sullivan
@ 2015-05-05 17:35   ` Young, James M
  0 siblings, 0 replies; 31+ messages in thread
From: Young, James M @ 2015-05-05 17:35 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 Catherine Sullivan
> Sent: Thursday, April 16, 2015 5:06 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [net-next S4 07/15] i40evf: restore state
> 
> From: Mitch Williams <mitch.a.williams@intel.com>
> 
> If the netdev is closed when a reset occurs, the adapter state will be left in
> the RESETTING state incorrectly. Correct this deficiency.
> 
> Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
> Change-ID: Ia0c5bf0449f7c81609f6f646e6b805f030d3360d
> ---
>  drivers/net/ethernet/intel/i40evf/i40evf_main.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

My testing for this patch showed the issue as unresolved.  

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

* [Intel-wired-lan] [net-next S4 01/15] i40e: Collect PFC XOFF RX stats even in single TC case
  2015-04-17  0:05 ` [Intel-wired-lan] [net-next S4 01/15] i40e: Collect PFC XOFF RX stats even in single TC case Catherine Sullivan
@ 2015-05-05 17:44   ` Young, James M
  0 siblings, 0 replies; 31+ messages in thread
From: Young, James M @ 2015-05-05 17:44 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 Catherine Sullivan
> Sent: Thursday, April 16, 2015 5:06 PM
> To: intel-wired-lan at lists.osuosl.org
> Cc: Parikh, Neerav
> Subject: [Intel-wired-lan] [net-next S4 01/15] i40e: Collect PFC XOFF RX stats
> even in single TC case
> 
> From: Neerav Parikh <neerav.parikh@intel.com>
> 
> When PFC is enabled for any UP in single TC configuration the driver didn't
> collect the PFC XOFF RX stats. Though a single TC with PFC enabled is not a
> common scenario do not prevent the driver from collecting stats if firmware
> indicates that PFC is enabled.
> 
> Signed-off-by: Neerav Parikh <neerav.parikh@intel.com>
> Change-ID: Ie20bd58b07608b528f3c6d95894c9ae56b00077a
> ---
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)

Tested-by: Jim Young <james.m.young@intel.com>
	No DCB features tested by my, base driver only, this patch does not affect base driver function.

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

* [Intel-wired-lan] [net-next S4 06/15] i40e/i40evf: Remove unneeded TODO
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 06/15] i40e/i40evf: Remove unneeded TODO Catherine Sullivan
@ 2015-05-05 17:51   ` Young, James M
  0 siblings, 0 replies; 31+ messages in thread
From: Young, James M @ 2015-05-05 17:51 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 Catherine Sullivan
> Sent: Thursday, April 16, 2015 5:06 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [net-next S4 06/15] i40e/i40evf: Remove
> unneeded TODO
> 
> From: Greg Rose <gregory.v.rose@intel.com>
> 
> There's no need for a counter so remove the TODO comment.
> 
> Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
> Change-ID: I3321dda04934c4f5fda9b279ab666192bda44214
> ---
>  drivers/net/ethernet/intel/i40e/i40e_txrx.c   | 3 ---
>  drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 3 ---
>  2 files changed, 6 deletions(-)

Tested-by: Jim Young <james.m.young@intel.com>
	

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

* [Intel-wired-lan] [net-next S4 02/15] i40e: Disable offline diagnostics if VFs are enabled
  2015-04-17  0:05 ` [Intel-wired-lan] [net-next S4 02/15] i40e: Disable offline diagnostics if VFs are enabled Catherine Sullivan
@ 2015-05-05 17:53   ` Young, James M
  0 siblings, 0 replies; 31+ messages in thread
From: Young, James M @ 2015-05-05 17:53 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 Catherine Sullivan
> Sent: Thursday, April 16, 2015 5:06 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [net-next S4 02/15] i40e: Disable offline diagnostics
> if VFs are enabled
> 
> From: Greg Rose <gregory.v.rose@intel.com>
> 
> Require the user to disable virtual functions before running the device offline
> diagnostics.  The offline diagnostics are intended to ensure basic operation of
> the device - it is beyond the scope of the diagnostic test to handle the
> additional complexity of bringing all the virtual functions offline and then
> back online for each test run.
> 
> Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
> Change-ID: Ic0b854851a09fc85df0c9e82c220e45885457c30
> ---
>  drivers/net/ethernet/intel/i40e/i40e_ethtool.c     | 27
> ++++++++++++++++++++++
>  drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c |  7 ++++++
>  2 files changed, 34 insertions(+)

Tested-by: Jim Young <james.m.young@intel.com>
	

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

* [Intel-wired-lan] [net-next S4 05/15] i40e: Remove unnecessary pf members
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 05/15] i40e: Remove unnecessary pf members Catherine Sullivan
@ 2015-05-06 16:33   ` Young, James M
  0 siblings, 0 replies; 31+ messages in thread
From: Young, James M @ 2015-05-06 16:33 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 Catherine Sullivan
> Sent: Thursday, April 16, 2015 5:06 PM
> To: intel-wired-lan at lists.osuosl.org
> Cc: Singhai, Anjali
> Subject: [Intel-wired-lan] [net-next S4 05/15] i40e: Remove unnecessary pf
> members
> 
> From: Anjali Singhai Jain <anjali.singhai@intel.com>
> 
> We can use the stat index macro directly, a variable is not required.
> 
> Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
> Change-ID: I19f08ac16353dc0cd87a1a8248d714e15a54aa8a
> ---
>  drivers/net/ethernet/intel/i40e/i40e.h         |  2 --
>  drivers/net/ethernet/intel/i40e/i40e_ethtool.c |  2 +-
>  drivers/net/ethernet/intel/i40e/i40e_main.c    | 10 ++++------
>  3 files changed, 5 insertions(+), 9 deletions(-)

Tested-by: Jim Young <james.m.young@intel.com>


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

* [Intel-wired-lan] [net-next S4 04/15] i40e/i40evf: Add stats to count Tunnel ATR hits
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 04/15] i40e/i40evf: Add stats to count Tunnel ATR hits Catherine Sullivan
@ 2015-05-08 17:56   ` Young, James M
  0 siblings, 0 replies; 31+ messages in thread
From: Young, James M @ 2015-05-08 17:56 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 Catherine Sullivan
> Sent: Thursday, April 16, 2015 5:06 PM
> To: intel-wired-lan at lists.osuosl.org
> Cc: Singhai, Anjali
> Subject: [Intel-wired-lan] [net-next S4 04/15] i40e/i40evf: Add stats to count
> Tunnel ATR hits
> 
> From: Anjali Singhai Jain <anjali.singhai@intel.com>
> 
> Add a 3rd dynamic filter counter to track Tunneled ATR hits separately.
> Ethtool port stat "fdir_atr_tunnel_match"
> 
> Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
> Change-ID: Idd978b6db2a462b5722397cd2ffd04ef055f8655
> ---
>  drivers/net/ethernet/intel/i40e/i40e.h         |  3 +++
>  drivers/net/ethernet/intel/i40e/i40e_ethtool.c |  1 +
>  drivers/net/ethernet/intel/i40e/i40e_main.c    |  4 ++++
>  drivers/net/ethernet/intel/i40e/i40e_txrx.c    | 13 ++++++++++---
>  drivers/net/ethernet/intel/i40e/i40e_type.h    |  1 +
>  drivers/net/ethernet/intel/i40evf/i40e_type.h  |  1 +
>  6 files changed, 20 insertions(+), 3 deletions(-)
 
Tested-by: Jim Young <james.m.young@intel.com>


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

* [Intel-wired-lan] [net-next S4 03/15] i40e/i40evf: Add ATR support for tunneled TCP/IPv4/IPv6 packets.
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 03/15] i40e/i40evf: Add ATR support for tunneled TCP/IPv4/IPv6 packets Catherine Sullivan
@ 2015-05-08 19:24   ` Young, James M
  0 siblings, 0 replies; 31+ messages in thread
From: Young, James M @ 2015-05-08 19:24 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 Catherine Sullivan
> Sent: Thursday, April 16, 2015 5:06 PM
> To: intel-wired-lan at lists.osuosl.org
> Cc: Singhai, Anjali
> Subject: [Intel-wired-lan] [net-next S4 03/15] i40e/i40evf: Add ATR support
> for tunneled TCP/IPv4/IPv6 packets.
> 
> From: Anjali Singhai Jain <anjali.singhai@intel.com>
> 
> Without this RSS would have done inner header load balancing. Now we can
> get the benefits of ATR for tunneled packets to better align TX and RX
> queues with the right core/interrupt.
> 
> Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Change-ID: I07d0e0a192faf28fdd33b2f04c32b2a82ff97ddd
> ---
>  drivers/net/ethernet/intel/i40e/i40e_txrx.c   | 77 +++++++++++++++--------
> ----
>  drivers/net/ethernet/intel/i40e/i40e_txrx.h   |  1 +
>  drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 34 ++++++------
> drivers/net/ethernet/intel/i40evf/i40e_txrx.h |  1 +
>  4 files changed, 62 insertions(+), 51 deletions(-)

I cannot verify this as a pass since I cannot use netperf or iperf through the vxlan tunnel using IPv6 inner protocol.  Pings do not trigger ATR hits so cannot verify that way. IPv4 iperf and netper do cause hits that advance the count. 


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

* [Intel-wired-lan] [net-next S4 09/15] i40e: Move the FD ATR/SB messages to a higher debug level
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 09/15] i40e: Move the FD ATR/SB messages to a higher debug level Catherine Sullivan
@ 2015-05-09  0:06   ` Young, James M
  0 siblings, 0 replies; 31+ messages in thread
From: Young, James M @ 2015-05-09  0: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 Catherine Sullivan
> Sent: Thursday, April 16, 2015 5:06 PM
> To: intel-wired-lan at lists.osuosl.org
> Cc: Singhai, Anjali
> Subject: [Intel-wired-lan] [net-next S4 09/15] i40e: Move the FD ATR/SB
> messages to a higher debug level
> 
> From: Anjali Singhai Jain <anjali.singhai@intel.com>
> 
> These are not useful unless SV is happening as there is a FD flush counter
> that tracks this.
> 
> Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
> Change-ID: If2655b5a29687247d03a51d35f69854bbeb711ce
> ---
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 18 ++++++++++++------
> drivers/net/ethernet/intel/i40e/i40e_txrx.c |  9 ++++++---
>  2 files changed, 18 insertions(+), 9 deletions(-)

Tested-by: Jim Young <james.m.young@intel.com>


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

* [Intel-wired-lan] [net-next S4 12/15] i40evf: skb->xmit_more support
  2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 12/15] i40evf: skb->xmit_more support Catherine Sullivan
  2015-05-05 17:27   ` Alexander Duyck
@ 2015-05-09  0:21   ` Young, James M
  1 sibling, 0 replies; 31+ messages in thread
From: Young, James M @ 2015-05-09  0:21 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 Catherine Sullivan
> Sent: Thursday, April 16, 2015 5:06 PM
> To: intel-wired-lan at lists.osuosl.org
> Cc: Daniel Borkmann; Eric Dumazet
> Subject: [Intel-wired-lan] [net-next S4 12/15] i40evf: skb->xmit_more
> support
> 
> From: Jesse Brandeburg <jesse.brandeburg@intel.com>
> 
> Eric added support for skb->xmit_more in i40e, this ports that into i40evf as
> well.
> 
> Support skb->xmit_more in i40evf is straightforward; we need to move
> around i40e_maybe_stop_tx() call to correctly test netif_xmit_stopped()
> before taking the decision to not kick the NIC.
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Change-ID: Idddda6a2e4a7ab335631c91ced51f55b25eb8468
> ---
>  drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 88 ++++++++++++++---------
> ----
>  1 file changed, 47 insertions(+), 41 deletions(-)

Tested-by: Jim Young <james.m.young@intel.com>


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

end of thread, other threads:[~2015-05-09  0:21 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-17  0:05 [Intel-wired-lan] [net-next S4 00/15] i40e/i40evf updates Catherine Sullivan
2015-04-17  0:05 ` [Intel-wired-lan] [net-next S4 01/15] i40e: Collect PFC XOFF RX stats even in single TC case Catherine Sullivan
2015-05-05 17:44   ` Young, James M
2015-04-17  0:05 ` [Intel-wired-lan] [net-next S4 02/15] i40e: Disable offline diagnostics if VFs are enabled Catherine Sullivan
2015-05-05 17:53   ` Young, James M
2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 03/15] i40e/i40evf: Add ATR support for tunneled TCP/IPv4/IPv6 packets Catherine Sullivan
2015-05-08 19:24   ` Young, James M
2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 04/15] i40e/i40evf: Add stats to count Tunnel ATR hits Catherine Sullivan
2015-05-08 17:56   ` Young, James M
2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 05/15] i40e: Remove unnecessary pf members Catherine Sullivan
2015-05-06 16:33   ` Young, James M
2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 06/15] i40e/i40evf: Remove unneeded TODO Catherine Sullivan
2015-05-05 17:51   ` Young, James M
2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 07/15] i40evf: restore state Catherine Sullivan
2015-05-05 17:35   ` Young, James M
2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 08/15] i40e: fix unrecognized FCOE EOF case Catherine Sullivan
2015-05-05 16:15   ` Young, James M
2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 09/15] i40e: Move the FD ATR/SB messages to a higher debug level Catherine Sullivan
2015-05-09  0:06   ` Young, James M
2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 10/15] i40e/i40evf: Add stats to track FD ATR and SB dynamic enable state Catherine Sullivan
2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 11/15] i40e/i40evf: Update Flex-10 related device/function capabilities Catherine Sullivan
2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 12/15] i40evf: skb->xmit_more support Catherine Sullivan
2015-05-05 17:27   ` Alexander Duyck
2015-05-09  0:21   ` Young, James M
2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 13/15] i40e/i40evf: force inline transmit functions Catherine Sullivan
2015-05-05 16:12   ` Young, James M
2015-05-05 16:55   ` Alexander Duyck
2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 14/15] i40e/i40evf: remove time_stamp member Catherine Sullivan
2015-04-17  0:06 ` [Intel-wired-lan] [net-next S4 15/15] i40e: Bump version to 1.3.4 Catherine Sullivan
2015-05-05 16:11   ` Young, James M
2015-04-17 18:53 ` [Intel-wired-lan] [net-next S4 00/15] i40e/i40evf updates Jeff Kirsher

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.