linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: Danny Kukawka <danny.kukawka@bisect.de>
Cc: "David S. Miller" <davem@davemloft.net>,
	Danny Kukawka <dkukawka@suse.de>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH 00/50] set addr_assign_type to NET_ADDR_RANDOM if  a random mac address get assigned to a netdevice
Date: Wed, 8 Feb 2012 14:58:23 -0800	[thread overview]
Message-ID: <20120208145823.75f386c5@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <1328735457-29986-1-git-send-email-danny.kukawka@bisect.de>

On Wed,  8 Feb 2012 22:10:07 +0100
Danny Kukawka <danny.kukawka@bisect.de> wrote:

> The information if a device has a random MAC address is exported
> to the userspace via /sys/class/net/*/addr_assign_type, which
> export net_device->addr_assign_type.
> 
> Currently only a few driver really use dev_hw_addr_random() to
> set addr_assign_type correctly to NET_ADDR_RANDOM.
> 
> This patch change the drivers which set random addresses to
> change also addr_assign_type to NET_ADDR_RANDOM.
> 
> To reflect if the MAC was changed from userspace via SIOCSIFHWADDR,
> which means it's no longer a random address set by the kernel,
> this patch remove NET_ADDR_RANDOM from addr_assign_type in this
> case.
> 
> With this patch tools from userspace can now detect devices with
> random MAC addresses and change them to persistent addresses if
> needed (as e.g. in case of smsc95xx on PandaBoard).
> 
> Maybe it makes sense to introduce a new state for addr_assign_type
> to reflect the fact, that the MAC address was changed via a ioctl
> from user space, e.g, with NET_ADDR_USERSPACE ?
> 


This reminds me that passing dev->dev_addr to dev_hw_addr_rrandom is redundant
for all the instances you showed, so why is it ia parameter.

Also it should BUG() if address length is not 6 (ETH_ALEN).


  parent reply	other threads:[~2012-02-08 22:58 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-08 21:10 [RFC][PATCH 00/50] set addr_assign_type to NET_ADDR_RANDOM if a random mac address get assigned to a netdevice Danny Kukawka
2012-02-08 21:10 ` [PATCH 01/50] eth: reset addr_assign_type if eth_mac_addr() called Danny Kukawka
2012-02-08 22:50   ` Stephen Hemminger
2012-02-08 22:57     ` Danny Kukawka
2012-02-08 21:10 ` [PATCH 02/50] smsc95xx: use dev_hw_addr_random() instead of random_ether_addr() Danny Kukawka
2012-02-09 10:51   ` Sergei Shtylyov
2012-02-08 21:10 ` [PATCH 03/50] smsc75xx: se " Danny Kukawka
2012-02-08 21:10 ` [PATCH 04/50] adi/blackfin: set addr_assign_type correctly if random Danny Kukawka
2012-02-09  3:28   ` Bob Liu
2012-02-09  4:05   ` Mike Frysinger
2012-02-08 21:10 ` [PATCH 05/50] UML net: set addr_assign_type if random_ether_addr() used Danny Kukawka
2012-02-08 21:10 ` [PATCH 06/50] dummy: use dev_hw_addr_random() instead of random_ether_addr() Danny Kukawka
2012-02-08 21:10 ` [PATCH 07/50] au1000_eth: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 08/50] bnx2x: " Danny Kukawka
2012-02-09  9:59   ` David Laight
2012-02-08 21:10 ` [PATCH 09/50] Cadence MACB: " Danny Kukawka
2012-02-09  8:24   ` Nicolas Ferre
2012-02-08 21:10 ` [PATCH 10/50] Calxeda XGMAC: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 11/50] ep93xx: " Danny Kukawka
2012-02-08 21:29   ` H Hartley Sweeten
2012-02-08 21:10 ` [PATCH 12/50] dm9000: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 13/50] dnet: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 14/50] ethoc: set addr_assign_type if random_ether_addr() used Danny Kukawka
2012-02-08 21:10 ` [PATCH 15/50] lantiq_etop: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 16/50] pxa168_eth: use dev_hw_addr_random() instead of random_ether_addr() Danny Kukawka
2012-02-08 21:10 ` [PATCH 17/50] enc28j60: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 18/50] mipsnet: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 19/50] macsonic: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 20/50] smsc911x: " Danny Kukawka
2012-02-09 11:28   ` Mark Brown
2012-02-08 21:10 ` [PATCH 21/50] smsc9420: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 22/50] r6040: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 23/50] efx: " Danny Kukawka
2012-02-08 21:29   ` Ben Hutchings
2012-02-08 21:10 ` [PATCH 24/50] sis900: " Danny Kukawka
2012-02-11  9:05   ` Daniele Venzano
2012-02-08 21:10 ` [PATCH 25/50] via-rhine: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 26/50] faraday: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 27/50] davinci_emac: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 28/50] forcedeth: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 29/50] micrel eth: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 30/50] atheros eth: set addr_assign_type if random_ether_addr() used Danny Kukawka
2012-02-08 21:10 ` [PATCH 31/50] tc35815: use dev_hw_addr_random() instead of random_ether_addr() Danny Kukawka
2012-02-08 21:10 ` [PATCH 32/50] tile_net: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 33/50] stmmac: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 34/50] xilinx ll_temac: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 35/50] ifb: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 36/50] igbvf: reset netdevice addr_assign_type if changed from random Danny Kukawka
2012-02-08 21:10 ` [PATCH 37/50] usbnet: set addr_assign_type if random_ether_addr() used Danny Kukawka
2012-02-08 21:30   ` Oliver Neukum
2012-02-08 21:41     ` Danny Kukawka
2012-02-09  6:57     ` Bjørn Mork
2012-02-09 14:55       ` Oliver Neukum
2012-02-08 21:10 ` [PATCH 38/50] g_ether: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 39/50] veth: use dev_hw_addr_random() instead of random_ether_addr() Danny Kukawka
2012-02-08 21:10 ` [PATCH 40/50] batman-adv: " Danny Kukawka
2012-02-09  8:44   ` [B.A.T.M.A.N.] " Sven Eckelmann
2012-02-11 11:12   ` Marek Lindner
2012-02-08 21:10 ` [PATCH 41/50] l2tp_eth: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 42/50] virtio_net: " Danny Kukawka
2012-02-09  9:35   ` Michael S. Tsirkin
2012-02-08 21:10 ` [PATCH 43/50] macvlan: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 44/50] team: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 45/50] tun: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 46/50] wan: " Danny Kukawka
2012-02-09 14:12   ` Krzysztof Halasa
2012-02-08 21:10 ` [PATCH 47/50] bridge: " Danny Kukawka
2012-02-08 22:52   ` Stephen Hemminger
2012-02-08 21:10 ` [PATCH 48/50] ip_gre.c: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 49/50] openvswitch: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 50/50] " Danny Kukawka
2012-02-08 22:58 ` Stephen Hemminger [this message]
2012-02-09 14:59   ` [RFC][PATCH 00/50] set addr_assign_type to NET_ADDR_RANDOM if a random mac address get assigned to a netdevice Danny Kukawka
2012-02-09 16:06     ` Stephen Hemminger
2012-02-08 23:29 ` David Miller
2012-02-09 12:18   ` Danny Kukawka
2012-02-09 18:37     ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120208145823.75f386c5@nehalam.linuxnetplumber.net \
    --to=shemminger@vyatta.com \
    --cc=danny.kukawka@bisect.de \
    --cc=davem@davemloft.net \
    --cc=dkukawka@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).