diff options
author | 2024-03-11 22:07:27 +0800 | |
---|---|---|
committer | 2024-03-11 13:07:48 -0700 | |
commit | 8d0c314c30c9fe7f755d941f5d65a6e427518048 (patch) | |
tree | 875edcfb403caf18d452740ba3bfce9e1d0ff64a /tools/perf/scripts/python/export-to-postgresql.py | |
parent | net: page_pool: factor out page_pool recycle check (diff) | |
download | linux-rng-8d0c314c30c9fe7f755d941f5d65a6e427518048.tar.xz linux-rng-8d0c314c30c9fe7f755d941f5d65a6e427518048.zip |
tools: ynl-gen: support using pre-defined values in attr checks
Support using pre-defined values in checks so we don't need to use hard
code number for the string, binary length. e.g. we have a definition like
#define TEAM_STRING_MAX_LEN 32
Which defined in yaml like:
definitions:
-
name: string-max-len
type: const
value: 32
It can be used in the attribute-sets like
attribute-sets:
-
name: attr-option
name-prefix: team-attr-option-
attributes:
-
name: name
type: string
checks:
len: string-max-len
With this patch it will be converted to
[TEAM_ATTR_OPTION_NAME] = { .type = NLA_STRING, .len = TEAM_STRING_MAX_LEN, }
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Link: https://lore.kernel.org/r/20240311140727.109562-1-liuhangbin@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions