diff options
author | Jakub Kicinski <kuba@kernel.org> | 2023-06-07 13:23:54 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-06-08 14:01:10 -0700 |
commit | 9858bfc271de3cc61307a710044c304e6ec34f8a (patch) | |
tree | bbf9103915428861a5a11957418771ab4878db5b /tools/net/ynl/lib | |
parent | 8947e503737138ff92323f99637d921451fe398a (diff) |
tools: ynl-gen: use enum names in op strmap more carefully
In preparation for supporting families which use different msg
ids to and from the kernel - make sure the ids in op strmap
are correct. The map is expected to be used mostly for notifications,
don't generate a separate map for the "to kernel" direction.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/net/ynl/lib')
-rw-r--r-- | tools/net/ynl/lib/nlspec.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/net/ynl/lib/nlspec.py b/tools/net/ynl/lib/nlspec.py index ada22b073aa2..bd5da8aaeac7 100644 --- a/tools/net/ynl/lib/nlspec.py +++ b/tools/net/ynl/lib/nlspec.py @@ -442,6 +442,10 @@ class SpecFamily(SpecElement): else: raise Exception("Can't parse directional ops") + if req_val == req_val_next: + req_val = None + if rsp_val == rsp_val_next: + rsp_val = None op = self.new_operation(elem, req_val, rsp_val) req_val = req_val_next rsp_val = rsp_val_next |