All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanislav Fomichev <stfomichev@gmail.com>
To: Donald Hunter <donald.hunter@gmail.com>
Cc: netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
	donald.hunter@redhat.com
Subject: Re: [PATCH net-next v1 2/2] netlink: specs: Add a spec for FIB rule management
Date: Mon, 4 Nov 2024 10:45:34 -0800	[thread overview]
Message-ID: <ZykWTs9a3EqJ3nz5@mini-arch> (raw)
In-Reply-To: <20241104165352.19696-3-donald.hunter@gmail.com>

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@gmail.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@fomichev.me>

  parent reply	other threads:[~2024-11-04 18:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-04 16:53 [PATCH net-next v1 0/2] netlink: specs: Add neigh and rule YNL specs Donald Hunter
2024-11-04 16:53 ` [PATCH net-next v1 1/2] netlink: specs: Add a spec for neighbor tables in rtnetlink Donald Hunter
2024-11-04 16:53 ` [PATCH net-next v1 2/2] netlink: specs: Add a spec for FIB rule management Donald Hunter
2024-11-04 18:24   ` Ido Schimmel
2024-11-05 11:06     ` Donald Hunter
2024-11-04 18:45   ` Stanislav Fomichev [this message]
2024-11-05 11:10     ` Donald Hunter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZykWTs9a3EqJ3nz5@mini-arch \
    --to=stfomichev@gmail.com \
    --cc=davem@davemloft.net \
    --cc=donald.hunter@gmail.com \
    --cc=donald.hunter@redhat.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.