[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZykWTs9a3EqJ3nz5@mini-arch>
Date: Mon, 4 Nov 2024 10:45:34 -0800
From: Stanislav Fomichev <stfomichev@...il.com>
To: Donald Hunter <donald.hunter@...il.com>
Cc: netdev@...r.kernel.org, Jakub Kicinski <kuba@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
Simon Horman <horms@...nel.org>, donald.hunter@...hat.com
Subject: Re: [PATCH net-next v1 2/2] netlink: specs: Add a spec for FIB rule
management
On 11/04, Donald Hunter wrote:
> Add a YNL spec for FIB rules:
>
> ./tools/net/ynl/cli.py \
> --spec Documentation/netlink/specs/rt_rule.yaml \
> --dump getrule --json '{"family": 2}'
>
> [{'action': 'to-tbl',
> 'dst-len': 0,
> 'family': 2,
> 'flags': 0,
> 'protocol': 2,
> 'src-len': 0,
> 'suppress-prefixlen': '0xffffffff',
> 'table': 255,
> 'tos': 0},
> ... ]
>
> Signed-off-by: Donald Hunter <donald.hunter@...il.com>
> ---
> Documentation/netlink/specs/rt_rule.yaml | 240 +++++++++++++++++++++++
> 1 file changed, 240 insertions(+)
> create mode 100644 Documentation/netlink/specs/rt_rule.yaml
>
> diff --git a/Documentation/netlink/specs/rt_rule.yaml b/Documentation/netlink/specs/rt_rule.yaml
> new file mode 100644
> index 000000000000..736bcdb25738
> --- /dev/null
> +++ b/Documentation/netlink/specs/rt_rule.yaml
> @@ -0,0 +1,240 @@
> +# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
> +
> +name: rt-rule
> +protocol: netlink-raw
> +protonum: 0
> +
> +doc:
> + FIB rule management over rtnetlink.
> +
> +definitions:
> + -
> + name: rtgenmsg
> + type: struct
> + members:
> + -
> + name: family
> + type: u8
> + -
> + name: pad
> + type: pad
> + len: 3
> + -
> + name: fib-rule-hdr
> + type: struct
> + members:
> + -
> + name: family
> + type: u8
> + -
> + name: dst-len
> + type: u8
> + -
> + name: src-len
> + type: u8
> + -
> + name: tos
> + type: u8
> + -
> + name: table
> + type: u8
> + -
> + name: res1
> + type: pad
> + len: 1
> + -
> + name: res2
> + type: pad
> + len: 1
> + -
> + name: action
> + type: u8
> + enum: fr-act
> + -
> + name: flags
> + type: u32
> + -
> + name: fr-act
> + type: enum
> + entries:
> + - unspec
> + - to-tbl
> + - goto
> + - nop
> + - res3
> + - res4
> + - blackhole
> + - unreachable
> + - prohibit
> + -
> + name: fib-rule-port-range
> + type: struct
> + members:
> + -
> + name: start
> + type: u16
> + -
> + name: end
> + type: u16
> + -
[..]
> + name: fib-rule-uid-range
> + type: struct
> + members:
> + -
> + name: start
> + type: u16
> + -
> + name: end
> + type: u16
Should be u32?
struct fib_rule_uid_range {
__u32 start;
__u32 end;
};
Otherwise, both patches look good:
Acked-by: Stanislav Fomichev <sdf@...ichev.me>
Powered by blists - more mailing lists