Hello community, here is the log from the commit of package ethtool for openSUSE:Factory checked in at 2018-04-24 15:30:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ethtool (Old) and /work/SRC/openSUSE:Factory/.ethtool.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ethtool" Tue Apr 24 15:30:31 2018 rev:51 rq:599818 version:4.16 Changes: -------- --- /work/SRC/openSUSE:Factory/ethtool/ethtool.changes 2018-04-06 17:42:42.946296507 +0200 +++ /work/SRC/openSUSE:Factory/.ethtool.new/ethtool.changes 2018-04-24 15:30:32.831827623 +0200 @@ -1,0 +2,16 @@ +Sat Apr 14 23:39:42 UTC 2018 - [email protected] + +- Update to new upstream release 4.16 + * Feature: add support for extra RSS contexts and RSS steering filters + * Feature: Add SFF 8636 date code parsing support + * Fix: don't fall back to grxfhindir when context was specified + * Fix: correct display of VF when showing vf/queue filters + * Fix: show VF and queue in the help for -N + * Fix: correct VF index values for the ring_cookie parameter + +------------------------------------------------------------------- +Tue Apr 10 07:15:27 UTC 2018 - [email protected] + +- Fix build for targets not (fully) supporting %license macro + +------------------------------------------------------------------- Old: ---- ethtool-4.15.tar.sign ethtool-4.15.tar.xz New: ---- ethtool-4.16.tar.sign ethtool-4.16.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ethtool.spec ++++++ --- /var/tmp/diff_new_pack.DfQlI1/_old 2018-04-24 15:30:33.503803311 +0200 +++ /var/tmp/diff_new_pack.DfQlI1/_new 2018-04-24 15:30:33.507803167 +0200 @@ -17,7 +17,7 @@ Name: ethtool -Version: 4.15 +Version: 4.16 Release: 0 Summary: Examine and Tune Ethernet-Based Network Interfaces License: GPL-2.0-only @@ -50,7 +50,11 @@ %defattr(-,root,root) %{_sbindir}/ethtool %{_mandir}/man8/ethtool.8* +%if (0%{?suse_version} >= 1500) || (0%{?sle_version} >= 120300) %license COPYING +%else +%doc COPYING +%endif %doc AUTHORS NEWS %changelog ++++++ ethtool-4.15.tar.xz -> ethtool-4.16.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ethtool-4.15/Makefile.in new/ethtool-4.16/Makefile.in --- old/ethtool-4.15/Makefile.in 2018-02-01 19:36:21.000000000 +0100 +++ new/ethtool-4.16/Makefile.in 2018-04-13 19:51:06.000000000 +0200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ethtool-4.15/NEWS new/ethtool-4.16/NEWS --- old/ethtool-4.15/NEWS 2018-02-01 19:34:54.000000000 +0100 +++ new/ethtool-4.16/NEWS 2018-04-13 19:48:13.000000000 +0200 @@ -1,3 +1,13 @@ +Version 4.16 - April 13, 2018 + + * Feature: add support for extra RSS contexts and RSS steering filters + * Feature: Document RSS context control and RSS filters + * Fix: don't fall back to grxfhindir when context was specified + * Fix: correct display of VF when showing vf/queue filters + * Fix: show VF and queue in the help for -N + * Fix: correct VF index values for the ring_cookie parameter + * Feature: Add SFF 8636 date code parsing support + Version 4.15 - February 1, 2018 * Feature: Support for FEC encoding control @@ -7,7 +17,6 @@ * Feature: Add ETHTOOL_RESET support via --reset command * Fix: fix MFLCN register dump for 82599 and newer - Version 4.13 - October 27, 2017 * Fix: Do not return error code if no changes were attempted. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ethtool-4.15/aclocal.m4 new/ethtool-4.16/aclocal.m4 --- old/ethtool-4.15/aclocal.m4 2018-02-01 19:36:20.000000000 +0100 +++ new/ethtool-4.16/aclocal.m4 2018-04-13 19:51:05.000000000 +0200 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.15 -*- Autoconf -*- +# generated automatically by aclocal 1.15.1 -*- Autoconf -*- -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2017 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,7 +20,7 @@ If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2014 Free Software Foundation, Inc. +# Copyright (C) 2002-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -35,7 +35,7 @@ [am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.15], [], +m4_if([$1], [1.15.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,14 +51,14 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.15])dnl +[AM_AUTOMAKE_VERSION([1.15.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -110,7 +110,7 @@ # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2014 Free Software Foundation, Inc. +# Copyright (C) 1997-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -141,7 +141,7 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -332,7 +332,7 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -408,7 +408,7 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -605,7 +605,7 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -626,7 +626,7 @@ fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2014 Free Software Foundation, Inc. +# Copyright (C) 2003-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -648,7 +648,7 @@ # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -683,7 +683,7 @@ # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -733,7 +733,7 @@ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2014 Free Software Foundation, Inc. +# Copyright (C) 1997-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -772,7 +772,7 @@ # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -801,7 +801,7 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -848,7 +848,7 @@ # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -867,7 +867,7 @@ # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -948,7 +948,7 @@ rm -f conftest.file ]) -# Copyright (C) 2009-2014 Free Software Foundation, Inc. +# Copyright (C) 2009-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1008,7 +1008,7 @@ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1036,7 +1036,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2014 Free Software Foundation, Inc. +# Copyright (C) 2006-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1055,7 +1055,7 @@ # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2014 Free Software Foundation, Inc. +# Copyright (C) 2004-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ethtool-4.15/configure new/ethtool-4.16/configure --- old/ethtool-4.15/configure 2018-02-01 19:36:22.000000000 +0100 +++ new/ethtool-4.16/configure 2018-04-13 19:51:06.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.15. +# Generated by GNU Autoconf 2.69 for ethtool 4.16. # # Report bugs to <[email protected]>. # @@ -580,8 +580,8 @@ # Identity of this package. PACKAGE_NAME='ethtool' PACKAGE_TARNAME='ethtool' -PACKAGE_VERSION='4.15' -PACKAGE_STRING='ethtool 4.15' +PACKAGE_VERSION='4.16' +PACKAGE_STRING='ethtool 4.16' 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.15 to adapt to many kinds of systems. +\`configure' configures ethtool 4.16 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.15:";; + short | recursive ) echo "Configuration of ethtool 4.16:";; 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.15 +ethtool configure 4.16 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.15, which was +It was created by ethtool $as_me 4.16, 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.15' + VERSION='4.16' 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.15, which was +This file was extended by ethtool $as_me 4.16, 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.15 +ethtool config.status 4.16 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.15/configure.ac new/ethtool-4.16/configure.ac --- old/ethtool-4.15/configure.ac 2018-02-01 19:29:22.000000000 +0100 +++ new/ethtool-4.16/configure.ac 2018-04-13 19:42:13.000000000 +0200 @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(ethtool, 4.15, [email protected]) +AC_INIT(ethtool, 4.16, [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.15/ethtool-copy.h new/ethtool-4.16/ethtool-copy.h --- old/ethtool-4.15/ethtool-copy.h 2017-12-14 20:20:37.000000000 +0100 +++ new/ethtool-4.16/ethtool-copy.h 2018-03-12 19:20:35.000000000 +0100 @@ -912,12 +912,15 @@ * @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 @@ * 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 @@ * 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 @@ __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 - 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 @@ * 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 @@ __u32 rsvd32; __u32 rss_config[0]; }; +#define ETH_RXFH_CONTEXT_ALLOC 0xffffffff #define ETH_RXFH_INDIR_NO_CHANGE 0xffffffff /** @@ -1633,6 +1651,8 @@ /* 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) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ethtool-4.15/ethtool.8 new/ethtool-4.16/ethtool.8 --- old/ethtool-4.15/ethtool.8 2018-02-01 19:36:25.000000000 +0100 +++ new/ethtool-4.16/ethtool.8 2018-04-13 19:51:07.000000000 +0200 @@ -113,7 +113,7 @@ . hy \\n(HY .. . -.TH ETHTOOL 8 "February 2018" "Ethtool version 4.15" +.TH ETHTOOL 8 "April 2018" "Ethtool version 4.16" .SH NAME ethtool \- query or control network driver and hardware settings . @@ -274,6 +274,7 @@ .BM user\-def .RB [ dst-mac \ \*(MA\ [ m \ \*(MA]] .BN action +.BN context .BN loc .RB | .br @@ -303,6 +304,10 @@ .RB ...\ | \ default \ ] .RB [ hfunc .IR FUNC ] +.RB [ context +.I CTX +.RB |\ new ] +.RB [ delete ] .HP .B ethtool \-f|\-\-flash .I devname file @@ -868,9 +873,15 @@ 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 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. +Specifies the Virtual Function the filter applies to. Not compatible with action. .TP .BI queue \ N Specifies the Rx queue to send packets to. Not compatible with action. @@ -926,6 +937,22 @@ .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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ethtool-4.15/ethtool.8.in new/ethtool-4.16/ethtool.8.in --- old/ethtool-4.15/ethtool.8.in 2018-02-01 19:30:41.000000000 +0100 +++ new/ethtool-4.16/ethtool.8.in 2018-04-13 19:42:48.000000000 +0200 @@ -113,7 +113,7 @@ . hy \\n(HY .. . -.TH ETHTOOL 8 "February 2018" "Ethtool version @VERSION@" +.TH ETHTOOL 8 "April 2018" "Ethtool version @VERSION@" .SH NAME ethtool \- query or control network driver and hardware settings . @@ -274,6 +274,7 @@ .BM user\-def .RB [ dst-mac \ \*(MA\ [ m \ \*(MA]] .BN action +.BN context .BN loc .RB | .br @@ -303,6 +304,10 @@ .RB ...\ | \ default \ ] .RB [ hfunc .IR FUNC ] +.RB [ context +.I CTX +.RB |\ new ] +.RB [ delete ] .HP .B ethtool \-f|\-\-flash .I devname file @@ -868,9 +873,15 @@ 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 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. +Specifies the Virtual Function the filter applies to. Not compatible with action. .TP .BI queue \ N Specifies the Rx queue to send packets to. Not compatible with action. @@ -926,6 +937,22 @@ .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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ethtool-4.15/ethtool.c new/ethtool-4.16/ethtool.c --- old/ethtool-4.15/ethtool.c 2018-02-01 19:25:59.000000000 +0100 +++ new/ethtool-4.16/ethtool.c 2018-03-29 20:38:54.000000000 +0200 @@ -1506,7 +1506,7 @@ 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; @@ -3517,11 +3517,20 @@ 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(); @@ -3531,16 +3540,19 @@ 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 */ @@ -3549,7 +3561,7 @@ 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"); @@ -3578,8 +3590,18 @@ 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) @@ -3587,11 +3609,17 @@ 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); @@ -3683,10 +3711,23 @@ 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) { @@ -3695,8 +3736,9 @@ } 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"); @@ -3712,6 +3754,7 @@ } 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); @@ -3872,6 +3915,8 @@ 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(); @@ -3907,6 +3952,18 @@ 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(); } @@ -3930,6 +3987,41 @@ 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) { @@ -3940,7 +4032,7 @@ 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) { @@ -3988,14 +4080,19 @@ 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) @@ -4008,6 +4105,8 @@ 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: @@ -5023,12 +5122,12 @@ { "-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" @@ -5046,18 +5145,22 @@ " [ vlan %x [m %x] ]\n" " [ 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" + " [ action %d ] | [ vf %d queue %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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ethtool-4.15/ethtool.spec new/ethtool-4.16/ethtool.spec --- old/ethtool-4.15/ethtool.spec 2018-02-01 19:36:30.000000000 +0100 +++ new/ethtool-4.16/ethtool.spec 2018-04-13 19:51:08.000000000 +0200 @@ -1,5 +1,5 @@ Name : ethtool -Version : 4.15 +Version : 4.16 Release : 1 Group : Utilities diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ethtool-4.15/internal.h new/ethtool-4.16/internal.h --- old/ethtool-4.15/internal.h 2017-06-02 19:27:13.000000000 +0200 +++ new/ethtool-4.16/internal.h 2018-03-12 19:20:35.000000000 +0100 @@ -332,11 +332,11 @@ /* 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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ethtool-4.15/qsfp.c new/ethtool-4.16/qsfp.c --- old/ethtool-4.15/qsfp.c 2016-08-24 21:47:26.000000000 +0200 +++ new/ethtool-4.16/qsfp.c 2018-02-27 20:19:33.000000000 +0100 @@ -782,6 +782,8 @@ SFF8636_VENDOR_REV_END_OFFSET, "Vendor rev"); sff_show_ascii(id, SFF8636_VENDOR_SN_START_OFFSET, SFF8636_VENDOR_SN_END_OFFSET, "Vendor SN"); + sff_show_ascii(id, SFF8636_DATE_YEAR_OFFSET, + SFF8636_DATE_VENDOR_LOT_OFFSET + 1, "Date code"); sff8636_show_revision_compliance(id); sff8636_show_dom(id, eeprom_len); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ethtool-4.15/qsfp.h new/ethtool-4.16/qsfp.h --- old/ethtool-4.15/qsfp.h 2016-08-24 21:47:26.000000000 +0200 +++ new/ethtool-4.16/qsfp.h 2018-02-27 20:19:33.000000000 +0100 @@ -535,6 +535,8 @@ #define SFF8636_DATE_MONTH_LEN 2 #define SFF8636_DATE_DAY_OFFSET 0xD8 #define SFF8636_DATE_DAY_LEN 2 +#define SFF8636_DATE_VENDOR_LOT_OFFSET 0xDA +#define SFF8636_DATE_VENDOR_LOT_LEN 2 /* Diagnostic Monitoring Type - 220 */ #define SFF8636_DIAG_TYPE_OFFSET 0xDC diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ethtool-4.15/rxclass.c new/ethtool-4.16/rxclass.c --- old/ethtool-4.15/rxclass.c 2017-06-02 19:27:13.000000000 +0200 +++ new/ethtool-4.16/rxclass.c 2018-03-12 19:20:35.000000000 +0100 @@ -94,14 +94,15 @@ } } -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,16 +248,24 @@ 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) { u64 vf = ethtool_get_flow_spec_ring_vf(fsp->ring_cookie); u64 queue = ethtool_get_flow_spec_ring(fsp->ring_cookie); + /* A value of zero indicates that this rule targeted the main + * function. A positive value indicates which virtual function + * was targeted, so we'll subtract 1 in order to show the + * correct VF index + */ if (vf) + fprintf(stdout, "\tAction: Direct to VF %llu queue %llu\n", + vf - 1, queue); + else 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"); } @@ -264,10 +273,11 @@ 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: @@ -280,11 +290,11 @@ 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; @@ -328,7 +338,7 @@ } /* display rule */ - rxclass_print_rule(&nfccmd.fs); + rxclass_print_rule(&nfccmd.fs, (__u32)nfccmd.rss_context); return err; } @@ -558,7 +568,7 @@ } 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; @@ -576,6 +586,7 @@ /* 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) @@ -1047,6 +1058,13 @@ err = rxclass_get_ulong(str, &val, 8); if (err) return -1; + + /* The ring_cookie uses 0 to indicate the rule targets the + * main function, so add 1 to the value in order to target the + * correct virtual function. + */ + val++; + *(u64 *)&p[opt->offset] &= ~ETHTOOL_RX_FLOW_SPEC_RING_VF; *(u64 *)&p[opt->offset] = (u64)val << ETHTOOL_RX_FLOW_SPEC_RING_VF_OFF; break; @@ -1242,7 +1260,7 @@ } 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; @@ -1331,6 +1349,40 @@ 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];
