diff mbox series

[net-next,2/8] ynl-gen-c.py: allow directional model for kernel mode

Message ID 20230801141907.816280-3-jiri@resnulli.us (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series devlink: use spec to generate split ops | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 9 this patch: 9
netdev/cc_maintainers success CCed 5 of 5 maintainers
netdev/build_clang success Errors and warnings before: 9 this patch: 9
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 9 this patch: 9
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Jiri Pirko Aug. 1, 2023, 2:19 p.m. UTC
From: Jiri Pirko <jiri@nvidia.com>

Directional model is only considered in uapi mode. No reason to forbid
directional model for kernel mode, so lift the limitation.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
---
 tools/net/ynl/ynl-gen-c.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jakub Kicinski Aug. 1, 2023, 6:27 p.m. UTC | #1
On Tue,  1 Aug 2023 16:19:01 +0200 Jiri Pirko wrote:
> Directional model is only considered in uapi mode. No reason to forbid
> directional model for kernel mode, so lift the limitation.

I mean, the reason is that it's not tested so this way
I don't get people sending "fixes" claiming stuff that's
not supported is broken :)
Jiri Pirko Aug. 2, 2023, 6:42 a.m. UTC | #2
Tue, Aug 01, 2023 at 08:27:03PM CEST, kuba@kernel.org wrote:
>On Tue,  1 Aug 2023 16:19:01 +0200 Jiri Pirko wrote:
>> Directional model is only considered in uapi mode. No reason to forbid
>> directional model for kernel mode, so lift the limitation.
>
>I mean, the reason is that it's not tested so this way
>I don't get people sending "fixes" claiming stuff that's
>not supported is broken :)

Got it, but I need it for devlink. Works fine as far as I can tell.
Jiri Pirko Aug. 2, 2023, 8:51 a.m. UTC | #3
Tue, Aug 01, 2023 at 08:27:03PM CEST, kuba@kernel.org wrote:
>On Tue,  1 Aug 2023 16:19:01 +0200 Jiri Pirko wrote:
>> Directional model is only considered in uapi mode. No reason to forbid
>> directional model for kernel mode, so lift the limitation.
>
>I mean, the reason is that it's not tested so this way
>I don't get people sending "fixes" claiming stuff that's
>not supported is broken :)

I re-phrased the patch description accordingly, hopefully to your
satisfaction.
diff mbox series

Patch

diff --git a/tools/net/ynl/ynl-gen-c.py b/tools/net/ynl/ynl-gen-c.py
index 1c36d0c935da..6f77c69fc410 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')