From patchwork Mon Oct 23 18:17:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mat Martineau X-Patchwork-Id: 13433355 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A409B21365; Mon, 23 Oct 2023 18:17:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mvsu0p+e" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6E5B5C433C8; Mon, 23 Oct 2023 18:17:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698085044; bh=tZWT4nwUOGmeRZNhiWRzIgAUmCuJoLGoAGNZN7nP150=; h=From:Subject:Date:To:Cc:From; b=mvsu0p+ekOU5tSeHdjacl10+enzbry1QIK3Sw/UMV6oOP9yHHFNwTvQh3keScWosZ 4UsN55t7a0pPXY1w57nb2iMNUrVwi75nzZZzH0OnlUqOTFHQAOiMKmLo0HB+9rI9sL Tj+Ep3yb6vfuFMVpaXoGP+xaomVluV+zRAzu8991mqJO3QkXEk8H84uIAxCGqGGiCT KvNKp0Xp5q1m7cTb41BH3oBsz0Z3tt2xk+f6VppX1KUaR3lZiia7e5Rg1H6AHFvcFo 2uGsDlSHAt412fmSDujCjBuuTNM/tTYZkyicJwIU3Ud/dlyuWPKWDVy9mbqrUofeQ1 JQmykB4YuJKdw== From: Mat Martineau Subject: [PATCH net-next v2 0/7] mptcp: convert Netlink code to use YAML spec Date: Mon, 23 Oct 2023 11:17:04 -0700 Message-Id: <20231023-send-net-next-20231023-1-v2-0-16b1f701f900@kernel.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAKC4NmUC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyjHQUlJIzE vPSU3UzU4B8JSMDI2NDINYtTs1L0c1LLQHiihJduLChbqKRcZKZkYWFpallshJQe0FRalpmBdj oaCWYBqXY2loAwY9IGnQAAAA= To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthieu Baerts Cc: netdev@vger.kernel.org, mptcp@lists.linux.dev, Simon Horman , Mat Martineau , Davide Caratti X-Mailer: b4 0.12.4 X-Patchwork-Delegate: kuba@kernel.org This series from Davide converts most of the MPTCP Netlink interface (plus uAPI bits) to use sources generated by YNL using a YAML spec file. This new YAML file is useful to validate the API and to generate a good documentation page. Patch 1 modifies YNL spec to support "uns-admin-perm" for genetlink legacy. Patch 2 adds support for validating exact length of netlink attrs. Patch 3 converts Netlink structures from small_ops to ops to prepare the switch to YAML. Patch 4 adds the Netlink YAML spec for MPTCP. Patch 5 adds and uses a new header file generated from the new YAML spec. Patch 6 renames some handlers to match the ones generated from the YAML spec. Patch 7 adds and uses Netlink policies automatically generated from the YAML spec. v2 changes: - de-uglify YAML spec file, replacing '_' with '-' and avoiding unnecessary assignments in enums (Jakub Kicinski) - keep validating addr6 with NLA_POLICY_EXACT_LEN() (Jakub Kicinski) - Don't leave MPTCP_EVENT_UNSPEC undocumented (Simon Horman) Signed-off-by: Mat Martineau --- Davide Caratti (7): tools: ynl: add uns-admin-perm to genetlink legacy tools: ynl-gen: add support for exact-len validation net: mptcp: convert netlink from small_ops to ops Documentation: netlink: add a YAML spec for mptcp uapi: mptcp: use header file generated from YAML spec net: mptcp: rename netlink handlers to mptcp_pm_nl__{doit,dumpit} net: mptcp: use policy generated by YAML spec Documentation/netlink/genetlink-c.yaml | 3 + Documentation/netlink/genetlink-legacy.yaml | 5 +- Documentation/netlink/genetlink.yaml | 3 + Documentation/netlink/netlink-raw.yaml | 3 + Documentation/netlink/specs/mptcp.yaml | 391 ++++++++++++++++++++++++++++ MAINTAINERS | 3 +- include/uapi/linux/mptcp.h | 174 +------------ include/uapi/linux/mptcp_pm.h | 150 +++++++++++ net/mptcp/Makefile | 3 +- net/mptcp/mptcp_pm_gen.c | 179 +++++++++++++ net/mptcp/mptcp_pm_gen.h | 58 +++++ net/mptcp/pm_netlink.c | 114 ++------ net/mptcp/pm_userspace.c | 8 +- net/mptcp/protocol.h | 6 +- tools/net/ynl/ynl-gen-c.py | 28 +- 15 files changed, 843 insertions(+), 285 deletions(-) --- base-commit: 6e7ce2d71bb99096d811918341fde61e66bfff2c change-id: 20231023-send-net-next-20231023-1-a23b6288959c Best regards,