From patchwork Fri Mar 24 17:11:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 7164 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp785554vqo; Fri, 24 Mar 2023 10:15:06 -0700 (PDT) X-Google-Smtp-Source: AKy350b6Pjuz1TWalVfG9TX6MzkSkSmpG7zweCstsYqq8WE6q0BvSCfIm3YYOaV01Xj3x7yzp53y X-Received: by 2002:a62:3046:0:b0:625:4f81:bb30 with SMTP id w67-20020a623046000000b006254f81bb30mr3690946pfw.21.1679678106457; Fri, 24 Mar 2023 10:15:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679678106; cv=none; d=google.com; s=arc-20160816; b=rwy+m7M8bLFoI5YkYkZrjqaksKG73F6/nVpc6XOXKLShl9AUwD5/r+2xRE6WzmJzl4 kzAcwglVq7I7Praci/FvnNt5BqbqOJmk+E1CW7roiFpdhButgpu0CJy3CZkOAV6jSnZt W7J5hA0pE9FLr0wvczxDdiqAtvnS6VlttQ/3j3kB6mHo40x/PHRk8D7ruiHgH+ENlb+t PWLRYF0PF/5D+5xB3ZDrQ+Xtosq3TBoiqsA/R8O5PKBoHK4qRoVLgt4a6gd1rcD/7xnv 7y2+H5Xn6CJpBzRlnEFo+s6I4OJVyMclURWiKaD1NbcMEPRgPRYKV2DcA09lQdWxmp0o zHRA== 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=Rp4jzDgiOrieNODoUE7feSGHVsgmzzTUUSpbLxz1Poo=; b=obzOmCkSyY566hixWUb8+dhBgQPy2NFVt88KuOCmATFiZezglmcgGWQz+O+S7xrgzk H3SENQTWsnGXxziowNhAu2/VCg/CPdze4uQB+xU2eCPyswMRwCGGq3/GTl9tpqnBvXMP dFu7Iw/0CxSXMGMsvAhZrJQm4N/77oB4GpKn0Ca0/dPuRzXKIL4JXc1a6p73/c+YiZvv eNQ0ifTgo4rjEJ2LSxCAVCo7MY0BtmugzG22kZ6BDRLBeR9l3lfoxNKR/GUm1L5KAtgn rV/aw2FSK4hoBt3IFor9gwu2JaJAy91/Yj/gf5nm44dz2N9RKYgykwrtxXl7Zpo6YQbh zCEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tessares.net header.s=google header.b="eg3VX4b/"; 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 h124-20020a636c82000000b004fb647a766dsi22374058pgc.7.2023.03.24.10.14.53; Fri, 24 Mar 2023 10:15:06 -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="eg3VX4b/"; 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 S232056AbjCXRMI (ORCPT + 99 others); Fri, 24 Mar 2023 13:12:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231656AbjCXRMG (ORCPT ); Fri, 24 Mar 2023 13:12:06 -0400 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6D702194D for ; Fri, 24 Mar 2023 10:12:03 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id p34so1556433wms.3 for ; Fri, 24 Mar 2023 10:12:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares.net; s=google; t=1679677922; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=Rp4jzDgiOrieNODoUE7feSGHVsgmzzTUUSpbLxz1Poo=; b=eg3VX4b/9QMY/w9Um0SvW5sAhGNaAzNudm8etC/W+KkwNirZkXfFHTdJwh7LVrxs5q hlGkFrEi2Xc9WO+9EzypwG/LU2m/hQAJfEEDtD5yUU4yypvBPIEnJY8HMIqURrMFoMMS RiY66SctKO9N43N9v0rKlrwCyTMLjBlz6Hn0UqtN/W9yVAAq64Ols6iglhKHGYhOP92y 1Q2TU3RWuE5P5AeJrVbYGkZzbR1hkmyvoBNIqEKG1qKnWjfBjH/cB9N6vb4vkBWYLaKh PLG+vfdRo8jCnRCM5wkYp6SlthkW+wOoYNIz62a5yPIMo3UP+EUnWQzYxvOZwWYdFoma 6bjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679677922; 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=Rp4jzDgiOrieNODoUE7feSGHVsgmzzTUUSpbLxz1Poo=; b=4YLiJQBZyiKvpkGjtlQu/jF4pZlZaWLd1LbwPItmw+OJ3fUtV8QmT06cvU+UBBO7TE GthQL2A5/t6iyq1IzMrX8G6u5s796gGbiM2Tiv83/AbFYwaM4ho+U3iCjq5LUrLU9z1l 2CID1R92aClxn3FK0kuTub9cPhmNeFQQkloBLLZuc2d5GrHMgK1Vuo1s9JfBKEyQ7yQY CZQWq+RPEvMokGFDwuCyfu4azHhKFw40Zmv/UHkQlKEVcC7lWBR6Xu5CIcCCwSezArlb J35hGvpKJdSE9ePWlbz7kQzyfjFDYIpNWHVUvVbxkGD9+HxEiWPOJ2+kGcdCXWmR8FR/ octQ== X-Gm-Message-State: AO0yUKXz3ky2hxKPy3IevkUPkd+PLsoSksewwO4EH4YuQShWLq5qIlGu kedX/eSDGSOE91Bp0jCgksKY8w== X-Received: by 2002:a05:600c:2909:b0:3eb:383c:1870 with SMTP id i9-20020a05600c290900b003eb383c1870mr3013607wmd.11.1679677922317; Fri, 24 Mar 2023 10:12:02 -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 n17-20020a1c7211000000b003edf2dc7ca3sm5336285wmc.34.2023.03.24.10.12.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Mar 2023 10:12:02 -0700 (PDT) From: Matthieu Baerts Subject: [PATCH net-next 0/4] mptcp: a couple of cleanups and improvements Date: Fri, 24 Mar 2023 18:11:29 +0100 Message-Id: <20230324-upstream-net-next-20230324-misc-features-v1-0-5a29154592bd@tessares.net> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAMLZHWQC/2WOwQqDMBBEf0X23AUTQ5X+SukhSde6B6PsRhHEf 2/swUsPc3jM8JgdlIRJ4VHtILSy8pQKmFsFcfDpQ8jvwmBr29SNdbjMmoX8iIlyyZbxqkbWiD3 5vAgpmrYLNtxN54yDogteCYP4FIdT+Oc5N7NQz9vvzhOu4nUcXzu7zDeoAAAA 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=1284; i=matthieu.baerts@tessares.net; h=from:subject:message-id; bh=BbPKd6tExiRa5BLYOz2a++7Meq/Ul3smPHqa4Li5/A4=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBkHdnh686gD+l9bRK9koOr/oHp/1mkc2lAmaFLW gnkYJucdF2JAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZB3Z4QAKCRD2t4JPQmmg c7wsD/47ZlVEZNdxxFu1HQrRrIwW0tYnosH/p9bpE62YreDa2HQTI60M7x+gOPOtF6uBLXwox/C lCJFcIsLbzpzUo/VIkd6SKEdDdjU0KqLB6270YQ74MZKwwbS6BzMKNZe9BH1yhcUAZGettPA901 wSX3HF7XOMmWvGHz8bkVeMCGOLJ3V608TfPATeEWvseKst85lwtZuaXngAfLtjBwKJiwRljym/6 oEwIhnbHsAL/JtiLRODn87sAtq602MVus+ajJQA3O+7G8mz+t1Ur5mKIAgAPuqTwG90UMk3QWIJ 7dXaZLkwVCNJdVzDBvpfmjWmH3vpapJCv4Y/Yjm+j3QDCe1pS5ECx+EUStMyBo/n1dXa8y//Oij +m6CT+v1tWHPzoHHD8xOcx9GtlYd2LzFfP4wmzBkfPnVeQpSu5JbxMgsmFssZLzadu3BRgZRnoU iW5uz3nGTNLivAcxh6EJUMioICRVKhXZgbbLJmvN9HKXVe7FUzW4ZGwxNMI7mpQn32rBl0I9H7k fZUVzy2JbDMxPrAgbR/WqWQdPlE80bdt0boBQtz7+eB2zBzs2YQk9ez7cqGgogD9+dzKwS/DSLJ VeFqoRmRnLXY576j18qc4FvMoZnJhlgGsaauZt2WBFCYX4rT1Rq0kdH0yLrt3TgQ7HZvMnU+mGk GKgfavySdvrbo9w== 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?1761270150261201183?= X-GMAIL-MSGID: =?utf-8?q?1761270150261201183?= 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 --- 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: 323fe43cf9aef79159ba8937218a3f076bf505af change-id: 20230324-upstream-net-next-20230324-misc-features-178b2b618414 Best regards,