mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 06:31:58 +02:00
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>
This commit is contained in:
parent
400244eaa2
commit
f7c595c9d9
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user