<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/etherdevice.h, branch v3.16.68</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.16.68</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.16.68'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2015-09-30T12:20:44Z</updated>
<entry>
<title>net: fix endian check warning in etherdevice.h</title>
<updated>2015-09-30T12:20:44Z</updated>
<author>
<name>Jesse Brandeburg</name>
<email>jesse.brandeburg@intel.com</email>
</author>
<published>2015-08-14T01:34:03Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=bea65a59d8d46c8d17c2c79533b973b3f9f22340'/>
<id>urn:sha1:bea65a59d8d46c8d17c2c79533b973b3f9f22340</id>
<content type='text'>
commit fbaff3ef859a86dc3df2128d2de9f8a6e255a967 upstream.

Sparse builds have been warning for a really long time now
that etherdevice.h has a conversion that is unsafe.

  include/linux/etherdevice.h:79:32: warning: restricted __be16 degrades to integer

This code change fixes the issue and generates the exact
same assembly before/after (checked on x86_64)

Fixes: 2c722fe1c821 (etherdevice: Optimize a few is_&lt;foo&gt;_ether_addr functions)
Signed-off-by: Jesse Brandeburg &lt;jesse.brandeburg@intel.com&gt;
CC: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Luis Henriques &lt;luis.henriques@canonical.com&gt;
</content>
</entry>
<entry>
<title>etherdevice: Use ether_addr_copy to copy an Ethernet address</title>
<updated>2014-01-15T23:39:33Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2014-01-14T23:18:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=286ab723d4b83d37deb4017008ef1444a95cfb0d'/>
<id>urn:sha1:286ab723d4b83d37deb4017008ef1444a95cfb0d</id>
<content type='text'>
Some systems can use the normally known u16 alignment of
Ethernet addresses to save some code/text bytes and cycles.

This does not change currently emitted code on x86 by gcc 4.8.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>etherdevice: Optimize a few is_&lt;foo&gt;_ether_addr functions</title>
<updated>2013-12-10T01:58:11Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2013-12-06T23:44:21Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2c722fe1c821a100ca87fcc36e90a9bceb497c7c'/>
<id>urn:sha1:2c722fe1c821a100ca87fcc36e90a9bceb497c7c</id>
<content type='text'>
If CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is set,
several is_&lt;foo&gt;_ether_addr functions can be slightly
improved by using u32 dereferences.

I believe all current uses of is_zero_ether_addr and
is_broadcast_ether_addr are u16 aligned, so always use
u16 references to improve those functions performance.

Document the u16 alignment requirements.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>etherdevice: Add ether_addr_equal_unaligned</title>
<updated>2013-12-10T01:58:10Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2013-12-06T22:21:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=73eaef87e98a96fe8b8a586f916b2721bf512efa'/>
<id>urn:sha1:73eaef87e98a96fe8b8a586f916b2721bf512efa</id>
<content type='text'>
Add a generic routine to test if possibly unaligned
to u16 Ethernet addresses are equal.

If CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is set,
this uses the slightly faster generic routine
ether_addr_equal, otherwise this uses memcmp.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ether_addr_equal: Optimize implementation, remove unused compare_ether_addr</title>
<updated>2013-12-06T21:37:43Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2013-12-05T22:54:38Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0d74c42f788caf3cad727c61c490d9459bc8918b'/>
<id>urn:sha1:0d74c42f788caf3cad727c61c490d9459bc8918b</id>
<content type='text'>
Add a new check for CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS to reduce
the number of or's used in the ether_addr_equal comparison to very
slightly improve function performance.

Simplify the ether_addr_equal_64bits implementation.
Integrate and remove the zap_last_2bytes helper as it's now
used only once.

Remove the now unused compare_ether_addr function.

Update the unaligned-memory-access documentation to remove the
compare_ether_addr description and show how unaligned accesses
could occur with ether_addr_equal.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[networking]device.h: Remove extern from function prototypes</title>
<updated>2013-09-26T22:06:58Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2013-09-26T21:48:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f629d208d27a22f495b7734eede585b5d207e912'/>
<id>urn:sha1:f629d208d27a22f495b7734eede585b5d207e912</id>
<content type='text'>
There are a mix of function prototypes with and without extern
in the kernel sources.  Standardize on not using extern for
function prototypes.

Function prototypes don't need to be written with extern.
extern is assumed by the compiler.  Its use is as unnecessary as
using auto to declare automatic/local variables in a block.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
</content>
</entry>
<entry>
<title>net: etherdevice: add address inherit helper</title>
<updated>2013-09-04T00:57:49Z</updated>
<author>
<name>Bjørn Mork</name>
<email>bjorn@mork.no</email>
</author>
<published>2013-08-30T16:08:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=83a093b486ecfd25e7b04b82f6a388f24bd274b2'/>
<id>urn:sha1:83a093b486ecfd25e7b04b82f6a388f24bd274b2</id>
<content type='text'>
Some etherdevices inherit their address from a parent or
master device. The addr_assign_type should be updated along
with the address in these cases.  Adding a helper function
to simplify this.

Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: split eth_mac_addr for better error handling</title>
<updated>2013-01-21T19:07:44Z</updated>
<author>
<name>Stefan Hajnoczi</name>
<email>stefanha@gmail.com</email>
</author>
<published>2013-01-21T01:17:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=fa0879e37b59e8e3f130a30a9e6fa515717c5bdd'/>
<id>urn:sha1:fa0879e37b59e8e3f130a30a9e6fa515717c5bdd</id>
<content type='text'>
When we set mac address, software mac address in system and hardware mac
address all need to be updated. Current eth_mac_addr() doesn't allow
callers to implement error handling nicely.

This patch split eth_mac_addr() to prepare part and real commit part,
then we can prepare first, and try to change hardware address, then do
the real commit if hardware address is set successfully.

Signed-off-by: Stefan Hajnoczi &lt;stefanha@gmail.com&gt;
Signed-off-by: Amos Kong &lt;akong@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: set dev-&gt;addr_assign_type correctly</title>
<updated>2013-01-04T06:37:35Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@resnulli.us</email>
</author>
<published>2013-01-01T03:30:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e41b2d7fe7803e85e1202d0eb172717d7bf1bbaf'/>
<id>urn:sha1:e41b2d7fe7803e85e1202d0eb172717d7bf1bbaf</id>
<content type='text'>
Not a bitfield, but a plain value.

Signed-off-by: Jiri Pirko &lt;jiri@resnulli.us&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>eth: Rename and properly align br_reserved_address array</title>
<updated>2012-11-03T01:34:05Z</updated>
<author>
<name>Ben Hutchings</name>
<email>bhutchings@solarflare.com</email>
</author>
<published>2012-11-01T09:12:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2bc80059fe19229e68a306ce12f5e61e80b92c5c'/>
<id>urn:sha1:2bc80059fe19229e68a306ce12f5e61e80b92c5c</id>
<content type='text'>
Since this array is no longer part of the bridge driver, it should
have an 'eth' prefix not 'br'.

We also assume that either it's 16-bit-aligned or the architecture has
efficient unaligned access.  Ensure the first of these is true by
explicitly aligning it.

Signed-off-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
Acked-by: John Fastabend &lt;john.r.fastabend@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
