From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
robh@kernel.org, johannes@sipsolutions.net,
ecree.xilinx@gmail.com, stephen@networkplumber.org,
sdf@google.com, f.fainelli@gmail.com, fw@strlen.de,
linux-doc@vger.kernel.org, razor@blackwall.org,
nicolas.dichtel@6wind.com, gnault@redhat.com,
Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH net-next 4/6] netlink: add a proto specification for FOU
Date: Wed, 28 Sep 2022 18:11:20 -0700 [thread overview]
Message-ID: <20220929011122.1139374-5-kuba@kernel.org> (raw)
In-Reply-To: <20220929011122.1139374-1-kuba@kernel.org>
FOU has a reasonably modern Genetlink family. Add a spec.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
Documentation/netlink/specs/fou.yaml | 128 +++++++++++++++++++++++++++
1 file changed, 128 insertions(+)
create mode 100644 Documentation/netlink/specs/fou.yaml
diff --git a/Documentation/netlink/specs/fou.yaml b/Documentation/netlink/specs/fou.yaml
new file mode 100644
index 000000000000..266c386eedf3
--- /dev/null
+++ b/Documentation/netlink/specs/fou.yaml
@@ -0,0 +1,128 @@
+name: fou
+
+protocol: genetlink-legacy
+
+doc: |
+ Foo-over-UDP.
+
+c-family-name: fou-genl-name
+c-version-name: fou-genl-version
+max-by-define: true
+kernel-policy: global
+
+definitions:
+ -
+ type: enum
+ name: encap_type
+ name-prefix: fou-encap-
+ enum-name:
+ entries: [ unspec, direct, gue ]
+
+attribute-sets:
+ -
+ name: fou
+ name-prefix: fou-attr-
+ attributes:
+ -
+ name: unspec
+ type: unused
+ -
+ name: port
+ type: u16
+ byte-order: big-endian
+ -
+ name: af
+ type: u8
+ -
+ name: ipproto
+ type: u8
+ -
+ name: type
+ type: u8
+ -
+ name: remcsum_nopartial
+ type: flag
+ -
+ name: local_v4
+ type: u32
+ -
+ name: local_v6
+ type: binary
+ checks:
+ min-len: 16
+ -
+ name: peer_v4
+ type: u32
+ -
+ name: peer_v6
+ type: binary
+ checks:
+ min-len: 16
+ -
+ name: peer_port
+ type: u16
+ byte-order: big-endian
+ -
+ name: ifindex
+ type: s32
+
+operations:
+ list:
+ -
+ name: unspec
+ doc: unused
+
+ -
+ name: add
+ doc: Add port.
+ attribute-set: fou
+
+ dont-validate: [ strict, dump ]
+ flags: [ admin-perm ]
+
+ do:
+ request: &all_attrs
+ attributes:
+ - port
+ - ipproto
+ - type
+ - remcsum_nopartial
+ - local_v4
+ - peer_v4
+ - local_v6
+ - peer_v6
+ - peer_port
+ - ifindex
+
+ -
+ name: del
+ doc: Delete port.
+ attribute-set: fou
+
+ dont-validate: [ strict, dump ]
+ flags: [ admin-perm ]
+
+ do:
+ request: &select_attrs
+ attributes:
+ - af
+ - ifindex
+ - port
+ - peer_port
+ - local_v4
+ - peer_v4
+ - local_v6
+ - peer_v6
+
+ -
+ name: get
+ doc: Get tunnel info.
+ attribute-set: fou
+ dont-validate: [ strict, dump ]
+
+ do:
+ request: *select_attrs
+ reply: *all_attrs
+
+ dump:
+ reply: *all_attrs
--
2.37.3
next prev parent reply other threads:[~2022-09-29 1:11 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-29 1:11 [PATCH net-next 0/6] Netlink protocol specs Jakub Kicinski
2022-09-29 1:11 ` [PATCH net-next 1/6] docs: add more netlink docs (incl. spec docs) Jakub Kicinski
2022-09-29 8:15 ` Bagas Sanjaya
2022-09-29 9:43 ` Nicolas Dichtel
2022-09-29 13:34 ` Guillaume Nault
2022-09-29 14:32 ` Jakub Kicinski
2022-09-29 15:11 ` Guillaume Nault
2022-09-29 15:47 ` Jakub Kicinski
2022-09-29 15:52 ` Guillaume Nault
2022-09-29 1:11 ` [PATCH net-next 2/6] netlink: add schemas for YAML specs Jakub Kicinski
2022-09-29 1:11 ` [PATCH net-next 3/6] net: add basic C code generators for Netlink Jakub Kicinski
2022-09-29 1:11 ` Jakub Kicinski [this message]
2022-09-29 9:02 ` [PATCH net-next 4/6] netlink: add a proto specification for FOU Nicolas Dichtel
2022-09-29 9:06 ` Nicolas Dichtel
2022-09-29 14:41 ` Jakub Kicinski
2022-09-29 1:11 ` [PATCH net-next 5/6] net: fou: regenerate the uAPI from the spec Jakub Kicinski
2022-09-29 1:11 ` [PATCH net-next 6/6] net: fou: use policy and operation tables generated " Jakub Kicinski
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=20220929011122.1139374-5-kuba@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=ecree.xilinx@gmail.com \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=fw@strlen.de \
--cc=gnault@redhat.com \
--cc=johannes@sipsolutions.net \
--cc=linux-doc@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nicolas.dichtel@6wind.com \
--cc=pabeni@redhat.com \
--cc=razor@blackwall.org \
--cc=robh@kernel.org \
--cc=sdf@google.com \
--cc=stephen@networkplumber.org \
/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.