<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/include/linux/ethtool.h, branch v2.6.36-rc5</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6</title>
<updated>2010-07-07T22:59:38+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2010-07-07T22:59:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=597e608a8492d662736c9bc6aa507dbf1cadc17d'/>
<id>597e608a8492d662736c9bc6aa507dbf1cadc17d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>ethtool: Add support for control of RX flow hash indirection</title>
<updated>2010-06-30T21:09:37+00:00</updated>
<author>
<name>Ben Hutchings</name>
<email>bhutchings@solarflare.com</email>
</author>
<published>2010-06-30T05:05:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a5b6ee291e39e285e021cf251dbcf770c83cd74e'/>
<id>a5b6ee291e39e285e021cf251dbcf770c83cd74e</id>
<content type='text'>
Many NICs use an indirection table to map an RX flow hash value to one
of an arbitrary number of queues (not necessarily a power of 2).  It
can be useful to remove some queues from this indirection table so
that they are only used for flows that are specifically filtered
there.  It may also be useful to weight the mapping to account for
user processes with the same CPU-affinity as the RX interrupts.

Signed-off-by: Ben Hutchings &lt;bhutchings@solarflare.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>
Many NICs use an indirection table to map an RX flow hash value to one
of an arbitrary number of queues (not necessarily a power of 2).  It
can be useful to remove some queues from this indirection table so
that they are only used for flows that are specifically filtered
there.  It may also be useful to weight the mapping to account for
user processes with the same CPU-affinity as the RX interrupts.

Signed-off-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ethtool: Change ethtool_op_set_flags to validate flags</title>
<updated>2010-06-30T21:09:35+00:00</updated>
<author>
<name>Ben Hutchings</name>
<email>bhutchings@solarflare.com</email>
</author>
<published>2010-06-30T02:44:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1437ce3983bcbc0447a0dedcd644c14fe833d266'/>
<id>1437ce3983bcbc0447a0dedcd644c14fe833d266</id>
<content type='text'>
ethtool_op_set_flags() does not check for unsupported flags, and has
no way of doing so.  This means it is not suitable for use as a
default implementation of ethtool_ops::set_flags.

Add a 'supported' parameter specifying the flags that the driver and
hardware support, validate the requested flags against this, and
change all current callers to pass this parameter.

Change some other trivial implementations of ethtool_ops::set_flags to
call ethtool_op_set_flags().

Signed-off-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
Reviewed-by: Stanislaw Gruszka &lt;sgruszka@redhat.com&gt;
Acked-by: Jeff Garzik &lt;jgarzik@redhat.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>
ethtool_op_set_flags() does not check for unsupported flags, and has
no way of doing so.  This means it is not suitable for use as a
default implementation of ethtool_ops::set_flags.

Add a 'supported' parameter specifying the flags that the driver and
hardware support, validate the requested flags against this, and
change all current callers to pass this parameter.

Change some other trivial implementations of ethtool_ops::set_flags to
call ethtool_op_set_flags().

Signed-off-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
Reviewed-by: Stanislaw Gruszka &lt;sgruszka@redhat.com&gt;
Acked-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ethtool: Fix potential user buffer overflow for ETHTOOL_{G, S}RXFH</title>
<updated>2010-06-29T08:00:29+00:00</updated>
<author>
<name>Ben Hutchings</name>
<email>bhutchings@solarflare.com</email>
</author>
<published>2010-06-28T08:45:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bf988435bd5b53529f4408a8efb1f433f6ddfda9'/>
<id>bf988435bd5b53529f4408a8efb1f433f6ddfda9</id>
<content type='text'>
struct ethtool_rxnfc was originally defined in 2.6.27 for the
ETHTOOL_{G,S}RXFH command with only the cmd, flow_type and data
fields.  It was then extended in 2.6.30 to support various additional
commands.  These commands should have been defined to use a new
structure, but it is too late to change that now.

Since user-space may still be using the old structure definition
for the ETHTOOL_{G,S}RXFH commands, and since they do not need the
additional fields, only copy the originally defined fields to and
from user-space.

Signed-off-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
Cc: stable@kernel.org
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
struct ethtool_rxnfc was originally defined in 2.6.27 for the
ETHTOOL_{G,S}RXFH command with only the cmd, flow_type and data
fields.  It was then extended in 2.6.30 to support various additional
commands.  These commands should have been defined to use a new
structure, but it is too late to change that now.

Since user-space may still be using the old structure definition
for the ETHTOOL_{G,S}RXFH commands, and since they do not need the
additional fields, only copy the originally defined fields to and
from user-space.

