mbox series

[net-next,v4,0/2] tools: ynl-gen: fix parse multi-attr enum attribute

Message ID 20230725101642.267248-1-arkadiusz.kubalewski@intel.com (mailing list archive)
Headers show
Series tools: ynl-gen: fix parse multi-attr enum attribute | expand

Message

Arkadiusz Kubalewski July 25, 2023, 10:16 a.m. UTC
Fix the issues with parsing enums in ynl.py script.

v4->v5:
- fix indent issue in _decode_binary()

v3->v4:
- decoding 'enum-as-flag' starts from 0 instead of enum's start-value
- move back usage of _decode_enum() back to _decode_binary()
- fix typo in commit message

v2->v3:
- Restore i iterator helper for decoding 'enum-as-flag' attributes in
_decode_enum(..) function.
- Fix _decode_enum(..) usage in case of binary & struct type attributes
by moving it to as_struct() funtion while calling _decode_enum(..) for
individual struct members.

v1->v2:
Initially this was one patch, but review shown there is need to fix also
leftover issues with indexing in _decode_enum(..) function
("tools: ynl-gen: fix enum index in _decode_enum(..)").

*** BLURB HERE ***

Arkadiusz Kubalewski (2):
  tools: ynl-gen: fix enum index in _decode_enum(..)
  tools: ynl-gen: fix parse multi-attr enum attribute

 tools/net/ynl/lib/ynl.py | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

Comments

Jakub Kicinski July 26, 2023, 3:13 a.m. UTC | #1
On Tue, 25 Jul 2023 12:16:40 +0200 Arkadiusz Kubalewski wrote:
> Fix the issues with parsing enums in ynl.py script.

In case DaveM wants to take these in the morning already:

Reviewed-by: Jakub Kicinski <kuba@kernel.org>
patchwork-bot+netdevbpf@kernel.org July 26, 2023, 9 p.m. UTC | #2
Hello:

This series was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Tue, 25 Jul 2023 12:16:40 +0200 you wrote:
> Fix the issues with parsing enums in ynl.py script.
> 
> v4->v5:
> - fix indent issue in _decode_binary()
> 
> v3->v4:
> - decoding 'enum-as-flag' starts from 0 instead of enum's start-value
> - move back usage of _decode_enum() back to _decode_binary()
> - fix typo in commit message
> 
> [...]

Here is the summary with links:
  - [net-next,v5,1/2] tools: ynl-gen: fix enum index in _decode_enum(..)
    https://git.kernel.org/netdev/net/c/d7ddf5f4269f
  - [net-next,v5,2/2] tools: ynl-gen: fix parse multi-attr enum attribute
    https://git.kernel.org/netdev/net/c/df15c15e6c98

You are awesome, thank you!