[PATCH v3 0/3] net: dsa: use more appropriate NET_NAME_* constants for user ports

From: Rasmus Villemoes
Date: Wed Nov 16 2022 - 06:06:20 EST


The intention of commit 685343fc3ba6 ("net: add name_assign_type
netdev attribute") was clearly that drivers be switched over one by
one to select appropriate NET_NAME_* constants instead of
NET_NAME_UNKNOWN. This small series attempts to do that for DSA user
ports.

This is obviously and intentionally user-visible changes, so there's a
small chance that it could lead to a regression. To make it easy to
revert either of the "label in DT" and "fallback to eth%d" changes,
this is done as a refactoring which shouldn't introduce any functional
change (but by itself adds code which looks a little odd, with the two
identical assignments in the two branches), followed by changing the
constant used in each case in two different patches.

Rasmus Villemoes (3):
net: dsa: refactor name assignment for user ports
net: dsa: use NET_NAME_PREDICTABLE for user ports with name given in
DT
net: dsa: set name_assign_type to NET_NAME_ENUM for enumerated user
ports

net/dsa/dsa2.c | 3 ---
net/dsa/slave.c | 13 +++++++++++--
2 files changed, 11 insertions(+), 5 deletions(-)

--
2.37.2