Signed-off-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
Cc: stable@kernel.org
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ethtool: Revert incorrect indentation changes</title>
<updated>2010-06-15T06:13:06+00:00</updated>
<author>
<name>Ben Hutchings</name>
<email>bhutchings@solarflare.com</email>
</author>
<published>2010-06-14T08:53:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1be3b5fe9dffe3300f995584d8f996dd20e29412'/>
<id>1be3b5fe9dffe3300f995584d8f996dd20e29412</id>
<content type='text'>
commit 97f8aefbbfb5aa5c9944e5fa8149f1fdaf71c7b6 "net: fix ethtool
coding style errors and warnings" changed the indentation of several
macro definitions in ethtool.h.  These definitions line up in the diff
where there is an extra character at the start of each line, but not
in the resulting file.

Signed-off-by: Ben Hutchings &lt;bhutchings@solarflare.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>
commit 97f8aefbbfb5aa5c9944e5fa8149f1fdaf71c7b6 "net: fix ethtool
coding style errors and warnings" changed the indentation of several
macro definitions in ethtool.h.  These definitions line up in the diff
where there is an extra character at the start of each line, but not
in the resulting file.

Signed-off-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: fix ethtool coding style errors and warnings</title>
<updated>2010-04-08T04:54:42+00:00</updated>
<author>
<name>chavey</name>
<email>chavey@google.com</email>
</author>
<published>2010-04-08T04:54:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=97f8aefbbfb5aa5c9944e5fa8149f1fdaf71c7b6'/>
<id>97f8aefbbfb5aa5c9944e5fa8149f1fdaf71c7b6</id>
<content type='text'>
Fix coding style errors and warnings output while running checkpatch.pl
on the files net/core/ethtool.c and include/linux/ethtool.h

Signed-off-by: chavey &lt;chavey@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>
Fix coding style errors and warnings output while running checkpatch.pl
on the files net/core/ethtool.c and include/linux/ethtool.h

Signed-off-by: chavey &lt;chavey@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netdev: ethtool RXHASH flag</title>
<updated>2010-03-31T06:51:08+00:00</updated>
<author>
<name>stephen hemminger</name>
<email>shemminger@vyatta.com</email>
</author>
<published>2010-03-29T14:47:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b00fabb4020d17bda4bea59507e09fadf573088d'/>
<id>b00fabb4020d17bda4bea59507e09fadf573088d</id>
<content type='text'>
This adds ethtool and device feature flag to allow control
of receive hashing offload.

Signed-off-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Acked-by: Jeff Garzik &lt;jgarzik@redhat.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 adds ethtool and device feature flag to allow control
of receive hashing offload.

