summaryrefslogtreecommitdiff
path: root/tools/net/ynl/lib/ynl.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2023-10-23 16:16:52 -0700
committerJakub Kicinski <kuba@kernel.org>2023-10-23 16:16:52 -0700
commit4fb56e3e92bcac98625ebb85bd931785e7779cec (patch)
tree40e8bc5635c1d35acf016b7776a2b5c2eb4c7729 /tools/net/ynl/lib/ynl.c
parent70b1aca365cbbbc7c4570463306c77ed1776bc3d (diff)
parentcebe7306073d4afeb24886f9063417e559fa2e22 (diff)
Merge branch 'devlink-finish-conversion-to-generated-split_ops'
Jiri Pirko says: ==================== devlink: finish conversion to generated split_ops This patchset converts the remaining genetlink commands to generated split_ops and removes the existing small_ops arrays entirely alongside with shared netlink attribute policy. Patches #1-#6 are just small preparations and small fixes on multiple places. Note that couple of patches contain the "Fixes" tag but no need to put them into -net tree. Patch #7 is a simple rename preparation Patch #8 is the main one in this set and adds actual definitions of cmds in to yaml file. Patches #9-#10 finalize the change removing bits that are no longer in use. ==================== Link: https://lore.kernel.org/r/20231021112711.660606-1-jiri@resnulli.us Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/net/ynl/lib/ynl.c')
-rw-r--r--tools/net/ynl/lib/ynl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/net/ynl/lib/ynl.c b/tools/net/ynl/lib/ynl.c
index 350ddc247450..830d25097009 100644
--- a/tools/net/ynl/lib/ynl.c
+++ b/tools/net/ynl/lib/ynl.c
@@ -379,6 +379,12 @@ int ynl_attr_validate(struct ynl_parse_arg *yarg, const struct nlattr *attr)
yerr(yarg->ys, YNL_ERROR_ATTR_INVALID,
"Invalid attribute (string %s)", policy->name);
return -1;
+ case YNL_PT_BITFIELD32:
+ if (len == sizeof(struct nla_bitfield32))
+ break;
+ yerr(yarg->ys, YNL_ERROR_ATTR_INVALID,
+ "Invalid attribute (bitfield32 %s)", policy->name);
+ return -1;
default:
yerr(yarg->ys, YNL_ERROR_ATTR_INVALID,
"Invalid attribute (unknown %s)", policy->name);