From: Jakub Kicinski <kuba@kernel.org>
To: netdev@vger.kernel.org
Cc: olteanv@gmail.com, andrew@lunn.ch, idosch@idosch.org,
f.fainelli@gmail.com, Jakub Kicinski <kuba@kernel.org>
Subject: [RFC net-next 0/6] ethernet: add eth_hw_addr_set_port()
Date: Fri, 15 Oct 2021 12:38:42 -0700 [thread overview]
Message-ID: <20211015193848.779420-1-kuba@kernel.org> (raw)
While doing the last polishing of the drivers/ethernet
changes I realized we have a handful of drivers offsetting
some base MAC addr by an id. So I decided to add a helper
for it. The helper takes care of wrapping which is probably
not 100% necessary but seems like a good idea. And it saves
driver side LoC (the diffstat is actually negative if we
compare against the changes I'd have to make if I was to
convert all these drivers to not operate directly on
netdev->dev_addr).
Sending as RFC, because feedback welcome.. and it may
be weekend for Ido.
Jakub Kicinski (6):
ethernet: add a helper for assigning port addresses
ethernet: ocelot: use eth_hw_addr_set_port()
ethernet: prestera: use eth_hw_addr_set_port()
ethernet: fec: use eth_hw_addr_set_port()
ethernet: mlxsw: use eth_hw_addr_set_port()
ethernet: sparx5: use eth_hw_addr_set_port()
drivers/net/ethernet/freescale/fec_main.c | 5 +----
.../ethernet/marvell/prestera/prestera_main.c | 5 +++--
drivers/net/ethernet/mellanox/mlxsw/minimal.c | 9 +++-----
.../net/ethernet/mellanox/mlxsw/spectrum.c | 8 +++----
.../ethernet/microchip/sparx5/sparx5_netdev.c | 4 +---
drivers/net/ethernet/mscc/ocelot_net.c | 3 +--
include/linux/etherdevice.h | 21 +++++++++++++++++++
7 files changed, 34 insertions(+), 21 deletions(-)
--
2.31.1
next reply other threads:[~2021-10-15 19:38 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-15 19:38 Jakub Kicinski [this message]
2021-10-15 19:38 ` [RFC net-next 1/6] ethernet: add a helper for assigning port addresses Jakub Kicinski
2021-10-15 19:38 ` Jakub Kicinski
2021-10-15 21:36 ` Shannon Nelson
2021-10-15 21:36 ` Shannon Nelson
2021-10-15 22:30 ` Jakub Kicinski
2021-10-15 22:30 ` Jakub Kicinski
2021-10-15 22:50 ` Vladimir Oltean
2021-10-15 22:50 ` Vladimir Oltean
2021-10-17 15:06 ` Ido Schimmel
2021-10-17 15:06 ` Ido Schimmel
2021-10-18 14:08 ` Jakub Kicinski
2021-10-18 14:08 ` Jakub Kicinski
2021-10-15 19:38 ` [RFC net-next 2/6] ethernet: ocelot: use eth_hw_addr_set_port() Jakub Kicinski
2021-10-15 19:38 ` [RFC net-next 3/6] ethernet: prestera: " Jakub Kicinski
2021-10-15 23:51 ` Vladimir Oltean
2021-10-16 0:17 ` Jakub Kicinski
2021-10-16 0:27 ` Vladimir Oltean
2021-10-18 16:54 ` Taras Chornyi [C]
2021-10-18 17:01 ` Jakub Kicinski
2021-10-18 18:20 ` Taras Chornyi
2021-10-16 21:19 ` Shannon Nelson
2021-10-18 14:19 ` Jakub Kicinski
2021-10-18 16:26 ` Shannon Nelson
2021-10-18 17:33 ` Ido Schimmel
2021-10-18 17:54 ` Shannon Nelson
2021-10-18 19:15 ` Ido Schimmel
2021-10-15 19:38 ` [RFC net-next 4/6] ethernet: fec: " Jakub Kicinski
2021-10-15 19:38 ` [RFC net-next 5/6] ethernet: mlxsw: " Jakub Kicinski
2021-10-15 19:38 ` [RFC net-next 6/6] ethernet: sparx5: " Jakub Kicinski
2021-10-15 19:38 ` Jakub Kicinski
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=20211015193848.779420-1-kuba@kernel.org \
--to=kuba@kernel.org \
--cc=andrew@lunn.ch \
--cc=f.fainelli@gmail.com \
--cc=idosch@idosch.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
/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 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.