netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-07-17
@ 2015-07-17 14:25 Jeff Kirsher
  2015-07-17 14:25 ` [net-next 01/14] clarify implementation of ethtool's get_ts_info op Jeff Kirsher
                   ` (14 more replies)
  0 siblings, 15 replies; 17+ messages in thread
From: Jeff Kirsher @ 2015-07-17 14:25 UTC (permalink / raw)
  To: davem; +Cc: Jeff Kirsher, netdev, nhorman, sassmann, jogreene, john.ronciak

This series contains updates to igb, ixgbe, ixgbevf, i40e, bnx2x,
freescale, siena and dp83640.

Jacob provides several patches to clarify the intended way to implement
both SIOCSHWTSTAMP and ethtool's get_ts_info().  It is okay to support
the specific filters in SIOCSHWTSTAMP by upscaling them to the generic
filters.

Alex Duyck provides a igb patch to pull the time stamp from the fragment
before it gets added to the skb, to avoid a possible issue in which the
fragment can possibly be less than IGB_RX_HDR_LEN due to the time stamp
being pulled after the copybreak check.  Also provides a ixgbevf patch to
fold the ixgbevf_pull_tail() call into ixgbevf_add_rx_frag(), which gives
the advantage that the fragment does not have to be modified after it is
added to the skb.

Fan provides patches for ixgbe/ixgbevf to set the receive hash type
based on receive descriptor RSS type.

Todd provides a fix for igb where on check for link on any media other
than copper was not being detected since it was looking on the incorrect
PHY page (due to the page being used gets switched before the function
to check link gets executed).

The following are changes since commit c15df306fc79c672573f1cc2ebdfcb32d7e68780:
  ipv6: Remove unused arguments for __ipv6_dev_get_saddr().
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue master

Alexander Duyck (2):
  igb: Pull timestamp from fragment before adding it to skb
  ixgbevf: fold ixgbevf_pull_tail into ixgbevf_add_rx_frag

Fan Du (3):
  ixgbe: Specify Rx hash type WRT Rx desc RSS type
  ixgbevf: Set Rx hash type for ingress packets
  ixgbe: Don't report flow director filter's status

Jacob Keller (8):
  clarify implementation of ethtool's get_ts_info op
  freescale: remove incorrect copied comment
  bnx2x: only report most generic filters in get_ts_info
  i40e: only report generic filters in get_ts_info
  igb: only report generic filters in get_ts_info
  ixgbe: only report generic filters in get_ts_info
  siena: only report generic filters in get_ts_info
  dp83640: only report generic filters in ts_info

Todd Fujinaka (1):
  igb: Fix i354 88E1112 PHY on RCC boards using AutoMediaDetect

 Documentation/networking/timestamping.txt          |  7 ++
 .../net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c    | 11 +--
 drivers/net/ethernet/freescale/fec_ptp.c           |  6 --
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c     | 13 +--
 drivers/net/ethernet/intel/igb/e1000_82575.c       | 18 +++--
 drivers/net/ethernet/intel/igb/igb_ethtool.c       |  4 -
 drivers/net/ethernet/intel/igb/igb_main.c          | 94 ++++++----------------
 drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c     |  2 -
 drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c   |  8 --
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c      | 25 +++++-
 drivers/net/ethernet/intel/ixgbevf/defines.h       | 12 +++
 drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c  | 93 +++++++++++----------
 drivers/net/ethernet/sfc/siena.c                   |  6 +-
 drivers/net/phy/dp83640.c                          | 10 +--
 include/uapi/linux/ethtool.h                       |  5 ++
 15 files changed, 134 insertions(+), 180 deletions(-)

-- 
2.4.3

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

