<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/net/core/ethtool.c, branch linux-3.19.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>ethtool: Support for configurable RSS hash function</title>
<updated>2014-12-09T02:07:10+00:00</updated>
<author>
<name>Eyal Perry</name>
<email>eyalpe@mellanox.com</email>
</author>
<published>2014-12-02T16:12:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=892311f66f2411b813ca631009356891a0c2b0a1'/>
<id>892311f66f2411b813ca631009356891a0c2b0a1</id>
<content type='text'>
This patch extends the set/get_rxfh ethtool-options for getting or
setting the RSS hash function.

It modifies drivers implementation of set/get_rxfh accordingly.

This change also delegates the responsibility of checking whether a
modification to a certain RX flow hash parameter is supported to the
driver implementation of set_rxfh.

User-kernel API is done through the new hfunc bitmask field in the
ethtool_rxfh struct. A bit set in the hfunc field is corresponding to an
index in the new string-set ETH_SS_RSS_HASH_FUNCS.

Got approval from most of the relevant driver maintainers that their
driver is using Toeplitz, and for the few that didn't answered, also
assumed it is Toeplitz.

Cc: Tom Lendacky &lt;thomas.lendacky@amd.com&gt;
Cc: Ariel Elior &lt;ariel.elior@qlogic.com&gt;
Cc: Prashant Sreedharan &lt;prashant@broadcom.com&gt;
Cc: Michael Chan &lt;mchan@broadcom.com&gt;
Cc: Hariprasad S &lt;hariprasad@chelsio.com&gt;
Cc: Sathya Perla &lt;sathya.perla@emulex.com&gt;
Cc: Subbu Seetharaman &lt;subbu.seetharaman@emulex.com&gt;
Cc: Ajit Khaparde &lt;ajit.khaparde@emulex.com&gt;
Cc: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
Cc: Jesse Brandeburg &lt;jesse.brandeburg@intel.com&gt;
Cc: Bruce Allan &lt;bruce.w.allan@intel.com&gt;
Cc: Carolyn Wyborny &lt;carolyn.wyborny@intel.com&gt;
Cc: Don Skidmore &lt;donald.c.skidmore@intel.com&gt;
Cc: Greg Rose &lt;gregory.v.rose@intel.com&gt;
Cc: Matthew Vick &lt;matthew.vick@intel.com&gt;
Cc: John Ronciak &lt;john.ronciak@intel.com&gt;
Cc: Mitch Williams &lt;mitch.a.williams@intel.com&gt;
Cc: Amir Vadai &lt;amirv@mellanox.com&gt;
Cc: Solarflare linux maintainers &lt;linux-net-drivers@solarflare.com&gt;
Cc: Shradha Shah &lt;sshah@solarflare.com&gt;
Cc: Shreyas Bhatewara &lt;sbhatewara@vmware.com&gt;
Cc: "VMware, Inc." &lt;pv-drivers@vmware.com&gt;
Cc: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Eyal Perry &lt;eyalpe@mellanox.com&gt;
Signed-off-by: Amir Vadai &lt;amirv@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch extends the set/get_rxfh ethtool-options for getting or
setting the RSS hash function.

It modifies drivers implementation of set/get_rxfh accordingly.

This change also delegates the responsibility of checking whether a
modification to a certain RX flow hash parameter is supported to the
driver implementation of set_rxfh.

User-kernel API is done through the new hfunc bitmask field in the
ethtool_rxfh struct. A bit set in the hfunc field is corresponding to an
index in the new string-set ETH_SS_RSS_HASH_FUNCS.

Got approval from most of the relevant driver maintainers that their
driver is using Toeplitz, and for the few that didn't answered, also
assumed it is Toeplitz.

