summaryrefslogtreecommitdiff
path: root/include/net/devlink.h
diff options
context:
space:
mode:
authorParav Pandit <parav@nvidia.com>2025-08-13 12:44:17 +0300
committerJakub Kicinski <kuba@kernel.org>2025-08-14 17:35:20 -0700
commit41a6e8ab18642741437da932c2f5762b185e928c (patch)
treeb20dd62fac1175678f833353f118ab7bbf09ef95 /include/net/devlink.h
parent0ebc0bcd0aa0037019aac996c50166c7baf44ff8 (diff)
devlink/port: Check attributes early and constify
Constify the devlink port attributes to indicate they are read only and does not depend on anything else. Therefore, validate it early before setting in the devlink port. Reviewed-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: Parav Pandit <parav@nvidia.com> Link: https://patch.msgid.link/20250813094417.7269-3-parav@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net/devlink.h')
-rw-r--r--include/net/devlink.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/devlink.h b/include/net/devlink.h
index b32c9ceeb81d..3119d053bc4d 100644
--- a/include/net/devlink.h
+++ b/include/net/devlink.h
@@ -1743,7 +1743,7 @@ void devlink_port_type_ib_set(struct devlink_port *devlink_port,
struct ib_device *ibdev);
void devlink_port_type_clear(struct devlink_port *devlink_port);
void devlink_port_attrs_set(struct devlink_port *devlink_port,
- struct devlink_port_attrs *devlink_port_attrs);
+ const struct devlink_port_attrs *attrs);
void devlink_port_attrs_pci_pf_set(struct devlink_port *devlink_port, u32 controller,
u16 pf, bool external);
void devlink_port_attrs_pci_vf_set(struct devlink_port *devlink_port, u32 controller,