Signed-off-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Acked-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ethtool: Add direct access to ops-&gt;get_sset_count</title>
<updated>2010-03-05T22:00:17+00:00</updated>
<author>
<name>Jeff Garzik</name>
<email>jeff@garzik.org</email>
</author>
<published>2010-03-04T08:21:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d17792ebdf90289c9fd1bce888076d3d60ecd53b'/>
<id>d17792ebdf90289c9fd1bce888076d3d60ecd53b</id>
<content type='text'>
On 03/04/2010 09:26 AM, Ben Hutchings wrote:
&gt; On Thu, 2010-03-04 at 00:51 -0800, Jeff Kirsher wrote:
&gt;&gt; From: Jeff Garzik&lt;jgarzik@redhat.com&gt;
&gt;&gt;
&gt;&gt; This patch is an alternative approach for accessing string
&gt;&gt; counts, vs. the drvinfo indirect approach.  This way the drvinfo
&gt;&gt; space doesn't run out, and we don't break ABI later.
&gt; [...]
&gt;&gt; --- a/net/core/ethtool.c
&gt;&gt; +++ b/net/core/ethtool.c
&gt;&gt; @@ -214,6 +214,10 @@ static noinline int ethtool_get_drvinfo(struct net_device *dev, void __user *use
&gt;&gt;   	info.cmd = ETHTOOL_GDRVINFO;
&gt;&gt;   	ops-&gt;get_drvinfo(dev,&amp;info);
&gt;&gt;
&gt;&gt; +	/*
&gt;&gt; +	 * this method of obtaining string set info is deprecated;
&gt;&gt; +	 * consider using ETHTOOL_GSSET_INFO instead
&gt;&gt; +	 */
&gt;
&gt; This comment belongs on the interface (ethtool.h) not the
&gt; implementation.

Debatable -- the current comment is located at the callsite of
ops-&gt;get_sset_count(), which is where an implementor might think to add
a new call.  Not all the numeric fields in ethtool_drvinfo are obtained
from -&gt;get_sset_count().

Hence the "some" in the attached patch to include/linux/ethtool.h,
addressing your comment.

&gt; [...]
&gt;&gt; +static noinline int ethtool_get_sset_info(struct net_device *dev,
&gt;&gt; +                                          void __user *useraddr)
&gt;&gt; +{
&gt; [...]
&gt;&gt; +	/* calculate size of return buffer */
&gt;&gt; +	for (i = 0; i&lt;  64; i++)
&gt;&gt; +		if (sset_mask&amp;  (1ULL&lt;&lt;  i))
&gt;&gt; +			n_bits++;
&gt; [...]
&gt;
&gt; We have a function for this:
&gt;
&gt; 	n_bits = hweight64(sset_mask);

Agreed.

I've attached a follow-up patch, which should enable my/Jeff's kernel
patch to be applied, followed by this one.

Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.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>
On 03/04/2010 09:26 AM, Ben Hutchings wrote:
&gt; On Thu, 2010-03-04 at 00:51 -0800, Jeff Kirsher wrote:
&gt;&gt; From: Jeff Garzik&lt;jgarzik@redhat.com&gt;
&gt;&gt;
&gt;&gt; This patch is an alternative approach for accessing string
&gt;&gt; counts, vs. the drvinfo indirect approach.  This way the drvinfo
&gt;&gt; space doesn't run out, and we don't break ABI later.
&gt; [...]
&gt;&gt; --- a/net/core/ethtool.c
&gt;&gt; +++ b/net/core/ethtool.c
&gt;&gt; @@ -214,6 +214,10 @@ static noinline int ethtool_get_drvinfo(struct net_device *dev, void __user *use
&gt;&gt;   	info.cmd = ETHTOOL_GDRVINFO;
&gt;&gt;   	ops-&gt;get_drvinfo(dev,&amp;info);
&gt;&gt;
&gt;&gt; +	/*
&gt;&gt; +	 * this method of obtaining string set info is deprecated;
&gt;&gt; +	 * consider using ETHTOOL_GSSET_INFO instead
&gt;&gt; +	 */
&gt;
&gt; This comment belongs on the interface (ethtool.h) not the
&gt; implementation.

Debatable -- the current comment is located at the callsite of
ops-&gt;get_sset_count(), which is where an implementor might think to add
a new call.  Not all the numeric fields in ethtool_drvinfo are obtained
from -&gt;get_sset_count().

Hence the "some" in the attached patch to include/linux/ethtool.h,
addressing your comment.

&gt; [...]
&gt;&gt; +static noinline int ethtool_get_sset_info(struct net_device *dev,
&gt;&gt; +                                          void __user *useraddr)
&gt;&gt; +{
&gt; [...]
&gt;&gt; +	/* calculate size of return buffer */
&gt;&gt; +	for (i = 0; i&lt;  64; i++)
&gt;&gt; +		if (sset_mask&amp;  (1ULL&lt;&lt;  i))
&gt;&gt; +			n_bits++;
&gt; [...]
&gt;
&gt; We have a function for this:
&gt;
&gt; 	n_bits = hweight64(sset_mask);

Agreed.

I've attached a follow-up patch, which should enable my/Jeff's kernel
patch to be applied, followed by this one.

Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ethtool: Add direct access to ops-&gt;get_sset_count</title>
<updated>2010-03-05T22:00:17+00:00</updated>
<author>
<name>Jeff Garzik</name>
<email>jgarzik@redhat.com</email>
</author>
<published>2010-03-03T22:51:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=723b2f57ad83ee7087acf9a95e8e289414b1f521'/>
<id>723b2f57ad83ee7087acf9a95e8e289414b1f521</id>
<content type='text'>
This patch is an alternative approach for accessing string
counts, vs. the drvinfo indirect approach.  This way the drvinfo
space doesn't run out, and we don't break ABI later.

Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
Signed-off-by: Peter P Waskiewicz Jr &lt;peter.p.waskiewicz.jr@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.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 is an alternative approach for accessing string
counts, vs. the drvinfo indirect approach.  This way the drvinfo
space doesn't run out, and we don't break ABI later.

Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
Signed-off-by: Peter P Waskiewicz Jr &lt;peter.p.waskiewicz.jr@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "ethtool: Add n-tuple string length to drvinfo and return it"</title>
<updated>2010-02-26T13:12:02+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2010-02-26T13:12:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=738b0343e73604750feb107e063c28b3ca36cb84'/>
<id>738b0343e73604750feb107e063c28b3ca36cb84</id>
<content type='text'>
This reverts commit c79c5ffdce14abb4de3878c5aa8c3c6e5093c69b.

As Jeff points out we can't break the user visible interface
like this, we need to add this into the reserved[] thing.

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 reverts commit c79c5ffdce14abb4de3878c5aa8c3c6e5093c69b.

As Jeff points out we can't break the user visible interface
like this, we need to add this into the reserved[] thing.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
