diff --git a/.ethtool.metadata b/.ethtool.metadata
new file mode 100644
index 0000000..4ab498b
--- /dev/null
+++ b/.ethtool.metadata
@@ -0,0 +1 @@
+db82313f212aa1e1b8f5f892f25a9883bea26b9f SOURCES/ethtool-4.8.tar.xz
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..8a95788
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+SOURCES/ethtool-4.8.tar.xz
diff --git a/SOURCES/0001-ethtool-add-register-dump-support-for-fjes-driver.patch b/SOURCES/0001-ethtool-add-register-dump-support-for-fjes-driver.patch
new file mode 100644
index 0000000..c0010e4
--- /dev/null
+++ b/SOURCES/0001-ethtool-add-register-dump-support-for-fjes-driver.patch
@@ -0,0 +1,174 @@
+From 1be465a88eb247b78ddbc3129f53cc547ce8687b Mon Sep 17 00:00:00 2001
+From: Taku Izumi <izumi.taku@jp.fujitsu.com>
+Date: Wed, 16 Nov 2016 09:55:32 +0900
+Subject: [PATCH 1/3] ethtool: add register dump support for fjes driver
+
+This patch adds the register dump format for FUJITSU Extended
+Network device like the following:
+
+   # ethtool -d es0
+
+0x0000: OWNER_EPID    (Owner EPID)                       0x00000001
+0x0004: MAX_EP        (Maximum EP)                       0x00000008
+0x0010: DCTL          (Device Control)                   0x00000000
+0x0020: CR            (Command request)                  0x80000002
+0x0024: CS            (Command status)                   0x80000002
+0x0028: SHSTSAL       (Share status address Low)         0xE8215304
+0x002C: SHSTSAH       (Share status address High)        0x00000007
+0x0034: REQBL         (Request Buffer length)            0x00008028
+0x0038: REQBAL        (Request Buffer Address Low)       0xEB0A0000
+0x003C: REQBAH        (Request Buffer Address High)      0x00000007
+0x0044: RESPBL        (Response Buffer Length)           0x00000018
+0x0048: RESPBAL       (Response Buffer Address Low)      0xE41E1220
+0x004C: RESPBAH       (Response Buffer Address High)     0x00000007
+0x0080: IS            (Interrupt status)                 0x00000000
+0x0084: IMS           (Interrupt mask set)               0x7FE00000
+0x0088: IMC           (Interrupt mask clear)             0x001F0000
+0x008C: IG            (Interrupt generator)              0x00010000
+0x0090: ICTL          (Interrupt control)                0x00000000
+
+Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+(cherry picked from commit acc3d3a32940cdd3325520d212fa94f44b86ed09)
+---
+ Makefile.am |  2 +-
+ ethtool.c   |  1 +
+ fjes.c      | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ internal.h  |  2 ++
+ 4 files changed, 93 insertions(+), 1 deletion(-)
+ create mode 100644 fjes.c
+
+diff --git a/Makefile.am b/Makefile.am
+index de2db2e..edbda57 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -14,7 +14,7 @@ ethtool_SOURCES += \
+ 		  pcnet32.c realtek.c tg3.c marvell.c vioc.c	\
+ 		  smsc911x.c at76c50x-usb.c sfc.c stmmac.c	\
+ 		  sff-common.c sff-common.h sfpid.c sfpdiag.c	\
+-		  ixgbevf.c tse.c vmxnet3.c qsfp.c qsfp.h
++		  ixgbevf.c tse.c vmxnet3.c qsfp.c qsfp.h fjes.c
+ endif
+ 
+ TESTS = test-cmdline test-features
+diff --git a/ethtool.c b/ethtool.c
+index 49ac94e..75299c6 100644
+--- a/ethtool.c
++++ b/ethtool.c
+@@ -1136,6 +1136,7 @@ static const struct {
+ 	{ "et131x", et131x_dump_regs },
+ 	{ "altera_tse", altera_tse_dump_regs },
+ 	{ "vmxnet3", vmxnet3_dump_regs },
++	{ "fjes", fjes_dump_regs },
+ #endif
+ };
+ 
+diff --git a/fjes.c b/fjes.c
+new file mode 100644
+index 0000000..52f7c28
+--- /dev/null
++++ b/fjes.c
+@@ -0,0 +1,89 @@
++/* Copyright (c) 2016 FUJITSU LIMITED */
++#include <stdio.h>
++#include "internal.h"
++
++int fjes_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs)
++{
++	u32 *regs_buff = (u32 *)regs->data;
++
++	if (regs->version != 1)
++		return -1;
++
++	/* Information registers */
++	fprintf(stdout,
++		"0x0000: OWNER_EPID    (Owner EPID)                       0x%08X\n",
++		regs_buff[0]);
++
++	fprintf(stdout,
++		"0x0004: MAX_EP        (Maximum EP)                       0x%08X\n",
++		regs_buff[1]);
++
++	/* Device Control registers */
++	fprintf(stdout,
++		"0x0010: DCTL          (Device Control)                   0x%08X\n",
++		regs_buff[4]);
++
++	/* Command Control registers */
++	fprintf(stdout,
++		"0x0020: CR            (Command request)                  0x%08X\n",
++		regs_buff[8]);
++
++	fprintf(stdout,
++		"0x0024: CS            (Command status)                   0x%08X\n",
++		regs_buff[9]);
++
++	fprintf(stdout,
++		"0x0028: SHSTSAL       (Share status address Low)         0x%08X\n",
++		regs_buff[10]);
++
++	fprintf(stdout,
++		"0x002C: SHSTSAH       (Share status address High)        0x%08X\n",
++		regs_buff[11]);
++
++	fprintf(stdout,
++		"0x0034: REQBL         (Request Buffer length)            0x%08X\n",
++		regs_buff[13]);
++
++	fprintf(stdout,
++		"0x0038: REQBAL        (Request Buffer Address Low)       0x%08X\n",
++		regs_buff[14]);
++
++	fprintf(stdout,
++		"0x003C: REQBAH        (Request Buffer Address High)      0x%08X\n",
++		regs_buff[15]);
++
++	fprintf(stdout,
++		"0x0044: RESPBL        (Response Buffer Length)           0x%08X\n",
++		regs_buff[17]);
++
++	fprintf(stdout,
++		"0x0048: RESPBAL       (Response Buffer Address Low)      0x%08X\n",
++		regs_buff[18]);
++
++	fprintf(stdout,
++		"0x004C: RESPBAH       (Response Buffer Address High)     0x%08X\n",
++		regs_buff[19]);
++
++	/* Interrupt Control registers */
++	fprintf(stdout,
++		"0x0080: IS            (Interrupt status)                 0x%08X\n",
++		regs_buff[32]);
++
++	fprintf(stdout,
++		"0x0084: IMS           (Interrupt mask set)               0x%08X\n",
++		regs_buff[33]);
++
++	fprintf(stdout,
++		"0x0088: IMC           (Interrupt mask clear)             0x%08X\n",
++		regs_buff[34]);
++
++	fprintf(stdout,
++		"0x008C: IG            (Interrupt generator)              0x%08X\n",
++		regs_buff[35]);
++
++	fprintf(stdout,
++		"0x0090: ICTL          (Interrupt control)                0x%08X\n",
++		regs_buff[36]);
++
++	return 0;
++}
+diff --git a/internal.h b/internal.h
+index 3c08b74..4e658ea 100644
+--- a/internal.h
++++ b/internal.h
+@@ -348,4 +348,6 @@ void sff8472_show_all(const __u8 *id);
+ /* QSFP Optics diagnostics */
+ void sff8636_show_all(const __u8 *id, __u32 eeprom_len);
+ 
++/* FUJITSU Extended Socket network device */
++int fjes_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
+ #endif /* ETHTOOL_INTERNAL_H__ */
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0002-ethtool-sync-help-output-for-x-X-with-man-page.patch b/SOURCES/0002-ethtool-sync-help-output-for-x-X-with-man-page.patch
new file mode 100644
index 0000000..17cb755
--- /dev/null
+++ b/SOURCES/0002-ethtool-sync-help-output-for-x-X-with-man-page.patch
@@ -0,0 +1,34 @@
+From d695f60666453d964a653c5033764c4b80121f56 Mon Sep 17 00:00:00 2001
+From: Ivan Vecera <cera@cera.cz>
+Date: Mon, 20 Feb 2017 15:13:52 +0100
+Subject: [PATCH 2/3] ethtool: sync help output for -x/-X with man page
+
+Add missing words to the help output for -x and -X commands as well
+as an ability to set the indirection table to default value.
+
+Signed-off-by: Ivan Vecera <cera@cera.cz>
+---
+ ethtool.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/ethtool.c b/ethtool.c
+index 75299c6..0d3244e 100644
+--- a/ethtool.c
++++ b/ethtool.c
+@@ -4645,10 +4645,10 @@ static const struct option {
+ 	{ "-T|--show-time-stamping", 1, do_tsinfo,
+ 	  "Show time stamping capabilities" },
+ 	{ "-x|--show-rxfh-indir|--show-rxfh", 1, do_grxfh,
+-	  "Show Rx flow hash indirection and/or hash key" },
++	  "Show Rx flow hash indirection table and/or RSS hash key" },
+ 	{ "-X|--set-rxfh-indir|--rxfh", 1, do_srxfh,
+-	  "Set Rx flow hash indirection and/or hash key",
+-	  "		[ equal N | weight W0 W1 ... ]\n"
++	  "Set Rx flow hash indirection table and/or RSS hash key",
++	  "		[ equal N | weight W0 W1 ... | default ]\n"
+ 	  "		[ hkey %x:%x:%x:%x:%x:.... ]\n" },
+ 	{ "-f|--flash", 1, do_flash,
+ 	  "Flash firmware image from the specified file to a region on the device",
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0003-ethtool-Fix-the-advertise-parameter-logic.patch b/SOURCES/0003-ethtool-Fix-the-advertise-parameter-logic.patch
new file mode 100644
index 0000000..8f47dc2
--- /dev/null
+++ b/SOURCES/0003-ethtool-Fix-the-advertise-parameter-logic.patch
@@ -0,0 +1,44 @@
+From 47b95959941b3d7d2d35a128da5685799329aaf6 Mon Sep 17 00:00:00 2001
+From: Michael Chan <mchan@broadcom.com>
+Date: Tue, 22 Nov 2016 18:55:47 -0500
+Subject: [PATCH 3/3] ethtool: Fix the "advertise" parameter logic.
+
+The current code ignores the value of the advertise parameter.  For example,
+
+ethtool -s ethx advertise 0x1000
+
+The full_advertising_wanted parameter of 0x1000 is not passed to the kernel.
+The reason is that advertising_wanted is NULL in this case, and ethtool
+will think that the user has given no advertisement input and so it will
+proceed to pass all supported advertisement speeds to the kernel.
+
+The older legacy ethtool with similar logic worked because
+advertising_wanted was an integer and could take on -1 and 0.  It would pass
+the full_advertising_wanted value if advertising_wanted == -1.
+
+This fix is to pass all supported advertisement speeds only when both
+advertising_wanted == NULL && full_advertising_wanted == NULL.
+
+Signed-off-by: Michael Chan <michael.chan@broadcom.com>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+---
+ ethtool.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/ethtool.c b/ethtool.c
+index 0d3244e..ce48639 100644
+--- a/ethtool.c
++++ b/ethtool.c
+@@ -2972,7 +2972,8 @@ static int do_sset(struct cmd_context *ctx)
+ 				fprintf(stderr,	"\n");
+ 			}
+ 			if (autoneg_wanted == AUTONEG_ENABLE &&
+-			    advertising_wanted == NULL) {
++			    advertising_wanted == NULL &&
++			    full_advertising_wanted == NULL) {
+ 				unsigned int i;
+ 
+ 				/* Auto negotiation enabled, but with
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0004-ethtool-Fix-SFF-8079-cable-technology-bit-parsing.patch b/SOURCES/0004-ethtool-Fix-SFF-8079-cable-technology-bit-parsing.patch
new file mode 100644
index 0000000..9c67185
--- /dev/null
+++ b/SOURCES/0004-ethtool-Fix-SFF-8079-cable-technology-bit-parsing.patch
@@ -0,0 +1,36 @@
+From 51f9fba287ff7c8b10e0d5291cd66e78d40b6b8f Mon Sep 17 00:00:00 2001
+From: Gal Pressman <galp@mellanox.com>
+Date: Sun, 19 Mar 2017 14:10:41 +0200
+Subject: [PATCH 4/7] ethtool: Fix SFF 8079 cable technology bit parsing
+
+According to the transceiver compliance code definition in the spec, bits
+2 & 3 in the 8th byte are indication of active/passive cable, and not
+specifically related to FC/copper.
+
+Fixes: 2edf56749abe ("ethtool: Addition of -m option to dump module eeprom")
+Signed-off-by: Gal Pressman <galp@mellanox.com>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+(cherry picked from commit e33c8841f26090031d571fddd71dab06f56ab1bf)
+---
+ sfpid.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/sfpid.c b/sfpid.c
+index fd6415c..1732e5e 100644
+--- a/sfpid.c
++++ b/sfpid.c
+@@ -137,9 +137,9 @@ static void sff8079_show_transceiver(const __u8 *id)
+ 	if (id[8] & (1 << 4))
+ 		printf("%s FC: Longwave laser (LL)\n", pfx);
+ 	if (id[8] & (1 << 3))
+-		printf("%s FC: Copper Active\n", pfx);
++		printf("%s Active Cable\n", pfx);
+ 	if (id[8] & (1 << 2))
+-		printf("%s FC: Copper Passive\n", pfx);
++		printf("%s Passive Cable\n", pfx);
+ 	if (id[8] & (1 << 1))
+ 		printf("%s FC: Copper FC-BaseT\n", pfx);
+ 	/* Fibre Channel transmission media */
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0005-ethtool-Support-for-configurable-RSS-hash-function.patch b/SOURCES/0005-ethtool-Support-for-configurable-RSS-hash-function.patch
new file mode 100644
index 0000000..7020ab2
--- /dev/null
+++ b/SOURCES/0005-ethtool-Support-for-configurable-RSS-hash-function.patch
@@ -0,0 +1,188 @@
+From e89f3c656ff17741aa3ea33c57bc177afedc999b Mon Sep 17 00:00:00 2001
+From: Gal Pressman <galp@mellanox.com>
+Date: Wed, 8 Mar 2017 16:03:51 +0200
+Subject: [PATCH 5/7] ethtool: Support for configurable RSS hash function
+
+This ethtool patch adds support to set and get the current RSS hash
+function for the device through the new hfunc mask field in the
+ethtool_rxfh struct. Kernel supported hash function names are queried
+with ETHTOOL_GSTRINGS - each string is corresponding with a bit in hfunc
+mask according to its index in the string-set.
+
+(This corrects the mistaken revert from commit 126464e4da182064. -- JWL)
+
+Signed-off-by: Eyal Perry <eyalpe@mellanox.com>
+Signed-off-by: Gal Pressman <galp@mellanox.com>
+Reviewed-by: Saeed Mahameed <saeedm@mellanox.com>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+(cherry picked from commit b888f358763a20625a381e071ea50524a520c7c1)
+---
+ ethtool.8.in |  6 ++++++
+ ethtool.c    | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
+ 2 files changed, 69 insertions(+), 3 deletions(-)
+
+diff --git a/ethtool.8.in b/ethtool.8.in
+index 9631847..b69c5c6 100644
+--- a/ethtool.8.in
++++ b/ethtool.8.in
+@@ -301,6 +301,8 @@ ethtool \- query or control network driver and hardware settings
+ .BI weight\  W0
+ .IR W1
+ .RB ...\ | \ default \ ]
++.RB [ hfunc
++.IR FUNC ]
+ .HP
+ .B ethtool \-f|\-\-flash
+ .I devname file
+@@ -853,6 +855,10 @@ Sets RSS hash key of the specified network device. RSS hash key should be of dev
+ Hash key format must be in xx:yy:zz:aa:bb:cc format meaning both the nibbles of a byte should be mentioned
+ even if a nibble is zero.
+ .TP
++.BI hfunc
++Sets RSS hash function of the specified network device.
++List of RSS hash functions which kernel supports is shown as a part of the --show-rxfh command output.
++.TP
+ .BI equal\  N
+ Sets the receive flow hash indirection table to spread flows evenly
+ between the first \fIN\fR receive queues.
+diff --git a/ethtool.c b/ethtool.c
+index ce48639..8eba6e6 100644
+--- a/ethtool.c
++++ b/ethtool.c
+@@ -3640,6 +3640,7 @@ static int do_grxfhindir(struct cmd_context *ctx,
+ 
+ static int do_grxfh(struct cmd_context *ctx)
+ {
++	struct ethtool_gstrings *hfuncs = NULL;
+ 	struct ethtool_rxfh rss_head = {0};
+ 	struct ethtool_rxnfc ring_count;
+ 	struct ethtool_rxfh *rss;
+@@ -3697,6 +3698,26 @@ static int do_grxfh(struct cmd_context *ctx)
+ 			printf("%02x:", (u8) hkey[i]);
+ 	}
+ 
++	printf("RSS hash function:\n");
++	if (!rss->hfunc) {
++		printf("    Operation not supported\n");
++		goto out;
++	}
++
++	hfuncs = get_stringset(ctx, ETH_SS_RSS_HASH_FUNCS, 0, 1);
++	if (!hfuncs) {
++		perror("Cannot get hash functions names");
++		free(rss);
++		return 1;
++	}
++
++	for (i = 0; i < hfuncs->len; i++)
++		printf("    %s: %s\n",
++		       (const char *)hfuncs->data + i * ETH_GSTRING_LEN,
++		       (rss->hfunc & (1 << i)) ? "on" : "off");
++
++out:
++	free(hfuncs);
+ 	free(rss);
+ 	return 0;
+ }
+@@ -3800,11 +3821,16 @@ static int do_srxfh(struct cmd_context *ctx)
+ 	struct ethtool_rxfh *rss;
+ 	struct ethtool_rxnfc ring_count;
+ 	int rxfhindir_equal = 0, rxfhindir_default = 0;
++	struct ethtool_gstrings *hfuncs = NULL;
+ 	char **rxfhindir_weight = NULL;
+ 	char *rxfhindir_key = NULL;
++	char *req_hfunc_name = NULL;
++	char *hfunc_name = NULL;
+ 	char *hkey = NULL;
+ 	int err = 0;
++	int i;
+ 	u32 arg_num = 0, indir_bytes = 0;
++	u32 req_hfunc = 0;
+ 	u32 entry_size = sizeof(rss_head.rss_config[0]);
+ 	u32 num_weights = 0;
+ 
+@@ -3836,6 +3862,12 @@ static int do_srxfh(struct cmd_context *ctx)
+ 		} else if (!strcmp(ctx->argp[arg_num], "default")) {
+ 			++arg_num;
+ 			rxfhindir_default = 1;
++		} else if (!strcmp(ctx->argp[arg_num], "hfunc")) {
++			++arg_num;
++			req_hfunc_name = ctx->argp[arg_num];
++			if (!req_hfunc_name)
++				exit_bad_args();
++			++arg_num;
+ 		} else {
+ 			exit_bad_args();
+ 		}
+@@ -3868,7 +3900,8 @@ static int do_srxfh(struct cmd_context *ctx)
+ 
+ 	rss_head.cmd = ETHTOOL_GRSSH;
+ 	err = send_ioctl(ctx, &rss_head);
+-	if (err < 0 && errno == EOPNOTSUPP && !rxfhindir_key) {
++	if (err < 0 && errno == EOPNOTSUPP && !rxfhindir_key &&
++	    !req_hfunc_name) {
+ 		return do_srxfhindir(ctx, rxfhindir_default, rxfhindir_equal,
+ 				     rxfhindir_weight, num_weights);
+ 	} else if (err < 0) {
+@@ -3886,14 +3919,39 @@ static int do_srxfh(struct cmd_context *ctx)
+ 	if (rxfhindir_equal || rxfhindir_weight)
+ 		indir_bytes = rss_head.indir_size * entry_size;
+ 
++	if (rss_head.hfunc && req_hfunc_name) {
++		hfuncs = get_stringset(ctx, ETH_SS_RSS_HASH_FUNCS, 0, 1);
++		if (!hfuncs) {
++			perror("Cannot get hash functions names");
++			return 1;
++		}
++
++		for (i = 0; i < hfuncs->len && !req_hfunc ; i++) {
++			hfunc_name = (char *)(hfuncs->data +
++					      i * ETH_GSTRING_LEN);
++			if (!strncmp(hfunc_name, req_hfunc_name,
++				     ETH_GSTRING_LEN))
++				req_hfunc = (u32)1 << i;
++		}
++
++		if (!req_hfunc) {
++			fprintf(stderr,
++				"Unknown hash function: %s\n", req_hfunc_name);
++			free(hfuncs);
++			return 1;
++		}
++	}
++
+ 	rss = calloc(1, sizeof(*rss) + indir_bytes + rss_head.key_size);
+ 	if (!rss) {
+ 		perror("Cannot allocate memory for RX flow hash config");
+-		return 1;
++		err = 1;
++		goto free;
+ 	}
+ 	rss->cmd = ETHTOOL_SRSSH;
+ 	rss->indir_size = rss_head.indir_size;
+ 	rss->key_size = rss_head.key_size;
++	rss->hfunc = req_hfunc;
+ 
+ 	if (fill_indir_table(&rss->indir_size, rss->rss_config, rxfhindir_default,
+ 			     rxfhindir_equal, rxfhindir_weight, num_weights)) {
+@@ -3918,6 +3976,7 @@ free:
+ 		free(hkey);
+ 
+ 	free(rss);
++	free(hfuncs);
+ 	return err;
+ }
+ 
+@@ -4650,7 +4709,8 @@ static const struct option {
+ 	{ "-X|--set-rxfh-indir|--rxfh", 1, do_srxfh,
+ 	  "Set Rx flow hash indirection table and/or RSS hash key",
+ 	  "		[ equal N | weight W0 W1 ... | default ]\n"
+-	  "		[ hkey %x:%x:%x:%x:%x:.... ]\n" },
++	  "		[ hkey %x:%x:%x:%x:%x:.... ]\n"
++	  "		[ hfunc FUNC ]\n" },
+ 	{ "-f|--flash", 1, do_flash,
+ 	  "Flash firmware image from the specified file to a region on the device",
+ 	  "               FILENAME [ REGION-NUMBER-TO-FLASH ]\n" },
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0006-net_tstamp.h-sync-with-net-next.patch b/SOURCES/0006-net_tstamp.h-sync-with-net-next.patch
new file mode 100644
index 0000000..8a3f21d
--- /dev/null
+++ b/SOURCES/0006-net_tstamp.h-sync-with-net-next.patch
@@ -0,0 +1,129 @@
+From 13e8c7b8c8537488bc7612c11c429cec274db1f9 Mon Sep 17 00:00:00 2001
+From: Miroslav Lichvar <mlichvar@redhat.com>
+Date: Tue, 23 May 2017 16:29:29 +0200
+Subject: [PATCH 6/7] net_tstamp.h: sync with net-next
+
+This covers kernel changes up to:
+
+commit b50a5c70ffa4fd6b6da324ab54c84adf48fb17d9
+Author: Miroslav Lichvar <mlichvar@redhat.com>
+Date:   Fri May 19 17:52:40 2017 +0200
+
+    net: allow simultaneous SW and HW transmit timestamping
+
+    Add SOF_TIMESTAMPING_OPT_TX_SWHW option to allow an outgoing packet to
+    be looped to the socket's error queue with a software timestamp even
+    when a hardware transmit timestamp is expected to be provided by the
+    driver.
+
+    Applications using this option will receive two separate messages from
+    the error queue, one with a software timestamp and the other with a
+    hardware timestamp. As the hardware timestamp is saved to the shared skb
+    info, which may happen before the first message with software timestamp
+    is received by the application, the hardware timestamp is copied to the
+    SCM_TIMESTAMPING control message only when the skb has no software
+    timestamp or it is an incoming packet.
+
+    While changing sw_tx_timestamp(), inline it in skb_tx_timestamp() as
+    there are no other users.
+
+    CC: Richard Cochran <richardcochran@gmail.com>
+    CC: Willem de Bruijn <willemb@google.com>
+    Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
+    Acked-by: Willem de Bruijn <willemb@google.com>
+    Signed-off-by: David S. Miller <davem@davemloft.net>
+
+CC: Richard Cochran <richardcochran@gmail.com>
+Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+(cherry picked from commit ba800e3b4acd0692fc16013acbab2c3ac1ecfe66)
+---
+ net_tstamp-copy.h | 52 +++++++++++++++++++++++++++++++++++++++++-----------
+ 1 file changed, 41 insertions(+), 11 deletions(-)
+
+diff --git a/net_tstamp-copy.h b/net_tstamp-copy.h
+index ae5df12..3d421d9 100644
+--- a/net_tstamp-copy.h
++++ b/net_tstamp-copy.h
+@@ -9,6 +9,7 @@
+ #ifndef _NET_TIMESTAMPING_H
+ #define _NET_TIMESTAMPING_H
+ 
++#include <linux/types.h>
+ #include <linux/socket.h>   /* for SO_TIMESTAMPING */
+ 
+ /* SO_TIMESTAMPING gets an integer bit field comprised of these values */
+@@ -20,23 +21,42 @@ enum {
+ 	SOF_TIMESTAMPING_SOFTWARE = (1<<4),
+ 	SOF_TIMESTAMPING_SYS_HARDWARE = (1<<5),
+ 	SOF_TIMESTAMPING_RAW_HARDWARE = (1<<6),
+-	SOF_TIMESTAMPING_MASK =
+-	(SOF_TIMESTAMPING_RAW_HARDWARE - 1) |
+-	SOF_TIMESTAMPING_RAW_HARDWARE
++	SOF_TIMESTAMPING_OPT_ID = (1<<7),
++	SOF_TIMESTAMPING_TX_SCHED = (1<<8),
++	SOF_TIMESTAMPING_TX_ACK = (1<<9),
++	SOF_TIMESTAMPING_OPT_CMSG = (1<<10),
++	SOF_TIMESTAMPING_OPT_TSONLY = (1<<11),
++	SOF_TIMESTAMPING_OPT_STATS = (1<<12),
++	SOF_TIMESTAMPING_OPT_PKTINFO = (1<<13),
++	SOF_TIMESTAMPING_OPT_TX_SWHW = (1<<14),
++
++	SOF_TIMESTAMPING_LAST = SOF_TIMESTAMPING_OPT_TX_SWHW,
++	SOF_TIMESTAMPING_MASK = (SOF_TIMESTAMPING_LAST - 1) |
++				 SOF_TIMESTAMPING_LAST
+ };
+ 
++/*
++ * SO_TIMESTAMPING flags are either for recording a packet timestamp or for
++ * reporting the timestamp to user space.
++ * Recording flags can be set both via socket options and control messages.
++ */
++#define SOF_TIMESTAMPING_TX_RECORD_MASK	(SOF_TIMESTAMPING_TX_HARDWARE | \
++					 SOF_TIMESTAMPING_TX_SOFTWARE | \
++					 SOF_TIMESTAMPING_TX_SCHED | \
++					 SOF_TIMESTAMPING_TX_ACK)
++
+ /**
+- * struct hwtstamp_config - %SIOCSHWTSTAMP parameter
++ * struct hwtstamp_config - %SIOCGHWTSTAMP and %SIOCSHWTSTAMP parameter
+  *
+- * @flags:	no flags defined right now, must be zero
++ * @flags:	no flags defined right now, must be zero for %SIOCSHWTSTAMP
+  * @tx_type:	one of HWTSTAMP_TX_*
+- * @rx_type:	one of one of HWTSTAMP_FILTER_*
++ * @rx_filter:	one of HWTSTAMP_FILTER_*
+  *
+- * %SIOCSHWTSTAMP expects a &struct ifreq with a ifr_data pointer to
+- * this structure. dev_ifsioc() in the kernel takes care of the
+- * translation between 32 bit userspace and 64 bit kernel. The
+- * structure is intentionally chosen so that it has the same layout on
+- * 32 and 64 bit systems, don't break this!
++ * %SIOCGHWTSTAMP and %SIOCSHWTSTAMP expect a &struct ifreq with a
++ * ifr_data pointer to this structure.  For %SIOCSHWTSTAMP, if the
++ * driver or hardware does not support the requested @rx_filter value,
++ * the driver may use a more general filter mode.  In this case
++ * @rx_filter will indicate the actual mode on return.
+  */
+ struct hwtstamp_config {
+ 	int flags;
+@@ -108,6 +128,16 @@ enum hwtstamp_rx_filters {
+ 	HWTSTAMP_FILTER_PTP_V2_SYNC,
+ 	/* PTP v2/802.AS1, any layer, Delay_req packet */
+ 	HWTSTAMP_FILTER_PTP_V2_DELAY_REQ,
++
++	/* NTP, UDP, all versions and packet modes */
++	HWTSTAMP_FILTER_NTP_ALL,
++};
++
++/* SCM_TIMESTAMPING_PKTINFO control message */
++struct scm_ts_pktinfo {
++	__u32 if_index;
++	__u32 pkt_length;
++	__u32 reserved[2];
+ };
+ 
+ #endif /* _NET_TIMESTAMPING_H */
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0007-ethtool-add-support-for-HWTSTAMP_FILTER_NTP_ALL.patch b/SOURCES/0007-ethtool-add-support-for-HWTSTAMP_FILTER_NTP_ALL.patch
new file mode 100644
index 0000000..3bb7ff3
--- /dev/null
+++ b/SOURCES/0007-ethtool-add-support-for-HWTSTAMP_FILTER_NTP_ALL.patch
@@ -0,0 +1,40 @@
+From ee10917f5cb60f8602deac815ec9923258fa6ab2 Mon Sep 17 00:00:00 2001
+From: Miroslav Lichvar <mlichvar@redhat.com>
+Date: Tue, 23 May 2017 16:29:30 +0200
+Subject: [PATCH 7/7] ethtool: add support for HWTSTAMP_FILTER_NTP_ALL
+
+Add HWTSTAMP_FILTER_NTP_ALL to the list of hardware receive
+filters which can be printed by ethtool -T.
+
+CC: Richard Cochran <richardcochran@gmail.com>
+Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+(cherry picked from commit d976d5dada4e58d3fdc31506943307159289493a)
+---
+ ethtool.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/ethtool.c b/ethtool.c
+index 8eba6e6..5465f59 100644
+--- a/ethtool.c
++++ b/ethtool.c
+@@ -1583,7 +1583,7 @@ static char *tx_type_labels[N_TX_TYPES] = {
+ 	"one-step-sync         (HWTSTAMP_TX_ONESTEP_SYNC)",
+ };
+ 
+-#define N_RX_FILTERS (HWTSTAMP_FILTER_PTP_V2_DELAY_REQ + 1)
++#define N_RX_FILTERS (HWTSTAMP_FILTER_NTP_ALL + 1)
+ 
+ static char *rx_filter_labels[N_RX_FILTERS] = {
+ 	"none                  (HWTSTAMP_FILTER_NONE)",
+@@ -1601,6 +1601,7 @@ static char *rx_filter_labels[N_RX_FILTERS] = {
+ 	"ptpv2-event           (HWTSTAMP_FILTER_PTP_V2_EVENT)",
+ 	"ptpv2-sync            (HWTSTAMP_FILTER_PTP_V2_SYNC)",
+ 	"ptpv2-delay-req       (HWTSTAMP_FILTER_PTP_V2_DELAY_REQ)",
++	"ntp-all               (HWTSTAMP_FILTER_NTP_ALL)",
+ };
+ 
+ static int dump_tsinfo(const struct ethtool_ts_info *info)
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0008-ethtool-copy.h-sync-with-net-next.patch b/SOURCES/0008-ethtool-copy.h-sync-with-net-next.patch
new file mode 100644
index 0000000..23c6bb1
--- /dev/null
+++ b/SOURCES/0008-ethtool-copy.h-sync-with-net-next.patch
@@ -0,0 +1,96 @@
+From 1cfc4bab2c9109f8d9c58344e21da4fa0cae17ca Mon Sep 17 00:00:00 2001
+From: "Allan W. Nielsen" <allan.nielsen@microsemi.com>
+Date: Thu, 24 Nov 2016 09:56:50 +0100
+Subject: [PATCH 08/11] ethtool-copy.h:sync with net-next
+
+This covers kernel changes upto:
+
+commit 607c7029146790201e90b58c4235ddff0304d6e0
+Author: Raju Lakkaraju <Raju.Lakkaraju@microsemi.com>
+Date:   Thu Nov 17 13:07:22 2016 +0100
+
+    ethtool: (uapi) Add ETHTOOL_PHY_DOWNSHIFT to PHY tunables
+
+    For operation in cabling environments that are incompatible with
+    1000BASE-T, PHY device may provide an automatic link speed downshift
+    operation. When enabled, the device automatically changes its 1000BASE-T
+    auto-negotiation to the next slower speed after a configured number of
+    failed attempts at 1000BASE-T.  This feature is useful in setting up in
+    networks using older cable installations that include only pairs A and B,
+    and not pairs C and D.
+
+    Signed-off-by: Raju Lakkaraju <Raju.Lakkaraju@microsemi.com>
+    Signed-off-by: Allan W. Nielsen <allan.nielsen@microsemi.com>
+    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
+    Signed-off-by: David S. Miller <davem@davemloft.net>
+
+Signed-off-by: Allan W. Nielsen <allan.nielsen@microsemi.com>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+(cherry picked from commit af5af00a644e117c573d9afe591f8ce51348953f)
+---
+ ethtool-copy.h | 21 ++++++++++++++++++---
+ 1 file changed, 18 insertions(+), 3 deletions(-)
+
+diff --git a/ethtool-copy.h b/ethtool-copy.h
+index 70748f5..3d299e3 100644
+--- a/ethtool-copy.h
++++ b/ethtool-copy.h
+@@ -117,8 +117,7 @@ struct ethtool_cmd {
+ static __inline__ void ethtool_cmd_speed_set(struct ethtool_cmd *ep,
+ 					 __u32 speed)
+ {
+-
+-	ep->speed = (__u16)speed;
++	ep->speed = (__u16)(speed & 0xFFFF);
+ 	ep->speed_hi = (__u16)(speed >> 16);
+ }
+ 
+@@ -247,6 +246,19 @@ struct ethtool_tunable {
+ 	void	*data[0];
+ };
+ 
++#define DOWNSHIFT_DEV_DEFAULT_COUNT	0xff
++#define DOWNSHIFT_DEV_DISABLE		0
++
++enum phy_tunable_id {
++	ETHTOOL_PHY_ID_UNSPEC,
++	ETHTOOL_PHY_DOWNSHIFT,
++	/*
++	 * Add your fresh new phy tunable attribute above and remember to update
++	 * phy_tunable_strings[] in net/core/ethtool.c
++	 */
++	__ETHTOOL_PHY_TUNABLE_COUNT,
++};
++
+ /**
+  * struct ethtool_regs - hardware register dump
+  * @cmd: Command number = %ETHTOOL_GREGS
+@@ -547,6 +559,7 @@ struct ethtool_pauseparam {
+  * @ETH_SS_FEATURES: Device feature names
+  * @ETH_SS_RSS_HASH_FUNCS: RSS hush function names
+  * @ETH_SS_PHY_STATS: Statistic names, for use with %ETHTOOL_GPHYSTATS
++ * @ETH_SS_PHY_TUNABLES: PHY tunable names
+  */
+ enum ethtool_stringset {
+ 	ETH_SS_TEST		= 0,
+@@ -557,6 +570,7 @@ enum ethtool_stringset {
+ 	ETH_SS_RSS_HASH_FUNCS,
+ 	ETH_SS_TUNABLES,
+ 	ETH_SS_PHY_STATS,
++	ETH_SS_PHY_TUNABLES,
+ };
+ 
+ /**
+@@ -1312,7 +1326,8 @@ struct ethtool_per_queue_op {
+ 
+ #define ETHTOOL_GLINKSETTINGS	0x0000004c /* Get ethtool_link_settings */
+ #define ETHTOOL_SLINKSETTINGS	0x0000004d /* Set ethtool_link_settings */
+-
++#define ETHTOOL_PHY_GTUNABLE	0x0000004e /* Get PHY tunable configuration */
++#define ETHTOOL_PHY_STUNABLE	0x0000004f /* Set PHY tunable configuration */
+ 
+ /* compatibility with older code */
+ #define SPARC_ETH_GSET		ETHTOOL_GSET
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0009-ethtool-Add-support-for-2500baseT-5000baseT-link-mod.patch b/SOURCES/0009-ethtool-Add-support-for-2500baseT-5000baseT-link-mod.patch
new file mode 100644
index 0000000..3ee44bc
--- /dev/null
+++ b/SOURCES/0009-ethtool-Add-support-for-2500baseT-5000baseT-link-mod.patch
@@ -0,0 +1,83 @@
+From c5c7c33cb83947523e954c7410216e6b8c0dd942 Mon Sep 17 00:00:00 2001
+From: Pavel Belous <pavel.s.belous@gmail.com>
+Date: Mon, 30 Jan 2017 20:03:30 +0300
+Subject: [PATCH 09/11] ethtool: Add support for 2500baseT/5000baseT link modes
+
+This patch introduce ethtool support for 2500BaseT and 5000BaseT link modes
+from new IEEE 802.3bz standard.
+
+ethtool-copy.h file sync with net.
+
+Signed-off-by: Pavel Belous <pavel.s.belous@gmail.com>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+(cherry picked from commit 64dfc5e2f0467a4f61c066165eb42c118ca744e3)
+---
+ ethtool-copy.h | 4 +++-
+ ethtool.8.in   | 4 +++-
+ ethtool.c      | 6 ++++++
+ 3 files changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/ethtool-copy.h b/ethtool-copy.h
+index 3d299e3..06fc04c 100644
+--- a/ethtool-copy.h
++++ b/ethtool-copy.h
+@@ -1382,6 +1382,8 @@ enum ethtool_link_mode_bit_indices {
+ 	ETHTOOL_LINK_MODE_10000baseLR_Full_BIT	= 44,
+ 	ETHTOOL_LINK_MODE_10000baseLRM_Full_BIT	= 45,
+ 	ETHTOOL_LINK_MODE_10000baseER_Full_BIT	= 46,
++	ETHTOOL_LINK_MODE_2500baseT_Full_BIT = 47,
++	ETHTOOL_LINK_MODE_5000baseT_Full_BIT = 48,
+ 
+ 
+ 	/* Last allowed bit for __ETHTOOL_LINK_MODE_LEGACY_MASK is bit
+@@ -1391,7 +1393,7 @@ enum ethtool_link_mode_bit_indices {
+ 	 */
+ 
+ 	__ETHTOOL_LINK_MODE_LAST
+-	  = ETHTOOL_LINK_MODE_10000baseER_Full_BIT,
++	  = ETHTOOL_LINK_MODE_5000baseT_Full_BIT,
+ };
+ 
+ #define __ETHTOOL_LINK_MODE_LEGACY_MASK(base_name)	\
+diff --git a/ethtool.8.in b/ethtool.8.in
+index b69c5c6..eb0f551 100644
+--- a/ethtool.8.in
++++ b/ethtool.8.in
+@@ -578,7 +578,9 @@ lB	l	lB.
+ 0x020	1000baseT Full
+ 0x20000	1000baseKX Full
+ 0x20000000000	1000baseX Full
+-0x8000	2500baseX Full	(not supported by IEEE standards)
++0x800000000000  2500baseT Full
++0x8000	2500baseX Full	(not supported by IEEE standards)'
++0x1000000000000  5000baseT Full
+ 0x1000	10000baseT Full
+ 0x40000	10000baseKX4 Full
+ 0x80000	10000baseKR Full
+diff --git a/ethtool.c b/ethtool.c
+index 5465f59..9650f54 100644
+--- a/ethtool.c
++++ b/ethtool.c
+@@ -529,6 +529,8 @@ static void init_global_link_mode_masks(void)
+ 		ETHTOOL_LINK_MODE_10000baseLR_Full_BIT,
+ 		ETHTOOL_LINK_MODE_10000baseLRM_Full_BIT,
+ 		ETHTOOL_LINK_MODE_10000baseER_Full_BIT,
++		ETHTOOL_LINK_MODE_2500baseT_Full_BIT,
++		ETHTOOL_LINK_MODE_5000baseT_Full_BIT,
+ 	};
+ 	static const enum ethtool_link_mode_bit_indices
+ 		additional_advertised_flags_bits[] = {
+@@ -681,6 +683,10 @@ static void dump_link_caps(const char *prefix, const char *an_prefix,
+ 		  "10000baseLRM/Full" },
+ 		{ 0, ETHTOOL_LINK_MODE_10000baseER_Full_BIT,
+ 		  "10000baseER/Full" },
++                { 0, ETHTOOL_LINK_MODE_2500baseT_Full_BIT,
++                  "2500baseT/Full" },
++                { 0, ETHTOOL_LINK_MODE_5000baseT_Full_BIT,
++                  "5000baseT/Full" },
+ 	};
+ 	int indent;
+ 	int did1, new_line_pend, i;
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0010-ethtool.8-Fix-formatting-of-advertise-bitmask.patch b/SOURCES/0010-ethtool.8-Fix-formatting-of-advertise-bitmask.patch
new file mode 100644
index 0000000..1dd71ff
--- /dev/null
+++ b/SOURCES/0010-ethtool.8-Fix-formatting-of-advertise-bitmask.patch
@@ -0,0 +1,37 @@
+From f4578eaf711f3d5e15f3e5fdb98cce3ebae80a2b Mon Sep 17 00:00:00 2001
+From: Gal Pressman <galp@mellanox.com>
+Date: Thu, 28 Sep 2017 15:08:52 +0300
+Subject: [PATCH 10/11] ethtool.8: Fix formatting of advertise bitmask
+
+Fields should be separated with a tab instead of spaces.
+Also, remove an accidental ' character from 2500baseX Full mode.
+
+Fixes: 64dfc5e2f046 ("ethtool: Add support for 2500baseT/5000baseT link modes")
+Signed-off-by: Gal Pressman <galp@mellanox.com>
+Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+(cherry picked from commit f35a4bcd55164495deb4eef0975a1623d760ff91)
+---
+ ethtool.8.in | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/ethtool.8.in b/ethtool.8.in
+index eb0f551..c7208ab 100644
+--- a/ethtool.8.in
++++ b/ethtool.8.in
+@@ -578,9 +578,9 @@ lB	l	lB.
+ 0x020	1000baseT Full
+ 0x20000	1000baseKX Full
+ 0x20000000000	1000baseX Full
+-0x800000000000  2500baseT Full
+-0x8000	2500baseX Full	(not supported by IEEE standards)'
+-0x1000000000000  5000baseT Full
++0x800000000000	2500baseT Full
++0x8000	2500baseX Full	(not supported by IEEE standards)
++0x1000000000000	5000baseT Full
+ 0x1000	10000baseT Full
+ 0x40000	10000baseKX4 Full
+ 0x80000	10000baseKR Full
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0011-ethtool.8-Document-56000-advertise-link-modes.patch b/SOURCES/0011-ethtool.8-Document-56000-advertise-link-modes.patch
new file mode 100644
index 0000000..84c540f
--- /dev/null
+++ b/SOURCES/0011-ethtool.8-Document-56000-advertise-link-modes.patch
@@ -0,0 +1,37 @@
+From 2c64f09bee9b601cb60fd0398f1e4eb1b09a3ebb Mon Sep 17 00:00:00 2001
+From: Gal Pressman <galp@mellanox.com>
+Date: Thu, 28 Sep 2017 15:08:53 +0300
+Subject: [PATCH 11/11] ethtool.8: Document 56000 advertise link modes
+
+Add the following advertise modes to the manual:
+56000baseKR4 Full
+56000baseCR4 Full
+56000baseSR4 Full
+56000baseLR4 Full
+
+Signed-off-by: Gal Pressman <galp@mellanox.com>
+Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+(cherry picked from commit 47c71e3c45cd6e248a25e87cbd8afa201836e59d)
+---
+ ethtool.8.in | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/ethtool.8.in b/ethtool.8.in
+index c7208ab..c176cac 100644
+--- a/ethtool.8.in
++++ b/ethtool.8.in
+@@ -601,6 +601,10 @@ lB	l	lB.
+ 0x400000000	50000baseCR2 Full
+ 0x800000000	50000baseKR2 Full
+ 0x10000000000	50000baseSR2 Full
++0x8000000	56000baseKR4 Full
++0x10000000	56000baseCR4 Full
++0x20000000	56000baseSR4 Full
++0x40000000	56000baseLR4 Full
+ 0x1000000000	100000baseKR4 Full
+ 0x2000000000	100000baseSR4 Full
+ 0x4000000000	100000baseCR4 Full
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0012-ethtool-Remove-UDP-Fragmentation-Offload-error-print.patch b/SOURCES/0012-ethtool-Remove-UDP-Fragmentation-Offload-error-print.patch
new file mode 100644
index 0000000..b9a5edd
--- /dev/null
+++ b/SOURCES/0012-ethtool-Remove-UDP-Fragmentation-Offload-error-print.patch
@@ -0,0 +1,39 @@
+From b41605a9328686d45f6f4ee7791f476866bcc7a9 Mon Sep 17 00:00:00 2001
+From: Shaker Daibes <shakerd@mellanox.com>
+Date: Mon, 18 Sep 2017 10:35:38 +0300
+Subject: [PATCH 12/12] ethtool: Remove UDP Fragmentation Offload error prints
+
+UFO was removed in kernel, here we remove UFO error prints when using
+"ethtool -k" command.
+
+Fixes the following issue:
+Features for ens8:
+Cannot get device udp-fragmentation-offload settings: Operation not
+supported
+
+Signed-off-by: Shaker Daibes <shakerd@mellanox.com>
+Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+(cherry picked from commit d5d35d8331dee79a7453d3ea501bcc7b8b90582c)
+---
+ ethtool.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/ethtool.c b/ethtool.c
+index 9650f54..1411d62 100644
+--- a/ethtool.c
++++ b/ethtool.c
+@@ -2187,6 +2187,10 @@ get_features(struct cmd_context *ctx, const struct feature_defs *defs)
+ 		eval.cmd = off_flag_def[i].get_cmd;
+ 		err = send_ioctl(ctx, &eval);
+ 		if (err) {
++			if (errno == EOPNOTSUPP &&
++			    off_flag_def[i].get_cmd == ETHTOOL_GUFO)
++				continue;
++
+ 			fprintf(stderr,
+ 				"Cannot get device %s settings: %m\n",
+ 				off_flag_def[i].long_name);
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0013-ethtool-copy.h-sync-with-net-next.patch b/SOURCES/0013-ethtool-copy.h-sync-with-net-next.patch
new file mode 100644
index 0000000..74385ac
--- /dev/null
+++ b/SOURCES/0013-ethtool-copy.h-sync-with-net-next.patch
@@ -0,0 +1,174 @@
+From 3ad39b7b490fc130b47ec248de707d3ae481c9ed Mon Sep 17 00:00:00 2001
+From: Scott Branden <scott.branden@broadcom.com>
+Date: Tue, 12 Dec 2017 12:20:02 -0800
+Subject: [PATCH 13/14] ethtool-copy.h: sync with net-next
+
+This covers kernel changes up to:
+
+commit 40e44a1e669d078946f46853808a60d29e6f0885
+Author: Scott Branden <scott.branden@broadcom.com>
+Date:   Thu Nov 30 11:35:59 2017 -0800
+
+    net: ethtool: add support for reset of AP inside NIC interface.
+
+    Add ETH_RESET_AP to reset the application processor(s) inside the NIC
+    interface.
+
+    Current ETH_RESET_MGMT supports a management processor inside this NIC.
+    This is typically used for remote NIC management purposes.
+
+    Application processors exist inside some SmartNICs to run various
+    applications inside the NIC processor - be it a simple algorithm without
+    an OS to as complex as hosting multiple VMs.
+
+    Signed-off-by: Scott Branden <scott.branden@broadcom.com>
+    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
+    Signed-off-by: David S. Miller <davem@davemloft.net>
+
+Signed-off-by: Scott Branden <scott.branden@broadcom.com>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+(cherry picked from commit 83634baa75b5831ed9bfd135f9747b94aacdd842)
+---
+ ethtool-copy.h | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++-----
+ 1 file changed, 61 insertions(+), 5 deletions(-)
+
+diff --git a/ethtool-copy.h b/ethtool-copy.h
+index 06fc04c..f4e7bb2 100644
+--- a/ethtool-copy.h
++++ b/ethtool-copy.h
+@@ -1,3 +1,4 @@
++/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+ /*
+  * ethtool.h: Defines for Linux ethtool.
+  *
+@@ -1236,6 +1237,47 @@ struct ethtool_per_queue_op {
+ 	char	data[];
+ };
+ 
++/**
++ * struct ethtool_fecparam - Ethernet forward error correction(fec) parameters
++ * @cmd: Command number = %ETHTOOL_GFECPARAM or %ETHTOOL_SFECPARAM
++ * @active_fec: FEC mode which is active on porte
++ * @fec: Bitmask of supported/configured FEC modes
++ * @rsvd: Reserved for future extensions. i.e FEC bypass feature.
++ *
++ * Drivers should reject a non-zero setting of @autoneg when
++ * autoneogotiation is disabled (or not supported) for the link.
++ *
++ */
++struct ethtool_fecparam {
++	__u32   cmd;
++	/* bitmask of FEC modes */
++	__u32   active_fec;
++	__u32   fec;
++	__u32   reserved;
++};
++
++/**
++ * enum ethtool_fec_config_bits - flags definition of ethtool_fec_configuration
++ * @ETHTOOL_FEC_NONE: FEC mode configuration is not supported
++ * @ETHTOOL_FEC_AUTO: Default/Best FEC mode provided by driver
++ * @ETHTOOL_FEC_OFF: No FEC Mode
++ * @ETHTOOL_FEC_RS: Reed-Solomon Forward Error Detection mode
++ * @ETHTOOL_FEC_BASER: Base-R/Reed-Solomon Forward Error Detection mode
++ */
++enum ethtool_fec_config_bits {
++	ETHTOOL_FEC_NONE_BIT,
++	ETHTOOL_FEC_AUTO_BIT,
++	ETHTOOL_FEC_OFF_BIT,
++	ETHTOOL_FEC_RS_BIT,
++	ETHTOOL_FEC_BASER_BIT,
++};
++
++#define ETHTOOL_FEC_NONE		(1 << ETHTOOL_FEC_NONE_BIT)
++#define ETHTOOL_FEC_AUTO		(1 << ETHTOOL_FEC_AUTO_BIT)
++#define ETHTOOL_FEC_OFF			(1 << ETHTOOL_FEC_OFF_BIT)
++#define ETHTOOL_FEC_RS			(1 << ETHTOOL_FEC_RS_BIT)
++#define ETHTOOL_FEC_BASER		(1 << ETHTOOL_FEC_BASER_BIT)
++
+ /* CMDs currently supported */
+ #define ETHTOOL_GSET		0x00000001 /* DEPRECATED, Get settings.
+ 					    * Please use ETHTOOL_GLINKSETTINGS
+@@ -1328,6 +1370,8 @@ struct ethtool_per_queue_op {
+ #define ETHTOOL_SLINKSETTINGS	0x0000004d /* Set ethtool_link_settings */
+ #define ETHTOOL_PHY_GTUNABLE	0x0000004e /* Get PHY tunable configuration */
+ #define ETHTOOL_PHY_STUNABLE	0x0000004f /* Set PHY tunable configuration */
++#define ETHTOOL_GFECPARAM	0x00000050 /* Get FEC settings */
++#define ETHTOOL_SFECPARAM	0x00000051 /* Set FEC settings */
+ 
+ /* compatibility with older code */
+ #define SPARC_ETH_GSET		ETHTOOL_GSET
+@@ -1382,9 +1426,12 @@ enum ethtool_link_mode_bit_indices {
+ 	ETHTOOL_LINK_MODE_10000baseLR_Full_BIT	= 44,
+ 	ETHTOOL_LINK_MODE_10000baseLRM_Full_BIT	= 45,
+ 	ETHTOOL_LINK_MODE_10000baseER_Full_BIT	= 46,
+-	ETHTOOL_LINK_MODE_2500baseT_Full_BIT = 47,
+-	ETHTOOL_LINK_MODE_5000baseT_Full_BIT = 48,
++	ETHTOOL_LINK_MODE_2500baseT_Full_BIT	= 47,
++	ETHTOOL_LINK_MODE_5000baseT_Full_BIT	= 48,
+ 
++	ETHTOOL_LINK_MODE_FEC_NONE_BIT	= 49,
++	ETHTOOL_LINK_MODE_FEC_RS_BIT	= 50,
++	ETHTOOL_LINK_MODE_FEC_BASER_BIT	= 51,
+ 
+ 	/* Last allowed bit for __ETHTOOL_LINK_MODE_LEGACY_MASK is bit
+ 	 * 31. Please do NOT define any SUPPORTED_* or ADVERTISED_*
+@@ -1393,7 +1440,7 @@ enum ethtool_link_mode_bit_indices {
+ 	 */
+ 
+ 	__ETHTOOL_LINK_MODE_LAST
+-	  = ETHTOOL_LINK_MODE_5000baseT_Full_BIT,
++	  = ETHTOOL_LINK_MODE_FEC_BASER_BIT,
+ };
+ 
+ #define __ETHTOOL_LINK_MODE_LEGACY_MASK(base_name)	\
+@@ -1484,13 +1531,17 @@ enum ethtool_link_mode_bit_indices {
+  * it was forced up into this mode or autonegotiated.
+  */
+ 
+-/* The forced speed, in units of 1Mb. All values 0 to INT_MAX are legal. */
++/* The forced speed, in units of 1Mb. All values 0 to INT_MAX are legal.
++ * Update drivers/net/phy/phy.c:phy_speed_to_str() and
++ * drivers/net/bonding/bond_3ad.c:__get_link_speed() when adding new values.
++ */
+ #define SPEED_10		10
+ #define SPEED_100		100
+ #define SPEED_1000		1000
+ #define SPEED_2500		2500
+ #define SPEED_5000		5000
+ #define SPEED_10000		10000
++#define SPEED_14000		14000
+ #define SPEED_20000		20000
+ #define SPEED_25000		25000
+ #define SPEED_40000		40000
+@@ -1633,6 +1684,7 @@ enum ethtool_reset_flags {
+ 	ETH_RESET_PHY		= 1 << 6,	/* Transceiver/PHY */
+ 	ETH_RESET_RAM		= 1 << 7,	/* RAM shared between
+ 						 * multiple components */
++	ETH_RESET_AP		= 1 << 8,	/* Application processor */
+ 
+ 	ETH_RESET_DEDICATED	= 0x0000ffff,	/* All components dedicated to
+ 						 * this interface */
+@@ -1701,6 +1753,8 @@ enum ethtool_reset_flags {
+  *	%ethtool_link_mode_bit_indices for the link modes, and other
+  *	link features that the link partner advertised through
+  *	autonegotiation; 0 if unknown or not applicable.  Read-only.
++ * @transceiver: Used to distinguish different possible PHY types,
++ *	reported consistently by PHYLIB.  Read-only.
+  *
+  * If autonegotiation is disabled, the speed and @duplex represent the
+  * fixed link mode and are writable if the driver supports multiple
+@@ -1752,7 +1806,9 @@ struct ethtool_link_settings {
+ 	__u8	eth_tp_mdix;
+ 	__u8	eth_tp_mdix_ctrl;
+ 	__s8	link_mode_masks_nwords;
+-	__u32	reserved[8];
++	__u8	transceiver;
++	__u8	reserved1[3];
++	__u32	reserved[7];
+ 	__u32	link_mode_masks[0];
+ 	/* layout of link_mode_masks fields:
+ 	 * __u32 map_supported[link_mode_masks_nwords];
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0014-ethtool-Support-for-FEC-encoding-control.patch b/SOURCES/0014-ethtool-Support-for-FEC-encoding-control.patch
new file mode 100644
index 0000000..c23b8c7
--- /dev/null
+++ b/SOURCES/0014-ethtool-Support-for-FEC-encoding-control.patch
@@ -0,0 +1,298 @@
+From 6477a1f47b15c2a81a9995397942a0fc17f0b06f Mon Sep 17 00:00:00 2001
+From: Dustin Byford <dustin@cumulusnetworks.com>
+Date: Mon, 18 Dec 2017 14:57:41 -0800
+Subject: [PATCH 14/14] ethtool: Support for FEC encoding control
+
+As FEC settings and different FEC modes are mandatory
+and configurable across various interfaces of 25G/50G/100G/40G,
+the lack of FEC encoding control and reporting today is a source
+for interoperability issues for many vendors
+
+set-fec/show-fec option(s) are designed to provide control and report
+the FEC encoding on the link.
+
+$ethtool --set-fec swp1 encoding [off | RS | BaseR | auto]
+
+Encoding: Types of encoding
+Off    :  Turning off FEC
+RS     :  Force RS-FEC encoding
+BaseR  :  Force BaseR encoding
+Auto   :  Default FEC settings for drivers, and would represent
+          asking the hardware to essentially go into a best effort mode.
+
+Here are a few examples of what we would expect if encoding=auto:
+- if autoneg is on, we are  expecting FEC to be negotiated as on or off
+  as long as protocol supports it
+- if the hardware is capable of detecting the FEC encoding on it's
+  receiver it will reconfigure its encoder to match
+- in absence of the above, the configuration would be set to IEEE
+  defaults.
+
+>From our understanding, this is essentially what most hardware/driver
+combinations are doing today in the absence of a way for users to
+control the behavior.
+
+$ethtool --show-fec  swp1
+FEC parameters for swp1:
+FEC encodings:  RS
+
+ethtool devname output:
+$ethtool swp1
+Settings for swp1:
+root@hpe-7712-03:~# ethtool swp18
+Settings for swp18:
+    Supported ports: [ FIBRE ]
+    Supported link modes:   40000baseCR4/Full
+                            40000baseSR4/Full
+                            40000baseLR4/Full
+                            100000baseSR4/Full
+                            100000baseCR4/Full
+                            100000baseLR4_ER4/Full
+    Supported pause frame use: No
+    Supports auto-negotiation: Yes
+    Supported FEC modes: [RS | BaseR | None | Not reported]
+    Advertised link modes:  Not reported
+    Advertised pause frame use: No
+    Advertised auto-negotiation: No
+    Advertised FEC modes: [RS | BaseR | None | Not reported]
+    Speed: 100000Mb/s
+    Duplex: Full
+    Port: FIBRE
+    PHYAD: 106
+    Transceiver: internal
+    Auto-negotiation: off
+    Link detected: yes
+
+Signed-off-by: Vidya Sagar Ravipati <vidya.chowdary@gmail.com>
+Signed-off-by: Dustin Byford <dustin@cumulusnetworks.com>
+[code style + man page edits + commit message update]
+Signed-off-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+
+(cherry picked from commit 8db75d1e4001ac4cdfc73d5bedd0ec6d58a3d617)
+
+Conflicts:
+	ethtool.8.in
+	ethtool.c
+---
+ ethtool.8.in |  31 ++++++++++++++++
+ ethtool.c    | 119 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 150 insertions(+)
+
+diff --git a/ethtool.8.in b/ethtool.8.in
+index c176cac..6816020 100644
+--- a/ethtool.8.in
++++ b/ethtool.8.in
+@@ -342,6 +342,13 @@ ethtool \- query or control network driver and hardware settings
+ .B2 tx-lpi on off
+ .BN tx-timer
+ .BN advertise
++.HP
++.B ethtool \-\-show\-fec
++.I devname
++.HP
++.B ethtool \-\-set\-fec
++.I devname
++.B4 encoding auto off rs baser
+ .
+ .\" Adjust lines (i.e. full justification) and hyphenate.
+ .ad
+@@ -959,6 +966,30 @@ Values are as for
+ Sets the amount of time the device should stay in idle mode prior to asserting
+ its Tx LPI (in microseconds). This has meaning only when Tx LPI is enabled.
+ .RE
++.TP
++.B \-\-show\-fec
++Queries the specified network device for its support of Forward Error Correction.
++.TP
++.B \-\-set\-fec
++Configures Forward Error Correction for the specified network device.
++
++Forward Error Correction modes selected by a user are expected to be persisted
++after any hotplug events. If a module is swapped that does not support the
++current FEC mode, the driver or firmware must take the link down
++administratively and report the problem in the system logs for users to correct.
++.RS 4
++.TP
++.A4 encoding auto off rs baser
++Sets the FEC encoding for the device.
++.TS
++nokeep;
++lB	l.
++auto	Use the driver's default encoding
++off	Turn off FEC
++RS	Force RS-FEC encoding
++BaseR	Force BaseR encoding
++.TE
++.RE
+ .SH BUGS
+ Not supported (in part or whole) on all network drivers.
+ .SH AUTHOR
+diff --git a/ethtool.c b/ethtool.c
+index 1411d62..2e9ee2c 100644
+--- a/ethtool.c
++++ b/ethtool.c
+@@ -543,6 +543,9 @@ static void init_global_link_mode_masks(void)
+ 		ETHTOOL_LINK_MODE_Pause_BIT,
+ 		ETHTOOL_LINK_MODE_Asym_Pause_BIT,
+ 		ETHTOOL_LINK_MODE_Backplane_BIT,
++		ETHTOOL_LINK_MODE_FEC_NONE_BIT,
++		ETHTOOL_LINK_MODE_FEC_RS_BIT,
++		ETHTOOL_LINK_MODE_FEC_BASER_BIT,
+ 	};
+ 	unsigned int i;
+ 
+@@ -690,6 +693,7 @@ static void dump_link_caps(const char *prefix, const char *an_prefix,
+ 	};
+ 	int indent;
+ 	int did1, new_line_pend, i;
++	int fecreported = 0;
+ 
+ 	/* Indent just like the separate functions used to */
+ 	indent = strlen(prefix) + 14;
+@@ -741,6 +745,26 @@ static void dump_link_caps(const char *prefix, const char *an_prefix,
+ 			fprintf(stdout, "Yes\n");
+ 		else
+ 			fprintf(stdout, "No\n");
++
++		fprintf(stdout, "	%s FEC modes:", prefix);
++		if (ethtool_link_mode_test_bit(ETHTOOL_LINK_MODE_FEC_NONE_BIT,
++					       mask)) {
++			fprintf(stdout, " None");
++			fecreported = 1;
++		}
++		if (ethtool_link_mode_test_bit(ETHTOOL_LINK_MODE_FEC_BASER_BIT,
++					       mask)) {
++			fprintf(stdout, " BaseR");
++			fecreported = 1;
++		}
++		if (ethtool_link_mode_test_bit(ETHTOOL_LINK_MODE_FEC_RS_BIT,
++					       mask)) {
++			fprintf(stdout, " RS");
++			fecreported = 1;
++		}
++		if (!fecreported)
++			fprintf(stdout, " Not reported");
++		fprintf(stdout, "\n");
+ 	}
+ }
+ 
+@@ -1569,6 +1593,20 @@ static void dump_eeecmd(struct ethtool_eee *ep)
+ 	dump_link_caps("Link partner advertised EEE", "", link_mode, 1);
+ }
+ 
++static void dump_fec(u32 fec)
++{
++	if (fec & ETHTOOL_FEC_NONE)
++		fprintf(stdout, " None");
++	if (fec & ETHTOOL_FEC_AUTO)
++		fprintf(stdout, " Auto");
++	if (fec & ETHTOOL_FEC_OFF)
++		fprintf(stdout, " Off");
++	if (fec & ETHTOOL_FEC_BASER)
++		fprintf(stdout, " BaseR");
++	if (fec & ETHTOOL_FEC_RS)
++		fprintf(stdout, " RS");
++}
++
+ #define N_SOTS 7
+ 
+ static char *so_timestamping_labels[N_SOTS] = {
+@@ -4592,6 +4630,84 @@ static int do_seee(struct cmd_context *ctx)
+ 	return 0;
+ }
+ 
++static int fecmode_str_to_type(const char *str)
++{
++	int fecmode = 0;
++
++	if (!str)
++		return fecmode;
++
++	if (!strcasecmp(str, "auto"))
++		fecmode |= ETHTOOL_FEC_AUTO;
++	else if (!strcasecmp(str, "off"))
++		fecmode |= ETHTOOL_FEC_OFF;
++	else if (!strcasecmp(str, "rs"))
++		fecmode |= ETHTOOL_FEC_RS;
++	else if (!strcasecmp(str, "baser"))
++		fecmode |= ETHTOOL_FEC_BASER;
++
++	return fecmode;
++}
++
++static int do_gfec(struct cmd_context *ctx)
++{
++	struct ethtool_fecparam feccmd = { 0 };
++	int rv;
++
++	if (ctx->argc != 0)
++		exit_bad_args();
++
++	feccmd.cmd = ETHTOOL_GFECPARAM;
++	rv = send_ioctl(ctx, &feccmd);
++	if (rv != 0) {
++		perror("Cannot get FEC settings");
++		return rv;
++	}
++
++	fprintf(stdout, "FEC parameters for %s:\n", ctx->devname);
++	fprintf(stdout, "Configured FEC encodings:");
++	dump_fec(feccmd.fec);
++	fprintf(stdout, "\n");
++
++	fprintf(stdout, "Active FEC encoding:");
++	dump_fec(feccmd.active_fec);
++	fprintf(stdout, "\n");
++
++	return 0;
++}
++
++static int do_sfec(struct cmd_context *ctx)
++{
++	char *fecmode_str = NULL;
++	struct ethtool_fecparam feccmd;
++	struct cmdline_info cmdline_fec[] = {
++		{ "encoding", CMDL_STR,  &fecmode_str,  &feccmd.fec},
++	};
++	int changed;
++	int fecmode;
++	int rv;
++
++	parse_generic_cmdline(ctx, &changed, cmdline_fec,
++			      ARRAY_SIZE(cmdline_fec));
++
++	if (!fecmode_str)
++		exit_bad_args();
++
++	fecmode = fecmode_str_to_type(fecmode_str);
++	if (!fecmode)
++		exit_bad_args();
++
++	feccmd.cmd = ETHTOOL_SFECPARAM;
++	feccmd.fec = fecmode;
++	rv = send_ioctl(ctx, &feccmd);
++	if (rv != 0) {
++		perror("Cannot set FEC settings");
++		return rv;
++	}
++
++	return 0;
++}
++
+ #ifndef TEST_ETHTOOL
+ int send_ioctl(struct cmd_context *ctx, void *cmd)
+ {
+@@ -4754,6 +4870,9 @@ static const struct option {
+ 	  "		[ advertise %x ]\n"
+ 	  "		[ tx-lpi on|off ]\n"
+ 	  "		[ tx-timer %d ]\n"},
++	{ "--show-fec", 1, do_gfec, "Show FEC settings"},
++	{ "--set-fec", 1, do_sfec, "Set FEC settings",
++	  "		[ encoding auto|off|rs|baser ]\n"},
+ 	{ "-h|--help", 0, show_usage, "Show this help" },
+ 	{ "--version", 0, do_version, "Show version number" },
+ 	{}
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0015-ethtool-copy.h-sync-with-net-next.patch b/SOURCES/0015-ethtool-copy.h-sync-with-net-next.patch
new file mode 100644
index 0000000..b8f0db5
--- /dev/null
+++ b/SOURCES/0015-ethtool-copy.h-sync-with-net-next.patch
@@ -0,0 +1,115 @@
+From ac4c40ab13bbd42145331766f74c3928bc9e6d51 Mon Sep 17 00:00:00 2001
+From: Edward Cree <ecree@solarflare.com>
+Date: Fri, 9 Mar 2018 15:03:46 +0000
+Subject: [PATCH 15/18] ethtool-copy.h: sync with net-next
+
+This covers kernel changes up to commit 84a1d9c48200,
+    net: ethtool: extend RXNFC API to support RSS spreading of filter matches
+
+Signed-off-by: Edward Cree <ecree@solarflare.com>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+(cherry picked from commit 23b2e3b14405221b564c5dd6d7bf48c48e3db2c8)
+---
+ ethtool-copy.h | 32 ++++++++++++++++++++++++++------
+ 1 file changed, 26 insertions(+), 6 deletions(-)
+
+diff --git a/ethtool-copy.h b/ethtool-copy.h
+index f4e7bb2..8cc61e9 100644
+--- a/ethtool-copy.h
++++ b/ethtool-copy.h
+@@ -912,12 +912,15 @@ static __inline__ __u64 ethtool_get_flow_spec_ring_vf(__u64 ring_cookie)
+  * @flow_type: Type of flow to be affected, e.g. %TCP_V4_FLOW
+  * @data: Command-dependent value
+  * @fs: Flow classification rule
++ * @rss_context: RSS context to be affected
+  * @rule_cnt: Number of rules to be affected
+  * @rule_locs: Array of used rule locations
+  *
+  * For %ETHTOOL_GRXFH and %ETHTOOL_SRXFH, @data is a bitmask indicating
+  * the fields included in the flow hash, e.g. %RXH_IP_SRC.  The following
+- * structure fields must not be used.
++ * structure fields must not be used, except that if @flow_type includes
++ * the %FLOW_RSS flag, then @rss_context determines which RSS context to
++ * act on.
+  *
+  * For %ETHTOOL_GRXRINGS, @data is set to the number of RX rings/queues
+  * on return.
+@@ -929,7 +932,9 @@ static __inline__ __u64 ethtool_get_flow_spec_ring_vf(__u64 ring_cookie)
+  * set in @data then special location values should not be used.
+  *
+  * For %ETHTOOL_GRXCLSRULE, @fs.@location specifies the location of an
+- * existing rule on entry and @fs contains the rule on return.
++ * existing rule on entry and @fs contains the rule on return; if
++ * @fs.@flow_type includes the %FLOW_RSS flag, then @rss_context is
++ * filled with the RSS context ID associated with the rule.
+  *
+  * For %ETHTOOL_GRXCLSRLALL, @rule_cnt specifies the array size of the
+  * user buffer for @rule_locs on entry.  On return, @data is the size
+@@ -940,7 +945,11 @@ static __inline__ __u64 ethtool_get_flow_spec_ring_vf(__u64 ring_cookie)
+  * For %ETHTOOL_SRXCLSRLINS, @fs specifies the rule to add or update.
+  * @fs.@location either specifies the location to use or is a special
+  * location value with %RX_CLS_LOC_SPECIAL flag set.  On return,
+- * @fs.@location is the actual rule location.
++ * @fs.@location is the actual rule location.  If @fs.@flow_type
++ * includes the %FLOW_RSS flag, @rss_context is the RSS context ID to
++ * use for flow spreading traffic which matches this rule.  The value
++ * from the rxfh indirection table will be added to @fs.@ring_cookie
++ * to choose which ring to deliver to.
+  *
+  * For %ETHTOOL_SRXCLSRLDEL, @fs.@location specifies the location of an
+  * existing rule on entry.
+@@ -961,7 +970,10 @@ struct ethtool_rxnfc {
+ 	__u32				flow_type;
+ 	__u64				data;
+ 	struct ethtool_rx_flow_spec	fs;
+-	__u32				rule_cnt;
++	union {
++		__u32			rule_cnt;
++		__u32			rss_context;
++	};
+ 	__u32				rule_locs[0];
+ };
+ 
+@@ -988,7 +1000,11 @@ struct ethtool_rxfh_indir {
+ /**
+  * struct ethtool_rxfh - command to get/set RX flow hash indir or/and hash key.
+  * @cmd: Specific command number - %ETHTOOL_GRSSH or %ETHTOOL_SRSSH
+- * @rss_context: RSS context identifier.
++ * @rss_context: RSS context identifier.  Context 0 is the default for normal
++ *	traffic; other contexts can be referenced as the destination for RX flow
++ *	classification rules.  %ETH_RXFH_CONTEXT_ALLOC is used with command
++ *	%ETHTOOL_SRSSH to allocate a new RSS context; on return this field will
++ *	contain the ID of the newly allocated context.
+  * @indir_size: On entry, the array size of the user buffer for the
+  *	indirection table, which may be zero, or (for %ETHTOOL_SRSSH),
+  *	%ETH_RXFH_INDIR_NO_CHANGE.  On return from %ETHTOOL_GRSSH,
+@@ -1007,7 +1023,8 @@ struct ethtool_rxfh_indir {
+  * size should be returned.  For %ETHTOOL_SRSSH, an @indir_size of
+  * %ETH_RXFH_INDIR_NO_CHANGE means that indir table setting is not requested
+  * and a @indir_size of zero means the indir table should be reset to default
+- * values. An hfunc of zero means that hash function setting is not requested.
++ * values (if @rss_context == 0) or that the RSS context should be deleted.
++ * An hfunc of zero means that hash function setting is not requested.
+  */
+ struct ethtool_rxfh {
+ 	__u32   cmd;
+@@ -1019,6 +1036,7 @@ struct ethtool_rxfh {
+ 	__u32	rsvd32;
+ 	__u32   rss_config[0];
+ };
++#define ETH_RXFH_CONTEXT_ALLOC		0xffffffff
+ #define ETH_RXFH_INDIR_NO_CHANGE	0xffffffff
+ 
+ /**
+@@ -1633,6 +1651,8 @@ static __inline__ int ethtool_validate_duplex(__u8 duplex)
+ /* Flag to enable additional fields in struct ethtool_rx_flow_spec */
+ #define	FLOW_EXT	0x80000000
+ #define	FLOW_MAC_EXT	0x40000000
++/* Flag to enable RSS spreading of traffic matching rule (nfc only) */
++#define	FLOW_RSS	0x20000000
+ 
+ /* L3-L4 network traffic flow hash options */
+ #define	RXH_L2DA	(1 << 1)
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0016-ethtool-add-support-for-extra-RSS-contexts-and-RSS-s.patch b/SOURCES/0016-ethtool-add-support-for-extra-RSS-contexts-and-RSS-s.patch
new file mode 100644
index 0000000..1f1ee2a
--- /dev/null
+++ b/SOURCES/0016-ethtool-add-support-for-extra-RSS-contexts-and-RSS-s.patch
@@ -0,0 +1,475 @@
+From 10b4bae4d7f2fa4768fbe90cbfa18ed6059e5a5b Mon Sep 17 00:00:00 2001
+From: Edward Cree <ecree@solarflare.com>
+Date: Fri, 9 Mar 2018 15:04:12 +0000
+Subject: [PATCH 16/18] ethtool: add support for extra RSS contexts and RSS
+ steering filters
+
+RSS contexts can be created on a device with -X ... context new, modified
+ with -X ... context N, and deleted with -X ... context N delete.
+N-tuple filters can be directed at those contexts with -N ... context N.
+
+Signed-off-by: Edward Cree <ecree@solarflare.com>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+(cherry picked from commit f5d55b967e0c5757e423805a70d1a298e307e91e)
+---
+ ethtool.c  | 141 ++++++++++++++++++++++++++++++++++++++++++++++++++++---------
+ internal.h |   4 +-
+ rxclass.c  |  58 +++++++++++++++++++++----
+ 3 files changed, 173 insertions(+), 30 deletions(-)
+
+diff --git a/ethtool.c b/ethtool.c
+index 2e9ee2c..a276fdb 100644
+--- a/ethtool.c
++++ b/ethtool.c
+@@ -1513,7 +1513,7 @@ static void dump_features(const struct feature_defs *defs,
+ 
+ static int dump_rxfhash(int fhash, u64 val)
+ {
+-	switch (fhash) {
++	switch (fhash & ~FLOW_RSS) {
+ 	case TCP_V4_FLOW:
+ 		fprintf(stdout, "TCP over IPV4 flows");
+ 		break;
+@@ -3527,11 +3527,20 @@ static int do_srxclass(struct cmd_context *ctx)
+ 	if (ctx->argc < 2)
+ 		exit_bad_args();
+ 
+-	if (ctx->argc == 3 && !strcmp(ctx->argp[0], "rx-flow-hash")) {
++	if (!strcmp(ctx->argp[0], "rx-flow-hash")) {
+ 		int rx_fhash_set;
+ 		u32 rx_fhash_val;
+ 		struct ethtool_rxnfc nfccmd;
++		bool flow_rss = false;
+ 
++		if (ctx->argc == 5) {
++			if (strcmp(ctx->argp[3], "context"))
++				exit_bad_args();
++			flow_rss = true;
++			nfccmd.rss_context = get_u32(ctx->argp[4], 0);
++		} else if (ctx->argc != 3) {
++			exit_bad_args();
++		}
+ 		rx_fhash_set = rxflow_str_to_type(ctx->argp[1]);
+ 		if (!rx_fhash_set)
+ 			exit_bad_args();
+@@ -3541,16 +3550,19 @@ static int do_srxclass(struct cmd_context *ctx)
+ 		nfccmd.cmd = ETHTOOL_SRXFH;
+ 		nfccmd.flow_type = rx_fhash_set;
+ 		nfccmd.data = rx_fhash_val;
++		if (flow_rss)
++			nfccmd.flow_type |= FLOW_RSS;
+ 
+ 		err = send_ioctl(ctx, &nfccmd);
+ 		if (err < 0)
+ 			perror("Cannot change RX network flow hashing options");
+ 	} else if (!strcmp(ctx->argp[0], "flow-type")) {	
+ 		struct ethtool_rx_flow_spec rx_rule_fs;
++		__u32 rss_context = 0;
+ 
+ 		ctx->argc--;
+ 		ctx->argp++;
+-		if (rxclass_parse_ruleopts(ctx, &rx_rule_fs) < 0)
++		if (rxclass_parse_ruleopts(ctx, &rx_rule_fs, &rss_context) < 0)
+ 			exit_bad_args();
+ 
+ 		/* attempt to add rule via N-tuple specifier */
+@@ -3559,7 +3571,7 @@ static int do_srxclass(struct cmd_context *ctx)
+ 			return 0;
+ 
+ 		/* attempt to add rule via network flow classifier */
+-		err = rxclass_rule_ins(ctx, &rx_rule_fs);
++		err = rxclass_rule_ins(ctx, &rx_rule_fs, rss_context);
+ 		if (err < 0) {
+ 			fprintf(stderr, "Cannot insert"
+ 				" classification rule\n");
+@@ -3588,8 +3600,18 @@ static int do_grxclass(struct cmd_context *ctx)
+ 	struct ethtool_rxnfc nfccmd;
+ 	int err;
+ 
+-	if (ctx->argc == 2 && !strcmp(ctx->argp[0], "rx-flow-hash")) {
++	if (ctx->argc > 0 && !strcmp(ctx->argp[0], "rx-flow-hash")) {
+ 		int rx_fhash_get;
++		bool flow_rss = false;
++
++		if (ctx->argc == 4) {
++			if (strcmp(ctx->argp[2], "context"))
++				exit_bad_args();
++			flow_rss = true;
++			nfccmd.rss_context = get_u32(ctx->argp[3], 0);
++		} else if (ctx->argc != 2) {
++			exit_bad_args();
++		}
+ 
+ 		rx_fhash_get = rxflow_str_to_type(ctx->argp[1]);
+ 		if (!rx_fhash_get)
+@@ -3597,11 +3619,17 @@ static int do_grxclass(struct cmd_context *ctx)
+ 
+ 		nfccmd.cmd = ETHTOOL_GRXFH;
+ 		nfccmd.flow_type = rx_fhash_get;
++		if (flow_rss)
++			nfccmd.flow_type |= FLOW_RSS;
+ 		err = send_ioctl(ctx, &nfccmd);
+-		if (err < 0)
++		if (err < 0) {
+ 			perror("Cannot get RX network flow hashing options");
+-		else
++		} else {
++			if (flow_rss)
++				fprintf(stdout, "For RSS context %u:\n",
++					nfccmd.rss_context);
+ 			dump_rxfhash(rx_fhash_get, nfccmd.data);
++		}
+ 	} else if (ctx->argc == 2 && !strcmp(ctx->argp[0], "rule")) {
+ 		int rx_class_rule_get =
+ 			get_uint_range(ctx->argp[1], 0, INT_MAX);
+@@ -3693,10 +3721,23 @@ static int do_grxfh(struct cmd_context *ctx)
+ 	struct ethtool_rxfh rss_head = {0};
+ 	struct ethtool_rxnfc ring_count;
+ 	struct ethtool_rxfh *rss;
++	u32 rss_context = 0;
+ 	u32 i, indir_bytes;
++	int arg_num = 0;
+ 	char *hkey;
+ 	int err;
+ 
++	while (arg_num < ctx->argc) {
++		if (!strcmp(ctx->argp[arg_num], "context")) {
++			++arg_num;
++			rss_context = get_int_range(ctx->argp[arg_num], 0, 1,
++						    ETH_RXFH_CONTEXT_ALLOC - 1);
++			++arg_num;
++		} else {
++			exit_bad_args();
++		}
++	}
++
+ 	ring_count.cmd = ETHTOOL_GRXRINGS;
+ 	err = send_ioctl(ctx, &ring_count);
+ 	if (err < 0) {
+@@ -3705,6 +3746,7 @@ static int do_grxfh(struct cmd_context *ctx)
+ 	}
+ 
+ 	rss_head.cmd = ETHTOOL_GRSSH;
++	rss_head.rss_context = rss_context;
+ 	err = send_ioctl(ctx, &rss_head);
+ 	if (err < 0 && errno == EOPNOTSUPP) {
+ 		return do_grxfhindir(ctx, &ring_count);
+@@ -3722,6 +3764,7 @@ static int do_grxfh(struct cmd_context *ctx)
+ 	}
+ 
+ 	rss->cmd = ETHTOOL_GRSSH;
++	rss->rss_context = rss_context;
+ 	rss->indir_size = rss_head.indir_size;
+ 	rss->key_size = rss_head.key_size;
+ 	err = send_ioctl(ctx, rss);
+@@ -3882,6 +3925,8 @@ static int do_srxfh(struct cmd_context *ctx)
+ 	u32 req_hfunc = 0;
+ 	u32 entry_size = sizeof(rss_head.rss_config[0]);
+ 	u32 num_weights = 0;
++	u32 rss_context = 0;
++	int delete = 0;
+ 
+ 	if (ctx->argc < 1)
+ 		exit_bad_args();
+@@ -3917,6 +3962,18 @@ static int do_srxfh(struct cmd_context *ctx)
+ 			if (!req_hfunc_name)
+ 				exit_bad_args();
+ 			++arg_num;
++		} else if (!strcmp(ctx->argp[arg_num], "context")) {
++			++arg_num;
++			if(!strcmp(ctx->argp[arg_num], "new"))
++				rss_context = ETH_RXFH_CONTEXT_ALLOC;
++			else
++				rss_context = get_int_range(
++						ctx->argp[arg_num], 0, 1,
++						ETH_RXFH_CONTEXT_ALLOC - 1);
++			++arg_num;
++		} else if (!strcmp(ctx->argp[arg_num], "delete")) {
++			++arg_num;
++			delete = 1;
+ 		} else {
+ 			exit_bad_args();
+ 		}
+@@ -3940,6 +3997,41 @@ static int do_srxfh(struct cmd_context *ctx)
+ 		return 1;
+ 	}
+ 
++	if (rxfhindir_default && rss_context) {
++		fprintf(stderr,
++			"Default and context options are mutually exclusive\n");
++		return 1;
++	}
++
++	if (delete && !rss_context) {
++		fprintf(stderr, "Delete option requires context option\n");
++		return 1;
++	}
++
++	if (delete && rxfhindir_weight) {
++		fprintf(stderr,
++			"Delete and weight options are mutually exclusive\n");
++		return 1;
++	}
++
++	if (delete && rxfhindir_equal) {
++		fprintf(stderr,
++			"Delete and equal options are mutually exclusive\n");
++		return 1;
++	}
++
++	if (delete && rxfhindir_default) {
++		fprintf(stderr,
++			"Delete and default options are mutually exclusive\n");
++		return 1;
++	}
++
++	if (delete && rxfhindir_key) {
++		fprintf(stderr,
++			"Delete and hkey options are mutually exclusive\n");
++		return 1;
++	}
++
+ 	ring_count.cmd = ETHTOOL_GRXRINGS;
+ 	err = send_ioctl(ctx, &ring_count);
+ 	if (err < 0) {
+@@ -3950,7 +4042,7 @@ static int do_srxfh(struct cmd_context *ctx)
+ 	rss_head.cmd = ETHTOOL_GRSSH;
+ 	err = send_ioctl(ctx, &rss_head);
+ 	if (err < 0 && errno == EOPNOTSUPP && !rxfhindir_key &&
+-	    !req_hfunc_name) {
++	    !req_hfunc_name && !rss_context) {
+ 		return do_srxfhindir(ctx, rxfhindir_default, rxfhindir_equal,
+ 				     rxfhindir_weight, num_weights);
+ 	} else if (err < 0) {
+@@ -3998,14 +4090,19 @@ static int do_srxfh(struct cmd_context *ctx)
+ 		goto free;
+ 	}
+ 	rss->cmd = ETHTOOL_SRSSH;
+-	rss->indir_size = rss_head.indir_size;
+-	rss->key_size = rss_head.key_size;
++	rss->rss_context = rss_context;
+ 	rss->hfunc = req_hfunc;
+-
+-	if (fill_indir_table(&rss->indir_size, rss->rss_config, rxfhindir_default,
+-			     rxfhindir_equal, rxfhindir_weight, num_weights)) {
+-		err = 1;
+-		goto free;
++	if (delete) {
++		rss->indir_size = rss->key_size = 0;
++	} else {
++		rss->indir_size = rss_head.indir_size;
++		rss->key_size = rss_head.key_size;
++		if (fill_indir_table(&rss->indir_size, rss->rss_config,
++				     rxfhindir_default, rxfhindir_equal,
++				     rxfhindir_weight, num_weights)) {
++			err = 1;
++			goto free;
++		}
+ 	}
+ 
+ 	if (hkey)
+@@ -4018,6 +4115,8 @@ static int do_srxfh(struct cmd_context *ctx)
+ 	if (err < 0) {
+ 		perror("Cannot set RX flow hash configuration");
+ 		err = 1;
++	} else if (rss_context == ETH_RXFH_CONTEXT_ALLOC) {
++		printf("New RSS context is %d\n", rss->rss_context);
+ 	}
+ 
+ free:
+@@ -4803,12 +4902,12 @@ static const struct option {
+ 	{ "-n|-u|--show-nfc|--show-ntuple", 1, do_grxclass,
+ 	  "Show Rx network flow classification options or rules",
+ 	  "		[ rx-flow-hash tcp4|udp4|ah4|esp4|sctp4|"
+-	  "tcp6|udp6|ah6|esp6|sctp6 |\n"
++	  "tcp6|udp6|ah6|esp6|sctp6 [context %d] |\n"
+ 	  "		  rule %d ]\n" },
+ 	{ "-N|-U|--config-nfc|--config-ntuple", 1, do_srxclass,
+ 	  "Configure Rx network flow classification options or rules",
+ 	  "		rx-flow-hash tcp4|udp4|ah4|esp4|sctp4|"
+-	  "tcp6|udp6|ah6|esp6|sctp6 m|v|t|s|d|f|n|r... |\n"
++	  "tcp6|udp6|ah6|esp6|sctp6 m|v|t|s|d|f|n|r... [context %d] |\n"
+ 	  "		flow-type ether|ip4|tcp4|udp4|sctp4|ah4|esp4|"
+ 	  "ip6|tcp6|udp6|ah6|esp6|sctp6\n"
+ 	  "			[ src %x:%x:%x:%x:%x:%x [m %x:%x:%x:%x:%x:%x] ]\n"
+@@ -4827,17 +4926,21 @@ static const struct option {
+ 	  "			[ user-def %x [m %x] ]\n"
+ 	  "			[ dst-mac %x:%x:%x:%x:%x:%x [m %x:%x:%x:%x:%x:%x] ]\n"
+ 	  "			[ action %d ]\n"
++	  "			[ context %d ]\n"
+ 	  "			[ loc %d]] |\n"
+ 	  "		delete %d\n" },
+ 	{ "-T|--show-time-stamping", 1, do_tsinfo,
+ 	  "Show time stamping capabilities" },
+ 	{ "-x|--show-rxfh-indir|--show-rxfh", 1, do_grxfh,
+-	  "Show Rx flow hash indirection table and/or RSS hash key" },
++	  "Show Rx flow hash indirection table and/or RSS hash key",
++	  "		[ context %d ]\n" },
+ 	{ "-X|--set-rxfh-indir|--rxfh", 1, do_srxfh,
+ 	  "Set Rx flow hash indirection table and/or RSS hash key",
++	  "		[ context %d|new ]\n"
+ 	  "		[ equal N | weight W0 W1 ... | default ]\n"
+ 	  "		[ hkey %x:%x:%x:%x:%x:.... ]\n"
+-	  "		[ hfunc FUNC ]\n" },
++	  "		[ hfunc FUNC ]\n"
++	  "		[ delete ]\n" },
+ 	{ "-f|--flash", 1, do_flash,
+ 	  "Flash firmware image from the specified file to a region on the device",
+ 	  "               FILENAME [ REGION-NUMBER-TO-FLASH ]\n" },
+diff --git a/internal.h b/internal.h
+index 4e658ea..913f4eb 100644
+--- a/internal.h
++++ b/internal.h
+@@ -332,11 +332,11 @@ int vmxnet3_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
+ 
+ /* Rx flow classification */
+ int rxclass_parse_ruleopts(struct cmd_context *ctx,
+-			   struct ethtool_rx_flow_spec *fsp);
++			   struct ethtool_rx_flow_spec *fsp, __u32 *rss_context);
+ int rxclass_rule_getall(struct cmd_context *ctx);
+ int rxclass_rule_get(struct cmd_context *ctx, __u32 loc);
+ int rxclass_rule_ins(struct cmd_context *ctx,
+-		     struct ethtool_rx_flow_spec *fsp);
++		     struct ethtool_rx_flow_spec *fsp, __u32 rss_context);
+ int rxclass_rule_del(struct cmd_context *ctx, __u32 loc);
+ 
+ /* Module EEPROM parsing code */
+diff --git a/rxclass.c b/rxclass.c
+index c7bfeba..39c9eca 100644
+--- a/rxclass.c
++++ b/rxclass.c
+@@ -94,14 +94,15 @@ static void rxclass_print_nfc_spec_ext(struct ethtool_rx_flow_spec *fsp)
+ 	}
+ }
+ 
+-static void rxclass_print_nfc_rule(struct ethtool_rx_flow_spec *fsp)
++static void rxclass_print_nfc_rule(struct ethtool_rx_flow_spec *fsp,
++				   __u32 rss_context)
+ {
+ 	unsigned char	*smac, *smacm, *dmac, *dmacm;
+ 	__u32		flow_type;
+ 
+ 	fprintf(stdout,	"Filter: %d\n", fsp->location);
+ 
+-	flow_type = fsp->flow_type & ~(FLOW_EXT | FLOW_MAC_EXT);
++	flow_type = fsp->flow_type & ~(FLOW_EXT | FLOW_MAC_EXT | FLOW_RSS);
+ 
+ 	invert_flow_mask(fsp);
+ 
+@@ -247,6 +248,9 @@ static void rxclass_print_nfc_rule(struct ethtool_rx_flow_spec *fsp)
+ 
+ 	rxclass_print_nfc_spec_ext(fsp);
+ 
++	if (fsp->flow_type & FLOW_RSS)
++		fprintf(stdout, "\tRSS Context ID: %u\n", rss_context);
++
+ 	if (fsp->ring_cookie != RX_CLS_FLOW_DISC)
+ 		fprintf(stdout, "\tAction: Direct to queue %llu\n",
+ 			fsp->ring_cookie);
+@@ -256,10 +260,11 @@ static void rxclass_print_nfc_rule(struct ethtool_rx_flow_spec *fsp)
+ 	fprintf(stdout, "\n");
+ }
+ 
+-static void rxclass_print_rule(struct ethtool_rx_flow_spec *fsp)
++static void rxclass_print_rule(struct ethtool_rx_flow_spec *fsp,
++			       __u32 rss_context)
+ {
+ 	/* print the rule in this location */
+-	switch (fsp->flow_type & ~(FLOW_EXT | FLOW_MAC_EXT)) {
++	switch (fsp->flow_type & ~(FLOW_EXT | FLOW_MAC_EXT | FLOW_RSS)) {
+ 	case TCP_V4_FLOW:
+ 	case UDP_V4_FLOW:
+ 	case SCTP_V4_FLOW:
+@@ -272,11 +277,11 @@ static void rxclass_print_rule(struct ethtool_rx_flow_spec *fsp)
+ 	case ESP_V6_FLOW:
+ 	case IPV6_USER_FLOW:
+ 	case ETHER_FLOW:
+-		rxclass_print_nfc_rule(fsp);
++		rxclass_print_nfc_rule(fsp, rss_context);
+ 		break;
+ 	case IPV4_USER_FLOW:
+ 		if (fsp->h_u.usr_ip4_spec.ip_ver == ETH_RX_NFC_IP4)
+-			rxclass_print_nfc_rule(fsp);
++			rxclass_print_nfc_rule(fsp, rss_context);
+ 		else /* IPv6 uses IPV6_USER_FLOW */
+ 			fprintf(stderr, "IPV4_USER_FLOW with wrong ip_ver\n");
+ 		break;
+@@ -320,7 +325,7 @@ int rxclass_rule_get(struct cmd_context *ctx, __u32 loc)
+ 	}
+ 
+ 	/* display rule */
+-	rxclass_print_rule(&nfccmd.fs);
++	rxclass_print_rule(&nfccmd.fs, (__u32)nfccmd.rss_context);
+ 	return err;
+ }
+ 
+@@ -550,7 +555,7 @@ out:
+ }
+ 
+ int rxclass_rule_ins(struct cmd_context *ctx,
+-		     struct ethtool_rx_flow_spec *fsp)
++		     struct ethtool_rx_flow_spec *fsp, __u32 rss_context)
+ {
+ 	struct ethtool_rxnfc nfccmd;
+ 	__u32 loc = fsp->location;
+@@ -568,6 +573,7 @@ int rxclass_rule_ins(struct cmd_context *ctx,
+ 
+ 	/* notify netdev of new rule */
+ 	nfccmd.cmd = ETHTOOL_SRXCLSRLINS;
++	nfccmd.rss_context = rss_context;
+ 	nfccmd.fs = *fsp;
+ 	err = send_ioctl(ctx, &nfccmd);
+ 	if (err < 0)
+@@ -1184,7 +1190,7 @@ static int rxclass_get_mask(char *str, unsigned char *p,
+ }
+ 
+ int rxclass_parse_ruleopts(struct cmd_context *ctx,
+-			   struct ethtool_rx_flow_spec *fsp)
++			   struct ethtool_rx_flow_spec *fsp, __u32 *rss_context)
+ {
+ 	const struct rule_opts *options;
+ 	unsigned char *p = (unsigned char *)fsp;
+@@ -1273,6 +1279,40 @@ int rxclass_parse_ruleopts(struct cmd_context *ctx,
+ 	for (i = 1; i < argc;) {
+ 		const struct rule_opts *opt;
+ 		int idx;
++
++		/* special handling for 'context %d' as it doesn't go in
++		 * the struct ethtool_rx_flow_spec
++		 */
++		if (!strcmp(argp[i], "context")) {
++			unsigned long long val;
++
++			i++;
++			if (i >= argc) {
++				fprintf(stderr, "'context' missing value\n");
++				return -1;
++			}
++
++			if (rxclass_get_ulong(argp[i], &val, 32)) {
++				fprintf(stderr, "Invalid context value[%s]\n",
++					argp[i]);
++				return -1;
++			}
++
++			/* Can't use the ALLOC special value as the context ID
++			 * of a filter to insert
++			 */
++			if ((__u32)val == ETH_RXFH_CONTEXT_ALLOC) {
++				fprintf(stderr, "Bad context value %x\n",
++					(__u32)val);
++				return -1;
++			}
++
++			*rss_context = (__u32)val;
++			fsp->flow_type |= FLOW_RSS;
++			i++;
++			continue;
++		}
++
+ 		for (opt = options, idx = 0; idx < n_opts; idx++, opt++) {
+ 			char mask_name[16];
+ 
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0017-ethtool.8-Document-RSS-context-control-and-RSS-filte.patch b/SOURCES/0017-ethtool.8-Document-RSS-context-control-and-RSS-filte.patch
new file mode 100644
index 0000000..1153a9c
--- /dev/null
+++ b/SOURCES/0017-ethtool.8-Document-RSS-context-control-and-RSS-filte.patch
@@ -0,0 +1,75 @@
+From 2fb429c04c2da29701c250351bb8877f9d0e5ac2 Mon Sep 17 00:00:00 2001
+From: Edward Cree <ecree@solarflare.com>
+Date: Fri, 9 Mar 2018 15:04:21 +0000
+Subject: [PATCH 17/18] ethtool.8: Document RSS context control and RSS filters
+
+Signed-off-by: Edward Cree <ecree@solarflare.com>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+(cherry picked from commit 172d6f10021dcce940d0354b266a9f4bbfde0b94)
+---
+ ethtool.8.in | 28 ++++++++++++++++++++++++++++
+ 1 file changed, 28 insertions(+)
+
+diff --git a/ethtool.8.in b/ethtool.8.in
+index 6816020..dd2e3f5 100644
+--- a/ethtool.8.in
++++ b/ethtool.8.in
+@@ -274,6 +274,7 @@ ethtool \- query or control network driver and hardware settings
+ .BM user\-def
+ .RB [ dst-mac \ \*(MA\ [ m \ \*(MA]]
+ .BN action
++.BN context
+ .BN loc
+ .RB |
+ .br
+@@ -303,6 +304,10 @@ ethtool \- query or control network driver and hardware settings
+ .RB ...\ | \ default \ ]
+ .RB [ hfunc
+ .IR FUNC ]
++.RB [ context
++.I CTX
++.RB |\  new ]
++.RB [ delete ]
+ .HP
+ .B ethtool \-f|\-\-flash
+ .I devname file
+@@ -832,6 +837,13 @@ lB	l.
+ 0 or higher	Rx queue to route the flow
+ .TE
+ .TP
++.BI context \ N
++Specifies the RSS context to spread packets over multiple queues; either
++.B 0
++for the default RSS context, or a value returned by
++.BI ethtool\ -X\  ... \ context
++.BR new .
++.TP
+ .BI loc \ N
+ Specify the location/ID to insert the rule. This will overwrite
+ any rule present in that location and will not go through any
+@@ -883,6 +895,22 @@ must be non-zero and must not exceed the size of the indirection table.
+ .TP
+ .BI default
+ Sets the receive flow hash indirection table to its default value.
++.TP
++\fBcontext \fICTX\fR | \fBnew\fR
++Specifies an RSS context to act on; either
++.B new
++to allocate a new RSS context, or
++.IR CTX ,
++a value returned by a previous
++.IB ... \ context
++.BR new .
++.TP
++.B delete
++Delete the specified RSS context.  May only be used in conjunction with
++.B context
++and a non-zero
++.I CTX
++value.
+ .RE
+ .TP
+ .B \-f \-\-flash
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0018-ethtool-don-t-fall-back-to-grxfhindir-when-context-w.patch b/SOURCES/0018-ethtool-don-t-fall-back-to-grxfhindir-when-context-w.patch
new file mode 100644
index 0000000..9f1cab4
--- /dev/null
+++ b/SOURCES/0018-ethtool-don-t-fall-back-to-grxfhindir-when-context-w.patch
@@ -0,0 +1,34 @@
+From 6ff8142033aed6f9eafe7c4f8a67a55c5a98ab2f Mon Sep 17 00:00:00 2001
+From: Edward Cree <ecree@solarflare.com>
+Date: Mon, 19 Mar 2018 16:52:06 +0000
+Subject: [PATCH 18/18] ethtool: don't fall back to grxfhindir when context was
+ specified
+
+In do_grfxh(), if rss_context is non-zero, we must not fall back to
+ do_grxfhindir() if ETHTOOL_GRSSH fails, for that reads the default RSS
+ context and not the one specified.
+
+Fixes: f5d55b967e0c ("ethtool: add support for extra RSS contexts and RSS steering filters")
+Signed-off-by: Edward Cree <ecree@solarflare.com>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+(cherry picked from commit 7984d34ea893a529330b6addb959cbf6e3ec026f)
+---
+ ethtool.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ethtool.c b/ethtool.c
+index a276fdb..2ecc13f 100644
+--- a/ethtool.c
++++ b/ethtool.c
+@@ -3748,7 +3748,7 @@ static int do_grxfh(struct cmd_context *ctx)
+ 	rss_head.cmd = ETHTOOL_GRSSH;
+ 	rss_head.rss_context = rss_context;
+ 	err = send_ioctl(ctx, &rss_head);
+-	if (err < 0 && errno == EOPNOTSUPP) {
++	if (err < 0 && errno == EOPNOTSUPP && !rss_context) {
+ 		return do_grxfhindir(ctx, &ring_count);
+ 	} else if (err < 0) {
+ 		perror("Cannot get RX flow hash indir size and/or key size");
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0019-ethtool-Fix-coding-style-warnings-and-errors-reporte.patch b/SOURCES/0019-ethtool-Fix-coding-style-warnings-and-errors-reporte.patch
new file mode 100644
index 0000000..5fec7e2
--- /dev/null
+++ b/SOURCES/0019-ethtool-Fix-coding-style-warnings-and-errors-reporte.patch
@@ -0,0 +1,385 @@
+From ec0ef0916c7d8d5f1b618610f202c805f1955827 Mon Sep 17 00:00:00 2001
+From: Gal Pressman <galp@mellanox.com>
+Date: Thu, 26 Oct 2017 17:44:43 +0300
+Subject: [PATCH] ethtool: Fix coding style warnings and errors reported by
+ checkpatch
+
+Checkpatch had a lot to say about ethtool.c, this will handle a lot of
+the reported issues.
+
+Signed-off-by: Gal Pressman <galp@mellanox.com>
+Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
+(cherry picked from commit 5a20e546c0bf4b479f1b3cd272ea366a6069bfa4)
+---
+ ethtool.c | 189 +++++++++++++++++++++++++++++---------------------------------
+ 1 file changed, 89 insertions(+), 100 deletions(-)
+
+diff --git a/ethtool.c b/ethtool.c
+index 2ecc13f..06006f4 100644
+--- a/ethtool.c
++++ b/ethtool.c
+@@ -235,7 +235,7 @@ get_uint_range(char *str, int base, unsigned long long max)
+ 		exit_bad_args();
+ 	errno = 0;
+ 	v = strtoull(str, &endp, base);
+-	if ( errno || *endp || v > max)
++	if (errno || *endp || v > max)
+ 		exit_bad_args();
+ 	return v;
+ }
+@@ -261,9 +261,8 @@ static void get_mac_addr(char *src, unsigned char *dest)
+ 	if (count != ETH_ALEN)
+ 		exit_bad_args();
+ 
+-	for (i = 0; i < count; i++) {
++	for (i = 0; i < count; i++)
+ 		dest[i] = buf[i];
+-	}
+ }
+ 
+ static int parse_hex_u32_bitmap(const char *s,
+@@ -408,7 +407,7 @@ static void parse_generic_cmdline(struct cmd_context *ctx,
+ 				break;
+ 			}
+ 		}
+-		if( !found)
++		if (!found)
+ 			exit_bad_args();
+ 	}
+ }
+@@ -686,10 +685,10 @@ static void dump_link_caps(const char *prefix, const char *an_prefix,
+ 		  "10000baseLRM/Full" },
+ 		{ 0, ETHTOOL_LINK_MODE_10000baseER_Full_BIT,
+ 		  "10000baseER/Full" },
+-                { 0, ETHTOOL_LINK_MODE_2500baseT_Full_BIT,
+-                  "2500baseT/Full" },
+-                { 0, ETHTOOL_LINK_MODE_5000baseT_Full_BIT,
+-                  "5000baseT/Full" },
++		{ 0, ETHTOOL_LINK_MODE_2500baseT_Full_BIT,
++		  "2500baseT/Full" },
++		{ 0, ETHTOOL_LINK_MODE_5000baseT_Full_BIT,
++		  "5000baseT/Full" },
+ 	};
+ 	int indent;
+ 	int did1, new_line_pend, i;
+@@ -719,7 +718,7 @@ static void dump_link_caps(const char *prefix, const char *an_prefix,
+ 		}
+ 	}
+ 	if (did1 == 0)
+-		 fprintf(stdout, "Not reported");
++		fprintf(stdout, "Not reported");
+ 	fprintf(stdout, "\n");
+ 
+ 	if (!link_mode_only) {
+@@ -911,32 +910,32 @@ static int parse_wolopts(char *optstr, u32 *data)
+ 	*data = 0;
+ 	while (*optstr) {
+ 		switch (*optstr) {
+-			case 'p':
+-				*data |= WAKE_PHY;
+-				break;
+-			case 'u':
+-				*data |= WAKE_UCAST;
+-				break;
+-			case 'm':
+-				*data |= WAKE_MCAST;
+-				break;
+-			case 'b':
+-				*data |= WAKE_BCAST;
+-				break;
+-			case 'a':
+-				*data |= WAKE_ARP;
+-				break;
+-			case 'g':
+-				*data |= WAKE_MAGIC;
+-				break;
+-			case 's':
+-				*data |= WAKE_MAGICSECURE;
+-				break;
+-			case 'd':
+-				*data = 0;
+-				break;
+-			default:
+-				return -1;
++		case 'p':
++			*data |= WAKE_PHY;
++			break;
++		case 'u':
++			*data |= WAKE_UCAST;
++			break;
++		case 'm':
++			*data |= WAKE_MCAST;
++			break;
++		case 'b':
++			*data |= WAKE_BCAST;
++			break;
++		case 'a':
++			*data |= WAKE_ARP;
++			break;
++		case 'g':
++			*data |= WAKE_MAGIC;
++			break;
++		case 's':
++			*data |= WAKE_MAGICSECURE;
++			break;
++		case 'd':
++			*data = 0;
++			break;
++		default:
++			return -1;
+ 		}
+ 		optstr++;
+ 	}
+@@ -981,10 +980,11 @@ static int dump_wol(struct ethtool_wolinfo *wol)
+ 	if (wol->supported & WAKE_MAGICSECURE) {
+ 		int i;
+ 		int delim = 0;
++
+ 		fprintf(stdout, "        SecureOn password: ");
+ 		for (i = 0; i < SOPASS_MAX; i++) {
+ 			fprintf(stdout, "%s%02x", delim?":":"", wol->sopass[i]);
+-			delim=1;
++			delim = 1;
+ 		}
+ 		fprintf(stdout, "\n");
+ 	}
+@@ -997,32 +997,32 @@ static int parse_rxfhashopts(char *optstr, u32 *data)
+ 	*data = 0;
+ 	while (*optstr) {
+ 		switch (*optstr) {
+-			case 'm':
+-				*data |= RXH_L2DA;
+-				break;
+-			case 'v':
+-				*data |= RXH_VLAN;
+-				break;
+-			case 't':
+-				*data |= RXH_L3_PROTO;
+-				break;
+-			case 's':
+-				*data |= RXH_IP_SRC;
+-				break;
+-			case 'd':
+-				*data |= RXH_IP_DST;
+-				break;
+-			case 'f':
+-				*data |= RXH_L4_B_0_1;
+-				break;
+-			case 'n':
+-				*data |= RXH_L4_B_2_3;
+-				break;
+-			case 'r':
+-				*data |= RXH_DISCARD;
+-				break;
+-			default:
+-				return -1;
++		case 'm':
++			*data |= RXH_L2DA;
++			break;
++		case 'v':
++			*data |= RXH_VLAN;
++			break;
++		case 't':
++			*data |= RXH_L3_PROTO;
++			break;
++		case 's':
++			*data |= RXH_IP_SRC;
++			break;
++		case 'd':
++			*data |= RXH_IP_DST;
++			break;
++		case 'f':
++			*data |= RXH_L4_B_0_1;
++			break;
++		case 'n':
++			*data |= RXH_L4_B_2_3;
++			break;
++		case 'r':
++			*data |= RXH_DISCARD;
++			break;
++		default:
++			return -1;
+ 		}
+ 		optstr++;
+ 	}
+@@ -1036,27 +1036,20 @@ static char *unparse_rxfhashopts(u64 opts)
+ 	memset(buf, 0, sizeof(buf));
+ 
+ 	if (opts) {
+-		if (opts & RXH_L2DA) {
++		if (opts & RXH_L2DA)
+ 			strcat(buf, "L2DA\n");
+-		}
+-		if (opts & RXH_VLAN) {
++		if (opts & RXH_VLAN)
+ 			strcat(buf, "VLAN tag\n");
+-		}
+-		if (opts & RXH_L3_PROTO) {
++		if (opts & RXH_L3_PROTO)
+ 			strcat(buf, "L3 proto\n");
+-		}
+-		if (opts & RXH_IP_SRC) {
++		if (opts & RXH_IP_SRC)
+ 			strcat(buf, "IP SA\n");
+-		}
+-		if (opts & RXH_IP_DST) {
++		if (opts & RXH_IP_DST)
+ 			strcat(buf, "IP DA\n");
+-		}
+-		if (opts & RXH_L4_B_0_1) {
++		if (opts & RXH_L4_B_0_1)
+ 			strcat(buf, "L4 bytes 0 & 1 [TCP/UDP src port]\n");
+-		}
+-		if (opts & RXH_L4_B_2_3) {
++		if (opts & RXH_L4_B_2_3)
+ 			strcat(buf, "L4 bytes 2 & 3 [TCP/UDP dst port]\n");
+-		}
+ 	} else {
+ 		sprintf(buf, "None");
+ 	}
+@@ -1157,10 +1150,10 @@ static const struct {
+ 	{ "tg3", tg3_dump_regs },
+ 	{ "skge", skge_dump_regs },
+ 	{ "sky2", sky2_dump_regs },
+-        { "vioc", vioc_dump_regs },
+-        { "smsc911x", smsc911x_dump_regs },
+-        { "at76c50x-usb", at76c50x_usb_dump_regs },
+-        { "sfc", sfc_dump_regs },
++	{ "vioc", vioc_dump_regs },
++	{ "smsc911x", smsc911x_dump_regs },
++	{ "at76c50x-usb", at76c50x_usb_dump_regs },
++	{ "sfc", sfc_dump_regs },
+ 	{ "st_mac100", st_mac100_dump_regs },
+ 	{ "st_gmac", st_gmac_dump_regs },
+ 	{ "et131x", et131x_dump_regs },
+@@ -2805,7 +2798,7 @@ static int do_sset(struct cmd_context *ctx)
+ 			i += 1;
+ 			if (i >= argc)
+ 				exit_bad_args();
+-			speed_wanted = get_int(argp[i],10);
++			speed_wanted = get_int(argp[i], 10);
+ 		} else if (!strcmp(argp[i], "duplex")) {
+ 			gset_changed = 1;
+ 			i += 1;
+@@ -3016,7 +3009,7 @@ static int do_sset(struct cmd_context *ctx)
+ 						speed_wanted);
+ 				if (duplex_wanted >= 0)
+ 					fprintf(stderr, " duplex %s",
+-						duplex_wanted ? 
++						duplex_wanted ?
+ 						"full" : "half");
+ 				fprintf(stderr,	"\n");
+ 			}
+@@ -3101,14 +3094,12 @@ static int do_sset(struct cmd_context *ctx)
+ 			perror("Cannot get current wake-on-lan settings");
+ 		} else {
+ 			/* Change everything the user specified. */
+-			if (wol_change) {
++			if (wol_change)
+ 				wol.wolopts = wol_wanted;
+-			}
+ 			if (sopass_change) {
+ 				int i;
+-				for (i = 0; i < SOPASS_MAX; i++) {
++				for (i = 0; i < SOPASS_MAX; i++)
+ 					wol.sopass[i] = sopass_wanted[i];
+-				}
+ 			}
+ 
+ 			/* Try to perform the update. */
+@@ -3205,7 +3196,7 @@ static int do_gregs(struct cmd_context *ctx)
+ 			free(regs);
+ 			return 75;
+ 		}
+-        }
++	}
+ 
+ 	if (dump_regs(gregs_dump_raw, gregs_dump_hex,
+ 		      &drvinfo, regs) < 0) {
+@@ -3364,7 +3355,7 @@ static int do_seeprom(struct cmd_context *ctx)
+ static int do_test(struct cmd_context *ctx)
+ {
+ 	enum {
+-		ONLINE=0,
++		ONLINE = 0,
+ 		OFFLINE,
+ 		EXTERNAL_LB,
+ 	} test_type;
+@@ -3375,15 +3366,14 @@ static int do_test(struct cmd_context *ctx)
+ 	if (ctx->argc > 1)
+ 		exit_bad_args();
+ 	if (ctx->argc == 1) {
+-		if (!strcmp(ctx->argp[0], "online")) {
++		if (!strcmp(ctx->argp[0], "online"))
+ 			test_type = ONLINE;
+-	 	} else if (!strcmp(*ctx->argp, "offline")) {
++		else if (!strcmp(*ctx->argp, "offline"))
+ 			test_type = OFFLINE;
+-		} else if (!strcmp(*ctx->argp, "external_lb")) {
++		else if (!strcmp(*ctx->argp, "external_lb"))
+ 			test_type = EXTERNAL_LB;
+-		} else {
++		else
+ 			exit_bad_args();
+-		}
+ 	} else {
+ 		test_type = OFFLINE;
+ 	}
+@@ -3414,7 +3404,7 @@ static int do_test(struct cmd_context *ctx)
+ 	err = send_ioctl(ctx, test);
+ 	if (err < 0) {
+ 		perror("Cannot test");
+-		free (test);
++		free(test);
+ 		free(strings);
+ 		return 74;
+ 	}
+@@ -3556,7 +3546,7 @@ static int do_srxclass(struct cmd_context *ctx)
+ 		err = send_ioctl(ctx, &nfccmd);
+ 		if (err < 0)
+ 			perror("Cannot change RX network flow hashing options");
+-	} else if (!strcmp(ctx->argp[0], "flow-type")) {	
++	} else if (!strcmp(ctx->argp[0], "flow-type")) {
+ 		struct ethtool_rx_flow_spec rx_rule_fs;
+ 		__u32 rss_context = 0;
+ 
+@@ -4325,8 +4315,8 @@ static int do_srxntuple(struct cmd_context *ctx,
+ 	/*
+ 	 * Display error only if response is something other than op not
+ 	 * supported.  It is possible that the interface uses the network
+-	 * flow classifier interface instead of N-tuple. 
+-	 */ 
++	 * flow classifier interface instead of N-tuple.
++	 */
+ 	if (err < 0) {
+ 		if (errno != EOPNOTSUPP)
+ 			perror("Cannot add new rule via N-tuple");
+@@ -4468,7 +4458,7 @@ static int do_gprivflags(struct cmd_context *ctx)
+ 
+ 	/* Find longest string and align all strings accordingly */
+ 	for (i = 0; i < strings->len; i++) {
+-		cur_len = strlen((const char*)strings->data +
++		cur_len = strlen((const char *)strings->data +
+ 				 i * ETH_GSTRING_LEN);
+ 		if (cur_len > max_len)
+ 			max_len = cur_len;
+@@ -4718,7 +4708,6 @@ static int do_seee(struct cmd_context *ctx)
+ 	do_generic_set(cmdline_eee, ARRAY_SIZE(cmdline_eee), &change2);
+ 
+ 	if (change2) {
+-
+ 		eeecmd.cmd = ETHTOOL_SEEE;
+ 		if (send_ioctl(ctx, &eeecmd)) {
+ 			perror("Cannot set EEE settings");
+@@ -4958,7 +4947,7 @@ static const struct option {
+ 	  "               [ tx N ]\n"
+ 	  "               [ other N ]\n"
+ 	  "               [ combined N ]\n" },
+-	{ "--show-priv-flags" , 1, do_gprivflags, "Query private flags" },
++	{ "--show-priv-flags", 1, do_gprivflags, "Query private flags" },
+ 	{ "--set-priv-flags", 1, do_sprivflags, "Set private flags",
+ 	  "		FLAG on|off ...\n" },
+ 	{ "-m|--dump-module-eeprom|--module-info", 1, do_getmodule,
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0020-ethtool-Add-support-for-200Gbps-50Gbps-per-lane-link.patch b/SOURCES/0020-ethtool-Add-support-for-200Gbps-50Gbps-per-lane-link.patch
new file mode 100644
index 0000000..e40303b
--- /dev/null
+++ b/SOURCES/0020-ethtool-Add-support-for-200Gbps-50Gbps-per-lane-link.patch
@@ -0,0 +1,162 @@
+From f507c9e5f77a10d25d32581c2b160e90c4c446b0 Mon Sep 17 00:00:00 2001
+From: Aya Levin <ayal@mellanox.com>
+Date: Mon, 25 Feb 2019 17:44:34 +0200
+Subject: [PATCH] ethtool: Add support for 200Gbps (50Gbps per lane) link mode
+
+Introduce 50Gbps per lane link modes and 200Gbps speed, update print
+functions and initialization functions accordingly.
+In addition, update related man page accordingly.
+
+Signed-off-by: Aya Levin <ayal@mellanox.com>
+Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
+Reviewed-by: Michal Kubecek <mkubecek@suse.cz>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+(cherry picked from commit caa4bbef6ff920a0ff1d94c5bff7f2c7c875fca3)
+---
+ ethtool-copy.h | 18 +++++++++++++++++-
+ ethtool.8.in   | 15 +++++++++++++++
+ ethtool.c      | 45 +++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 77 insertions(+), 1 deletion(-)
+
+diff --git a/ethtool-copy.h b/ethtool-copy.h
+index 8cc61e9..28b3592 100644
+--- a/ethtool-copy.h
++++ b/ethtool-copy.h
+@@ -1450,6 +1450,21 @@ enum ethtool_link_mode_bit_indices {
+ 	ETHTOOL_LINK_MODE_FEC_NONE_BIT	= 49,
+ 	ETHTOOL_LINK_MODE_FEC_RS_BIT	= 50,
+ 	ETHTOOL_LINK_MODE_FEC_BASER_BIT	= 51,
++	ETHTOOL_LINK_MODE_50000baseKR_Full_BIT		 = 52,
++	ETHTOOL_LINK_MODE_50000baseSR_Full_BIT		 = 53,
++	ETHTOOL_LINK_MODE_50000baseCR_Full_BIT		 = 54,
++	ETHTOOL_LINK_MODE_50000baseLR_ER_FR_Full_BIT	 = 55,
++	ETHTOOL_LINK_MODE_50000baseDR_Full_BIT		 = 56,
++	ETHTOOL_LINK_MODE_100000baseKR2_Full_BIT	 = 57,
++	ETHTOOL_LINK_MODE_100000baseSR2_Full_BIT	 = 58,
++	ETHTOOL_LINK_MODE_100000baseCR2_Full_BIT	 = 59,
++	ETHTOOL_LINK_MODE_100000baseLR2_ER2_FR2_Full_BIT = 60,
++	ETHTOOL_LINK_MODE_100000baseDR2_Full_BIT	 = 61,
++	ETHTOOL_LINK_MODE_200000baseKR4_Full_BIT	 = 62,
++	ETHTOOL_LINK_MODE_200000baseSR4_Full_BIT	 = 63,
++	ETHTOOL_LINK_MODE_200000baseLR4_ER4_FR4_Full_BIT = 64,
++	ETHTOOL_LINK_MODE_200000baseDR4_Full_BIT	 = 65,
++	ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT	 = 66,
+ 
+ 	/* Last allowed bit for __ETHTOOL_LINK_MODE_LEGACY_MASK is bit
+ 	 * 31. Please do NOT define any SUPPORTED_* or ADVERTISED_*
+@@ -1458,7 +1473,7 @@ enum ethtool_link_mode_bit_indices {
+ 	 */
+ 
+ 	__ETHTOOL_LINK_MODE_LAST
+-	  = ETHTOOL_LINK_MODE_FEC_BASER_BIT,
++	  = ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT,
+ };
+ 
+ #define __ETHTOOL_LINK_MODE_LEGACY_MASK(base_name)	\
+@@ -1566,6 +1581,7 @@ enum ethtool_link_mode_bit_indices {
+ #define SPEED_50000		50000
+ #define SPEED_56000		56000
+ #define SPEED_100000		100000
++#define SPEED_200000		200000
+ 
+ #define SPEED_UNKNOWN		-1
+ 
+diff --git a/ethtool.8.in b/ethtool.8.in
+index dd2e3f5..de6ae68 100644
+--- a/ethtool.8.in
++++ b/ethtool.8.in
+@@ -613,6 +613,11 @@ lB	l	lB.
+ 0x400000000	50000baseCR2 Full
+ 0x800000000	50000baseKR2 Full
+ 0x10000000000	50000baseSR2 Full
++0x10000000000000	50000baseKR Full
++0x20000000000000	50000baseSR Full
++0x40000000000000	50000baseCR Full
++0x80000000000000	50000baseLR_ER_FR Full
++0x100000000000000	50000baseDR Full
+ 0x8000000	56000baseKR4 Full
+ 0x10000000	56000baseCR4 Full
+ 0x20000000	56000baseSR4 Full
+@@ -621,6 +626,16 @@ lB	l	lB.
+ 0x2000000000	100000baseSR4 Full
+ 0x4000000000	100000baseCR4 Full
+ 0x8000000000	100000baseLR4_ER4 Full
++0x200000000000000	100000baseKR2 Full
++0x400000000000000	100000baseSR2 Full
++0x800000000000000	100000baseCR2 Full
++0x1000000000000000	100000baseLR2_ER2_FR2 Full
++0x2000000000000000	100000baseDR2 Full
++0x4000000000000000	200000baseKR4 Full
++0x8000000000000000	200000baseSR4 Full
++0x10000000000000000	200000baseLR4_ER4_FR4 Full
++0x20000000000000000	200000baseDR4 Full
++0x40000000000000000	200000baseCR4 Full
+ .TE
+ .TP
+ .BI phyad \ N
+diff --git a/ethtool.c b/ethtool.c
+index 06006f4..d58ca2e 100644
+--- a/ethtool.c
++++ b/ethtool.c
+@@ -530,6 +530,21 @@ static void init_global_link_mode_masks(void)
+ 		ETHTOOL_LINK_MODE_10000baseER_Full_BIT,
+ 		ETHTOOL_LINK_MODE_2500baseT_Full_BIT,
+ 		ETHTOOL_LINK_MODE_5000baseT_Full_BIT,
++		ETHTOOL_LINK_MODE_50000baseKR_Full_BIT,
++		ETHTOOL_LINK_MODE_50000baseSR_Full_BIT,
++		ETHTOOL_LINK_MODE_50000baseCR_Full_BIT,
++		ETHTOOL_LINK_MODE_50000baseLR_ER_FR_Full_BIT,
++		ETHTOOL_LINK_MODE_50000baseDR_Full_BIT,
++		ETHTOOL_LINK_MODE_100000baseKR2_Full_BIT,
++		ETHTOOL_LINK_MODE_100000baseSR2_Full_BIT,
++		ETHTOOL_LINK_MODE_100000baseCR2_Full_BIT,
++		ETHTOOL_LINK_MODE_100000baseLR2_ER2_FR2_Full_BIT,
++		ETHTOOL_LINK_MODE_100000baseDR2_Full_BIT,
++		ETHTOOL_LINK_MODE_200000baseKR4_Full_BIT,
++		ETHTOOL_LINK_MODE_200000baseSR4_Full_BIT,
++		ETHTOOL_LINK_MODE_200000baseLR4_ER4_FR4_Full_BIT,
++		ETHTOOL_LINK_MODE_200000baseDR4_Full_BIT,
++		ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT,
+ 	};
+ 	static const enum ethtool_link_mode_bit_indices
+ 		additional_advertised_flags_bits[] = {
+@@ -689,6 +704,36 @@ static void dump_link_caps(const char *prefix, const char *an_prefix,
+ 		  "2500baseT/Full" },
+ 		{ 0, ETHTOOL_LINK_MODE_5000baseT_Full_BIT,
+ 		  "5000baseT/Full" },
++		{ 0, ETHTOOL_LINK_MODE_50000baseKR_Full_BIT,
++		  "50000baseKR/Full" },
++		{ 0, ETHTOOL_LINK_MODE_50000baseSR_Full_BIT,
++		  "50000baseSR/Full" },
++		{ 0, ETHTOOL_LINK_MODE_50000baseCR_Full_BIT,
++		  "50000baseCR/Full" },
++		{ 0, ETHTOOL_LINK_MODE_50000baseLR_ER_FR_Full_BIT,
++		  "50000baseLR_ER_FR/Full" },
++		{ 0, ETHTOOL_LINK_MODE_50000baseDR_Full_BIT,
++		  "50000baseDR/Full" },
++		{ 0, ETHTOOL_LINK_MODE_100000baseKR2_Full_BIT,
++		  "100000baseKR2/Full" },
++		{ 0, ETHTOOL_LINK_MODE_100000baseSR2_Full_BIT,
++		  "100000baseSR2/Full" },
++		{ 0, ETHTOOL_LINK_MODE_100000baseCR2_Full_BIT,
++		  "100000baseCR2/Full" },
++		{ 0, ETHTOOL_LINK_MODE_100000baseLR2_ER2_FR2_Full_BIT,
++		  "100000baseLR2_ER2_FR2/Full" },
++		{ 0, ETHTOOL_LINK_MODE_100000baseDR2_Full_BIT,
++		  "100000baseDR2/Full" },
++		{ 0, ETHTOOL_LINK_MODE_200000baseKR4_Full_BIT,
++		  "200000baseKR4/Full" },
++		{ 0, ETHTOOL_LINK_MODE_200000baseSR4_Full_BIT,
++		  "200000baseSR4/Full" },
++		{ 0, ETHTOOL_LINK_MODE_200000baseLR4_ER4_FR4_Full_BIT,
++		  "200000baseLR4_ER4_FR4/Full" },
++		{ 0, ETHTOOL_LINK_MODE_200000baseDR4_Full_BIT,
++		  "200000baseDR4/Full" },
++		{ 0, ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT,
++		  "200000baseCR4/Full" },
+ 	};
+ 	int indent;
+ 	int did1, new_line_pend, i;
+-- 
+1.8.3.1
+
diff --git a/SPECS/ethtool.spec b/SPECS/ethtool.spec
new file mode 100644
index 0000000..46e57c3
--- /dev/null
+++ b/SPECS/ethtool.spec
@@ -0,0 +1,324 @@
+Name:		ethtool
+Epoch:		2
+Version:	4.8
+Release:	10%{?dist}
+Summary:	Settings tool for Ethernet NICs
+
+License:	GPLv2
+Group:		Applications/System
+URL:		https://www.kernel.org/pub/software/network/%{name}/
+
+# When using tarball from released upstream version:
+# - http://ftp.kernel.org/pub/software/network/%{name}/%{name}-%{version}.tar.bz2
+#
+# When generating tarball package from upstream git:
+# - git clone git://git.kernel.org/pub/scm/network/ethtool/ethtool.git ethtool-6
+# - cd ethtool-6; git checkout 669ba5cadfb15842e90d8aa7ba5a575f7a457b3e
+# - cp -f ChangeLog ChangeLog.old; git log > ChangeLog.git
+# - rm -rf .git; cd ..; tar cvfz ethtool-6.tar.gz ethtool-6
+# - Use the visible date of latest git log entry for %{release} in spec file
+Source0:	http://ftp.kernel.org/pub/software/network/%{name}/%{name}-%{version}.tar.xz
+BuildRequires:	automake, autoconf
+Conflicts:      filesystem < 3
+Patch0:		0001-ethtool-add-register-dump-support-for-fjes-driver.patch
+Patch1:		0002-ethtool-sync-help-output-for-x-X-with-man-page.patch
+Patch2:		0003-ethtool-Fix-the-advertise-parameter-logic.patch
+Patch3:		0004-ethtool-Fix-SFF-8079-cable-technology-bit-parsing.patch
+Patch4:		0005-ethtool-Support-for-configurable-RSS-hash-function.patch
+Patch5:		0006-net_tstamp.h-sync-with-net-next.patch
+Patch6:		0007-ethtool-add-support-for-HWTSTAMP_FILTER_NTP_ALL.patch
+Patch7:		0008-ethtool-copy.h-sync-with-net-next.patch
+Patch8:		0009-ethtool-Add-support-for-2500baseT-5000baseT-link-mod.patch
+Patch9:		0010-ethtool.8-Fix-formatting-of-advertise-bitmask.patch
+Patch10:	0011-ethtool.8-Document-56000-advertise-link-modes.patch
+Patch11:	0012-ethtool-Remove-UDP-Fragmentation-Offload-error-print.patch
+Patch12:	0013-ethtool-copy.h-sync-with-net-next.patch
+Patch13:	0014-ethtool-Support-for-FEC-encoding-control.patch
+Patch14:	0015-ethtool-copy.h-sync-with-net-next.patch
+Patch15:	0016-ethtool-add-support-for-extra-RSS-contexts-and-RSS-s.patch
+Patch16:	0017-ethtool.8-Document-RSS-context-control-and-RSS-filte.patch
+Patch17:	0018-ethtool-don-t-fall-back-to-grxfhindir-when-context-w.patch
+Patch18:	0019-ethtool-Fix-coding-style-warnings-and-errors-reporte.patch
+Patch19:	0020-ethtool-Add-support-for-200Gbps-50Gbps-per-lane-link.patch
+
+%description
+This utility allows querying and changing settings such as speed,
+port, auto-negotiation, PCI locations and checksum offload on many
+network devices, especially of Ethernet devices.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+%patch10 -p1
+%patch11 -p1
+%patch12 -p1
+%patch13 -p1
+%patch14 -p1
+%patch15 -p1
+%patch16 -p1
+%patch17 -p1
+%patch18 -p1
+%patch19 -p1
+
+# Only needed when using upstream git
+# aclocal
+# autoheader
+# automake --gnu --add-missing --copy
+# autoconf
+
+%build
+aclocal
+automake --gnu --add-missing --copy
+%configure
+make %{?_smp_mflags}
+
+%install
+make DESTDIR=%{buildroot} INSTALL='install -p' install
+
+%files
+%doc AUTHORS ChangeLog* COPYING LICENSE NEWS README
+%{_sbindir}/%{name}
+%{_mandir}/man8/%{name}.8*
+
+%changelog
+* Fri Mar 15 2019 Ivan Vecera <ivecera@redhat.com> - 2:4.8-9
+- Added support for 200Gbps (50Gbps/lane) link mode
+
+* Mon Jul  2 2018 Ivan Vecera <ivecera@redhat.com> - 2:4.8-9
+- Added support for extra RSS contexts and steering filters
+
+* Mon Jun 11 2018 Ivan Vecera <ivecera@redhat.com> - 2:4.8-8
+- Fixed RPM URL field in spec file
+
+* Wed Jan 10 2018 Ivan Vecera <ivecera@redhat.com> - 2:4.8-7
+- Fixed synopsis in ethtool man page
+
+* Tue Jan  9 2018 Ivan Vecera <ivecera@redhat.com> - 2:4.8-6
+- Added support for setting FEC parameters
+
+* Fri Jan  5 2018 Ivan Vecera <ivecera@redhat.com> - 2:4.8-5
+- Fixed changelog
+
+* Fri Jan  5 2018 Ivan Vecera <ivecera@redhat.com> - 2:4.8-4
+- Fixed UDP fragmentation offloading error messages printed on kernel-alt >=4.14
+
+* Tue Nov 14 2017 Ivan Vecera <ivecera@redhat.com> - 2:4.8-3
+- Added support for 2500baseT/5000baseT link modes
+
+* Fri Nov  3 2017 Ivan Vecera <ivecera@redhat.com> - 2:4.8-2
+- Added support for configurable RSS hash function
+- Fixed SFF 8079 cable technology bit parsing
+- Added support for HWTSTAMP_FILTER_NTP_ALL
+
+* Wed Mar 22 2017 Ivan Vecera <ivecera@redhat.com> - 2:4.8-1
+- Rebased against upstream v4.8
+
+* Fri Mar 17 2017 Ivan Vecera <ivecera@redhat.com> - 2:4.5-6
+- Fixed the "advertise" parameter logic
+
+* Tue Feb 21 2017 Ivan Vecera <ivecera@redhat.com> - 2:4.5-5
+- Fixed help page for commands -x and -X
+
+* Thu Feb  2 2017 Ivan Vecera <ivecera@redhat.com> - 2:4.5-4
+- Add register dump support for fjes driver
+
+* Tue Aug 16 2016 Ivan Vecera <ivecera@redhat.com> - 2:4.5-3
+- Added support for new ETHTOOL_xLINKSETTINGS API
+- Added support for diagnostics information for QSFP Plus/QSFP28 modules
+- Added support for 25G/50G/100G supported and advertised speed modes
+
+* Fri Mar 18 2016 Ivan Vecera <ivecera@redhat.com> - 2:4.5-2
+- Fixed several memory leaks
+
+* Wed Mar 16 2016 Ivan Vecera <ivecera@redhat.com> - 2:4.5-1
+- Update to the upstream version v4.5
+
+* Fri Oct 31 2014 Ivan Vecera <ivecera@redhat.com> - 2:3.15-2
+- Support for configurable RSS hash key
+
+* Mon Sep 15 2014 Ivan Vecera <ivecera@redhat.com> - 2:3.15-1
+- Update to the latest upstream
+
+* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 2:3.8-3
+- Mass rebuild 2014-01-24
+
+* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 2:3.8-2
+- Mass rebuild 2013-12-27
+
+* Mon Mar 04 2013 Jaromir Capik <jcapik@redhat.com> - 2:3.8-1
+- Update to 3.8 (#916922)
+
+* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2:3.7-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
+
+* Mon Dec 17 2012 Jaromir Capik <jcapik@redhat.com> - 2:3.7-1
+- Update to 3.7 (#887463)
+
+* Tue Oct 23 2012 Jaromir Capik <jcapik@redhat.com> 2:3.6-1
+- Update to 3.6 (#863774)
+
+* Tue Sep 25 2012 Jaromir Capik <jcapik@redhat.com> 2:3.5-1
+- Update to 3.5 (#840741)
+
+* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2:3.4.1-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
+
+* Thu Jun 28 2012 Jaromir Capik <jcapik@redhat.com> 2:3.4.1-1
+- Update to 3.4.1 (#830263)
+
+* Wed Jan 25 2012 Harald Hoyer <harald@redhat.com> 2:3.2-2
+- install everything in /usr
+  https://fedoraproject.org/wiki/Features/UsrMove
+
+* Fri Jan 13 2012 Jaromir Capik <jcapik@redhat.com> 2:3.2-1
+- Update to 3.2 (#781357)
+- Minor spec file changes according to the latest guidelines
+
+* Fri Dec 23 2011 Robert Scheck <robert@fedoraproject.org> 2:3.1-1
+- Upgrade to 3.1 (#728480)
+
+* Sun Jul 17 2011 Robert Scheck <robert@fedoraproject.org> 2:2.6.39-1
+- Upgrade to 2.6.39 (#710400)
+
+* Mon Mar 21 2011 Robert Scheck <robert@fedoraproject.org> 2:2.6.38-1
+- Upgrade to 2.6.38 (#667594)
+
+* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2:2.6.36-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+
+* Fri Dec 31 2010 Robert Scheck <robert@fedoraproject.org> 2:2.6.36-1
+- Upgrade to 2.6.36 (#623094)
+
+* Wed Jul 14 2010 Jeff Garzik <jgarzik@redhat.com> 2:2.6.34-1
+- Update to release 2.6.34.
+
+* Thu Feb  4 2010 Jeff Garzik <jgarzik@redhat.com> 2.6.33-0.1
+- update to version 2.6.33-pre1
+
+* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6-7.20090323git
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
+
+* Sat Jul 18 2009 Robert Scheck <robert@fedoraproject.org> 6-6.20090323git
+- Upgrade to GIT 20090323
+
+* Thu Jul 16 2009 Jeff Garzik <jgarzik@redhat.com> 6-5.20090306git
+- minor specfile cleanups
+
+* Sat Mar 07 2009 Robert Scheck <robert@fedoraproject.org> 6-4.20090306git
+- Upgrade to GIT 20090306
+
+* Mon Feb 23 2009 Robert Scheck <robert@fedoraproject.org> 6-3.20090115git
+- Rebuild for gcc 4.4 and rpm 4.6
+
+* Sat Jan 17 2009 Robert Scheck <robert@fedoraproject.org> 6-2.20090115git
+- Changes to match with Fedora Packaging Guidelines (#225735)
+- Upgrade to GIT 20090115 (#225735, #477498)
+- Removed bogus stated need of DEVNAME in -h/--help (#472038)
+- Removed completely needless INSTALL file from %%doc (#472034)
+
+* Wed Mar 12 2008 Tom "spot" Callaway <tcallawa@redhat.com> 6-1
+- Upgrade to ethtool version 6
+
+* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 5-2
+- Autorebuild for GCC 4.3
+
+* Thu Dec 14 2006 Jay Fenlason <fenlason@redhat.com> 5-1
+- Upgrade to ethtool version 5 to close
+  bz#184985: RFE: 10gigE support
+  bz#204840: "buffer overflow detected" when devname's length >=16 of ethtool
+  Resolves: #184985, #204840
+
+* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 3-1.2.2
+- rebuild
+
+* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 3-1.2.1
+- bump again for double-long bug on ppc(64)
+
+* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 3-1.2
+- rebuilt for new gcc4.1 snapshot and glibc changes
+
+* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
+- rebuilt
+
+* Thu Mar  3 2005 Jeff Garzik <jgarzik@pobox.com>
+- Update to version 3.
+- Use %%buildroot macro, rather than RPM_BUILD_ROOT env var,
+  as recommended by RPM packaging guidelines.
+
+* Sun Feb 27 2005 Florian La Roche <laroche@redhat.com>
+- Copyright: -> License
+
+* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
+- rebuilt
+
+* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
+- rebuilt
+
+* Fri Sep  5 2003 Bill Nottingham <notting@redhat.com> 1.8-2
+- remove bogus check for devices starting with ethXX, this time applying
+  the patch
+
+* Thu Jul 24 2003 Bill Nottingham <notting@redhat.com> 1.8-1
+- update to 1.8
+- remove bogus check for devices starting with ethXX
+
+* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
+- rebuilt
+
+* Sat Feb  8 2003 Bill Nottingham <notting@redhat.com> 1.6-5
+- move to /sbin
+
+* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
+- rebuilt
+
+* Thu Dec 12 2002 Tim Powers <timp@redhat.com> 1.6-3
+- rebuild on all arches
+
+* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
+- automated rebuild
+
+* Thu Jun 20 2002 Florian La Roche <Florian.LaRoche@redhat.de>
+- update to 1.6
+
+* Thu May 23 2002 Tim Powers <timp@redhat.com>
+- automated rebuild
+
+* Mon Mar  4 2002 Bill Nottingham <notting@redhat.com> 1.5-1
+- 1.5
+
+* Thu Feb 21 2002 Bill Nottingham <notting@redhat.com>
+- rebuild
+
+* Wed Jan 09 2002 Tim Powers <timp@redhat.com>
+- automated rebuild
+
+* Tue Dec  4 2001 Bill Nottingham <notting@redhat.com>
+- update to 1.4
+
+* Fri Aug  3 2001 Bill Nottingham <notting@redhat.com>
+- return of ethtool! (#50475)
+
+* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
+- automatic rebuild
+
+* Sun Jun 18 2000 Matt Wilson <msw@redhat.com>
+- rebuilt for next release
+- use FHS man path
+
+* Tue Feb 22 2000 Bill Nottingham <notting@redhat.com>
+- handle compressed manpages
+
+* Wed Apr 14 1999 Bill Nottingham <notting@redhat.com>
+- run through with new s/d
+
+* Tue Apr 13 1999 Jakub Jelinek <jj@ultra.linux.cz>
+- initial package.