mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 19:43:40 +02:00
Merge branch 'tools-ynl-gen-misc-changes'
Asbjørn Sloth Tønnesen says: ==================== tools: ynl-gen: misc changes Misc changes to ahead of wireguard ynl conversion, as announced in v1. v1: https://lore.kernel.org/20250901145034.525518-1-ast@fiberby.net ==================== Link: https://patch.msgid.link/20250902154640.759815-1-ast@fiberby.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
f38b9334bb
|
|
@ -52,7 +52,7 @@ attribute-sets:
|
|||
name: local-v6
|
||||
type: binary
|
||||
checks:
|
||||
min-len: 16
|
||||
exact-len: 16
|
||||
-
|
||||
name: peer-v4
|
||||
type: u32
|
||||
|
|
@ -60,7 +60,7 @@ attribute-sets:
|
|||
name: peer-v6
|
||||
type: binary
|
||||
checks:
|
||||
min-len: 16
|
||||
exact-len: 16
|
||||
-
|
||||
name: peer-port
|
||||
type: u16
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ struct genl_info;
|
|||
* @small_ops: the small-struct operations supported by this family
|
||||
* @n_small_ops: number of small-struct operations supported by this family
|
||||
* @split_ops: the split do/dump form of operation definition
|
||||
* @n_split_ops: number of entries in @split_ops, not that with split do/dump
|
||||
* @n_split_ops: number of entries in @split_ops, note that with split do/dump
|
||||
* ops the number of entries is not the same as number of commands
|
||||
* @sock_priv_size: the size of per-socket private memory
|
||||
* @sock_priv_init: the per-socket private memory initializer
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@ const struct nla_policy fou_nl_policy[FOU_ATTR_IFINDEX + 1] = {
|
|||
[FOU_ATTR_TYPE] = { .type = NLA_U8, },
|
||||
[FOU_ATTR_REMCSUM_NOPARTIAL] = { .type = NLA_FLAG, },
|
||||
[FOU_ATTR_LOCAL_V4] = { .type = NLA_U32, },
|
||||
[FOU_ATTR_LOCAL_V6] = { .len = 16, },
|
||||
[FOU_ATTR_LOCAL_V6] = NLA_POLICY_EXACT_LEN(16),
|
||||
[FOU_ATTR_PEER_V4] = { .type = NLA_U32, },
|
||||
[FOU_ATTR_PEER_V6] = { .len = 16, },
|
||||
[FOU_ATTR_PEER_V6] = NLA_POLICY_EXACT_LEN(16),
|
||||
[FOU_ATTR_PEER_PORT] = { .type = NLA_BE16, },
|
||||
[FOU_ATTR_IFINDEX] = { .type = NLA_S32, },
|
||||
};
|
||||
|
|
|
|||
|
|
@ -556,7 +556,7 @@ class TypeBinary(Type):
|
|||
elif 'exact-len' in self.checks:
|
||||
mem = 'NLA_POLICY_EXACT_LEN(' + self.get_limit_str('exact-len') + ')'
|
||||
elif 'min-len' in self.checks:
|
||||
mem = '{ .len = ' + self.get_limit_str('min-len') + ', }'
|
||||
mem = 'NLA_POLICY_MIN_LEN(' + self.get_limit_str('min-len') + ')'
|
||||
elif 'max-len' in self.checks:
|
||||
mem = 'NLA_POLICY_MAX_LEN(' + self.get_limit_str('max-len') + ')'
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user