diff options
| author | Jakub Kicinski <kuba@kernel.org> | 2025-07-09 01:06:37 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-07-11 03:57:49 +0300 |
| commit | f7c595c9d9f4cce9ec335f0d3c5d875bb547f9d5 (patch) | |
| tree | 1422c3777e555506adfc7bb97cc056b101bbd90c /tools/net/ynl/pyynl/lib/ynl.py | |
| parent | 400244eaa2c99da01a48f6323045f84411afce83 (diff) | |
| download | linux-f7c595c9d9f4cce9ec335f0d3c5d875bb547f9d5.tar.xz | |
tools: ynl: decode enums in auto-ints
Use enum decoding on auto-ints. Looks like we only had enum
auto-ints for input values until now. Upcoming RSS work will
need this to declare an attribute with flags as a uint.
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Link: https://patch.msgid.link/20250708220640.2738464-3-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/net/ynl/pyynl/lib/ynl.py')
| -rw-r--r-- | tools/net/ynl/pyynl/lib/ynl.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/net/ynl/pyynl/lib/ynl.py b/tools/net/ynl/pyynl/lib/ynl.py index 61deb5923067..7529bce174ff 100644 --- a/tools/net/ynl/pyynl/lib/ynl.py +++ b/tools/net/ynl/pyynl/lib/ynl.py @@ -762,6 +762,8 @@ class YnlFamily(SpecFamily): decoded = True elif attr_spec.is_auto_scalar: decoded = attr.as_auto_scalar(attr_spec['type'], attr_spec.byte_order) + if 'enum' in attr_spec: + decoded = self._decode_enum(decoded, attr_spec) elif attr_spec["type"] in NlAttr.type_formats: decoded = attr.as_scalar(attr_spec['type'], attr_spec.byte_order) if 'enum' in attr_spec: |
