diff options
| author | Jakub Kicinski <kuba@kernel.org> | 2024-10-29 16:52:59 -0700 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2024-10-29 16:52:59 -0700 |
| commit | ef0ed88af8007f7afa7a6f6bbf2fc4b8b032eeb1 (patch) | |
| tree | 6f029488069d7949d1853b26f211a712a18fc478 /net/devlink/devl_internal.h | |
| parent | b8bd8c44a266c9a7dcb907eab10fbb119e3f6494 (diff) | |
| parent | e3302f9a503a632c125170dc3c72b2886a910b0a (diff) | |
Merge branch 'devlink-minor-cleanup'
Przemek Kitszel says:
====================
devlink: minor cleanup
(Patch 1, 2) Add one helper shortcut to put u64 values into skb.
(Patch 3, 4) Minor cleanup for error codes.
(Patch 5, 6, 7) Remove some devlink_resource_*() usage and functions
itself via replacing devlink_* variants by devl_* ones.
v2: fix metadata (cc list, target tree) - Jiri; rebase; tags collected
v1: https://lore.kernel.org/20241018102009.10124-1-przemyslaw.kitszel@intel.com
====================
Link: https://patch.msgid.link/20241023131248.27192-1-przemyslaw.kitszel@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/devlink/devl_internal.h')
| -rw-r--r-- | net/devlink/devl_internal.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/devlink/devl_internal.h b/net/devlink/devl_internal.h index a9f064ab9ed9..14eaad9cfe35 100644 --- a/net/devlink/devl_internal.h +++ b/net/devlink/devl_internal.h @@ -181,6 +181,11 @@ devlink_nl_put_handle(struct sk_buff *msg, struct devlink *devlink) return 0; } +static inline int devlink_nl_put_u64(struct sk_buff *msg, int attrtype, u64 val) +{ + return nla_put_u64_64bit(msg, attrtype, val, DEVLINK_ATTR_PAD); +} + int devlink_nl_put_nested_handle(struct sk_buff *msg, struct net *net, struct devlink *devlink, int attrtype); int devlink_nl_msg_reply_and_new(struct sk_buff **msg, struct genl_info *info); |
