linux-yocto/net/devlink
Jedrzej Jagielski e02b941316 devlink: let driver opt out of automatic phys_port_name generation
[ Upstream commit c5ec7f49b480db0dfc83f395755b1c2a7c979920 ]

Currently when adding devlink port, phys_port_name is automatically
generated within devlink port initialization flow. As a result adding
devlink port support to driver may result in forced changes of interface
names, which breaks already existing network configs.

This is an expected behavior but in some scenarios it would not be
preferable to provide such limitation for legacy driver not being able to
keep 'pre-devlink' interface name.

Add flag no_phys_port_name to devlink_port_attrs struct which indicates
if devlink should not alter name of interface.

Suggested-by: Jiri Pirko <jiri@resnulli.us>
Link: https://lore.kernel.org/all/nbwrfnjhvrcduqzjl4a2jafnvvud6qsbxlvxaxilnryglf4j7r@btuqrimnfuly/
Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Cc: stable@vger.kernel.org # 6.16
Tested-By: Calvin Owens <calvin@wbinvd.org>
Signed-off-by: Calvin Owens <calvin@wbinvd.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-08-28 16:34:42 +02:00
..
core.c devlink: fix xa_alloc_cyclic() error handling 2025-03-19 09:57:36 +00:00
dev.c devlink: add value check to devlink_info_version_put() 2025-04-15 07:36:31 -07:00
devl_internal.h devlink: introduce devlink_nl_put_u64() 2024-10-29 16:52:56 -07:00
dpipe.c devlink: use devlink_nl_put_u64() helper 2024-10-29 16:52:56 -07:00
health.c devlink: use DEVLINK_VAR_ATTR_TYPE_* instead of NLA_* in fmsg 2025-05-06 18:21:11 -07:00
linecard.c devlink: introduce a helper for netlink multicast send 2023-12-19 15:31:40 +01:00
Makefile devlink: move devlink_notify_register/unregister() to dev.c 2023-08-28 08:02:24 -07:00
netlink_gen.c devlink: define enum for attr types of dynamic attributes 2025-05-06 18:21:11 -07:00
netlink_gen.h devlink: add a command to set notification filter and use it for multicasts 2023-12-19 15:31:40 +01:00
netlink.c devlink: Fix devlink parallel commands processing 2024-03-13 08:31:40 +00:00
param.c devlink: avoid param type value translations 2025-05-06 18:21:11 -07:00
port.c devlink: let driver opt out of automatic phys_port_name generation 2025-08-28 16:34:42 +02:00
rate.c devlink: use devlink_nl_put_u64() helper 2024-10-29 16:52:56 -07:00
region.c devlink: region: snapshot IDs: consolidate error values 2024-10-29 16:52:57 -07:00
resource.c devlink: remove unused devlink_resource_register() 2024-10-29 16:52:57 -07:00
sb.c devlink: rename netlink callback to be aligned with the generated ones 2023-10-23 16:12:47 -07:00
trap.c devlink: use devlink_nl_put_u64() helper 2024-10-29 16:52:56 -07:00