From patchwork Fri Jul 21 09:53:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Davide Caratti X-Patchwork-Id: 13321789 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 607BB199E8 for ; Fri, 21 Jul 2023 09:54:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689933241; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6zOYbXJPdRn2RfrjvgfiU75Z0UYoLyVB7bfsAQ0jvfU=; b=HbgxPpd7+kN1BbnnkDh1qh/+XgRn9i7DBYx8gxtR2tZKSQ/zDGtzWCZKKmLiWSeKRxcQBP mbP1DVZ8/o48LYHUsvR/gUDYA58mNXemVhDG24Qv4thAGh9DQLbvhjkZrebREN0zpFtpEa yPetsfh/NUuUGI9lL39IuY3X4sw4QeU= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-544-BpAy7-noNa-4v6FXl_FEuQ-1; Fri, 21 Jul 2023 05:53:59 -0400 X-MC-Unique: BpAy7-noNa-4v6FXl_FEuQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 404EF936D20; Fri, 21 Jul 2023 09:53:59 +0000 (UTC) Received: from dcaratti.users.ipa.redhat.com (unknown [10.45.225.220]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8FD5B1121314; Fri, 21 Jul 2023 09:53:58 +0000 (UTC) From: Davide Caratti To: Matthieu Baerts , pabeni@redhat.com Cc: mptcp@lists.linux.dev Subject: [PATCH mptcp-next 0/5] convert MPTCP to use YAML spec Date: Fri, 21 Jul 2023 11:53:31 +0200 Message-Id: Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com this series converts most of the MPTCP netlink interface (plus uAPI bits) to use sources generated by a YAML spec file. Patch 2/5 and 5/5 have been individually verified with kselftests. POC: $ sudo ./tools/net/ynl/cli.py --spec \ > Documentation/netlink/specs/mptcp.yaml --do add_addr \ > --json '{"addr": {"addr4": 16909061, "family": 2, "flags": 4, "id": 10, "port": 0}}' $ ip -j mptcp endpoint show id 10 [{"address":"1.2.3.5","id":10,"backup":true}] Davide Caratti (5): tools: ynl: add uns-admin-perm to genetlink legacy mptcp: convert netlink from small_ops to ops Documentation: netlink: add a YAML spec for mptcp mptcp: uapi: use header file generated from YAML spec net: mptcp: use policy generated by YAML spec Documentation/netlink/genetlink-legacy.yaml | 2 +- Documentation/netlink/specs/mptcp.yaml | 397 ++++++++++++++++++++ include/uapi/linux/mptcp.h | 174 +-------- include/uapi/linux/mptcp_pm.h | 149 ++++++++ net/mptcp/Makefile | 3 +- net/mptcp/mptcp_pm_gen.c | 179 +++++++++ net/mptcp/mptcp_pm_gen.h | 58 +++ net/mptcp/pm_netlink.c | 134 ++----- net/mptcp/pm_userspace.c | 13 +- net/mptcp/protocol.h | 4 +- 10 files changed, 836 insertions(+), 277 deletions(-) create mode 100644 Documentation/netlink/specs/mptcp.yaml create mode 100644 include/uapi/linux/mptcp_pm.h create mode 100644 net/mptcp/mptcp_pm_gen.c create mode 100644 net/mptcp/mptcp_pm_gen.h