diff options
| author | Jakub Kicinski <kuba@kernel.org> | 2025-05-06 18:20:12 -0700 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-05-06 18:21:11 -0700 |
| commit | a7371be8c8f525965553d1657164ace89c3b309e (patch) | |
| tree | 0b651bd00509fd39ae80291bbf6774247c9657b6 /include/uapi/linux | |
| parent | df6a69bc8f31fc34ac1f5408a82e60a3f31d905e (diff) | |
| parent | 88debb521f15d73728d55294f458992f5f69a7c4 (diff) | |
Merge branch 'devlink-sanitize-variable-typed-attributes'
Jiri Pirko says:
====================
devlink: sanitize variable typed attributes
This is continuation based on first two patches of
https://lore.kernel.org/20250425214808.507732-1-saeed@kernel.org
Better to take it as a separate patchset, as the rest of the original
patchset is probably settled.
This patchset is taking care of incorrect usage of internal NLA_* values
in uapi, introduces new enum (in patch #2) that shadows NLA_* values and
makes that part of UAPI.
The last two patches removes unnecessary translations with maintaining
clear devlink param driver api.
====================
Link: https://patch.msgid.link/20250505114513.53370-1-jiri@resnulli.us
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/uapi/linux')
| -rw-r--r-- | include/uapi/linux/devlink.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h index 9401aa343673..a5ee0f13740a 100644 --- a/include/uapi/linux/devlink.h +++ b/include/uapi/linux/devlink.h @@ -385,6 +385,21 @@ enum devlink_linecard_state { DEVLINK_LINECARD_STATE_MAX = __DEVLINK_LINECARD_STATE_MAX - 1 }; +/* Variable attribute type. */ +enum devlink_var_attr_type { + /* Following values relate to the internal NLA_* values */ + DEVLINK_VAR_ATTR_TYPE_U8 = 1, + DEVLINK_VAR_ATTR_TYPE_U16, + DEVLINK_VAR_ATTR_TYPE_U32, + DEVLINK_VAR_ATTR_TYPE_U64, + DEVLINK_VAR_ATTR_TYPE_STRING, + DEVLINK_VAR_ATTR_TYPE_FLAG, + DEVLINK_VAR_ATTR_TYPE_NUL_STRING = 10, + DEVLINK_VAR_ATTR_TYPE_BINARY, + __DEVLINK_VAR_ATTR_TYPE_CUSTOM_BASE = 0x80, + /* Any possible custom types, unrelated to NLA_* values go below */ +}; + enum devlink_attr { /* don't change the order or add anything between, this is ABI! */ DEVLINK_ATTR_UNSPEC, |
