From patchwork Mon Mar 27 10:22:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 7244 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1416161vqo; Mon, 27 Mar 2023 03:58:01 -0700 (PDT) X-Google-Smtp-Source: AKy350aEf+WKmpzvoxNIG2FFCLO4vDAwdetoN1Fiwvm0MmLRweJXzcBLTGluqfnlZigpRzPX+IOR X-Received: by 2002:a05:6402:48e:b0:4ff:844a:ed4c with SMTP id k14-20020a056402048e00b004ff844aed4cmr11863810edv.0.1679914680949; Mon, 27 Mar 2023 03:58:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679914680; cv=none; d=google.com; s=arc-20160816; b=PxNeBKYUUVGP4N0nbmuqyYkHVNpBUz9accX8q+lt0hZNJjIGeK0famqrPEpQ1ldQjh hfuSNEwByDFrrChgSW1eihJUX4yp+qZ8n5N4+zRDm/iVPVZBQm91efukK9hyHWFiwYaV XCMqNQAeM6fIM4tgfUiS/4HOA4CwKmKhWcCDSBaFf57B/ZEGr3/cs/59+qit38jhup/y T3T+Nhjo9vtXXFCr/Qy/j66OktEFGFe2hmqF5W1P5vOgkiPkdqsgIJ73+A6si3BrwF9t h+BVq5izUTz1Cw1SaiKal2MEBk1D/RA1BGGNn7Mztl9ONRVn8Po1GxX45smSRmPu+frR HeSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:from:dkim-signature; bh=nwOigjhn0/nfkRIj9IqWCI0UBahJ590Lb8WM7IjXdAg=; b=BKRD5lKU65caT+4t7D9FW1CV/ooik/TnWMq9orqlJRXVGWJUQFHZhpjtvOeEAIyzba bClE+myHf29aDNQqTwmlyAqGeqI9rJVtHLX7NwAsec0UinkbKZIn7yovdEY9YCFY3gYs LfcKxxeux4CSW51KKygzKVdGvB1q3zrigmG8ngRt0k0XLj+Tucd28to8UFaDnrBTYMS0 vrSbyLUXvEGuWE7EiCi8I+ZMQcsGOG06/AS5+SOunK8PK8yaUZmUBsb7Vwxd06ZLDfC1 Y9LrATCSQlZGRVOEyCZ3VVEY5mb+U3aHEuYn+8czZHuYONSv/fZwr60noDJ3I6hIok1A Usfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tessares.net header.s=google header.b="Xc+/9HD7"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=tessares.net Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ba26-20020a0564021ada00b004ab16936ef6si7464915edb.455.2023.03.27.03.57.37; Mon, 27 Mar 2023 03:58:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@tessares.net header.s=google header.b="Xc+/9HD7"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=tessares.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233632AbjC0KY2 (ORCPT + 99 others); Mon, 27 Mar 2023 06:24:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233584AbjC0KYV (ORCPT ); Mon, 27 Mar 2023 06:24:21 -0400 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C10D755BF for ; Mon, 27 Mar 2023 03:24:15 -0700 (PDT) Received: by mail-wm1-x336.google.com with SMTP id bg16-20020a05600c3c9000b003eb34e21bdfso7018038wmb.0 for ; Mon, 27 Mar 2023 03:24:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares.net; s=google; t=1679912654; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=nwOigjhn0/nfkRIj9IqWCI0UBahJ590Lb8WM7IjXdAg=; b=Xc+/9HD7Op2pUmUWyNmJKebsfr0V6V4TKAwRPQHLAeRro7SpW5jx05OjR5FdG8kRjw iIveblhWJ+itaepVyxm8MgQ7RopOA2sUUSFfKYzcyOvb3QMC3xnmmrnYSAguvlREtM/Y KPFRZFYN+stCmAKR4PV4gymb8CWHzwZkoIcWupam/J8tdmxPnJz9S9OquBMELkSutwDd JbI1/E08wCj4FSBDa/9S3a+3dM6ZsJ6DFQCOj3Jl7Wl1aPEUNjLK9FORGkt5+qD4h04N v3GAYm+l8/Y+ELBMKNaaFSwPCG+soviFpRQyrNiMqRlhisJo+H8KxPp/jsatG9kSHw7R zkiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679912654; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=nwOigjhn0/nfkRIj9IqWCI0UBahJ590Lb8WM7IjXdAg=; b=CfD0fXWf2OGgDwD4VH2t6gbTwzJw1uj59xbz9e0bm/cxXqyKljgSNWb8eB7+ld9YkU YTYYobyukhvEGUiewe6eJbPEwmi53RqRTilj1Up+ZdimXxohWjUrPKubj8uTzW/EtZKq R4aOFLygxp/N5AlEXVQ6gFyxV8M8NRjFZAw7adhXN2CmUECffKJ+Xa7YIQC1XXoNtvgc VVDgEtzOcL+X6lHLfSbw2O90DVqikzlprSouzC+5IV6fq4xcpKC3s4RbJHabPWJtZvlj x5PeEz9n06kLBzaH8P+tG4lOYLD9zAd+XvSNL7Qc73ydqMHNEQM3fbh9U01F1NDvPTuV NkpQ== X-Gm-Message-State: AO0yUKXlJIRx10xl+JIbRZ6mwJndtmZnIX7EB9eWlK6B7DpGPJriunHw gKkX7qK0+avvBl+v8feB7A4VTQ== X-Received: by 2002:a7b:c39a:0:b0:3ed:9ce3:4a39 with SMTP id s26-20020a7bc39a000000b003ed9ce34a39mr9370389wmj.26.1679912654170; Mon, 27 Mar 2023 03:24:14 -0700 (PDT) Received: from vdi08.nix.tessares.net (static.219.156.76.144.clients.your-server.de. [144.76.156.219]) by smtp.gmail.com with ESMTPSA id p5-20020a05600c358500b003ef6f87118dsm2220615wmq.42.2023.03.27.03.24.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Mar 2023 03:24:13 -0700 (PDT) From: Matthieu Baerts Subject: [PATCH net-next v2 0/4] mptcp: a couple of cleanups and improvements Date: Mon, 27 Mar 2023 12:22:20 +0200 Message-Id: <20230324-upstream-net-next-20230324-misc-features-v2-0-fca1471efbaa@tessares.net> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAFxuIWQC/5WOMQ6DMAxFr4I81xUJoYVOvUfFkIApGQgoDogKc fcGBpZOHTx8ve+nvwKTt8TwSFbwNFu2g4tBXhKoO+3ehLaJGWQqszSTCqeRgyfdo6MQbwl4ot5 yjS3pMHliFPfCSHMThRIKos5oJjReu7rbhT+evTN6au1yzHnBCapIOsth8J9j5ywO/v+kWWCKu ZalyFVeStM8AzHriK7xFapt277421BPEQEAAA== To: mptcp@lists.linux.dev, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Matthieu Baerts , Geliang Tang X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1529; i=matthieu.baerts@tessares.net; h=from:subject:message-id; bh=YZ7HyQPpwwhOjk8ddV6pgNaqf8NyURsDaIfJoPwcGfY=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBkIW7NnZNWfPoVEFzjURT49Y1TSl9DYozAFxYOd vZ+XAOPUeWJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZCFuzQAKCRD2t4JPQmmg c1kxD/4rQHDzB1swzhIlOTM2X1tysCsa0SaRMfBsABnVupqCeRq0kCcPvKrvxHGRCZDOj21yncl RX+x906PnQHRKpbUxhB2oB+5AQyYil+4sODn9F3ZxGEY85QpxSvRiSiK2MgH9itn+y865r7oKio vg/1sC00WnWFXzUkHwe8sQzFUxComYs5B7HHfg9hQmMC23c3Ec4fxjTkNRH1xWE6AXk0ckJ+4Sn te3cm9VddP527c1BAJsrZnT0b21NAGh+4DadZ2T6JVQKO2OLJm7wcH6OJmD2HFphBhbC5HLnih+ ygpIun9Y4ZQIqI7A/avvLrUWfXMjskQT83UHqBn9kleJUwqvf0tJqE3fOCTLZY+0GPmoHzrm/tt nEVwUu7zkn+lzBzkEqf0Q9DKcB+oFUT+f8G3ylQIyNG0WXcNp9zA/zWNeaA8hk7HUyV4cvGbL0E Ajiic7nZv6rZ64B7VUz6619B3Emsp5S8bm69NRhMpAuvAyQARKTniyYcdGdvslhnMYiXyV3CCvm /x7QF5dPe5TxNgoDhLxgRupyndmZdzXT4bArLI6HgOHs7eE5ZbCMiZKLtmeaiHrn96zJAfvYVhK tTKiUHrfnLAyAYB7OoVQz6kIye7u6KRff3/REhJBf0za/vkvEp0yZWRWvc4zq2zR6CZ0ieVAJ9i rQuRyn2ccC0nf3Q== X-Developer-Key: i=matthieu.baerts@tessares.net; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761518216720905005?= X-GMAIL-MSGID: =?utf-8?q?1761518216720905005?= Patch 1 removes an unneeded address copy in subflow_syn_recv_sock(). Patch 2 simplifies subflow_syn_recv_sock() to postpone some actions and to avoid a bunch of conditionals. Patch 3 stops reporting limits that are not taken into account when the userspace PM is used. Patch 4 adds a new test to validate that the 'subflows' field reported by the kernel is correct. Such info can be retrieved via Netlink (e.g. with ss) or getsockopt(SOL_MPTCP, MPTCP_INFO). Signed-off-by: Matthieu Baerts --- Changes in v2: - Patch 3/4's commit message has been updated to use the correct SHA - Rebased on latest net-next - Link to v1: https://lore.kernel.org/r/20230324-upstream-net-next-20230324-misc-features-v1-0-5a29154592bd@tessares.net --- Geliang Tang (1): selftests: mptcp: add mptcp_info tests Matthieu Baerts (1): mptcp: do not fill info not used by the PM in used Paolo Abeni (2): mptcp: avoid unneeded address copy mptcp: simplify subflow_syn_recv_sock() net/mptcp/sockopt.c | 20 +++++++---- net/mptcp/subflow.c | 43 +++++++--------------- tools/testing/selftests/net/mptcp/mptcp_join.sh | 47 ++++++++++++++++++++++++- 3 files changed, 72 insertions(+), 38 deletions(-) --- base-commit: e5b42483ccce50d5b957f474fd332afd4ef0c27b change-id: 20230324-upstream-net-next-20230324-misc-features-178b2b618414 Best regards,