Hello community, here is the log from the commit of package ethtool for openSUSE:Factory checked in at 2017-06-17 10:19:40 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ethtool (Old) and /work/SRC/openSUSE:Factory/.ethtool.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ethtool" Sat Jun 17 10:19:40 2017 rev:47 rq:501398 version:4.11 Changes: -------- --- /work/SRC/openSUSE:Factory/ethtool/ethtool.changes 2017-04-17 10:20:46.121310884 +0200 +++ /work/SRC/openSUSE:Factory/.ethtool.new/ethtool.changes 2017-06-17 10:19:43.443387875 +0200 @@ -1,0 +2,10 @@ +Tue Jun 6 11:57:16 UTC 2017 - [email protected] + +- Update to new upstream release 4.11 + * Feature: Support for configurable RSS hash function + * Feature: support queue and VF fields for rxclass filters + * Feature: Add support for 2500baseT/5000baseT link modes + * Fix: Fix SFF 8079 cable technology bit parsing + * Fix: sync help output for -x/-X with man page + +------------------------------------------------------------------- Old: ---- ethtool-4.10.tar.sign ethtool-4.10.tar.xz New: ---- ethtool-4.11.tar.sign ethtool-4.11.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ethtool.spec ++++++ --- /var/tmp/diff_new_pack.afyp4X/_old 2017-06-17 10:19:44.043303249 +0200 +++ /var/tmp/diff_new_pack.afyp4X/_new 2017-06-17 10:19:44.047302685 +0200 @@ -17,7 +17,7 @@ Name: ethtool -Version: 4.10 +Version: 4.11 Release: 0 Summary: Examine and Tune Ethernet-Based Network Interfaces License: GPL-2.0 ++++++ ethtool-4.10.tar.xz -> ethtool-4.11.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ethtool-4.10/NEWS new/ethtool-4.11/NEWS --- old/ethtool-4.10/NEWS 2017-03-24 18:52:01.000000000 +0100 +++ new/ethtool-4.11/NEWS 2017-06-02 19:43:27.000000000 +0200 @@ -1,4 +1,11 @@ -Version 4.10 - March 24, 2016 +Version 4.11 - June 2, 2017 + * Feature: Support for configurable RSS hash function + * Feature: support queue and VF fields for rxclass filters + * Feature: Add support for 2500baseT/5000baseT link modes + * Fix: Fix SFF 8079 cable technology bit parsing + * Fix: sync help output for -x/-X with man page + +Version 4.10 - March 24, 2017 * Fix: Fix the "advertise" parameter logic. * Feature: Implement ETHTOOL_PHY_GTUNABLE/ETHTOOL_PHY_STUNABLE and PHY downshift diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ethtool-4.10/configure new/ethtool-4.11/configure --- old/ethtool-4.10/configure 2017-03-24 18:53:18.000000000 +0100 +++ new/ethtool-4.11/configure 2017-06-02 19:44:53.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for ethtool 4.10. +# Generated by GNU Autoconf 2.69 for ethtool 4.11. # # Report bugs to <[email protected]>. # @@ -580,8 +580,8 @@ # Identity of this package. PACKAGE_NAME='ethtool' PACKAGE_TARNAME='ethtool' -PACKAGE_VERSION='4.10' -PACKAGE_STRING='ethtool 4.10' +PACKAGE_VERSION='4.11' +PACKAGE_STRING='ethtool 4.11' PACKAGE_BUGREPORT='[email protected]' PACKAGE_URL='' @@ -1237,7 +1237,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures ethtool 4.10 to adapt to many kinds of systems. +\`configure' configures ethtool 4.11 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1303,7 +1303,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of ethtool 4.10:";; + short | recursive ) echo "Configuration of ethtool 4.11:";; esac cat <<\_ACEOF @@ -1398,7 +1398,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -ethtool configure 4.10 +ethtool configure 4.11 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1645,7 +1645,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by ethtool $as_me 4.10, which was +It was created by ethtool $as_me 4.11, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2510,7 +2510,7 @@ # Define the identity of the package. PACKAGE='ethtool' - VERSION='4.10' + VERSION='4.11' cat >>confdefs.h <<_ACEOF @@ -4695,7 +4695,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by ethtool $as_me 4.10, which was +This file was extended by ethtool $as_me 4.11, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4761,7 +4761,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -ethtool config.status 4.10 +ethtool config.status 4.11 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ethtool-4.10/configure.ac new/ethtool-4.11/configure.ac --- old/ethtool-4.10/configure.ac 2017-03-24 18:48:14.000000000 +0100 +++ new/ethtool-4.11/configure.ac 2017-06-02 19:38:24.000000000 +0200 @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(ethtool, 4.10, [email protected]) +AC_INIT(ethtool, 4.11, [email protected]) AC_PREREQ(2.52) AC_CONFIG_SRCDIR([ethtool.c]) AM_INIT_AUTOMAKE([gnu]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ethtool-4.10/ethtool-copy.h new/ethtool-4.11/ethtool-copy.h --- old/ethtool-4.10/ethtool-copy.h 2016-12-02 21:10:48.000000000 +0100 +++ new/ethtool-4.11/ethtool-copy.h 2017-06-02 19:27:13.000000000 +0200 @@ -1382,6 +1382,8 @@ 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 @@ */ __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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ethtool-4.10/ethtool.8 new/ethtool-4.11/ethtool.8 --- old/ethtool-4.10/ethtool.8 2017-03-24 18:53:19.000000000 +0100 +++ new/ethtool-4.11/ethtool.8 2017-06-02 19:44:55.000000000 +0200 @@ -113,7 +113,7 @@ . hy \\n(HY .. . -.TH ETHTOOL 8 "March 2017" "Ethtool version 4.10" +.TH ETHTOOL 8 "June 2017" "Ethtool version 4.11" .SH NAME ethtool \- query or control network driver and hardware settings . @@ -301,6 +301,8 @@ .BI weight\ W0 .IR W1 .RB ...\ | \ default \ ] +.RB [ hfunc +.IR FUNC ] .HP .B ethtool \-f|\-\-flash .I devname file @@ -588,7 +590,9 @@ 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 @@ -829,6 +833,13 @@ 0 or higher Rx queue to route the flow .TE .TP +.BI vf \ N +Specifies the Virtual Function the filter applies to. A value of 0 indicates +the PF, and thus the VF index is offset by 1. Not compatible with action. +.TP +.BI queue \ N +Specifies the Rx queue to send packets to. Not compatible with action. +.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 @@ -865,6 +876,10 @@ 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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ethtool-4.10/ethtool.8.in new/ethtool-4.11/ethtool.8.in --- old/ethtool-4.10/ethtool.8.in 2017-03-24 18:49:24.000000000 +0100 +++ new/ethtool-4.11/ethtool.8.in 2017-06-02 19:39:13.000000000 +0200 @@ -113,7 +113,7 @@ . hy \\n(HY .. . -.TH ETHTOOL 8 "March 2017" "Ethtool version @VERSION@" +.TH ETHTOOL 8 "June 2017" "Ethtool version @VERSION@" .SH NAME ethtool \- query or control network driver and hardware settings . @@ -301,6 +301,8 @@ .BI weight\ W0 .IR W1 .RB ...\ | \ default \ ] +.RB [ hfunc +.IR FUNC ] .HP .B ethtool \-f|\-\-flash .I devname file @@ -588,7 +590,9 @@ 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 @@ -829,6 +833,13 @@ 0 or higher Rx queue to route the flow .TE .TP +.BI vf \ N +Specifies the Virtual Function the filter applies to. A value of 0 indicates +the PF, and thus the VF index is offset by 1. Not compatible with action. +.TP +.BI queue \ N +Specifies the Rx queue to send packets to. Not compatible with action. +.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 @@ -865,6 +876,10 @@ 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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ethtool-4.10/ethtool.c new/ethtool-4.11/ethtool.c --- old/ethtool-4.10/ethtool.c 2016-12-02 21:10:48.000000000 +0100 +++ new/ethtool-4.11/ethtool.c 2017-06-02 19:27:13.000000000 +0200 @@ -529,6 +529,8 @@ 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 @@ "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; @@ -3640,6 +3646,7 @@ 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 +3704,26 @@ 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 +3827,16 @@ 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 +3868,12 @@ } 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 +3906,8 @@ 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 +3925,39 @@ 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 +3982,7 @@ free(hkey); free(rss); + free(hfuncs); return err; } @@ -4786,11 +4851,12 @@ { "-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" - " [ hkey %x:%x:%x:%x:%x:.... ]\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" + " [ 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" }, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ethtool-4.10/ethtool.spec new/ethtool-4.11/ethtool.spec --- old/ethtool-4.10/ethtool.spec 2017-03-24 18:53:19.000000000 +0100 +++ new/ethtool-4.11/ethtool.spec 2017-06-02 19:44:55.000000000 +0200 @@ -1,5 +1,5 @@ Name : ethtool -Version : 4.10 +Version : 4.11 Release : 1 Group : Utilities diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ethtool-4.10/rxclass.c new/ethtool-4.11/rxclass.c --- old/ethtool-4.10/rxclass.c 2016-08-24 21:47:26.000000000 +0200 +++ new/ethtool-4.11/rxclass.c 2017-06-02 19:27:13.000000000 +0200 @@ -247,11 +247,19 @@ rxclass_print_nfc_spec_ext(fsp); - if (fsp->ring_cookie != RX_CLS_FLOW_DISC) - fprintf(stdout, "\tAction: Direct to queue %llu\n", - fsp->ring_cookie); - else + if (fsp->ring_cookie != RX_CLS_FLOW_DISC) { + u64 vf = ethtool_get_flow_spec_ring_vf(fsp->ring_cookie); + u64 queue = ethtool_get_flow_spec_ring(fsp->ring_cookie); + + if (vf) + fprintf(stdout, "\tAction: Direct to queue %llu\n", + queue); + else + fprintf(stdout, "\tAction: Direct to VF %llu queue %llu\n", + vf, queue); + } else { fprintf(stdout, "\tAction: Drop\n"); + } fprintf(stdout, "\n"); } @@ -600,6 +608,8 @@ OPT_U16, OPT_U32, OPT_U64, + OPT_RING_VF, + OPT_RING_QUEUE, OPT_BE16, OPT_BE32, OPT_BE64, @@ -608,19 +618,21 @@ OPT_MAC, } rule_opt_type_t; -#define NFC_FLAG_RING 0x001 -#define NFC_FLAG_LOC 0x002 -#define NFC_FLAG_SADDR 0x004 -#define NFC_FLAG_DADDR 0x008 -#define NFC_FLAG_SPORT 0x010 -#define NFC_FLAG_DPORT 0x020 -#define NFC_FLAG_SPI 0x030 -#define NFC_FLAG_TOS 0x040 -#define NFC_FLAG_PROTO 0x080 -#define NTUPLE_FLAG_VLAN 0x100 -#define NTUPLE_FLAG_UDEF 0x200 -#define NTUPLE_FLAG_VETH 0x400 -#define NFC_FLAG_MAC_ADDR 0x800 +#define NFC_FLAG_RING 0x0001 +#define NFC_FLAG_LOC 0x0002 +#define NFC_FLAG_SADDR 0x0004 +#define NFC_FLAG_DADDR 0x0008 +#define NFC_FLAG_SPORT 0x0010 +#define NFC_FLAG_DPORT 0x0020 +#define NFC_FLAG_SPI 0x0030 +#define NFC_FLAG_TOS 0x0040 +#define NFC_FLAG_PROTO 0x0080 +#define NTUPLE_FLAG_VLAN 0x0100 +#define NTUPLE_FLAG_UDEF 0x0200 +#define NTUPLE_FLAG_VETH 0x0400 +#define NFC_FLAG_MAC_ADDR 0x0800 +#define NFC_FLAG_RING_VF 0x1000 +#define NFC_FLAG_RING_QUEUE 0x2000 struct rule_opts { const char *name; @@ -648,6 +660,10 @@ offsetof(struct ethtool_rx_flow_spec, m_u.tcp_ip4_spec.pdst) }, { "action", OPT_U64, NFC_FLAG_RING, offsetof(struct ethtool_rx_flow_spec, ring_cookie), -1 }, + { "vf", OPT_RING_VF, NFC_FLAG_RING_VF, + offsetof(struct ethtool_rx_flow_spec, ring_cookie), -1 }, + { "queue", OPT_RING_QUEUE, NFC_FLAG_RING_QUEUE, + offsetof(struct ethtool_rx_flow_spec, ring_cookie), -1 }, { "loc", OPT_U32, NFC_FLAG_LOC, offsetof(struct ethtool_rx_flow_spec, location), -1 }, { "vlan-etype", OPT_BE16, NTUPLE_FLAG_VETH, @@ -679,6 +695,10 @@ offsetof(struct ethtool_rx_flow_spec, m_u.esp_ip4_spec.spi) }, { "action", OPT_U64, NFC_FLAG_RING, offsetof(struct ethtool_rx_flow_spec, ring_cookie), -1 }, + { "vf", OPT_RING_VF, NFC_FLAG_RING_VF, + offsetof(struct ethtool_rx_flow_spec, ring_cookie), -1 }, + { "queue", OPT_RING_QUEUE, NFC_FLAG_RING_QUEUE, + offsetof(struct ethtool_rx_flow_spec, ring_cookie), -1 }, { "loc", OPT_U32, NFC_FLAG_LOC, offsetof(struct ethtool_rx_flow_spec, location), -1 }, { "vlan-etype", OPT_BE16, NTUPLE_FLAG_VETH, @@ -722,6 +742,10 @@ offsetof(struct ethtool_rx_flow_spec, m_u.usr_ip4_spec.l4_4_bytes) + 2 }, { "action", OPT_U64, NFC_FLAG_RING, offsetof(struct ethtool_rx_flow_spec, ring_cookie), -1 }, + { "vf", OPT_RING_VF, NFC_FLAG_RING_VF, + offsetof(struct ethtool_rx_flow_spec, ring_cookie), -1 }, + { "queue", OPT_RING_QUEUE, NFC_FLAG_RING_QUEUE, + offsetof(struct ethtool_rx_flow_spec, ring_cookie), -1 }, { "loc", OPT_U32, NFC_FLAG_LOC, offsetof(struct ethtool_rx_flow_spec, location), -1 }, { "vlan-etype", OPT_BE16, NTUPLE_FLAG_VETH, @@ -756,6 +780,10 @@ offsetof(struct ethtool_rx_flow_spec, m_u.tcp_ip6_spec.pdst) }, { "action", OPT_U64, NFC_FLAG_RING, offsetof(struct ethtool_rx_flow_spec, ring_cookie), -1 }, + { "vf", OPT_RING_VF, NFC_FLAG_RING_VF, + offsetof(struct ethtool_rx_flow_spec, ring_cookie), -1 }, + { "queue", OPT_RING_QUEUE, NFC_FLAG_RING_QUEUE, + offsetof(struct ethtool_rx_flow_spec, ring_cookie), -1 }, { "loc", OPT_U32, NFC_FLAG_LOC, offsetof(struct ethtool_rx_flow_spec, location), -1 }, { "vlan-etype", OPT_BE16, NTUPLE_FLAG_VETH, @@ -787,6 +815,10 @@ offsetof(struct ethtool_rx_flow_spec, m_u.esp_ip6_spec.spi) }, { "action", OPT_U64, NFC_FLAG_RING, offsetof(struct ethtool_rx_flow_spec, ring_cookie), -1 }, + { "vf", OPT_RING_VF, NFC_FLAG_RING_VF, + offsetof(struct ethtool_rx_flow_spec, ring_cookie), -1 }, + { "queue", OPT_RING_QUEUE, NFC_FLAG_RING_QUEUE, + offsetof(struct ethtool_rx_flow_spec, ring_cookie), -1 }, { "loc", OPT_U32, NFC_FLAG_LOC, offsetof(struct ethtool_rx_flow_spec, location), -1 }, { "vlan-etype", OPT_BE16, NTUPLE_FLAG_VETH, @@ -830,6 +862,10 @@ offsetof(struct ethtool_rx_flow_spec, m_u.usr_ip6_spec.l4_4_bytes) + 2 }, { "action", OPT_U64, NFC_FLAG_RING, offsetof(struct ethtool_rx_flow_spec, ring_cookie), -1 }, + { "vf", OPT_RING_VF, NFC_FLAG_RING_VF, + offsetof(struct ethtool_rx_flow_spec, ring_cookie), -1 }, + { "queue", OPT_RING_QUEUE, NFC_FLAG_RING_QUEUE, + offsetof(struct ethtool_rx_flow_spec, ring_cookie), -1 }, { "loc", OPT_U32, NFC_FLAG_LOC, offsetof(struct ethtool_rx_flow_spec, location), -1 }, { "vlan-etype", OPT_BE16, NTUPLE_FLAG_VETH, @@ -858,6 +894,10 @@ offsetof(struct ethtool_rx_flow_spec, m_u.ether_spec.h_proto) }, { "action", OPT_U64, NFC_FLAG_RING, offsetof(struct ethtool_rx_flow_spec, ring_cookie), -1 }, + { "vf", OPT_RING_VF, NFC_FLAG_RING_VF, + offsetof(struct ethtool_rx_flow_spec, ring_cookie), -1 }, + { "queue", OPT_RING_QUEUE, NFC_FLAG_RING_QUEUE, + offsetof(struct ethtool_rx_flow_spec, ring_cookie), -1 }, { "loc", OPT_U32, NFC_FLAG_LOC, offsetof(struct ethtool_rx_flow_spec, location), -1 }, { "vlan-etype", OPT_BE16, NTUPLE_FLAG_VETH, @@ -1002,6 +1042,24 @@ *(u64 *)&p[opt->moffset] = (u64)mask; break; } + case OPT_RING_VF: { + unsigned long long val; + err = rxclass_get_ulong(str, &val, 8); + if (err) + return -1; + *(u64 *)&p[opt->offset] &= ~ETHTOOL_RX_FLOW_SPEC_RING_VF; + *(u64 *)&p[opt->offset] = (u64)val << ETHTOOL_RX_FLOW_SPEC_RING_VF_OFF; + break; + } + case OPT_RING_QUEUE: { + unsigned long long val; + err = rxclass_get_ulong(str, &val, 32); + if (err) + return -1; + *(u64 *)&p[opt->offset] &= ~ETHTOOL_RX_FLOW_SPEC_RING; + *(u64 *)&p[opt->offset] |= (u64)val; + break; + } case OPT_BE16: { unsigned long long val; err = rxclass_get_ulong(str, &val, 16); @@ -1320,6 +1378,16 @@ } } + if ((flags & NFC_FLAG_RING) && (flags & NFC_FLAG_RING_QUEUE)) { + fprintf(stderr, "action and queue are not compatible\n"); + return -1; + } + + if ((flags & NFC_FLAG_RING) && (flags & NFC_FLAG_RING_VF)) { + fprintf(stderr, "action and vf are not compatible\n"); + return -1; + } + if (flow_type == IPV4_USER_FLOW) fsp->h_u.usr_ip4_spec.ip_ver = ETH_RX_NFC_IP4; if (flags & (NTUPLE_FLAG_VLAN | NTUPLE_FLAG_UDEF | NTUPLE_FLAG_VETH)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ethtool-4.10/sfpid.c new/ethtool-4.11/sfpid.c --- old/ethtool-4.10/sfpid.c 2016-08-24 21:47:26.000000000 +0200 +++ new/ethtool-4.11/sfpid.c 2017-06-02 19:27:13.000000000 +0200 @@ -137,9 +137,9 @@ 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 */
