Commit 67c65ce7 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

tools: ynl-gen: don't override pure nested struct



For pure structs (parsed nested attributes) we track what
forms of the struct exist in request and reply directions.
Make sure we don't overwrite the recorded struct each time,
otherwise the information is lost.

Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 6ad49839
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -825,6 +825,7 @@ class Family(SpecFamily):
                    inherit = set()
                    nested = spec['nested-attributes']
                    if nested not in self.root_sets:
                        if nested not in self.pure_nested_structs:
                            self.pure_nested_structs[nested] = Struct(self, nested, inherited=inherit)
                    if attr in rs_members['request']:
                        self.pure_nested_structs[nested].request = True