All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v3 0/5] net: dsa: remove .set_addr
@ 2017-10-13 18:18 Vivien Didelot
  2017-10-13 18:18 ` [PATCH net-next v3 1/5] net: dsa: mv88e6xxx: setup random mac address Vivien Didelot
                   ` (6 more replies)
  0 siblings, 7 replies; 17+ messages in thread
From: Vivien Didelot @ 2017-10-13 18:18 UTC (permalink / raw)
  To: netdev
  Cc: linux-kernel, kernel, David S. Miller, Florian Fainelli,
	Andrew Lunn, David Laight, Vivien Didelot

An Ethernet switch may support having a MAC address, which can be used
as the switch's source address in transmitted full-duplex Pause frames.

If a DSA switch supports the related .set_addr operation, the DSA core
sets the master's MAC address on the switch.

This won't make sense anymore in a multi-CPU ports system, because there
won't be a unique master device assigned to a switch tree.

Moreover this operation is confusing because it makes the user think
that it could be used to program the switch with the MAC address of the
CPU/management port such that MAC address learning can be disabled on
said port, but in fact, that's not how it is currently used.

To fix this, assign a random MAC address at setup time in the mv88e6060
and mv88e6xxx drivers before removing .set_addr completely from DSA.

Changes in v3:
  - include fix for mv88e6060 switch MAC address setter.

Changes in v2:
  - remove .set_addr implementation from drivers and use a random MAC.

Vivien Didelot (5):
  net: dsa: mv88e6xxx: setup random mac address
  net: dsa: mv88e6060: fix switch MAC address
  net: dsa: mv88e6060: setup random mac address
  net: dsa: dsa_loop: remove .set_addr
  net: dsa: remove .set_addr

 drivers/net/dsa/dsa_loop.c       |  8 --------
 drivers/net/dsa/mv88e6060.c      | 37 ++++++++++++++++++++++++++-----------
 drivers/net/dsa/mv88e6xxx/chip.c | 33 +++++++++++++++++----------------
 include/net/dsa.h                |  1 -
 net/dsa/dsa2.c                   |  6 ------
 net/dsa/legacy.c                 |  6 ------
 6 files changed, 43 insertions(+), 48 deletions(-)

-- 
2.14.2

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2017-10-16 18:16 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-13 18:18 [PATCH net-next v3 0/5] net: dsa: remove .set_addr Vivien Didelot
2017-10-13 18:18 ` [PATCH net-next v3 1/5] net: dsa: mv88e6xxx: setup random mac address Vivien Didelot
2017-10-13 18:18 ` [PATCH net-next v3 2/5] net: dsa: mv88e6060: fix switch MAC address Vivien Didelot
2017-10-13 18:18 ` [PATCH net-next v3 3/5] net: dsa: mv88e6060: setup random mac address Vivien Didelot
2017-10-16  9:05   ` David Laight
2017-10-13 18:18 ` [PATCH net-next v3 4/5] net: dsa: dsa_loop: remove .set_addr Vivien Didelot
2017-10-13 18:18 ` [PATCH net-next v3 5/5] net: dsa: " Vivien Didelot
2017-10-15  1:30 ` [PATCH net-next v3 0/5] " David Miller
2017-10-16 15:23 ` Rodney Cummings
2017-10-16 16:09   ` Andrew Lunn
2017-10-16 16:28     ` Rodney Cummings
2017-10-16 16:47       ` Andrew Lunn
2017-10-16 16:52         ` Rodney Cummings
2017-10-16 16:57           ` Andrew Lunn
2017-10-16 18:14             ` Rodney Cummings
2017-10-16 16:30     ` David Laight
2017-10-16 16:44       ` Andrew Lunn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.