Cc: Tom Lendacky &lt;thomas.lendacky@amd.com&gt;
Cc: Ariel Elior &lt;ariel.elior@qlogic.com&gt;
Cc: Prashant Sreedharan &lt;prashant@broadcom.com&gt;
Cc: Michael Chan &lt;mchan@broadcom.com&gt;
Cc: Hariprasad S &lt;hariprasad@chelsio.com&gt;
Cc: Sathya Perla &lt;sathya.perla@emulex.com&gt;
Cc: Subbu Seetharaman &lt;subbu.seetharaman@emulex.com&gt;
Cc: Ajit Khaparde &lt;ajit.khaparde@emulex.com&gt;
Cc: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
Cc: Jesse Brandeburg &lt;jesse.brandeburg@intel.com&gt;
Cc: Bruce Allan &lt;bruce.w.allan@intel.com&gt;
Cc: Carolyn Wyborny &lt;carolyn.wyborny@intel.com&gt;
Cc: Don Skidmore &lt;donald.c.skidmore@intel.com&gt;
Cc: Greg Rose &lt;gregory.v.rose@intel.com&gt;
Cc: Matthew Vick &lt;matthew.vick@intel.com&gt;
Cc: John Ronciak &lt;john.ronciak@intel.com&gt;
Cc: Mitch Williams &lt;mitch.a.williams@intel.com&gt;
Cc: Amir Vadai &lt;amirv@mellanox.com&gt;
Cc: Solarflare linux maintainers &lt;linux-net-drivers@solarflare.com&gt;
Cc: Shradha Shah &lt;sshah@solarflare.com&gt;
Cc: Shreyas Bhatewara &lt;sbhatewara@vmware.com&gt;
Cc: "VMware, Inc." &lt;pv-drivers@vmware.com&gt;
Cc: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Eyal Perry &lt;eyalpe@mellanox.com&gt;
Signed-off-by: Amir Vadai &lt;amirv@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: provide a per host RSS key generic infrastructure</title>
<updated>2014-11-16T20:59:11+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2014-11-16T14:23:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=960fb622f85180f36d3aff82af53e2be3db2f888'/>
<id>960fb622f85180f36d3aff82af53e2be3db2f888</id>
<content type='text'>
RSS (Receive Side Scaling) typically uses Toeplitz hash and a 40 or 52 bytes
RSS key.

Some drivers use a constant (and well known key), some drivers use a random
key per port, making bonding setups hard to tune. Well known keys increase
attack surface, considering that number of queues is usually a power of two.

This patch provides infrastructure to help drivers doing the right thing.

netdev_rss_key_fill() should be used by drivers to initialize their RSS key,
even if they provide ethtool -X support to let user redefine the key later.

A new /proc/sys/net/core/netdev_rss_key file can be used to get the host
RSS key even for drivers not providing ethtool -x support, in case some
applications want to precisely setup flows to match some RX queues.

Tested:

myhost:~# cat /proc/sys/net/core/netdev_rss_key
11:63:99:bb:79:fb:a5:a7:07:45:b2:20:bf:02:42:2d:08:1a:dd:19:2b:6b:23:ac:56:28:9d:70:c3:ac:e8:16:4b:b7:c1:10:53:a4:78:41:36:40:74:b6:15:ca:27:44:aa:b3:4d:72

myhost:~# ethtool -x eth0
RX flow hash indirection table for eth0 with 8 RX ring(s):
    0:      0     1     2     3     4     5     6     7
RSS hash key:
11:63:99:bb:79:fb:a5:a7:07:45:b2:20:bf:02:42:2d:08:1a:dd:19:2b:6b:23:ac:56:28:9d:70:c3:ac:e8:16:4b:b7:c1:10:53:a4:78:41

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
RSS (Receive Side Scaling) typically uses Toeplitz hash and a 40 or 52 bytes
RSS key.

Some drivers use a constant (and well known key), some drivers use a random
key per port, making bonding setups hard to tune. Well known keys increase
attack surface, considering that number of queues is usually a power of two.

This patch provides infrastructure to help drivers doing the right thing.

netdev_rss_key_fill() should be used by drivers to initialize their RSS key,
even if they provide ethtool -X support to let user redefine the key later.

