From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE8F3C43217 for ; Fri, 30 Sep 2022 02:34:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229919AbiI3Cec (ORCPT ); Thu, 29 Sep 2022 22:34:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229804AbiI3Ce3 (ORCPT ); Thu, 29 Sep 2022 22:34:29 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43D4B121E59; Thu, 29 Sep 2022 19:34:28 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D4C2C62221; Fri, 30 Sep 2022 02:34:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 97A0AC43145; Fri, 30 Sep 2022 02:34:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664505267; bh=XI/BrBbRmdN0txffVSpx5uKhCXHwdDeEWzlLHrHM4Zk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=txSfb4VmJpJw3sYWlAdcXxc3OgBEkvgzO2+v0oKD9iH64iMKRATPeTTp0QzWulXzJ YIwZYdol8ehJ4twAwMmUrCrp0ZLo1AGxGezwUjh7PlriQbsnWy/MU0R7VMb/Nr9rhJ qt5ed+OX7hfWY3CNjSpoo/rtuCHaMYiQSKw3lf+o1kqCKRF3plP7jMskw6W2qbW/jM YHBGSeShpB87Fj0wTg3vDARmKCLqlzHu7tmB18hXk8IklGmpZUTQrG7WJSkuV9N/Nf CkQp5F4QgwnY88l48+uu0LPeS9e3I7FWntj4rW/MmdmSAQuiQuQmbJozoreaBZrQgD tle8I/iqUDvig== From: Jakub Kicinski 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 Subject: [PATCH net-next v2 4/7] netlink: add a proto specification for FOU Date: Thu, 29 Sep 2022 19:34:15 -0700 Message-Id: <20220930023418.1346263-5-kuba@kernel.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220930023418.1346263-1-kuba@kernel.org> References: <20220930023418.1346263-1-kuba@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org FOU has a reasonably modern Genetlink family. Add a spec. Signed-off-by: Jakub Kicinski --- 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