From 6da3424fd629570b5e3b5e9484ffc752a325f9f5 Mon Sep 17 00:00:00 2001 From: Jakub Kicinski Date: Thu, 8 Jun 2023 14:11:58 -0700 Subject: tools: ynl-gen: support code gen for events Netlink specs support both events and notifications (former can define their own message contents). Plug in missing code to generate types, parsers and include events into notification tables. Signed-off-by: Jakub Kicinski --- tools/net/ynl/lib/nlspec.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/net/ynl/lib/nlspec.py') diff --git a/tools/net/ynl/lib/nlspec.py b/tools/net/ynl/lib/nlspec.py index 623c5702bd10..c5d4a6d476a0 100644 --- a/tools/net/ynl/lib/nlspec.py +++ b/tools/net/ynl/lib/nlspec.py @@ -423,7 +423,7 @@ class SpecFamily(SpecElement): self.fixed_header = self.yaml['operations'].get('fixed-header') req_val = rsp_val = 1 for elem in self.yaml['operations']['list']: - if 'notify' in elem: + if 'notify' in elem or 'event' in elem: if 'value' in elem: rsp_val = elem['value'] req_val_next = req_val -- cgit v1.2.3-59-g8ed1b