A new /proc/sys/net/core/netdev_rss_key file can be used to get the host
RSS key even for drivers not providing ethtool -x support, in case some
applications want to precisely setup flows to match some RX queues.

Tested:

myhost:~# cat /proc/sys/net/core/netdev_rss_key
11:63:99:bb:79:fb:a5:a7:07:45:b2:20:bf:02:42:2d:08:1a:dd:19:2b:6b:23:ac:56:28:9d:70:c3:ac:e8:16:4b:b7:c1:10:53:a4:78:41:36:40:74:b6:15:ca:27:44:aa:b3:4d:72

myhost:~# ethtool -x eth0
RX flow hash indirection table for eth0 with 8 RX ring(s):
    0:      0     1     2     3     4     5     6     7
RSS hash key:
11:63:99:bb:79:fb:a5:a7:07:45:b2:20:bf:02:42:2d:08:1a:dd:19:2b:6b:23:ac:56:28:9d:70:c3:ac:e8:16:4b:b7:c1:10:53:a4:78:41

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Remove MPLS GSO feature.</title>
<updated>2014-11-06T07:52:33+00:00</updated>
<author>
<name>Pravin B Shelar</name>
<email>pshelar@nicira.com</email>
</author>
<published>2014-11-05T23:27:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=59b93b41e7fa71138734a911b11b044340dd16bd'/>
<id>59b93b41e7fa71138734a911b11b044340dd16bd</id>
<content type='text'>
Device can export MPLS GSO support in dev-&gt;mpls_features same way
it export vlan features in dev-&gt;vlan_features. So it is safe to
remove NETIF_F_GSO_MPLS redundant flag.

Signed-off-by: Pravin B Shelar &lt;pshelar@nicira.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Device can export MPLS GSO support in dev-&gt;mpls_features same way
it export vlan features in dev-&gt;vlan_features. So it is safe to
remove NETIF_F_GSO_MPLS redundant flag.

Signed-off-by: Pravin B Shelar &lt;pshelar@nicira.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: ethtool: Return -EOPNOTSUPP if user space tries to read EEPROM with lengh 0</title>
<updated>2014-10-31T20:12:34+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2014-10-31T03:50:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e0fb6fb6d52686134b2ece144060219591d4f8d3'/>
<id>e0fb6fb6d52686134b2ece144060219591d4f8d3</id>
<content type='text'>
If a driver supports reading EEPROM but no EEPROM is installed in the system,
the driver's get_eeprom_len function returns 0. ethtool will subsequently
try to read that zero-length EEPROM anyway. If the driver does not support
EEPROM access at all, this operation will return -EOPNOTSUPP. If the driver
does support EEPROM access but no EEPROM is installed, the operation will
return -EINVAL. Return -EOPNOTSUPP in both cases for consistency.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Tested-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a driver supports reading EEPROM but no EEPROM is installed in the system,
the driver's get_eeprom_len function returns 0. ethtool will subsequently
try to read that zero-length EEPROM anyway. If the driver does not support
EEPROM access at all, this operation will return -EOPNOTSUPP. If the driver
does support EEPROM access but no EEPROM is installed, the operation will
return -EINVAL. Return -EOPNOTSUPP in both cases for consistency.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Tested-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ethtool: Ethtool parameter to dynamically change tx_copybreak</title>
<updated>2014-10-06T05:04:16+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2014-10-05T09:35:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1255a5055449781a92076fc5429952f2b33cf309'/>
<id>1255a5055449781a92076fc5429952f2b33cf309</id>
<content type='text'>
Use new ethtool [sg]et_tunable() to set tx_copybread (inline threshold)

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: Amir Vadai &lt;amirv@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use new ethtool [sg]et_tunable() to set tx_copybread (inline threshold)

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: Amir Vadai &lt;amirv@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ethtool: Add generic options for tunables</title>
<updated>2014-09-05T19:12:20+00:00</updated>
<author>
<name>Govindarajulu Varadarajan</name>
<email>_govind@gmx.com</email>
</author>
<published>2014-09-02T21:47:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f0db9b073415848709dd59a6394969882f517da9'/>
<id>f0db9b073415848709dd59a6394969882f517da9</id>
<content type='text'>
This patch adds new ethtool cmd, ETHTOOL_GTUNABLE &amp; ETHTOOL_STUNABLE for getting
tunable values from driver.

