Le 29/09/2022 à 03:11, Jakub Kicinski a écrit : > FOU has a reasonably modern Genetlink family. Add a spec. > > Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx> > --- > 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 The first attribute should always be unspec/unused. Maybe it could be automatically generated? > + - > + 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 To what correspond this name? It helps to name the generated operations array? Something else than 'const struct genl_small_ops fou_ops[3]'?