From patchwork Fri Mar 1 18:18:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matthieu Baerts (NGI0)" X-Patchwork-Id: 21231 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:fa17:b0:10a:f01:a869 with SMTP id ju23csp63484dyc; Fri, 1 Mar 2024 10:19:20 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXCkAMNnQenKIS4EWM3LUVLhLz7IITo1rWabVm2gGym2nXc4sY50Dhh5Yo0jPXxSy9Ks4HxgzZ+SjebgPlnrY6T9d6X2w== X-Google-Smtp-Source: AGHT+IFGAdwOigMHaOFXQBgXxeZm/nhFzUiEa51hBX5HJF1an8q4diNgrFQAFMFppojO0MxhoMDz X-Received: by 2002:a05:6512:1599:b0:513:17a4:c8c1 with SMTP id bp25-20020a056512159900b0051317a4c8c1mr2490419lfb.49.1709317159862; Fri, 01 Mar 2024 10:19:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709317159; cv=pass; d=google.com; s=arc-20160816; b=fkWBiI5kH7S/isM9qVl/V0psYAs6fzQyuOsRSbg29VJVjA2or2k22DuuxXyI9odGXo AFvZAWUda4qt90dywcF5b7eGraMWvDq+PTiKSA1KvAvUtR5Lh9YGd+wgcMxhdtJvMgZy IVQxdcuxymVHEiV7M8Pm1i/2XrtdVkUsb/+w1yD9shk2YRh2rXZf4NK748iJ+K2y6JLP urbJ5jY89Q+fdzrS/C6yi/Jyelr+7UBv+8BAIwq0QWm9+4IiZHyc1Eci/Dz4EozE5pB3 mXoywejafiOJnWiTA2gJGmyLwzKjoVqRilpd4CFDD493T3njODuwWpMdzvpXoTDK9n3S xBEw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:from :dkim-signature; bh=U2o55hFlooJMgdlr5wGbiON9dL3A19vow1ecRyLfVsU=; fh=i1fHfqb3ms9PQICjX9LbYyHHX00fft5d6t57sCy1Fok=; b=pzG+Aour866A5wQ0gYOpHbzn4+ZKF7HFBPZZc+RhGktR7XtpdhXJfRm0Ix0piVK3nz kYdiLSyjH36C8dr8vNhR+uvJOidLf0ZFfuh/Y6DkhlO06KReHLf1AKXhNskuXCGjlrG9 1Epwkn3XO0iGr1LqeAO2V/ShE//XjLAUUKqT+6hoJ4i6rNVyM/yW5rFxAtaqUM6VIfDc GjogvXri5YT88nyEauoRlppIqoM9XynP+EeD3VW5xEtLNJwerY+cE563m2QOmA1drjkI N6ivLRF5Kve3pk1W5855PGjB4jFTNn+LSm7ZP9w0svuqrFJ+GTmUa5ThATqqP2Cccv+p Ef5A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=raarnnWk; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-88897-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88897-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id f22-20020a50a6d6000000b005641711f02bsi1645220edc.344.2024.03.01.10.19.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 10:19:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88897-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=raarnnWk; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-88897-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88897-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 7794D1F23A40 for ; Fri, 1 Mar 2024 18:19:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 58C8438DE0; Fri, 1 Mar 2024 18:18:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="raarnnWk" 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 95B564C9C; Fri, 1 Mar 2024 18:18:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709317112; cv=none; b=F3dfajLJ8eZqhv3G+yXzkilFtmR1lzML6X+nSl/kcHFKw0JBdg5F2Je20c+szij1sqHeh6aAaRWijO9dZtbPFmMR+itR4zlWsMmaoMKF1mHUtgXwuXJk1tflIeb9XJiCZAe4ZJcGVzYOgDEu7Aij8YpStPPFzUXWfP1VmxL0P6M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709317112; c=relaxed/simple; bh=hii28PLD1bwknV2BFNP4Zmy1bCwPNwEFF1J44mOUCqM=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=fAAQHsvNmi/MJKpkPr5JAMcqS4/W4+BSSQraInh7LV8zWbawQMXEkwp6tUdwnHudXF5asFuB6U+vKtTq3DPl6/0UnAvWIB398/MT8dj8Bf3j5aRTVNMZYiWjOY/nrnBFP3CcFCnvEGljB1YJALeLJ9v34KKTPIADpYDNBm0G2PY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=raarnnWk; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 89C6FC433C7; Fri, 1 Mar 2024 18:18:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709317112; bh=hii28PLD1bwknV2BFNP4Zmy1bCwPNwEFF1J44mOUCqM=; h=From:Subject:Date:To:Cc:From; b=raarnnWklT9jpRcOoBZFl6h1NxKkJpYlXgbYel+W3ftrVXkxsgJ41ddborR4psNS/ /MDZNSu+wlwC2NFSXLOqBD2hlhkZ94eaeXX2gMD1rxaVkn7HHkRvGXoq+F6lJZp3A6 et+266Fou+pSOdUneDi4vvFEj1W9914Lw4qzLgXenStwpXJdIg/IzoXWJKqlTYeKFD Ry04fFSSXYY+9T3m5M2ijYORSQOBOl/XkaitrLUsqp5wdYZxLP7aOSnhTUEnEXdqw2 pKIDkrBQpbBnOAQjMV8fT73OTfbFktSL9L1b8SzQVexMSdndAQl6WVJ0UcQPQee5HM bt4q2bmQbV+pA== From: "Matthieu Baerts (NGI0)" Subject: [PATCH net-next 00/15] mptcp: userspace pm: 'dump addrs' and 'get addr' Date: Fri, 01 Mar 2024 19:18:24 +0100 Message-Id: <20240301-upstream-net-next-20240301-mptcp-userspace-pm-dump-addr-v1-0-dc30a420b3a0@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAPAb4mUC/z2NQQrDIBBFrxJm3QHHSqG9SulCdNK60A6OlkDI3 SOFZPEXjw/vraBcEys8phUq/5KmbxlAlwnCx5c3Y4qDwRrrzNUQdtFW2Wcs3MaWhueVpQXBPow qPjBKxtizoI+xorU00+3uAzkHwy6V57T8y084XPDath1BAGB/kwAAAA== To: mptcp@lists.linux.dev, Mat Martineau , Geliang Tang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan Cc: Geliang Tang , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, "Matthieu Baerts (NGI0)" X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2416; i=matttbe@kernel.org; h=from:subject:message-id; bh=hii28PLD1bwknV2BFNP4Zmy1bCwPNwEFF1J44mOUCqM=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBl4hv0qXXi2pXUkV7y7yjrHS7HwrwOPZ/1EYZbH itzYafUsJyJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZeIb9AAKCRD2t4JPQmmg c+GMD/42HpNBuHgUvTTb/42tKofmvayz9EPKKd0qpvDdJqh+iPHGbR5uxJJoDL6bLrQIuP7ysTi ZMO3aPj/BmxsDOP5eaUyv81tj7oUkiY58IVrd5W5PJ0876I6gGO3KKjRo+4QEPu6fsQGAWeFPAv bqQx7GCjMBJiGMmHtAeCJbN6YGMaoEmUW4qqHek1itUerzHptVwSt+b8mk8SnxB+5TCEsW7lcBT UW7nRzwsz12OApqRSUK1tj+Es+3tPz33t/6GAqIOel7to/TUMck98DgEz2EHj+ur3A3dg7J6+xU Qg5unRI/ZjsuGDB2e1s3SrEnpeE0Rq7Lmw5KhsoHVsR7MwNSn1hu2Z17fzALEZ1MJasbZZo1yPO qkx/XH+gzZTW1MzDicaWJGSyELucPDSQ3wT5lmWPIBEGiOPbUj5abJAS8Ctu0jAhRcfbphz44Nl KOqSYIWcU6nPBXS7qSolqxAv50q9m8002Y+qyo83ifIrwL9RcYWOUesAG/t48OfTgmXud4IPE4k ANlzyY4w96krs7403U1U1NVZmP0vW4XYw/i8h6UfgeH+NyyK3oRTUpLNg9RSeGYme/JnRktKd1E su2ggXsccf6u5a1zsBQtAVPX+DF/4FVLcPLYgM3MQNXDOqfHhe2w3bgZAnecX1KRs8CNIjjFWNn cQcppVyZcyK6Djw== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792348950225883167 X-GMAIL-MSGID: 1792348950225883167 This series from Geliang adds two new Netlink commands to the userspace PM: - one to dump all addresses of a specific MPTCP connection: - feature added in patches 3 to 5 - test added in patches 7, 8 and 10 - and one to get a specific address for an MPTCP connection: - feature added in patches 11 to 13 - test added in patches 14 and 15 These new Netlink commands can be useful if an MPTCP daemon lost track of the different connections, e.g. after having been restarted. The other patches are some clean-ups and small improvements added while working on the new features. Signed-off-by: Matthieu Baerts (NGI0) --- Geliang Tang (15): mptcp: make pm_remove_addrs_and_subflows static mptcp: export mptcp_genl_family & mptcp_nl_fill_addr mptcp: implement mptcp_userspace_pm_dump_addr mptcp: add token for get-addr in yaml mptcp: dump addrs in userspace pm list mptcp: check userspace pm flags selftests: mptcp: add userspace pm subflow flag selftests: mptcp: add token for dump_addr selftests: mptcp: add mptcp_lib_check_output helper selftests: mptcp: dump userspace addrs list mptcp: add userspace_pm_lookup_addr_by_id helper mptcp: implement mptcp_userspace_pm_get_addr mptcp: get addr in userspace pm list selftests: mptcp: add token for get_addr selftests: mptcp: userspace pm get addr tests Documentation/netlink/specs/mptcp_pm.yaml | 3 +- net/mptcp/mptcp_pm_gen.c | 7 +- net/mptcp/mptcp_pm_gen.h | 2 +- net/mptcp/pm.c | 16 +++ net/mptcp/pm_netlink.c | 30 ++-- net/mptcp/pm_userspace.c | 180 +++++++++++++++++++++--- net/mptcp/protocol.h | 15 +- tools/testing/selftests/net/mptcp/mptcp_join.sh | 91 ++++++++++++ tools/testing/selftests/net/mptcp/mptcp_lib.sh | 23 +++ tools/testing/selftests/net/mptcp/pm_netlink.sh | 18 +-- tools/testing/selftests/net/mptcp/pm_nl_ctl.c | 39 ++++- 11 files changed, 374 insertions(+), 50 deletions(-) --- base-commit: e960825709330cb199d209740326cec37e8c419d change-id: 20240301-upstream-net-next-20240301-mptcp-userspace-pm-dump-addr-221f169ac144 Best regards,