Add get_tunable and set_tunable to ethtool_ops. Driver implements these
functions for getting/setting tunable value.

Signed-off-by: Govindarajulu Varadarajan &lt;_govind@gmx.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds new ethtool cmd, ETHTOOL_GTUNABLE &amp; ETHTOOL_STUNABLE for getting
tunable values from driver.

Add get_tunable and set_tunable to ethtool_ops. Driver implements these
functions for getting/setting tunable value.

Signed-off-by: Govindarajulu Varadarajan &lt;_govind@gmx.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ethtool: Check that reserved fields of struct ethtool_rxfh are 0</title>
<updated>2014-06-03T01:43:16+00:00</updated>
<author>
<name>Ben Hutchings</name>
<email>ben@decadent.org.uk</email>
</author>
<published>2014-05-15T15:28:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f062a3844845d267e3716cbc188ad502a15898b7'/>
<id>f062a3844845d267e3716cbc188ad502a15898b7</id>
<content type='text'>
We should fail rather than silently ignoring use of these extensions.

Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We should fail rather than silently ignoring use of these extensions.

Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ethtool: Replace ethtool_ops::{get,set}_rxfh_indir() with {get,set}_rxfh()</title>
<updated>2014-06-03T01:42:44+00:00</updated>
<author>
<name>Ben Hutchings</name>
<email>ben@decadent.org.uk</email>
</author>
<published>2014-05-15T00:25:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=fe62d001372388abb15a324148c913f9b43722a8'/>
<id>fe62d001372388abb15a324148c913f9b43722a8</id>
<content type='text'>
ETHTOOL_{G,S}RXFHINDIR and ETHTOOL_{G,S}RSSH should work for drivers
regardless of whether they expose the hash key, unless you try to
set a hash key for a driver that doesn't expose it.

Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Acked-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ETHTOOL_{G,S}RXFHINDIR and ETHTOOL_{G,S}RSSH should work for drivers
regardless of whether they expose the hash key, unless you try to
set a hash key for a driver that doesn't expose it.

Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Acked-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ethtool: Disallow ETHTOOL_SRSSH with both indir table and hash key unchanged</title>
<updated>2014-05-19T00:29:42+00:00</updated>
<author>
<name>Ben Hutchings</name>
<email>ben@decadent.org.uk</email>
</author>
<published>2014-05-19T00:29:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=61d88c6811f216de4ec26aafe24e650dc1aeb00e'/>
<id>61d88c6811f216de4ec26aafe24e650dc1aeb00e</id>
<content type='text'>
This would be a no-op, so there is no reason to request it.

This also allows conversion of the current implementations of
ethtool_ops::{get,set}_rxfh_indir to ethtool_ops::{get,set}_rxfh
with no change other than their parameters.

Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This would be a no-op, so there is no reason to request it.

This also allows conversion of the current implementations of
ethtool_ops::{get,set}_rxfh_indir to ethtool_ops::{get,set}_rxfh
with no change other than their parameters.

Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ethtool: Name the 'no change' value for setting RSS hash key but not indir table</title>
<updated>2014-05-19T00:18:19+00:00</updated>
<author>
<name>Ben Hutchings</name>
<email>ben@decadent.org.uk</email>
</author>
<published>2014-05-15T00:41:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=7455fa2422898eee3464032351d20695930d9542'/>
<id>7455fa2422898eee3464032351d20695930d9542</id>
<content type='text'>
We usually allocate special values of u32 fields starting from the top
down, so also change the value to 0xffffffff.  As these operations
haven't been included in a stable release yet, it's not too late to
change.

Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We usually allocate special values of u32 fields starting from the top
down, so also change the value to 0xffffffff.  As these operations
haven't been included in a stable release yet, it's not too late to
change.

Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
</feed>
