From patchwork Sat Jun 10 16:11:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 105985 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1635490vqr; Sat, 10 Jun 2023 09:34:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7W8cSR2JrIFtvdE2iJ3VUUjgFkeHSiuK+I09RzbHppXwyHngQqs8+/PfU+nyEmf95f6Xyz X-Received: by 2002:a17:907:1b0e:b0:96a:3e39:f567 with SMTP id mp14-20020a1709071b0e00b0096a3e39f567mr5063675ejc.47.1686414891338; Sat, 10 Jun 2023 09:34:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686414891; cv=none; d=google.com; s=arc-20160816; b=RnRvxewWu96amH9gm+lCtvgE1Hu7qiSaF54LNSNuBZ2qj9KkVtxJu6RCGkSE7k8ADA obMuSWIASeb5D1Ke50PXyUHJICYlX2tePUqTfAPWy+zaV2/sw4hIoq1PG7cEkul+IscL 1TuMz38qFL8puwn6VJ7p7q1JI2B+Kain/IWOb7gMuRnzc8ZDJoZVBCZIJRU5iYKkWHil R8v4n+vAUwSPQOk+p/SJ0/HjC7ZwJs/RY9mZ+8IdhUGYVABDZmdJBm5tOuuQ2xOgPMZh yS1WbXFJEzY8xjSc8pAyxJzIZobax6Wzz9sve9SyMm5+pQe1QqT+zEV/YDjIp4/BuVHa uVbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=qwBS5XsIXb7JpQCDDkpG6qW44kDRssUwnX3b+fqWvBk=; b=ZmtuKsTTUZlr5OG5ihkejzXu+2aVMwWu2lQgkGU3ZBQdAnhgFr7G74MTByT33S7hNd uQ/DgJMTm9UJuNfJNkVfvHhcWxXSaAbOo8jVQ3iGCzNwLacJIQNqjfQ73h7iq9EbcVf3 jP5HjcBm3jDBYGdl/21UcLhJ04PToxtjc3sp44PwReeRq78JQTyCFxOdfinLFcsPrqrn 9WecW5rfuk52y2marBk82pKiODx/9hmjjRJflFuPb1k0nMGfuNzPAAsMe/CUVitOLGoO FKt3LEjnnkwfzyGFplXOMapsYWmmg2RjIfWKKwB27/wArLW3sa8oFwQhbVSnqS/HSRBy yXcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tessares.net header.s=google header.b=iVFgPBSA; 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 ko17-20020a170907987100b0096acf19c1b8si2786435ejc.28.2023.06.10.09.34.27; Sat, 10 Jun 2023 09:34:51 -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=iVFgPBSA; 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 S231158AbjFJQMj (ORCPT + 99 others); Sat, 10 Jun 2023 12:12:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229576AbjFJQMN (ORCPT ); Sat, 10 Jun 2023 12:12:13 -0400 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D1FD3C1B for ; Sat, 10 Jun 2023 09:12:00 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-3f6e1394060so20252185e9.3 for ; Sat, 10 Jun 2023 09:12:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares.net; s=google; t=1686413519; x=1689005519; 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=qwBS5XsIXb7JpQCDDkpG6qW44kDRssUwnX3b+fqWvBk=; b=iVFgPBSAcrATRVA+d/IBU5wmB4/sLJigUZokDq0fFxcSzFo9gEeGCGrDwJTWJ6R4q/ cxT3cjKGJEsMiP482CgcNNUJn8wIC1BSiLCgwHNz5A6nl7zHTkxfD105IxbpnGULHl+D w7JzvG22cLk38HjWhP/G/wOqZJWfTfeUjOEugF6MXax6zwiPy5FkBI4Emq2NJzmryo2a YgiNqGNxrPLHKQo16gtTJBVKitS9xLs2NPgeC0TpB6EmpdNg/TiiNNDVf+8qHNz+KH5j p2QPPyGTwv7czz782XjfldneBtK/DqRFMSyYfL+FNdQfav9L4BJ8uHYHFvt+58bSnv0/ WGkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686413519; x=1689005519; 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=qwBS5XsIXb7JpQCDDkpG6qW44kDRssUwnX3b+fqWvBk=; b=dYCUMeoA6I99HGgI7X2YBLGACyV/IlVJgkL8+bjRiwYqymp5h0464Zot3kAx0olP7M bOIdY8RC9cGomM1Jf+em++7cTRInVj4lIk5MlJWEH3J+3Q6MVUdoMiUIrTjgw6HjJmWQ ou6i/51l0rU3L7Z0iKi1NXn1oJz4LqXJu2GHWHQIKy8SrxJnsyfOm3AxZatNDIEBKuYc oe/rWPWbfnWS3K1OTl8GMPcbueSKJXrIE48ZdLsiwP3Vstzm6S7f8V0uPve/4v+YwYQT na8j8MXk9lLWabz0UBUMDHp0q71vkNCr/A/syTF5YPaaVwIkFygpvLnLLcD0MUhivPzy LvLg== X-Gm-Message-State: AC+VfDwiXacKX++Yb/wtq15nXY/zj8y56/BwLC5ErmPTNduql3cV/MGC 2Z/iFmk9zYHE/5MECUgKbMpQKQ== X-Received: by 2002:a5d:56d0:0:b0:306:37ac:ef8e with SMTP id m16-20020a5d56d0000000b0030637acef8emr798312wrw.56.1686413518905; Sat, 10 Jun 2023 09:11:58 -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 u9-20020a5d4349000000b003079c402762sm7431145wrr.19.2023.06.10.09.11.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Jun 2023 09:11:58 -0700 (PDT) From: Matthieu Baerts Date: Sat, 10 Jun 2023 18:11:45 +0200 Subject: [PATCH net 10/17] selftests: mptcp: join: skip backup if set flag on ID not supported MIME-Version: 1.0 Message-Id: <20230609-upstream-net-20230610-mptcp-selftests-support-old-kernels-part-3-v1-10-2896fe2ee8a3@tessares.net> References: <20230609-upstream-net-20230610-mptcp-selftests-support-old-kernels-part-3-v1-0-2896fe2ee8a3@tessares.net> In-Reply-To: <20230609-upstream-net-20230610-mptcp-selftests-support-old-kernels-part-3-v1-0-2896fe2ee8a3@tessares.net> To: mptcp@lists.linux.dev, Mat Martineau , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan , Florian Westphal , Davide Caratti , Christoph Paasch , Geliang Tang , Geliang Tang Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, Matthieu Baerts , stable@vger.kernel.org X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2350; i=matthieu.baerts@tessares.net; h=from:subject:message-id; bh=KOwpP27/0y6dtujUDn5E+rsa3xHnBdzaOiL6LOjRD8g=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBkhKC+02DQFIemtIevGukKRqk4zhZgRlDuMPm8l vM1lsZHrRGJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZISgvgAKCRD2t4JPQmmg cxE/EADgZVu3gMyjdr9M8ZBEYOrU5gn6Lmyl2oVw4rY9KNRnI/YUq6JoXAU6dXmd+X/h5vkJ7JJ WcP6rXfL8VzSJ/4UoiVzP/vE69rc/ifUPOTPUhHpRH+9toeOQ0vWD17E2CdTbXIgdfDX8EV8TzP LZIzbawWBVbVfhtQJm+fP5MrT7A+3b/g/yjVUTw/4tgAQy2dfLMWiUltITxlFR8KdY9qZauyOa1 955yp8+YvhhzEIhFIqQzJnBNsa8fSV5PsjTFL7hI9vAknu09xl2eqyJrgFSHrqMSze9dBqpZUjA mDgJMXp6/7yHe8e1pahhqdIsH9LWaqi6nGHEUoRlmzJBLyLqVtUCp8wm422seuEOtH+udawHo2M s3SPPMzjisKqyPdNAL6PVHt/rhvVz3V+cLhRB3ScjpOiXEKCgg441pAkvSJcjeYEn9sxCSQ4tzl KO3SgWcyDnbbn8nYhOK4ACxiMkYpI1EBx5WtMudwr+ukKaJCUe4YFAzQ/iJ7+jTZ8esMKD0RlLm luV6HzzguXhhDjVGzlP8qCsx6Js97LIJcMImCUr7t/MaWqaeWSIA0lv13BhmSg7dzWvQl5177CT rQo97sNAFbpo1fM88kLuZiSXxjEl+I1szrkzZoQAw3bJ5H/Q+y0P+6mFKzLupMbIE+ZHV80/1dC mxnx11IDV+PmiZg== X-Developer-Key: i=matthieu.baerts@tessares.net; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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?1768334180830490121?= X-GMAIL-MSGID: =?utf-8?q?1768334180830490121?= Selftests are supposed to run on any kernels, including the old ones not supporting all MPTCP features. Commit bccefb762439 ("selftests: mptcp: simplify pm_nl_change_endpoint") has simplified the way the backup flag is set on an endpoint. Instead of doing: ./pm_nl_ctl set 10.0.2.1 flags backup Now we do: ./pm_nl_ctl set id 1 flags backup The new way is easier to maintain but it is also incompatible with older kernels not supporting the implicit endpoints putting in place the infrastructure to set flags per ID, hence the second Fixes tag. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: bccefb762439 ("selftests: mptcp: simplify pm_nl_change_endpoint") Cc: stable@vger.kernel.org Fixes: 4cf86ae84c71 ("mptcp: strict local address ID selection") Signed-off-by: Matthieu Baerts --- tools/testing/selftests/net/mptcp/mptcp_join.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh index 7f860a93527f..adbe297a95cf 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -2679,7 +2679,8 @@ mixed_tests() backup_tests() { # single subflow, backup - if reset "single subflow, backup"; then + if reset "single subflow, backup" && + continue_if mptcp_lib_kallsyms_has "subflow_rebuild_header$"; then pm_nl_set_limits $ns1 0 1 pm_nl_set_limits $ns2 0 1 pm_nl_add_endpoint $ns2 10.0.3.2 flags subflow,backup @@ -2689,7 +2690,8 @@ backup_tests() fi # single address, backup - if reset "single address, backup"; then + if reset "single address, backup" && + continue_if mptcp_lib_kallsyms_has "subflow_rebuild_header$"; then pm_nl_set_limits $ns1 0 1 pm_nl_add_endpoint $ns1 10.0.2.1 flags signal pm_nl_set_limits $ns2 1 1 @@ -2700,7 +2702,8 @@ backup_tests() fi # single address with port, backup - if reset "single address with port, backup"; then + if reset "single address with port, backup" && + continue_if mptcp_lib_kallsyms_has "subflow_rebuild_header$"; then pm_nl_set_limits $ns1 0 1 pm_nl_add_endpoint $ns1 10.0.2.1 flags signal port 10100 pm_nl_set_limits $ns2 1 1