summaryrefslogtreecommitdiff
path: root/tools/net/ynl/lib/nlspec.py
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2025-01-07 18:07:55 -0800
committerJakub Kicinski <kuba@kernel.org>2025-01-07 18:07:56 -0800
commitacafa84ff3749314a2d52c33b740df80e3127ad5 (patch)
treed553eab2fb333143f5108554d17491323c9145fc /tools/net/ynl/lib/nlspec.py
parentd8c2e5f33acec38cf478c509c65646d029cc378e (diff)
parent6ffdbb93a59c60ee18bebd9acdbbca91e6bf0e64 (diff)
Merge branch 'tools-ynl-decode-link-types-present-in-tests'
Jakub Kicinski says: ==================== tools: ynl: decode link types present in tests Using a kernel built for the net selftest target to run drivers/net tests currently fails, because the net kernel automatically spawns a handful of tunnel devices which YNL can't decode. Fill in those missing link types in rt_link. We need to extend subset support a bit for it to work. v1: https://lore.kernel.org/20250105012523.1722231-1-kuba@kernel.org ==================== Link: https://patch.msgid.link/20250107022820.2087101-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/net/ynl/lib/nlspec.py')
-rw-r--r--tools/net/ynl/lib/nlspec.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/net/ynl/lib/nlspec.py b/tools/net/ynl/lib/nlspec.py
index a745739655ad..314ec8007496 100644
--- a/tools/net/ynl/lib/nlspec.py
+++ b/tools/net/ynl/lib/nlspec.py
@@ -219,7 +219,10 @@ class SpecAttrSet(SpecElement):
else:
real_set = family.attr_sets[self.subset_of]
for elem in self.yaml['attributes']:
- attr = real_set[elem['name']]
+ real_attr = real_set[elem['name']]
+ combined_elem = real_attr.yaml | elem
+ attr = self.new_attr(combined_elem, real_attr.value)
+
self.attrs[attr.name] = attr
self.attrs_by_val[attr.value] = attr