From: Jiri Pirko Date: Thu, 3 Aug 2023 11:13:31 +0000 (+0200) Subject: ynl-gen-c.py: allow directional model for kernel mode X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=eab7be688b4416588d19ee1fe5edbfa79a639b42;p=linux.git ynl-gen-c.py: allow directional model for kernel mode Directional model limitation is only applicable for uapi mode. For kernel mode, the code is generated correctly using right cmd values for do/dump requests. Lift the limitation. Signed-off-by: Jiri Pirko Reviewed-by: Jakub Kicinski Link: https://lore.kernel.org/r/20230803111340.1074067-4-jiri@resnulli.us Signed-off-by: Jakub Kicinski --- diff --git a/tools/net/ynl/ynl-gen-c.py b/tools/net/ynl/ynl-gen-c.py index a3f70ca929fb2..2ea6af892b682 100755 --- a/tools/net/ynl/ynl-gen-c.py +++ b/tools/net/ynl/ynl-gen-c.py @@ -2317,7 +2317,7 @@ def main(): return supported_models = ['unified'] - if args.mode == 'user': + if args.mode in ['user', 'kernel']: supported_models += ['directional'] if parsed.msg_id_model not in supported_models: print(f'Message enum-model {parsed.msg_id_model} not supported for {args.mode} generation')