* [net-next 01/14] clarify implementation of ethtool's get_ts_info op
  2015-07-17 14:25 [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-07-17 Jeff Kirsher
@ 2015-07-17 14:25 ` Jeff Kirsher
  2015-07-17 19:17   ` Richard Cochran
  2015-07-17 14:25 ` [net-next 02/14] freescale: remove incorrect copied comment Jeff Kirsher
                   ` (13 subsequent siblings)
  14 siblings, 1 reply; 17+ messages in thread
From: Jeff Kirsher @ 2015-07-17 14:25 UTC (permalink / raw)
  To: davem; +Cc: Jacob Keller, netdev, nhorman, sassmann, jogreene, Jeff Kirsher

From: Jacob Keller <jacob.e.keller@intel.com>

This patch adds some clarification about the intended way to implement
both SIOCSHWTSTAMP and ethtool's get_ts_info. The HWTSTAMP API has
several Rx filters which are very specific, as well as more general
filters. The specific filters really only exist to support some broken
hardware which can't fully implement the generic filters. This patch
adds clarification that it is okay to support the specific filters in
SIOCSHWTSTAMP by upscaling them to the generic filters. In addition,
update the header for ethtool_ts_info to specify that drivers ought to
only report the filters they support without upscaling in this manner.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Reviewed-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 Documentation/networking/timestamping.txt | 7 +++++++
 include/uapi/linux/ethtool.h              | 5 +++++
 2 files changed, 12 insertions(+)

diff --git a/Documentation/networking/timestamping.txt b/Documentation/networking/timestamping.txt
index 5f09226..a977339 100644
--- a/Documentation/networking/timestamping.txt
+++ b/Documentation/networking/timestamping.txt
@@ -359,6 +359,13 @@ the requested fine-grained filtering for incoming packets is not
 supported, the driver may time stamp more than just the requested types
 of packets.
 
+Drivers are free to use a more permissive configuration than the requested
+configuration. It is expected that drivers should only implement directly the
+most generic mode that can be supported. For example if the hardware can
+support HWTSTAMP_FILTER_V2_EVENT, then it should generally always upscale
+HWTSTAMP_FILTER_V2_L2_SYNC_MESSAGE, and so forth, as HWTSTAMP_FILTER_V2_EVENT
+is more generic (and more useful to applications).
+
 A driver which supports hardware time stamping shall update the struct
 with the actual, possibly more permissive configuration. If the
 requested packets cannot be time stamped, then nothing should be
diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
index cd67aec..cd16291 100644
--- a/include/uapi/linux/ethtool.h
+++ b/include/uapi/linux/ethtool.h
@@ -1093,6 +1093,11 @@ struct ethtool_sfeatures {
  * the 'hwtstamp_tx_types' and 'hwtstamp_rx_filters' enumeration values,
  * respectively.  For example, if the device supports HWTSTAMP_TX_ON,
  * then (1 << HWTSTAMP_TX_ON) in 'tx_types' will be set.
+ *
+ * Drivers should only report the filters they actually support without
+ * upscaling in the SIOCSHWTSTAMP ioctl. If the SIOCSHWSTAMP request for
+ * HWTSTAMP_FILTER_V1_SYNC is supported by HWTSTAMP_FILTER_V1_EVENT, then the
+ * driver should only report HWTSTAMP_FILTER_V1_EVENT in this op.
  */
 struct ethtool_ts_info {
 	__u32	cmd;
-- 
2.4.3

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

* [net-next 02/14] freescale: remove incorrect copied comment
  2015-07-17 14:25 [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-07-17 Jeff Kirsher
  2015-07-17 14:25 ` [net-next 01/14] clarify implementation of ethtool's get_ts_info op Jeff Kirsher
@ 2015-07-17 14:25 ` Jeff Kirsher
  2015-07-17 14:25 ` [net-next 03/14] bnx2x: only report most generic filters in get_ts_info Jeff Kirsher
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: Jeff Kirsher @ 2015-07-17 14:25 UTC (permalink / raw)
  To: davem
  Cc: Jacob Keller, netdev, nhorman, sassmann, jogreene,
	Pantelis Antoniou, Vitaly Bordug, linuxppc-dev, Jeff Kirsher

From: Jacob Keller <jacob.e.keller@intel.com>

The comment in question is word-for-word copied from ixgbe, and clearly
has no meaning in freescale's driver. (it even says 'return an error'
when the code clearly does not). Remove the comment as it is obviously
incorrect and not applicable to the code as it is today.

CC: Pantelis Antoniou <pantelis.antoniou@gmail.com>
CC: Vitaly Bordug <vbordug@ru.mvista.com>
CC: <linuxppc-dev@lists.ozlabs.org>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/freescale/fec_ptp.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/ethernet/freescale/fec_ptp.c
index a15663a..7a8386a 100644
--- a/drivers/net/ethernet/freescale/fec_ptp.c
+++ b/drivers/net/ethernet/freescale/fec_ptp.c
@@ -506,12 +506,6 @@ int fec_ptp_set(struct net_device *ndev, struct ifreq *ifr)
 		break;
 
 	default:
-		/*
-		 * register RXMTRL must be set in order to do V1 packets,
-		 * therefore it is not possible to time stamp both V1 Sync and
-		 * Delay_Req messages and hardware does not support
-		 * timestamping all packets => return error
-		 */
 		fep->hwts_rx_en = 1;
 		config.rx_filter = HWTSTAMP_FILTER_ALL;
 		break;
-- 
2.4.3

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

* [net-next 03/14] bnx2x: only report most generic filters in get_ts_info
  2015-07-17 14:25 [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-07-17 Jeff Kirsher
  2015-07-17 14:25 ` [net-next 01/14] clarify implementation of ethtool's get_ts_info op Jeff Kirsher
  2015-07-17 14:25 ` [net-next 02/14] freescale: remove incorrect copied comment Jeff Kirsher
@ 2015-07-17 14:25 ` Jeff Kirsher
  2015-07-17 14:25 ` [net-next 04/14] i40e: only report " Jeff Kirsher
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: Jeff Kirsher @ 2015-07-17 14:25 UTC (permalink / raw)
  To: davem
  Cc: Jacob Keller, netdev, nhorman, sassmann, jogreene, Ariel Elior,
	Jeff Kirsher

From: Jacob Keller <jacob.e.keller@intel.com>

CC: Ariel Elior <ariel.elior@qlogic.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
index 76b9052..c783b57 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
@@ -3562,17 +3562,8 @@ static int bnx2x_get_ts_info(struct net_device *dev,
 
 		info->rx_filters = (1 << HWTSTAMP_FILTER_NONE) |
 				   (1 << HWTSTAMP_FILTER_PTP_V1_L4_EVENT) |
-				   (1 << HWTSTAMP_FILTER_PTP_V1_L4_SYNC) |
-				   (1 << HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ) |
 				   (1 << HWTSTAMP_FILTER_PTP_V2_L4_EVENT) |
-				   (1 << HWTSTAMP_FILTER_PTP_V2_L4_SYNC) |
-				   (1 << HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ) |
-				   (1 << HWTSTAMP_FILTER_PTP_V2_L2_EVENT) |
-				   (1 << HWTSTAMP_FILTER_PTP_V2_L2_SYNC) |
-				   (1 << HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ) |
-				   (1 << HWTSTAMP_FILTER_PTP_V2_EVENT) |
-				   (1 << HWTSTAMP_FILTER_PTP_V2_SYNC) |
-				   (1 << HWTSTAMP_FILTER_PTP_V2_DELAY_REQ);
+				   (1 << HWTSTAMP_FILTER_PTP_V2_EVENT);
 
 		info->tx_types = (1 << HWTSTAMP_TX_OFF)|(1 << HWTSTAMP_TX_ON);
 
-- 
2.4.3

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

* [net-next 04/14] i40e: only report generic filters in get_ts_info
  2015-07-17 14:25 [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-07-17 Jeff Kirsher
                   ` (2 preceding siblings ...)
  2015-07-17 14:25 ` [net-next 03/14] bnx2x: only report most generic filters in get_ts_info Jeff Kirsher
@ 2015-07-17 14:25 ` Jeff Kirsher
  2015-07-17 14:25 ` [net-next 05/14] igb: " Jeff Kirsher
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: Jeff Kirsher @ 2015-07-17 14:25 UTC (permalink / raw)
  To: davem; +Cc: Jacob Keller, netdev, nhorman, sassmann, jogreene, Jeff Kirsher

From: Jacob Keller <jacob.e.keller@intel.com>

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index 0b68f61..f2075d5 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -1467,17 +1467,8 @@ static int i40e_get_ts_info(struct net_device *dev,
 	info->tx_types = (1 << HWTSTAMP_TX_OFF) | (1 << HWTSTAMP_TX_ON);
 
 	info->rx_filters = (1 << HWTSTAMP_FILTER_NONE) |
-			   (1 << HWTSTAMP_FILTER_PTP_V1_L4_SYNC) |
-			   (1 << HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ) |
-			   (1 << HWTSTAMP_FILTER_PTP_V2_EVENT) |
-			   (1 << HWTSTAMP_FILTER_PTP_V2_L2_EVENT) |
-			   (1 << HWTSTAMP_FILTER_PTP_V2_L4_EVENT) |
-			   (1 << HWTSTAMP_FILTER_PTP_V2_SYNC) |
-			   (1 << HWTSTAMP_FILTER_PTP_V2_L2_SYNC) |
-			   (1 << HWTSTAMP_FILTER_PTP_V2_L4_SYNC) |
-			   (1 << HWTSTAMP_FILTER_PTP_V2_DELAY_REQ) |
-			   (1 << HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ) |
-			   (1 << HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ);
+			   (1 << HWTSTAMP_FILTER_PTP_V1_L4_EVENT) |
+			   (1 << HWTSTAMP_FILTER_PTP_V2_EVENT);
 
 	return 0;
 }
-- 
2.4.3

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

* [net-next 05/14] igb: only report generic filters in get_ts_info
  2015-07-17 14:25 [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-07-17 Jeff Kirsher
                   ` (3 preceding siblings ...)
  2015-07-17 14:25 ` [net-next 04/14] i40e: only report " Jeff Kirsher
@ 2015-07-17 14:25 ` Jeff Kirsher
  2015-07-17 14:25 ` [net-next 06/14] ixgbe: " Jeff Kirsher
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: Jeff Kirsher @ 2015-07-17 14:25 UTC (permalink / raw)
  To: davem; +Cc: Jacob Keller, netdev, nhorman, sassmann, jogreene, Jeff Kirsher

From: Jacob Keller <jacob.e.keller@intel.com>

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/igb/igb_ethtool.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c
index d5673eb..109cad9 100644
--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
+++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
@@ -2396,10 +2396,6 @@ static int igb_get_ts_info(struct net_device *dev,
 			info->rx_filters |=
 				(1 << HWTSTAMP_FILTER_PTP_V1_L4_SYNC) |
 				(1 << HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ) |
-				(1 << HWTSTAMP_FILTER_PTP_V2_L2_SYNC) |
-				(1 << HWTSTAMP_FILTER_PTP_V2_L4_SYNC) |
-				(1 << HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ) |
-				(1 << HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ) |
 				(1 << HWTSTAMP_FILTER_PTP_V2_EVENT);
 
 		return 0;
-- 
2.4.3

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

* [net-next 06/14] ixgbe: only report generic filters in get_ts_info
  2015-07-17 14:25 [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-07-17 Jeff Kirsher
                   ` (4 preceding siblings ...)
  2015-07-17 14:25 ` [net-next 05/14] igb: " Jeff Kirsher
@ 2015-07-17 14:25 ` Jeff Kirsher
  2015-07-17 14:25 ` [net-next 07/14] siena: " Jeff Kirsher
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: Jeff Kirsher @ 2015-07-17 14:25 UTC (permalink / raw)
  To: davem; +Cc: Jacob Keller, netdev, nhorman, sassmann, jogreene, Jeff Kirsher

From: Jacob Keller <jacob.e.keller@intel.com>

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
index ec7b232..f7aeb56 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
@@ -2938,14 +2938,6 @@ static int ixgbe_get_ts_info(struct net_device *dev,
 			(1 << HWTSTAMP_FILTER_NONE) |
 			(1 << HWTSTAMP_FILTER_PTP_V1_L4_SYNC) |
 			(1 << HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ) |
-			(1 << HWTSTAMP_FILTER_PTP_V2_L2_EVENT) |
-			(1 << HWTSTAMP_FILTER_PTP_V2_L4_EVENT) |
-			(1 << HWTSTAMP_FILTER_PTP_V2_SYNC) |
-			(1 << HWTSTAMP_FILTER_PTP_V2_L2_SYNC) |
-			(1 << HWTSTAMP_FILTER_PTP_V2_L4_SYNC) |
-			(1 << HWTSTAMP_FILTER_PTP_V2_DELAY_REQ) |
-			(1 << HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ) |
-			(1 << HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ) |
 			(1 << HWTSTAMP_FILTER_PTP_V2_EVENT);
 		break;
 	default:
-- 
2.4.3

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

* [net-next 07/14] siena: only report generic filters in get_ts_info
  2015-07-17 14:25 [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-07-17 Jeff Kirsher
                   ` (5 preceding siblings ...)
  2015-07-17 14:25 ` [net-next 06/14] ixgbe: " Jeff Kirsher
@ 2015-07-17 14:25 ` Jeff Kirsher
  2015-07-17 14:25 ` [net-next 08/14] dp83640: only report generic filters in ts_info Jeff Kirsher
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: Jeff Kirsher @ 2015-07-17 14:25 UTC (permalink / raw)
  To: davem
  Cc: Jacob Keller, netdev, nhorman, sassmann, jogreene,
	Solarflare linux maintainers, Shradha Shah, Jeff Kirsher

From: Jacob Keller <jacob.e.keller@intel.com>

CC: Solarflare linux maintainers <linux-net-drivers@solarflare.com>
CC: Shradha Shah <sshah@solarflare.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/sfc/siena.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/sfc/siena.c b/drivers/net/ethernet/sfc/siena.c
index b323b91..b2f886d 100644
--- a/drivers/net/ethernet/sfc/siena.c
+++ b/drivers/net/ethernet/sfc/siena.c
@@ -1042,9 +1042,5 @@ const struct efx_nic_type siena_a0_nic_type = {
 	.max_rx_ip_filters = FR_BZ_RX_FILTER_TBL0_ROWS,
 	.hwtstamp_filters = (1 << HWTSTAMP_FILTER_NONE |
 			     1 << HWTSTAMP_FILTER_PTP_V1_L4_EVENT |
-			     1 << HWTSTAMP_FILTER_PTP_V1_L4_SYNC |
-			     1 << HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ |
-			     1 << HWTSTAMP_FILTER_PTP_V2_L4_EVENT |
-			     1 << HWTSTAMP_FILTER_PTP_V2_L4_SYNC |
-			     1 << HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ),
+			     1 << HWTSTAMP_FILTER_PTP_V2_L4_EVENT),
 };
-- 
2.4.3

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

* [net-next 08/14] dp83640: only report generic filters in ts_info
  2015-07-17 14:25 [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-07-17 Jeff Kirsher
                   ` (6 preceding siblings ...)
  2015-07-17 14:25 ` [net-next 07/14] siena: " Jeff Kirsher
@ 2015-07-17 14:25 ` Jeff Kirsher
  2015-07-17 14:25 ` [net-next 09/14] igb: Pull timestamp from fragment before adding it to skb Jeff Kirsher
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: Jeff Kirsher @ 2015-07-17 14:25 UTC (permalink / raw)
  To: davem
  Cc: Jacob Keller, netdev, nhorman, sassmann, jogreene,
	Richard Cochran, Jeff Kirsher

From: Jacob Keller <jacob.e.keller@intel.com>

CC: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/phy/dp83640.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c
index 00cb41e..185b03c 100644
--- a/drivers/net/phy/dp83640.c
+++ b/drivers/net/phy/dp83640.c
@@ -1449,17 +1449,9 @@ static int dp83640_ts_info(struct phy_device *dev, struct ethtool_ts_info *info)
 	info->rx_filters =
 		(1 << HWTSTAMP_FILTER_NONE) |
 		(1 << HWTSTAMP_FILTER_PTP_V1_L4_EVENT) |
-		(1 << HWTSTAMP_FILTER_PTP_V1_L4_SYNC) |
-		(1 << HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ) |
 		(1 << HWTSTAMP_FILTER_PTP_V2_L4_EVENT) |
-		(1 << HWTSTAMP_FILTER_PTP_V2_L4_SYNC) |
-		(1 << HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ) |
 		(1 << HWTSTAMP_FILTER_PTP_V2_L2_EVENT) |
-		(1 << HWTSTAMP_FILTER_PTP_V2_L2_SYNC) |
-		(1 << HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ) |
-		(1 << HWTSTAMP_FILTER_PTP_V2_EVENT) |
-		(1 << HWTSTAMP_FILTER_PTP_V2_SYNC) |
-		(1 << HWTSTAMP_FILTER_PTP_V2_DELAY_REQ);
+		(1 << HWTSTAMP_FILTER_PTP_V2_EVENT);
 	return 0;
 }
 
-- 
2.4.3

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

* [net-next 09/14] igb: Pull timestamp from fragment before adding it to skb
  2015-07-17 14:25 [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-07-17 Jeff Kirsher
                   ` (7 preceding siblings ...)
  2015-07-17 14:25 ` [net-next 08/14] dp83640: only report generic filters in ts_info Jeff Kirsher
@ 2015-07-17 14:25 ` Jeff Kirsher
  2015-07-17 14:25 ` [net-next 10/14] ixgbevf: fold ixgbevf_pull_tail into ixgbevf_add_rx_frag Jeff Kirsher
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: Jeff Kirsher @ 2015-07-17 14:25 UTC (permalink / raw)
  To: davem; +Cc: Alexander Duyck, netdev, nhorman, sassmann, jogreene,
	Jeff Kirsher

From: Alexander Duyck <alexander.h.duyck@redhat.com>

This change makes it so that we pull the timestamp from the fragment before
we add it to the skb.  By doing this we can avoid a possible issue in which
the fragment can possibly be less than IGB_RX_HDR_LEN due to the timestamp
being pulled after the copybreak check.

While making this change I realized we could also pull the rest of the
igb_pull_tail function into igb_add_rx_frag since in the case of igb,
unlike ixgbe, we are able to unmap the entire buffer before calling
add_rx_frag so merging the two allows for sharing of code between the two
merged functions.

Reported-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/igb/igb_main.c | 94 ++++++++-----------------------
 1 file changed, 25 insertions(+), 69 deletions(-)

diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 2f70a9b..fc7729e 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -6621,22 +6621,25 @@ static bool igb_add_rx_frag(struct igb_ring *rx_ring,
 			    struct sk_buff *skb)
 {
 	struct page *page = rx_buffer->page;
+	unsigned char *va = page_address(page) + rx_buffer->page_offset;
 	unsigned int size = le16_to_cpu(rx_desc->wb.upper.length);
 #if (PAGE_SIZE < 8192)
 	unsigned int truesize = IGB_RX_BUFSZ;
 #else
-	unsigned int truesize = ALIGN(size, L1_CACHE_BYTES);
+	unsigned int truesize = SKB_DATA_ALIGN(size);
 #endif
+	unsigned int pull_len;
 
-	if ((size <= IGB_RX_HDR_LEN) && !skb_is_nonlinear(skb)) {
-		unsigned char *va = page_address(page) + rx_buffer->page_offset;
+	if (unlikely(skb_is_nonlinear(skb)))
+		goto add_tail_frag;
 
-		if (igb_test_staterr(rx_desc, E1000_RXDADV_STAT_TSIP)) {
-			igb_ptp_rx_pktstamp(rx_ring->q_vector, va, skb);
-			va += IGB_TS_HDR_LEN;
-			size -= IGB_TS_HDR_LEN;
-		}
+	if (unlikely(igb_test_staterr(rx_desc, E1000_RXDADV_STAT_TSIP))) {
+		igb_ptp_rx_pktstamp(rx_ring->q_vector, va, skb);
+		va += IGB_TS_HDR_LEN;
+		size -= IGB_TS_HDR_LEN;
+	}
 
+	if (likely(size <= IGB_RX_HDR_LEN)) {
 		memcpy(__skb_put(skb, size), va, ALIGN(size, sizeof(long)));
 
 		/* page is not reserved, we can reuse buffer as-is */
@@ -6648,8 +6651,21 @@ static bool igb_add_rx_frag(struct igb_ring *rx_ring,
 		return false;
 	}
 
+	/* we need the header to contain the greater of either ETH_HLEN or
+	 * 60 bytes if the skb->len is less than 60 for skb_pad.
+	 */
+	pull_len = eth_get_headlen(va, IGB_RX_HDR_LEN);
+
+	/* align pull length to size of long to optimize memcpy performance */
+	memcpy(__skb_put(skb, pull_len), va, ALIGN(pull_len, sizeof(long)));
+
+	/* update all of the pointers */
+	va += pull_len;
+	size -= pull_len;
+
+add_tail_frag:
 	skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags, page,
-			rx_buffer->page_offset, size, truesize);
+			(unsigned long)va & ~PAGE_MASK, size, truesize);
 
 	return igb_can_reuse_rx_page(rx_buffer, page, truesize);
 }
@@ -6791,62 +6807,6 @@ static bool igb_is_non_eop(struct igb_ring *rx_ring,
 }
 
 /**
- *  igb_pull_tail - igb specific version of skb_pull_tail
- *  @rx_ring: rx descriptor ring packet is being transacted on
- *  @rx_desc: pointer to the EOP Rx descriptor
- *  @skb: pointer to current skb being adjusted
- *
- *  This function is an igb specific version of __pskb_pull_tail.  The
- *  main difference between this version and the original function is that
- *  this function can make several assumptions about the state of things
- *  that allow for significant optimizations versus the standard function.
- *  As a result we can do things like drop a frag and maintain an accurate
- *  truesize for the skb.
- */
-static void igb_pull_tail(struct igb_ring *rx_ring,
-			  union e1000_adv_rx_desc *rx_desc,
-			  struct sk_buff *skb)
-{
-	struct skb_frag_struct *frag = &skb_shinfo(skb)->frags[0];
-	unsigned char *va;
-	unsigned int pull_len;
-
-	/* it is valid to use page_address instead of kmap since we are
-	 * working with pages allocated out of the lomem pool per
-	 * alloc_page(GFP_ATOMIC)
-	 */
-	va = skb_frag_address(frag);
-
-	if (igb_test_staterr(rx_desc, E1000_RXDADV_STAT_TSIP)) {
-		/* retrieve timestamp from buffer */
-		igb_ptp_rx_pktstamp(rx_ring->q_vector, va, skb);
-
-		/* update pointers to remove timestamp header */
-		skb_frag_size_sub(frag, IGB_TS_HDR_LEN);
-		frag->page_offset += IGB_TS_HDR_LEN;
-		skb->data_len -= IGB_TS_HDR_LEN;
-		skb->len -= IGB_TS_HDR_LEN;
-
-		/* move va to start of packet data */
-		va += IGB_TS_HDR_LEN;
-	}
-
-	/* we need the header to contain the greater of either ETH_HLEN or
-	 * 60 bytes if the skb->len is less than 60 for skb_pad.
-	 */
-	pull_len = eth_get_headlen(va, IGB_RX_HDR_LEN);
-
-	/* align pull length to size of long to optimize memcpy performance */
-	skb_copy_to_linear_data(skb, va, ALIGN(pull_len, sizeof(long)));
-
-	/* update all of the pointers */
-	skb_frag_size_sub(frag, pull_len);
-	frag->page_offset += pull_len;
-	skb->data_len -= pull_len;
-	skb->tail += pull_len;
-}
-
-/**
  *  igb_cleanup_headers - Correct corrupted or empty headers
  *  @rx_ring: rx descriptor ring packet is being transacted on
  *  @rx_desc: pointer to the EOP Rx descriptor
@@ -6873,10 +6833,6 @@ static bool igb_cleanup_headers(struct igb_ring *rx_ring,
 		}
 	}
 
-	/* place header in linear portion of buffer */
-	if (skb_is_nonlinear(skb))
-		igb_pull_tail(rx_ring, rx_desc, skb);
-
 	/* if eth_skb_pad returns an error the skb was freed */
 	if (eth_skb_pad(skb))
 		return true;
-- 
2.4.3

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

* [net-next 10/14] ixgbevf: fold ixgbevf_pull_tail into ixgbevf_add_rx_frag
  2015-07-17 14:25 [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-07-17 Jeff Kirsher
                   ` (8 preceding siblings ...)
  2015-07-17 14:25 ` [net-next 09/14] igb: Pull timestamp from fragment before adding it to skb Jeff Kirsher
@ 2015-07-17 14:25 ` Jeff Kirsher
  2015-07-17 14:25 ` [net-next 11/14] ixgbe: Specify Rx hash type WRT Rx desc RSS type Jeff Kirsher
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: Jeff Kirsher @ 2015-07-17 14:25 UTC (permalink / raw)
  To: davem; +Cc: Alexander Duyck, netdev, nhorman, sassmann, jogreene,
	Jeff Kirsher

From: Alexander Duyck <alexander.h.duyck@redhat.com>

This change folds the ixgbevf_pull_tail call into ixgbevf_add_rx_frag.  The
advantage to doing this is that the fragment doesn't have to be modified
after it is added to the skb.

Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 66 +++++++----------------
 1 file changed, 19 insertions(+), 47 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index e71cdde..acfa051 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -649,46 +649,6 @@ static void ixgbevf_alloc_rx_buffers(struct ixgbevf_ring *rx_ring,
 }
 
 /**
- * ixgbevf_pull_tail - ixgbevf specific version of skb_pull_tail
- * @rx_ring: rx descriptor ring packet is being transacted on
- * @skb: pointer to current skb being adjusted
- *
- * This function is an ixgbevf specific version of __pskb_pull_tail.  The
- * main difference between this version and the original function is that
- * this function can make several assumptions about the state of things
- * that allow for significant optimizations versus the standard function.
- * As a result we can do things like drop a frag and maintain an accurate
- * truesize for the skb.
- **/
-static void ixgbevf_pull_tail(struct ixgbevf_ring *rx_ring,
-			      struct sk_buff *skb)
-{
-	struct skb_frag_struct *frag = &skb_shinfo(skb)->frags[0];
-	unsigned char *va;
-	unsigned int pull_len;
-
-	/* it is valid to use page_address instead of kmap since we are
-	 * working with pages allocated out of the lomem pool per
-	 * alloc_page(GFP_ATOMIC)
-	 */
-	va = skb_frag_address(frag);
-
-	/* we need the header to contain the greater of either ETH_HLEN or
-	 * 60 bytes if the skb->len is less than 60 for skb_pad.
-	 */
-	pull_len = eth_get_headlen(va, IXGBEVF_RX_HDR_SIZE);
-
-	/* align pull length to size of long to optimize memcpy performance */
-	skb_copy_to_linear_data(skb, va, ALIGN(pull_len, sizeof(long)));
-
-	/* update all of the pointers */
-	skb_frag_size_sub(frag, pull_len);
-	frag->page_offset += pull_len;
-	skb->data_len -= pull_len;
-	skb->tail += pull_len;
-}
-
-/**
  * ixgbevf_cleanup_headers - Correct corrupted or empty headers
  * @rx_ring: rx descriptor ring packet is being transacted on
  * @rx_desc: pointer to the EOP Rx descriptor
@@ -721,10 +681,6 @@ static bool ixgbevf_cleanup_headers(struct ixgbevf_ring *rx_ring,
 		}
 	}
 
-	/* place header in linear portion of buffer */
-	if (skb_is_nonlinear(skb))
-		ixgbevf_pull_tail(rx_ring, skb);
-
 	/* if eth_skb_pad returns an error the skb was freed */
 	if (eth_skb_pad(skb))
 		return true;
@@ -789,16 +745,19 @@ static bool ixgbevf_add_rx_frag(struct ixgbevf_ring *rx_ring,
 				struct sk_buff *skb)
 {
 	struct page *page = rx_buffer->page;
+	unsigned char *va = page_address(page) + rx_buffer->page_offset;
 	unsigned int size = le16_to_cpu(rx_desc->wb.upper.length);
 #if (PAGE_SIZE < 8192)
 	unsigned int truesize = IXGBEVF_RX_BUFSZ;
 #else
 	unsigned int truesize = ALIGN(size, L1_CACHE_BYTES);
 #endif
+	unsigned int pull_len;
 
-	if ((size <= IXGBEVF_RX_HDR_SIZE) && !skb_is_nonlinear(skb)) {
-		unsigned char *va = page_address(page) + rx_buffer->page_offset;
+	if (unlikely(skb_is_nonlinear(skb)))
+		goto add_tail_frag;
 
+	if (likely(size <= IXGBEVF_RX_HDR_SIZE)) {
 		memcpy(__skb_put(skb, size), va, ALIGN(size, sizeof(long)));
 
 		/* page is not reserved, we can reuse buffer as is */
@@ -810,8 +769,21 @@ static bool ixgbevf_add_rx_frag(struct ixgbevf_ring *rx_ring,
 		return false;
 	}
 
+	/* we need the header to contain the greater of either ETH_HLEN or
+	 * 60 bytes if the skb->len is less than 60 for skb_pad.
+	 */
+	pull_len = eth_get_headlen(va, IXGBEVF_RX_HDR_SIZE);
+
+	/* align pull length to size of long to optimize memcpy performance */
+	memcpy(__skb_put(skb, pull_len), va, ALIGN(pull_len, sizeof(long)));
+
+	/* update all of the pointers */
+	va += pull_len;
+	size -= pull_len;
+
+add_tail_frag:
 	skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags, page,
-			rx_buffer->page_offset, size, truesize);
+			(unsigned long)va & ~PAGE_MASK, size, truesize);
 
 	/* avoid re-using remote pages */
 	if (unlikely(ixgbevf_page_is_reserved(page)))
-- 
2.4.3

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

* [net-next 11/14] ixgbe: Specify Rx hash type WRT Rx desc RSS type
  2015-07-17 14:25 [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-07-17 Jeff Kirsher
                   ` (9 preceding siblings ...)
  2015-07-17 14:25 ` [net-next 10/14] ixgbevf: fold ixgbevf_pull_tail into ixgbevf_add_rx_frag Jeff Kirsher
@ 2015-07-17 14:25 ` Jeff Kirsher
  2015-07-17 14:25 ` [net-next 12/14] ixgbevf: Set Rx hash type for ingress packets Jeff Kirsher
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: Jeff Kirsher @ 2015-07-17 14:25 UTC (permalink / raw)
  To: davem; +Cc: Fan Du, netdev, nhorman, sassmann, jogreene, Jeff Kirsher

From: Fan Du <fan.du@intel.com>

RSS could be leveraged by taking account L4 src/dst ports
as ingredients, thus ingress skb Rx hash type should honor
such the real configuration.

Signed-off-by: Fan Du <fan.du@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 25 +++++++++++++++++++++----
 1 file changed, 21 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 9aa6104..3e6a931 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -1360,14 +1360,31 @@ static int __ixgbe_notify_dca(struct device *dev, void *data)
 }
 
 #endif /* CONFIG_IXGBE_DCA */
+
+#define IXGBE_RSS_L4_TYPES_MASK \
+	((1ul << IXGBE_RXDADV_RSSTYPE_IPV4_TCP) | \
+	 (1ul << IXGBE_RXDADV_RSSTYPE_IPV4_UDP) | \
+	 (1ul << IXGBE_RXDADV_RSSTYPE_IPV6_TCP) | \
+	 (1ul << IXGBE_RXDADV_RSSTYPE_IPV6_UDP))
+
 static inline void ixgbe_rx_hash(struct ixgbe_ring *ring,
 				 union ixgbe_adv_rx_desc *rx_desc,
 				 struct sk_buff *skb)
 {
-	if (ring->netdev->features & NETIF_F_RXHASH)
-		skb_set_hash(skb,
-			     le32_to_cpu(rx_desc->wb.lower.hi_dword.rss),
-			     PKT_HASH_TYPE_L3);
+	u16 rss_type;
+
+	if (!(ring->netdev->features & NETIF_F_RXHASH))
+		return;
+
+	rss_type = le16_to_cpu(rx_desc->wb.lower.lo_dword.hs_rss.pkt_info) &
+		   IXGBE_RXDADV_RSSTYPE_MASK;
+
+	if (!rss_type)
+		return;
+
+	skb_set_hash(skb, le32_to_cpu(rx_desc->wb.lower.hi_dword.rss),
+		     (IXGBE_RSS_L4_TYPES_MASK & (1ul << rss_type)) ?
+		     PKT_HASH_TYPE_L4 : PKT_HASH_TYPE_L3);
 }
 
 #ifdef IXGBE_FCOE
-- 
2.4.3

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

* [net-next 12/14] ixgbevf: Set Rx hash type for ingress packets
  2015-07-17 14:25 [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-07-17 Jeff Kirsher
                   ` (10 preceding siblings ...)
  2015-07-17 14:25 ` [net-next 11/14] ixgbe: Specify Rx hash type WRT Rx desc RSS type Jeff Kirsher
@ 2015-07-17 14:25 ` Jeff Kirsher
  2015-07-17 14:25 ` [net-next 13/14] ixgbe: Don't report flow director filter's status Jeff Kirsher
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: Jeff Kirsher @ 2015-07-17 14:25 UTC (permalink / raw)
  To: davem; +Cc: Fan Du, netdev, nhorman, sassmann, jogreene, Jeff Kirsher

From: Fan Du <fan.du@intel.com>

Set hash type for ingress packets according to NIC
advanced receive descriptors RSS type part.

Signed-off-by: Fan Du <fan.du@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/ixgbevf/defines.h      | 12 ++++++++++
 drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 27 +++++++++++++++++++++++
 2 files changed, 39 insertions(+)

diff --git a/drivers/net/ethernet/intel/ixgbevf/defines.h b/drivers/net/ethernet/intel/ixgbevf/defines.h
index 770e21a..5843458 100644
--- a/drivers/net/ethernet/intel/ixgbevf/defines.h
+++ b/drivers/net/ethernet/intel/ixgbevf/defines.h
@@ -161,6 +161,18 @@ typedef u32 ixgbe_link_speed;
 #define IXGBE_RXDADV_SPLITHEADER_EN	0x00001000
 #define IXGBE_RXDADV_SPH		0x8000
 
+/* RSS Hash results */
+#define IXGBE_RXDADV_RSSTYPE_NONE		0x00000000
+#define IXGBE_RXDADV_RSSTYPE_IPV4_TCP		0x00000001
+#define IXGBE_RXDADV_RSSTYPE_IPV4		0x00000002
+#define IXGBE_RXDADV_RSSTYPE_IPV6_TCP		0x00000003
+#define IXGBE_RXDADV_RSSTYPE_IPV6_EX		0x00000004
+#define IXGBE_RXDADV_RSSTYPE_IPV6		0x00000005
+#define IXGBE_RXDADV_RSSTYPE_IPV6_TCP_EX	0x00000006
+#define IXGBE_RXDADV_RSSTYPE_IPV4_UDP		0x00000007
+#define IXGBE_RXDADV_RSSTYPE_IPV6_UDP		0x00000008
+#define IXGBE_RXDADV_RSSTYPE_IPV6_UDP_EX	0x00000009
+
 #define IXGBE_RXD_ERR_FRAME_ERR_MASK ( \
 				      IXGBE_RXD_ERR_CE |  \
 				      IXGBE_RXD_ERR_LE |  \
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index acfa051..b2c86f1 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -457,6 +457,32 @@ static void ixgbevf_rx_skb(struct ixgbevf_q_vector *q_vector,
 	napi_gro_receive(&q_vector->napi, skb);
 }
 
+#define IXGBE_RSS_L4_TYPES_MASK \
+	((1ul << IXGBE_RXDADV_RSSTYPE_IPV4_TCP) | \
+	 (1ul << IXGBE_RXDADV_RSSTYPE_IPV4_UDP) | \
+	 (1ul << IXGBE_RXDADV_RSSTYPE_IPV6_TCP) | \
+	 (1ul << IXGBE_RXDADV_RSSTYPE_IPV6_UDP))
+
+static inline void ixgbevf_rx_hash(struct ixgbevf_ring *ring,
+				   union ixgbe_adv_rx_desc *rx_desc,
+				   struct sk_buff *skb)
+{
+	u16 rss_type;
+
+	if (!(ring->netdev->features & NETIF_F_RXHASH))
+		return;
+
+	rss_type = le16_to_cpu(rx_desc->wb.lower.lo_dword.hs_rss.pkt_info) &
+		   IXGBE_RXDADV_RSSTYPE_MASK;
+
+	if (!rss_type)
+		return;
+
+	skb_set_hash(skb, le32_to_cpu(rx_desc->wb.lower.hi_dword.rss),
+		     (IXGBE_RSS_L4_TYPES_MASK & (1ul << rss_type)) ?
+		     PKT_HASH_TYPE_L4 : PKT_HASH_TYPE_L3);
+}
+
 /**
  * ixgbevf_rx_checksum - indicate in skb if hw indicated a good cksum
  * @ring: structure containig ring specific data
@@ -506,6 +532,7 @@ static void ixgbevf_process_skb_fields(struct ixgbevf_ring *rx_ring,
 				       union ixgbe_adv_rx_desc *rx_desc,
 				       struct sk_buff *skb)
 {
+	ixgbevf_rx_hash(rx_ring, rx_desc, skb);
 	ixgbevf_rx_checksum(rx_ring, rx_desc, skb);
 
 	if (ixgbevf_test_staterr(rx_desc, IXGBE_RXD_STAT_VP)) {
-- 
2.4.3

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

* [net-next 13/14] ixgbe: Don't report flow director filter's status
  2015-07-17 14:25 [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-07-17 Jeff Kirsher
                   ` (11 preceding siblings ...)
  2015-07-17 14:25 ` [net-next 12/14] ixgbevf: Set Rx hash type for ingress packets Jeff Kirsher
@ 2015-07-17 14:25 ` Jeff Kirsher
  2015-07-17 14:25 ` [net-next 14/14] igb: Fix i354 88E1112 PHY on RCC boards using AutoMediaDetect Jeff Kirsher
  2015-07-21  3:50 ` [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-07-17 David Miller
  14 siblings, 0 replies; 17+ messages in thread
From: Jeff Kirsher @ 2015-07-17 14:25 UTC (permalink / raw)
  To: davem; +Cc: Fan Du, netdev, nhorman, sassmann, jogreene, Jeff Kirsher

From: Fan Du <fan.du@intel.com>

For two reasons I want to disable this:
1. Not any part actually check the report status(Alexander Duyck)
2. To report hash value of a packet to stack,
   RSS -> 32bits hash value
   Perfect match fdir filter -> 13bits hash value
   Hashed-based fdir filter -> 31bits hash value

   fdir filter might hash on masked tuples for IP address,
   so it's still not desirable for usage.

So for now, just stick to RSS 32bits hash value.

Signed-off-by: Fan Du <fan.du@intel.com>
Suggested-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c
index 6b87d96..b1e364d 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c
@@ -1394,14 +1394,12 @@ s32 ixgbe_init_fdir_perfect_82599(struct ixgbe_hw *hw, u32 fdirctrl)
 	/*
 	 * Continue setup of fdirctrl register bits:
 	 *  Turn perfect match filtering on
-	 *  Report hash in RSS field of Rx wb descriptor
 	 *  Initialize the drop queue
 	 *  Move the flexible bytes to use the ethertype - shift 6 words
 	 *  Set the maximum length per hash bucket to 0xA filters
 	 *  Send interrupt when 64 (0x4 * 16) filters are left
 	 */
 	fdirctrl |= IXGBE_FDIRCTRL_PERFECT_MATCH |
-		    IXGBE_FDIRCTRL_REPORT_STATUS |
 		    (IXGBE_FDIR_DROP_QUEUE << IXGBE_FDIRCTRL_DROP_Q_SHIFT) |
 		    (0x6 << IXGBE_FDIRCTRL_FLEX_SHIFT) |
 		    (0xA << IXGBE_FDIRCTRL_MAX_LENGTH_SHIFT) |
-- 
2.4.3

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

* [net-next 14/14] igb: Fix i354 88E1112 PHY on RCC boards using AutoMediaDetect
  2015-07-17 14:25 [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-07-17 Jeff Kirsher
                   ` (12 preceding siblings ...)
  2015-07-17 14:25 ` [net-next 13/14] ixgbe: Don't report flow director filter's status Jeff Kirsher
@ 2015-07-17 14:25 ` Jeff Kirsher
  2015-07-21  3:50 ` [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-07-17 David Miller
  14 siblings, 0 replies; 17+ messages in thread
From: Jeff Kirsher @ 2015-07-17 14:25 UTC (permalink / raw)
  To: davem; +Cc: Todd Fujinaka, netdev, nhorman, sassmann, jogreene, Jeff Kirsher

From: Todd Fujinaka <todd.fujinaka@intel.com>

e1000_check_for_link_media_swap() checks PHY page 0 for copper and PHY
page 1 for "other" (fiber) link. The switch back from page 1 to page 0
happened too soon, before e1000_check_for_link_82575() is executed, and
link on fiber (other) was never detected. Check for link while still on
the proper PHY page.

Signed-off-by: Todd Fujinaka <todd.fujinaka@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/igb/e1000_82575.c | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/intel/igb/e1000_82575.c b/drivers/net/ethernet/intel/igb/e1000_82575.c
index b0182dd..d192569 100644
--- a/drivers/net/ethernet/intel/igb/e1000_82575.c
+++ b/drivers/net/ethernet/intel/igb/e1000_82575.c
@@ -139,10 +139,6 @@ static s32 igb_check_for_link_media_swap(struct e1000_hw *hw)
 	if (ret_val)
 		return ret_val;
 
-	/* reset page to 0 */
-	ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 0);
-	if (ret_val)
-		return ret_val;
 
 	if (data & E1000_M88E1112_STATUS_LINK)
 		port = E1000_MEDIA_PORT_OTHER;
@@ -151,8 +147,20 @@ static s32 igb_check_for_link_media_swap(struct e1000_hw *hw)
 	if (port && (hw->dev_spec._82575.media_port != port)) {
 		hw->dev_spec._82575.media_port = port;
 		hw->dev_spec._82575.media_changed = true;
+	}
+
+	if (port == E1000_MEDIA_PORT_COPPER) {
+		/* reset page to 0 */
+		ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 0);
+		if (ret_val)
+			return ret_val;
+		igb_check_for_link_82575(hw);
 	} else {
-		ret_val = igb_check_for_link_82575(hw);
+		igb_check_for_link_82575(hw);
+		/* reset page to 0 */
+		ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 0);
+		if (ret_val)
+			return ret_val;
 	}
 
 	return 0;
-- 
2.4.3

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

* Re: [net-next 01/14] clarify implementation of ethtool's get_ts_info op
  2015-07-17 14:25 ` [net-next 01/14] clarify implementation of ethtool's get_ts_info op Jeff Kirsher
@ 2015-07-17 19:17   ` Richard Cochran
  0 siblings, 0 replies; 17+ messages in thread
From: Richard Cochran @ 2015-07-17 19:17 UTC (permalink / raw)
  To: Jeff Kirsher; +Cc: davem, Jacob Keller, netdev, nhorman, sassmann, jogreene

On Fri, Jul 17, 2015 at 07:25:10AM -0700, Jeff Kirsher wrote:
> From: Jacob Keller <jacob.e.keller@intel.com>
> 
> This patch adds some clarification about the intended way to implement
> both SIOCSHWTSTAMP and ethtool's get_ts_info. The HWTSTAMP API has
> several Rx filters which are very specific, as well as more general
> filters. The specific filters really only exist to support some broken
> hardware which can't fully implement the generic filters. This patch
> adds clarification that it is okay to support the specific filters in
> SIOCSHWTSTAMP by upscaling them to the generic filters. In addition,
> update the header for ethtool_ts_info to specify that drivers ought to
> only report the filters they support without upscaling in this manner.

Acked-by: Richard Cochran <richardcochran@gmail.com>

(for this patch and the other get_ts_info patches)

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

* Re: [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-07-17
  2015-07-17 14:25 [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-07-17 Jeff Kirsher
                   ` (13 preceding siblings ...)
  2015-07-17 14:25 ` [net-next 14/14] igb: Fix i354 88E1112 PHY on RCC boards using AutoMediaDetect Jeff Kirsher
@ 2015-07-21  3:50 ` David Miller
  14 siblings, 0 replies; 17+ messages in thread
From: David Miller @ 2015-07-21  3:50 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, nhorman, sassmann, jogreene, john.ronciak

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Fri, 17 Jul 2015 07:25:09 -0700

> This series contains updates to igb, ixgbe, ixgbevf, i40e, bnx2x,
> freescale, siena and dp83640.
> 
> Jacob provides several patches to clarify the intended way to implement
> both SIOCSHWTSTAMP and ethtool's get_ts_info().  It is okay to support
> the specific filters in SIOCSHWTSTAMP by upscaling them to the generic
> filters.
> 
> Alex Duyck provides a igb patch to pull the time stamp from the fragment
> before it gets added to the skb, to avoid a possible issue in which the
> fragment can possibly be less than IGB_RX_HDR_LEN due to the time stamp
> being pulled after the copybreak check.  Also provides a ixgbevf patch to
> fold the ixgbevf_pull_tail() call into ixgbevf_add_rx_frag(), which gives
> the advantage that the fragment does not have to be modified after it is
> added to the skb.
> 
> Fan provides patches for ixgbe/ixgbevf to set the receive hash type
> based on receive descriptor RSS type.
> 
> Todd provides a fix for igb where on check for link on any media other
> than copper was not being detected since it was looking on the incorrect
> PHY page (due to the page being used gets switched before the function
> to check link gets executed).

Pulled, thanks a lot Jeff.

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

end of thread, other threads:[~2015-07-21  3:50 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-17 14:25 [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-07-17 Jeff Kirsher
2015-07-17 14:25 ` [net-next 01/14] clarify implementation of ethtool's get_ts_info op Jeff Kirsher
2015-07-17 19:17   ` Richard Cochran
2015-07-17 14:25 ` [net-next 02/14] freescale: remove incorrect copied comment Jeff Kirsher
2015-07-17 14:25 ` [net-next 03/14] bnx2x: only report most generic filters in get_ts_info Jeff Kirsher
2015-07-17 14:25 ` [net-next 04/14] i40e: only report " Jeff Kirsher
2015-07-17 14:25 ` [net-next 05/14] igb: " Jeff Kirsher
2015-07-17 14:25 ` [net-next 06/14] ixgbe: " Jeff Kirsher
2015-07-17 14:25 ` [net-next 07/14] siena: " Jeff Kirsher
2015-07-17 14:25 ` [net-next 08/14] dp83640: only report generic filters in ts_info Jeff Kirsher
2015-07-17 14:25 ` [net-next 09/14] igb: Pull timestamp from fragment before adding it to skb Jeff Kirsher
2015-07-17 14:25 ` [net-next 10/14] ixgbevf: fold ixgbevf_pull_tail into ixgbevf_add_rx_frag Jeff Kirsher
2015-07-17 14:25 ` [net-next 11/14] ixgbe: Specify Rx hash type WRT Rx desc RSS type Jeff Kirsher
2015-07-17 14:25 ` [net-next 12/14] ixgbevf: Set Rx hash type for ingress packets Jeff Kirsher
2015-07-17 14:25 ` [net-next 13/14] ixgbe: Don't report flow director filter's status Jeff Kirsher
2015-07-17 14:25 ` [net-next 14/14] igb: Fix i354 88E1112 PHY on RCC boards using AutoMediaDetect Jeff Kirsher
2015-07-21  3:50 ` [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-07-17 David Miller

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