From patchwork Fri Apr 14 15:47:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 13211732 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28ECFC77B6E for ; Fri, 14 Apr 2023 15:47:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230242AbjDNPr0 (ORCPT ); Fri, 14 Apr 2023 11:47:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230179AbjDNPrZ (ORCPT ); Fri, 14 Apr 2023 11:47:25 -0400 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 776C593CE for ; Fri, 14 Apr 2023 08:47:22 -0700 (PDT) Received: by mail-wm1-x329.google.com with SMTP id d8-20020a05600c3ac800b003ee6e324b19so10026602wms.1 for ; Fri, 14 Apr 2023 08:47:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares.net; s=google; t=1681487241; x=1684079241; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=O+DYIjU6I16ahs9ojO7PJA1gBnyWy1b9YKTrLd6I+3A=; b=4ID7M5d63Lb3U7c35N+eucaFO8dTtTHS8lYWblB4FRza6pUJTGJmd3nzaec0gS8Q+B TLzhYkH9y1XqUMh/KWndBHFwTnTNYY0kHrTkLjISs1JYMDZusFgKYwryZWS3U/2wolr2 B8g0Q/AYAiXuJ2IzbE5B6VfGxs7JPEbatfHjsOhRC7GmFhmCeED6xiZqZWGkuOhHTW1o WOaGTOfDfVCIli+JSAwKVCyrQFOTl4LJ9Sy5MmBygDk9p9gBXeeMPAFUk8JAeHap0i4y pO2HkCwMWi90oaOEMt/R5NXWK+aJsBYB6bNhLpHszpX8yAm9jqYuUrEMuVDFqPvAQu+o OuyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681487241; x=1684079241; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=O+DYIjU6I16ahs9ojO7PJA1gBnyWy1b9YKTrLd6I+3A=; b=jx/ea+pUcM65YskvS4xuzDTyOIPy3JGcYaKAwLpuU6osdYFlsTNMVOm7omk+74bGom svJJ3veP/Y5fQSq2NxqP94DiOgmQSNrc5cIoKMBInE0TFqfe1I8K9nIYGOYz2VDAtttg Z3OyM+HG4np9wTRyu2niTDWPzTFhk7pby5iNbXxS/mJFhIAMH7XfeOBpBpSUwmopqPNy FAcZ3iMAJV+uCI199R0d9sFL4RWcdf5vf2uBAYV5xoRaWu/pbr3l9XWyI+cyW6laY9Jw yVTEIAeQVIBOdFpfipEfamX2hbtrxMJCVIhc6USq/WgnByfY+yHM540bzLpgH+J8juA3 51xQ== X-Gm-Message-State: AAQBX9eGQWsRfCajgjJ43zPReG5U/feokIAVEU/bXmSadfyXlAGQrWGl hDTIy2Y1PasSDdC9wTbHy2mng9XfozGz3AMGcQDBog== X-Google-Smtp-Source: AKy350a2pFZHSYI2Cs61wOr3ZE02/f1Ft7kJ1/y0Uv4GxwlVz3xm14xyBcYCuyI/5r8nMpzingY2tg== X-Received: by 2002:a05:600c:204c:b0:3f0:aeac:2f9c with SMTP id p12-20020a05600c204c00b003f0aeac2f9cmr3054597wmg.7.1681487240924; Fri, 14 Apr 2023 08:47:20 -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 x2-20020a05600c21c200b003f149715cb6sm1034298wmj.10.2023.04.14.08.47.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Apr 2023 08:47:20 -0700 (PDT) From: Matthieu Baerts Date: Fri, 14 Apr 2023 17:47:06 +0200 Subject: [PATCH net-next 1/5] mptcp: make userspace_pm_append_new_local_addr static MIME-Version: 1.0 Message-Id: <20230414-upstream-net-next-20230414-mptcp-small-cleanups-v1-1-5aa4a2e05cf2@tessares.net> References: <20230414-upstream-net-next-20230414-mptcp-small-cleanups-v1-0-5aa4a2e05cf2@tessares.net> In-Reply-To: <20230414-upstream-net-next-20230414-mptcp-small-cleanups-v1-0-5aa4a2e05cf2@tessares.net> 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=1836; i=matthieu.baerts@tessares.net; h=from:subject:message-id; bh=xn6nYYGzn0RBwhlUBtEUuUOZaLPe5YmFSoe6Y1JgLjw=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBkOXWGV0Q+whOEFb9TdMJNNgfTb7WByJGEl3RHb c8yjkzLtw+JAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZDl1hgAKCRD2t4JPQmmg c4uHD/96LwkaJxFO1uZFMjroUmhb7BYvg14lCgz5jkWQLzcMb773Z3WawsSeohAZwLXdV6wEAPf 2iSgOnnzRHYZ1qKWnyfjKDGsuGmBcnJ4AtNhpIabkeivgab65SjSfzKpOpJ9izwn/b9lGbYK/fN Z5a/81WpeBsfhH7ZPdheta7cOdi4OzZeXTanZfnynlSUz6LdW+AGp15Fkctz3m+rmjpvnUYFOAL DoJBkYe8NhAYl2TBZk0EW3LWiYuogrI04ZUe4Q0D/i20uvDWHBfVsHX9Un5JnGYSXviOxyf+pt2 XmZ16tCpecFjRPTS0oAqJ7pAEuzWffB5j/7/zndy/+0A/8nBeGOcVjySoMzMdhNH09ODAXGh/Dv kpMWXrRb7DdeHlzC2sNPSg55L7xpMM8+2xFNfFtJiaptqrg4uOECoLBy1S3X4WClmkPtjeO6Um/ 05psx+HYtz1/9ogjcyBC2bt7Usx8nJiMGFdu3mZ8jyWxBShVA6xA0Je8HQzABwk6r9u/7uIjpMc OPI59cMXC5+gOm1PsnkvFgj1c7OeI8VOToskDTMUogXTiiXMMUOWPd8+MR330bNbNF0E/qh/215 9vEX+k8CJyZqgwF0UlSrBroGnLTQZvduW2kgmogVBrtkWOP4m7ZMRhYAttho+k7EQzz9DkoaQ4M Wccq/XOL6KbbMaw== X-Developer-Key: i=matthieu.baerts@tessares.net; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Geliang Tang mptcp_userspace_pm_append_new_local_addr() has always exclusively been used in pm_userspace.c since its introduction in commit 4638de5aefe5 ("mptcp: handle local addrs announced by userspace PMs"). So make it static. Signed-off-by: Geliang Tang Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts --- net/mptcp/pm_userspace.c | 4 ++-- net/mptcp/protocol.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/net/mptcp/pm_userspace.c b/net/mptcp/pm_userspace.c index a02d3cbf2a1b..27a275805c06 100644 --- a/net/mptcp/pm_userspace.c +++ b/net/mptcp/pm_userspace.c @@ -25,8 +25,8 @@ void mptcp_free_local_addr_list(struct mptcp_sock *msk) } } -int mptcp_userspace_pm_append_new_local_addr(struct mptcp_sock *msk, - struct mptcp_pm_addr_entry *entry) +static int mptcp_userspace_pm_append_new_local_addr(struct mptcp_sock *msk, + struct mptcp_pm_addr_entry *entry) { DECLARE_BITMAP(id_bitmap, MPTCP_PM_MAX_ADDR_ID + 1); struct mptcp_pm_addr_entry *match = NULL; diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h index e1310bc113be..c8dd24feabef 100644 --- a/net/mptcp/protocol.h +++ b/net/mptcp/protocol.h @@ -830,8 +830,6 @@ int mptcp_pm_remove_subflow(struct mptcp_sock *msk, const struct mptcp_rm_list * void mptcp_pm_remove_addrs_and_subflows(struct mptcp_sock *msk, struct list_head *rm_list); -int mptcp_userspace_pm_append_new_local_addr(struct mptcp_sock *msk, - struct mptcp_pm_addr_entry *entry); void mptcp_free_local_addr_list(struct mptcp_sock *msk); int mptcp_nl_cmd_announce(struct sk_buff *skb, struct genl_info *info); int mptcp_nl_cmd_remove(struct sk_buff *skb, struct genl_info *info); From patchwork Fri Apr 14 15:47:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 13211733 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 709CFC77B72 for ; Fri, 14 Apr 2023 15:47:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230288AbjDNPr1 (ORCPT ); Fri, 14 Apr 2023 11:47:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230110AbjDNPrZ (ORCPT ); Fri, 14 Apr 2023 11:47:25 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54F373A9C for ; Fri, 14 Apr 2023 08:47:23 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id n42-20020a05600c3baa00b003f0b12814aaso1297518wms.0 for ; Fri, 14 Apr 2023 08:47:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares.net; s=google; t=1681487242; x=1684079242; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=ROAGH3/MLol0O8DposnZ2qSsZAiwA2IYVTP8Kksz9vY=; b=BcU0vgNmCs3O3nL1BJrMGOUPdysG0O8cCK20bn3jpxWDdSyEI6JuGHa6Y14UD9zkkL ExwC5v63owpHeh8GsdQW50p+FQtXVl8T9Hi140rk+/kth8L1Q7i5YBYERj/v9gFDFOOY /4kCV/MD7eW6DKH/cdxD1+xCM3krUxjztJk/WMaF38d7nuenxhcgRuDiIMCkP1kREvPy kcmREXKGNc5ziHg6gUPokyvTOcnO/L5cq0itR1xFrzh0R+lhtt6bKbQrD0/6+XU2mHk1 idLY7ji05pW+y5rFpohLiYrcAVtR2Ac62kbpXqEHxa9gk/ZslxZfyoj5m1mG7tK354T6 kz6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681487242; x=1684079242; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ROAGH3/MLol0O8DposnZ2qSsZAiwA2IYVTP8Kksz9vY=; b=ltmDGV/1s5+N76RGue3aR8mZ3BvqiP8kBKzpytJfTrxX/tYaFlKZffjeSHINVzy5J1 jtr9dJUBqmubPmdSgMzJR2iqfN/OrQogygNc3mJINc7y4+Dxig7c3+wUmX/RrVqY9b01 hkrDBUWEOn+QLBlt34aMNyyOtKtJ0d11LfFySnwObIxIlbsYMW7r+aoF5nC3UYGq4+Ds uU34xy0zr4OS4upoTsy/8U6hPIrbU18yXNJzb86appVKElwqreCrU3AYmkJ9jnkm9EEM nKCiz8AZpXIdAty5VZWyRMtfF+ZPMt019j4/6N/hCNxZPzkJOJLgdvzjImuKreMc4tXo wYVQ== X-Gm-Message-State: AAQBX9es534a0KqkGT3CFEQ/AAQkCLBsRubOI7qN56Dg89uFneA5k+/M ZyS0BstLUBPNGfsp26iMJfT3DQ== X-Google-Smtp-Source: AKy350Z0mr0LXQVIqANCRWRGdF73h7kiyhCCcRaAzITaYTExNfjW/VmAKoBwmp/TH2DQHkwhPa2sTg== X-Received: by 2002:a1c:7312:0:b0:3f0:9f9b:1665 with SMTP id d18-20020a1c7312000000b003f09f9b1665mr5195510wmb.3.1681487241751; Fri, 14 Apr 2023 08:47:21 -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 x2-20020a05600c21c200b003f149715cb6sm1034298wmj.10.2023.04.14.08.47.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Apr 2023 08:47:21 -0700 (PDT) From: Matthieu Baerts Date: Fri, 14 Apr 2023 17:47:07 +0200 Subject: [PATCH net-next 2/5] MAINTAINERS: add git trees for MPTCP MIME-Version: 1.0 Message-Id: <20230414-upstream-net-next-20230414-mptcp-small-cleanups-v1-2-5aa4a2e05cf2@tessares.net> References: <20230414-upstream-net-next-20230414-mptcp-small-cleanups-v1-0-5aa4a2e05cf2@tessares.net> In-Reply-To: <20230414-upstream-net-next-20230414-mptcp-small-cleanups-v1-0-5aa4a2e05cf2@tessares.net> 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 X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=830; i=matthieu.baerts@tessares.net; h=from:subject:message-id; bh=vS/IFlxUvtKD47GgBJOfT3kDGNlgv5CC+NDxkpe5d+k=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBkOXWGt+uBrmDtZZccm3vssXJRxb3/wgMKtBSBW qhi747VdSmJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZDl1hgAKCRD2t4JPQmmg c3uqD/wMCewm+HBVHMHDEX/wjw7fB1HzXE0Z3cLx2pd8dV25HH1vkE6HTBjRQtPa1/C0CsBlvG6 WjhkhaiwWzkQV/Yq8jMIILjYeOdsIY03vYRNZqaC4oQ6MCZ/kqCpuwAm7E/bobwxK4FGa6kXkOi LrdolWQ6B19d5Js+m+12T/wInvSNk0peB1dzMt/HqOqkMhJA5R4/OmXetgeLkoglQu4glLg2AKi WIVfaqiZ2a6RLT948YfRQDTwCevtQGD3LUrICilewOxgOqNsoNj/xAtcFKuhqFOQOCES9zZ6n8O Yf6CSQMeFPc2vhv1/BOHuINF7qUsgsCXxet6XQXGrRIXmuC/hwzO9Icv1uusIRm9wIoBYMqZX/A oAlYci8XierSHT5aWGSFR8yH1vp2tD1NOAWjymaEjKmul9uWM+4HgHvVn/XWHvWEdNpqYTnaWWE c/j3m28QlDSVr36S7/rUH21gxa5t8GXCehnKGduyxOY9h51WbHnCkReUOsd88LTICbXJJ03tDPH dtCyE5fv2dukcogwD9Yb+ZbhnViqhQMRPJb4SbyZTPq5vUBCjuEPgO8Js7YQIBcXbEG8/cPDSec ZpMTdn8QgGCA5FM1TsMjMu6YlQgBUMJC0IRFsFztSeadzSCTusTjgSquhX7tOUjDLJJegHRp6GC JaCGmHDdXqRbD7g== X-Developer-Key: i=matthieu.baerts@tessares.net; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org This will help occasional developers to find our git repo without having to look at our wiki. Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index b8b275e27cdb..1c09473685b1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -14617,6 +14617,8 @@ L: mptcp@lists.linux.dev S: Maintained W: https://github.com/multipath-tcp/mptcp_net-next/wiki B: https://github.com/multipath-tcp/mptcp_net-next/issues +T: git https://github.com/multipath-tcp/mptcp_net-next.git export-net +T: git https://github.com/multipath-tcp/mptcp_net-next.git export F: Documentation/networking/mptcp-sysctl.rst F: include/net/mptcp.h F: include/trace/events/mptcp.h From patchwork Fri Apr 14 15:47:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 13211735 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A381BC77B78 for ; Fri, 14 Apr 2023 15:47:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230322AbjDNPrm (ORCPT ); Fri, 14 Apr 2023 11:47:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230243AbjDNPr0 (ORCPT ); Fri, 14 Apr 2023 11:47:26 -0400 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 697BE30FA for ; Fri, 14 Apr 2023 08:47:24 -0700 (PDT) Received: by mail-wr1-x434.google.com with SMTP id s2so14702169wra.7 for ; Fri, 14 Apr 2023 08:47:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares.net; s=google; t=1681487243; x=1684079243; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=lpfal81Z6EjmtDozR8H17bXhP01vB1EPYt1nMaTOgpk=; b=BjHbrGR353z8XzYk0NmEqBE4BXavNlUJuFfFmC68Ouil3tuI80t345U+ERJEZ/Nuol eu3nfrm1UsmMTeZEQCrkA/gqDFL7UpPw2pb/6EVtF8D+JU1fevLuzQsHX4nJUfA1rFL3 LbVu1Mukg8HB3EZsdHXdcGGQ4lXJjpSvime1S2/zK+K/mepEYy95F+p6kMbx+/+JM7qX J0/IcY+5TAZq3De4fSII9kpS171mUh9xNVSDgiX4apbuqE5j4q+VVyqhz4Q062hduw5f RXuayg5xTlu+oLLgxOtsKDThOaJe0QhY1bH/9Pnodswi9MJRcDy1dVO+L5Kxv9wOP/mt ndww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681487243; x=1684079243; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lpfal81Z6EjmtDozR8H17bXhP01vB1EPYt1nMaTOgpk=; b=WDIPqTvDKNMusyofIys/HtZmqV/FzZ53ygbDW/+gHu21FAaaRHcNhpBw6CGiQrL3lE 13oYeyqui7GHvT4YLJdkCiPZT3/m5Abzvy0bcIyGHO/c87sDM2MadtMl1C7m0Zg8Zg5m otfh+VmUMTsYBcRYec0e57E25T/UZh8f15iBynca12uHo/Ac0WEAiIz6M/ZCxaT0LG4f 4I+aO6WeRczUWoMH/Hf8XrPQC6nhx1/KztV6Rxgm6tEIgmNIzPFI6h2O3GlOaTvnTtdE /F9Yrd7K6IYXyWQdzbgfrbZ09yLxpqWPxQIj3uE1oEL5KE0GumoZXR3Vc43xzQNhSG/8 fI0Q== X-Gm-Message-State: AAQBX9du/y+wxgrv5WPaIVKdfqt8DeAI0rPM9HUlPx2d8+ovFdQ4OJ2d b7UeydtnaqK8G5AcsfzFqge99g== X-Google-Smtp-Source: AKy350b7kxOu/2UHaSN/4QDEHhLPiSWqhgwkMuXY1t3gxQlX5ThPZKJijRbxbAMNMYF+qRNjj7IlKw== X-Received: by 2002:a5d:4a08:0:b0:2f5:ac53:c04f with SMTP id m8-20020a5d4a08000000b002f5ac53c04fmr4271971wrq.28.1681487242678; Fri, 14 Apr 2023 08:47:22 -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 x2-20020a05600c21c200b003f149715cb6sm1034298wmj.10.2023.04.14.08.47.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Apr 2023 08:47:22 -0700 (PDT) From: Matthieu Baerts Date: Fri, 14 Apr 2023 17:47:08 +0200 Subject: [PATCH net-next 3/5] mptcp: remove unused 'remaining' variable MIME-Version: 1.0 Message-Id: <20230414-upstream-net-next-20230414-mptcp-small-cleanups-v1-3-5aa4a2e05cf2@tessares.net> References: <20230414-upstream-net-next-20230414-mptcp-small-cleanups-v1-0-5aa4a2e05cf2@tessares.net> In-Reply-To: <20230414-upstream-net-next-20230414-mptcp-small-cleanups-v1-0-5aa4a2e05cf2@tessares.net> 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 , Abaci Robot , Mat Martineau , Jiapeng Chong X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2584; i=matthieu.baerts@tessares.net; h=from:subject:message-id; bh=gV1NcAY6/tnkKf9VWYi1pcEwxZE3vF9bAm0gXkwoyA0=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBkOXWGmzpIRZ4fEeI/XlxK7M8E3sW44SLtFzFCe HKsivJpijGJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZDl1hgAKCRD2t4JPQmmg c8/QEACW882WEIPQ3ClfAl0TkV1bi26AGu5zGcgIICpo+6Q/BTNtG6Frl8WXegx6U8lRSx+LtCZ m4LhA/JDIhQBHUpNI7V6Q7bkB7cZWN7mugfV79O5Cpv7k3jxOvUW18dcXSAxiSb3oKfHpD24R8r G+5q0sirItKuWcZ2x6XQrCT/ForhoMRfDUGPvJnwpOrheZnTMXOw0hRW0y7ZBcbKnfHLPXInm6u jncpbEQuHJjMo3uEMzeTx4bJZk+ml4kfBPT7lu/ZSbLCQh+A4eOk1gKutvGnsADjnqgyuPki1TE 8xw3W1L6lN9si4uB1W9QjORPj+qlCVBcxHJ5h3mykGbqOy8dzvWyiSXIEaJWcZdkJmRJuVm5lWg gD3PtY5Ka+O0WukGMMEYaYYiBOKeryrydMdQ9Hti48K6TYN3HAO8hVlNtnNoYb53JgyaxfKILlu Q/7+JdLu+NlHTiVkmRAyk8Le5Ft8oMz9BMFdB23ck+v9IfFeWwywHt4aocx8UHsjUx1PQaKxqv3 fDgmkYc8YlbAyjggwO8ew5DmgGPzs6KgRfRWmYGzEbJPg7C4nuvRZzOEKn8OFkQxkEUyQPsPDgB 3HGLN7brliNO3C8uXWYe3uwIvz9nUXnszNCiyASJtz0IlypE245rbqYDxHDtW9BciMyrO6rU3GK WToe4Ewe7e85lmA== X-Developer-Key: i=matthieu.baerts@tessares.net; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org In some functions, 'remaining' variable was given in argument and/or set but never read. net/mptcp/options.c:779:3: warning: Value stored to 'remaining' is never read [clang-analyzer-deadcode.DeadStores]. net/mptcp/options.c:547:3: warning: Value stored to 'remaining' is never read [clang-analyzer-deadcode.DeadStores]. The issue has been reported internally by Alibaba CI. Reported-by: Abaci Robot Suggested-by: Mat Martineau Co-developed-by: Jiapeng Chong Signed-off-by: Jiapeng Chong Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts --- net/mptcp/options.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/net/mptcp/options.c b/net/mptcp/options.c index 355f798d575a..a9801cfe7d15 100644 --- a/net/mptcp/options.c +++ b/net/mptcp/options.c @@ -442,7 +442,6 @@ static void clear_3rdack_retransmission(struct sock *sk) static bool mptcp_established_options_mp(struct sock *sk, struct sk_buff *skb, bool snd_data_fin_enable, unsigned int *size, - unsigned int remaining, struct mptcp_out_options *opts) { struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk); @@ -556,7 +555,6 @@ static void mptcp_write_data_fin(struct mptcp_subflow_context *subflow, static bool mptcp_established_options_dss(struct sock *sk, struct sk_buff *skb, bool snd_data_fin_enable, unsigned int *size, - unsigned int remaining, struct mptcp_out_options *opts) { struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk); @@ -580,7 +578,6 @@ static bool mptcp_established_options_dss(struct sock *sk, struct sk_buff *skb, opts->ext_copy = *mpext; } - remaining -= map_size; dss_size = map_size; if (skb && snd_data_fin_enable) mptcp_write_data_fin(subflow, skb, &opts->ext_copy); @@ -851,9 +848,9 @@ bool mptcp_established_options(struct sock *sk, struct sk_buff *skb, } snd_data_fin = mptcp_data_fin_enabled(msk); - if (mptcp_established_options_mp(sk, skb, snd_data_fin, &opt_size, remaining, opts)) + if (mptcp_established_options_mp(sk, skb, snd_data_fin, &opt_size, opts)) ret = true; - else if (mptcp_established_options_dss(sk, skb, snd_data_fin, &opt_size, remaining, opts)) { + else if (mptcp_established_options_dss(sk, skb, snd_data_fin, &opt_size, opts)) { unsigned int mp_fail_size; ret = true; From patchwork Fri Apr 14 15:47:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 13211734 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 98E2AC77B6E for ; Fri, 14 Apr 2023 15:47:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230373AbjDNPrj (ORCPT ); Fri, 14 Apr 2023 11:47:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230247AbjDNPr0 (ORCPT ); Fri, 14 Apr 2023 11:47:26 -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 51F152691 for ; Fri, 14 Apr 2023 08:47:25 -0700 (PDT) Received: by mail-wm1-x336.google.com with SMTP id bd13-20020a05600c1f0d00b003f14c42cc99so853918wmb.2 for ; Fri, 14 Apr 2023 08:47:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares.net; s=google; t=1681487243; x=1684079243; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=IWDTtECwsAjmhmHRuxNIr9S2DI1LKdsoQ3rswGr32ds=; b=T2DCjD57aRc+HD2UC5CMLxlwCrnIpr+ZgwwhHPf3yqK/ASgz6n8armT5rL08ozQSSf b9S4kPyCVEM5sHxPm7hs1US6/AKSuj5KaKgVSw7ZB4nYPIj/fGdm+TNV5hub2G8ooQgW mSe9BnrVn19slUkgQHPoExUNRCxP9UzBLstdgWWzYbSqv2hWpyymlFiFSXXMHX9H216o 0x/i3UDr8/1WpdgwjZBFe1tE80AYJMpMb2I0QrDdoYDSS3qZrQ2lvaTUIkI38i56GNfF OMQ/BeFiqZnR74OCv4HM+mCjpN0REhuGkExModyFzrBJz8d3cShGkgyAOnjRxADTa1Mq wehg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681487243; x=1684079243; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IWDTtECwsAjmhmHRuxNIr9S2DI1LKdsoQ3rswGr32ds=; b=LWRKh8EEhOIqdJ/oV24czUM9Ou2alPVRz+7f0ShUWZG7zIbKAqFMx8Ab5s6smbguR7 7qeX0Ui91F3LDOXCSBBSKgw12XbHPPR+Wg5jB4JhXru9lB/QnquixhbwPkEWTd46ala2 w+I0mWNtPbgxlMK1+hY2HvgfBAKfB/5y2ac6rJMEL9/ngz6w0ICZjj85mUumduej6NGO kxA++tuzz/rbPB32DnMc9L2WuzoBkQwwZHop/Z6nV6p6fN0wMccPf4wHpHvGoCXmDimQ gzhuCF4pVTVNwJQjYTiNKlG1d4RkR+M7sZqfWjlfCHLL/RgRzHumrbKUyjXsCxHGM+Tw /cEg== X-Gm-Message-State: AAQBX9epRaB2HHvA4EpSPsBzpBgqaGAzLs9s+ic26i/bWRT4hvkIK4WP cdlogxzg/6O9vs+5hcnjii/g5A== X-Google-Smtp-Source: AKy350Zbfb/+ETHLfVDp+FeQgfyIrS1HLwN+tktEDWnNLW6wqZcaSBxXV5L/gCAOFber58De+xX88Q== X-Received: by 2002:a7b:c405:0:b0:3f1:4971:5cd0 with SMTP id k5-20020a7bc405000000b003f149715cd0mr1275134wmi.21.1681487243619; Fri, 14 Apr 2023 08:47:23 -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 x2-20020a05600c21c200b003f149715cb6sm1034298wmj.10.2023.04.14.08.47.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Apr 2023 08:47:23 -0700 (PDT) From: Matthieu Baerts Date: Fri, 14 Apr 2023 17:47:09 +0200 Subject: [PATCH net-next 4/5] selftests: mptcp: remove duplicated entries in usage MIME-Version: 1.0 Message-Id: <20230414-upstream-net-next-20230414-mptcp-small-cleanups-v1-4-5aa4a2e05cf2@tessares.net> References: <20230414-upstream-net-next-20230414-mptcp-small-cleanups-v1-0-5aa4a2e05cf2@tessares.net> In-Reply-To: <20230414-upstream-net-next-20230414-mptcp-small-cleanups-v1-0-5aa4a2e05cf2@tessares.net> 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 X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2688; i=matthieu.baerts@tessares.net; h=from:subject:message-id; bh=OMhBvjHspE9kilhYpui/Ahqh9sFYY67x1kU+MoI9vh8=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBkOXWGxSGApNnBsDJeBmCH9n9JpmD9H01vkQ0zT Ma71ppMdhKJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZDl1hgAKCRD2t4JPQmmg c7HcD/9kxoAJMsr/I/X47DPp8WsaXxFjLUx49XD5Bb7xI2I2i3JLR3FBVv27Yhsxs8r980pmrvB 1yP5rjDuYTatbmW743zPNUhM7sdIZ+l9l4nUsx1ahei2sMJiQdqNaNKeWP7obQPUYHUIdY7Wm1K WkyCeecW4EZ7QdZxIi9ZDvQ5zA9BZsVPT1rWGZWequ2zJEEB6xPjDk10CZtCFNA6jb01M/tM2qf otZWbcWTjbEbuhfT4uQwIROVhRf7C7MJdZ/TfzLa1LI/fXyEnYEHUU8jpcZX4XI+Mu0aCreEAAQ VIgfd3gJ7J7WjZLNHKSz1Nvv//srNIuwqJG1GkaahiGc46n3Pr03aL7KfuBYWGjNv/VPoVseIV5 8u2tfDIB6yxMr/AmdVEYlEfgpw21QNkeM5A2BoTjqS5fgXUu9O4/hcd8dAgVjYuq5D/SVseuWRW WhLjCM37GE6UfzOq4EpLIMlcEZxq8Gn4WpZL6dt2BAaH5kao0f01lrFzLAXfbOhNViTWLdjlVMs OQZnvai2OPd8gDPL1I3AbrWD6fWMHs9DU5eB2VhcLF5BZg/XNUPr44ChzlumQZDzrLwzgNnFcpc onjrf5hhJJdXpAutmSzLhlA3hcIsuGNPb7JNksxTuZR+1/QcsHZg8RZ72gUTRRVDKJIJm8Ju6rT w+rT1AZepwycxEw== X-Developer-Key: i=matthieu.baerts@tessares.net; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org mptcp_connect tool was printing some duplicated entries when showing how to use it: -j -l -r While at it, I also: - moved the very few entries that were not sorted, - added -R that was missing since commit 8a4b910d005d ("mptcp: selftests: add rcvbuf set option"), - removed the -u parameter that has been removed in commit f730b65c9d85 ("selftests: mptcp: try to set mptcp ulp mode in different sk states"). No need to backport this, it is just an internal tool used by our selftests. The help menu is mainly useful for MPTCP kernel devs. Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts --- tools/testing/selftests/net/mptcp/mptcp_connect.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.c b/tools/testing/selftests/net/mptcp/mptcp_connect.c index b25a31445ded..c7f9ebeebc2c 100644 --- a/tools/testing/selftests/net/mptcp/mptcp_connect.c +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.c @@ -106,8 +106,8 @@ static struct cfg_sockopt_types cfg_sockopt_types; static void die_usage(void) { fprintf(stderr, "Usage: mptcp_connect [-6] [-c cmsg] [-f offset] [-i file] [-I num] [-j] [-l] " - "[-m mode] [-M mark] [-o option] [-p port] [-P mode] [-j] [-l] [-r num] " - "[-s MPTCP|TCP] [-S num] [-r num] [-t num] [-T num] [-u] [-w sec] connect_address\n"); + "[-m mode] [-M mark] [-o option] [-p port] [-P mode] [-r num] [-R num] " + "[-s MPTCP|TCP] [-S num] [-t num] [-T num] [-w sec] connect_address\n"); fprintf(stderr, "\t-6 use ipv6\n"); fprintf(stderr, "\t-c cmsg -- test cmsg type \n"); fprintf(stderr, "\t-f offset -- stop the I/O after receiving and sending the specified amount " @@ -126,13 +126,13 @@ static void die_usage(void) fprintf(stderr, "\t-p num -- use port num\n"); fprintf(stderr, "\t-P [saveWithPeek|saveAfterPeek] -- save data with/after MSG_PEEK form tcp socket\n"); - fprintf(stderr, "\t-t num -- set poll timeout to num\n"); - fprintf(stderr, "\t-T num -- set expected runtime to num ms\n"); fprintf(stderr, "\t-r num -- enable slow mode, limiting each write to num bytes " "-- for remove addr tests\n"); fprintf(stderr, "\t-R num -- set SO_RCVBUF to num\n"); fprintf(stderr, "\t-s [MPTCP|TCP] -- use mptcp(default) or tcp sockets\n"); fprintf(stderr, "\t-S num -- set SO_SNDBUF to num\n"); + fprintf(stderr, "\t-t num -- set poll timeout to num\n"); + fprintf(stderr, "\t-T num -- set expected runtime to num ms\n"); fprintf(stderr, "\t-w num -- wait num sec before closing the socket\n"); exit(1); } From patchwork Fri Apr 14 15:47:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 13211736 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15391C77B72 for ; Fri, 14 Apr 2023 15:47:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230447AbjDNPro (ORCPT ); Fri, 14 Apr 2023 11:47:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230219AbjDNPri (ORCPT ); Fri, 14 Apr 2023 11:47:38 -0400 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24F30A24D for ; Fri, 14 Apr 2023 08:47:26 -0700 (PDT) Received: by mail-wr1-x435.google.com with SMTP id s2so14702250wra.7 for ; Fri, 14 Apr 2023 08:47:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares.net; s=google; t=1681487244; x=1684079244; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Qzxt4XcM4tuKu37taRV5Ugjl1Cb3GZa6ByEPKZjvm68=; b=insrqgRzM5WggRlz8B5pv0UziSsf4Bk9QYU+AO+KzFAuqcBNEQfCS26+Tj+MjVpCPL uP4cMmOfcMIkznI9FbQi2i0ZqSSx1UFKdWnalX1Ug6m5PBIPJDQIFphg7yUxhEV2ivcD M9ofn6TCMlSEDu2NlD9l6W0zpNmlqjPG48oC5E9h6qNkuvq8EgkhkTf0ug4ZxZs7KyJ9 meB7e6gdS6S30/zAYV20930f0NRg/RqDN2wYo0qD2BrPx75U4pcQEcZUotJ2Zm55CSXX IO6Jt3pvubJmtlv0lwzX8KuSBplshzeXLXRhQOuoEs50g6VBfAqoL9gGomBhW4PAPCn3 seLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681487244; x=1684079244; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Qzxt4XcM4tuKu37taRV5Ugjl1Cb3GZa6ByEPKZjvm68=; b=cMGu5x1IE4PIh4+kOYAKWFluI1v3I7ZN1rxymK3pWkCOaWyDkA9PAfiK5KITTTSBs0 0Y0ZUKdZxnQ5FOYLn8LEGWgtbvvjOXhd4g9acgzrWx6593CQaWXsGWrb5NdlPZzGvC0/ hbIxGvHaRVH8phXxJZJqsLXCc5JVVox5vjIwYqIEwL6eYQKW/TD8OlNoEs758LKmRTTW eI1AlvA/aTTkb7PeSph5+3cFG/kdhvlmhAZC4JtLzbSf2YxiKJbhBPwgedOU9zMMNBNV 6Lb0ojSMBzshiDdXXM787xdq8wKVVsSPAM+mjfvDp58lc1/wtUZlxg53TKY6WsMdhad8 bNKg== X-Gm-Message-State: AAQBX9dV8sP81/sBjFKaBKpomXzmFKFuEl7EPgJRo9mJH2pE8hFSPIyV GxEwM4keXx6VFxSvcvU2bQNb1g== X-Google-Smtp-Source: AKy350anVWsEzpcDQkwD4VfavS5OSXHWMTLonpGNhq7ef7wjmNN7vxgvbaWECHBpitBCNgJ0zo4sNQ== X-Received: by 2002:adf:f709:0:b0:2f4:e8e3:ef62 with SMTP id r9-20020adff709000000b002f4e8e3ef62mr4561531wrp.65.1681487244500; Fri, 14 Apr 2023 08:47:24 -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 x2-20020a05600c21c200b003f149715cb6sm1034298wmj.10.2023.04.14.08.47.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Apr 2023 08:47:24 -0700 (PDT) From: Matthieu Baerts Date: Fri, 14 Apr 2023 17:47:10 +0200 Subject: [PATCH net-next 5/5] selftests: mptcp: join: fix ShellCheck warnings MIME-Version: 1.0 Message-Id: <20230414-upstream-net-next-20230414-mptcp-small-cleanups-v1-5-5aa4a2e05cf2@tessares.net> References: <20230414-upstream-net-next-20230414-mptcp-small-cleanups-v1-0-5aa4a2e05cf2@tessares.net> In-Reply-To: <20230414-upstream-net-next-20230414-mptcp-small-cleanups-v1-0-5aa4a2e05cf2@tessares.net> 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 X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2487; i=matthieu.baerts@tessares.net; h=from:subject:message-id; bh=5FlU9MokKUitrXSC9YGwxuWrLrcBCHiaj46QcbM+33c=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBkOXWGyZxITuXwckR3HbIuXnkVm7W+wSc67dzLx OqLJqwqrtuJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZDl1hgAKCRD2t4JPQmmg c/XiEAC9N9r9lk1IJXEOk06iElSNPd4XvWvMdxKFRC8a5fiRwKfffWvBq83xIqjvPN6lDECghch CfAefrERTjAFWIxCED0YwWTaJVZPL7CTRv3gVQsmtwCmaJtkS9GgsHxdL3r0RrUfjRqH8ut/Qny K/3m2zTdH1tg/2vBHB/Dr2ojGfwPAQnyLoxtLKk58CFZkTgSGshZx66pjSYvoCM8HsHwx7fRi7r DueOR1eS1vGOO4aupDJApFqpDG/ezuNyrOhWfwpoQZX4eTYzky/g2ZHB1m+tjgvgbZc5898o6D6 j+Sw+5c/8/1EM5aZNcI3uQcIFgKFXQTFddSfuZn79KzBAdeo8qgOAUVzlLmz5fnJnqTaZiiJprD bjAQ01Yf0ADWyNM90DBOXG3GoVRYZdixwj5d6zGUmA81erWLFSChK34SDfulHISMbOvWjT5GXeX MRlzifdNAhXKtTbfm7r9zSg7lxBNdnqToMZnN07LX+DivSlR+tv2pjmK9k8P1fg+NSVRQrRo4IG YaMd4dgNsCCOdwzdic3nkmOvjfx5o6wyO3dLBBE8eFcwW3dLXQt0DRe3rRMN/ocQdWG3DUV4Pcs WRDOlOMJ4rBMfbcKDo4UkHyKa2pWSLiAdqztAQCLdUVev7wt3mfFKi8o6SGxzNvMjIDVEhwA/pa TCyicSCBV6Qm39Q== X-Developer-Key: i=matthieu.baerts@tessares.net; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Most of the code had an issue according to ShellCheck. That's mainly due to the fact it incorrectly believes most of the code was unreachable because it's invoked by variable name, see how the "tests" array is used. Once SC2317 has been ignored, three small warnings were still visible: - SC2155: Declare and assign separately to avoid masking return values. - SC2046: Quote this to prevent word splitting: can be ignored because "ip netns pids" can display more than one pid. - SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. This probably didn't fix any actual issues but it might help spotting new interesting warnings reported by ShellCheck as just before, ShellCheck was reporting issues for most lines making it a bit useless. Signed-off-by: Matthieu Baerts --- tools/testing/selftests/net/mptcp/mptcp_join.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh index fafd19ec7e1f..26310c17b4c6 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -6,6 +6,10 @@ # address all other issues detected by shellcheck. #shellcheck disable=SC2086 +# ShellCheck incorrectly believes that most of the code here is unreachable +# because it's invoked by variable name, see how the "tests" array is used +#shellcheck disable=SC2317 + ret=0 sin="" sinfail="" @@ -371,8 +375,9 @@ check_transfer() local line if [ -n "$bytes" ]; then + local out_size # when truncating we must check the size explicitly - local out_size=$(wc -c $out | awk '{print $1}') + out_size=$(wc -c $out | awk '{print $1}') if [ $out_size -ne $bytes ]; then echo "[ FAIL ] $what output file has wrong size ($out_size, $bytes)" fail_test @@ -500,6 +505,7 @@ kill_events_pids() kill_tests_wait() { + #shellcheck disable=SC2046 kill -SIGUSR1 $(ip netns pids $ns2) $(ip netns pids $ns1) wait } @@ -1703,7 +1709,7 @@ chk_subflow_nr() cnt1=$(ss -N $ns1 -tOni | grep -c token) cnt2=$(ss -N $ns2 -tOni | grep -c token) - if [ "$cnt1" != "$subflow_nr" -o "$cnt2" != "$subflow_nr" ]; then + if [ "$cnt1" != "$subflow_nr" ] || [ "$cnt2" != "$subflow_nr" ]; then echo "[fail] got $cnt1:$cnt2 subflows expected $subflow_nr" fail_test dump_stats=1