From patchwork Wed Jul 12 16:03:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 119277 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1269230vqm; Wed, 12 Jul 2023 09:30:32 -0700 (PDT) X-Google-Smtp-Source: APBJJlF6T2Nre3mnTl78vac9qCV7UwiKYAEiaU1UIln2zYpeTxOlBW57ywAImC+mlRZLdCrOHGZ2 X-Received: by 2002:a05:6358:5916:b0:135:62de:ff7d with SMTP id g22-20020a056358591600b0013562deff7dmr11803430rwf.8.1689179431688; Wed, 12 Jul 2023 09:30:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689179431; cv=none; d=google.com; s=arc-20160816; b=qCpiSvj/71Fjhi4gAbnOsDYyl1sJRmpVw5iKYN986eCnsobuq05/ye+WPxE1gHlBuH KEvcBKgwxARjeWnROfLDdfUhplySxldZA+21VifeGWcIwLXr6Cgqe0arWgPM2ZrXLjo/ qwWePjnWcdJdkD69ReHblmxIsijdgsJfuK12eVSa9TNRIepLZYF8o6dUVeJ8iEMCBMeJ zI0FrCD+TuwFgfV6EoP3tUouoRklsGfL+b2vQ7HMhI4EO7JlC8GDCsXvxONJYkiJgmk2 eNcoRoY9GCsduP5+r/A+rbpzBms984nL/XtGs2uCHrkiP2HDM8QGNb6YaAXzyTZ8h8IS Q8nQ== 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=liX/45MwjWcCDqrEus/1D+DYuEA/UW5nbbNnFzTg4gI=; fh=W5rn1gG81nIyOp2AvYKIXDwIEy66US4qHO9dtkppJI0=; b=vjbmSKUHYfedQVi7AlURhOT2gxvWsFQ2jizsUu10zXP4sbD/JaRDWmVtTPWaRSlhqO f/wY3vD/9NmGEeP3P0YUCL8gpC2pID96A3rut58jfkQCK1P0hKBZ9PXMImXTHJ24N1mA YGFkW1fV0sNMTJi1hUl5YtxwRAZ30TpgFSW4a/GJs6XKRK3TXThTzmiDNOIzS+v3WW4M fiQ5Bc8K1Xr1lh5dpI5tnRs+nrZphCd52fV/TYJTc7hLVhAOtcl7jG13QUaQ5MtbVGyY XyZIohzqiGqgBfoYOg216WNARQEVfTdqfYH0c6SQxzCxHlF6l8m7mD/rmxzvptGSujZj fCpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tessares.net header.s=google header.b=fciZYj0H; 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 z13-20020a63d00d000000b005533647f7c5si3230157pgf.420.2023.07.12.09.30.14; Wed, 12 Jul 2023 09:30:31 -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=fciZYj0H; 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 S233848AbjGLQDk (ORCPT + 99 others); Wed, 12 Jul 2023 12:03:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233588AbjGLQDc (ORCPT ); Wed, 12 Jul 2023 12:03:32 -0400 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B30B19A6 for ; Wed, 12 Jul 2023 09:03:31 -0700 (PDT) Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-3fbca8935bfso73380275e9.3 for ; Wed, 12 Jul 2023 09:03:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares.net; s=google; t=1689177810; x=1691769810; 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=liX/45MwjWcCDqrEus/1D+DYuEA/UW5nbbNnFzTg4gI=; b=fciZYj0HX8H8WkRBLOhTwiSmGL44WONfFZusDuofkVO6jK4hJ11DpBSAZToZkwD/6l r2A1JTi7nX31eOZe6mKrjxLbCAw2p6KIf1ykDOvnpSpifT36IvQnorTxgY80+Lk+vlwS Hn7dd6Mht7QTVPHtQXa2ZSwwaWq8nmAKMHtts2A/aGAB0XNI0F2Kk3d0uI/bFJcfA2H9 M7g14jBjbbck1flxpcYXHcelSLhar1XE+qnx0fXVDp4D2Pm4miWv10lAqkklOQEP7RTD cX78JPh4WuhdFupprUhkfBCAOmD8bY5g5+z0h4teFj9AgJ6XQvtwmVNuuSEH5Gzfzg7x VA8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689177810; x=1691769810; 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=liX/45MwjWcCDqrEus/1D+DYuEA/UW5nbbNnFzTg4gI=; b=UQPx4rSU4DNvcmp4gqcH1B2rrmJ8K2h1f81SGp4mY5xaErYXo4rB2/5YET5tmsiPDh JXYBxZJTLaIdGJ/hMu5KaZP4ZsyrD0nZ20muK3+xsWnHzt+O9WCTyKIk8As3royFplab yzLiiVeN2LeTci5YgWET/MTCrINWHZdF4k1JzubtGnMRhY9GBnqW/N9VqaysDhoDlaRV H+NAkuSJPHK95MG3RFkA4MgCf2T/KJWM9Qa1yLYvQ1K9fiLWkalWmdcXf33tqyP2S69X jDRVN/l1WBTfV/ORyV1DW//J4Cr0zH0v+eICHLaWi0VuwVBb5IG0va/dISr/t9VpC1pG zmAw== X-Gm-Message-State: ABy/qLaRME2fvblfylq2zKpzdJaNgturqXNgQ93bkDUWKgtqU1VZJs1O QINwIhKW7di/V4bw5yq3jyf5Qg== X-Received: by 2002:a7b:ce8e:0:b0:3fb:40ec:9483 with SMTP id q14-20020a7bce8e000000b003fb40ec9483mr17500250wmj.16.1689177809971; Wed, 12 Jul 2023 09:03:29 -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 o6-20020a05600c378600b003fbb9339b29sm15972581wmr.42.2023.07.12.09.03.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jul 2023 09:03:29 -0700 (PDT) From: Matthieu Baerts Date: Wed, 12 Jul 2023 18:03:18 +0200 Subject: [PATCH net-next 3/4] selftests: mptcp: add fullmesh env var MIME-Version: 1.0 Message-Id: <20230712-upstream-net-next-20230712-selftests-mptcp-use-local-env-v1-3-f1c8b62fbf95@tessares.net> References: <20230712-upstream-net-next-20230712-selftests-mptcp-use-local-env-v1-0-f1c8b62fbf95@tessares.net> In-Reply-To: <20230712-upstream-net-next-20230712-selftests-mptcp-use-local-env-v1-0-f1c8b62fbf95@tessares.net> To: mptcp@lists.linux.dev, Mat Martineau , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan Cc: Geliang Tang , netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Matthieu Baerts X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=2983; i=matthieu.baerts@tessares.net; h=from:subject:message-id; bh=ZRZR5HmHd9wxvCYcF2FjC/vJjQ+ch43TVOjqYZkaOMw=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBkrs7NeL73iGWFIRyzmvVjQ0jsjwYXrWg/7t1IR 9b4xcL0pxaJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZK7OzQAKCRD2t4JPQmmg c58SEAC2VJSE5J8PMyNYX+00lVSmRSPa2+qf5HH4NymX9rt4NROp7z48Kx5Z78bIGc3Cp1EWUTL INMg4cgamRfzDAdf70UZLoK3QA/QCya75TmGdwxzneTJzx5FIiBSPAI1MPzBWaUAAeOHrrV3E6M iyHPgH94H5R0Uj0hpgZLDW7QERGv3ls/PLnNBUOmXo7vW1yOY2eNJicd+mm4P+KYsXGsqeMJ9ZZ Qv6G2iYgcZ1ci9jAhUbeiw+Bm2Qg1tUoeVWqkxS0/Y5ZHDixi+yJ7r7nE71er9sitnsZn1zwCmc dcG8rCDAq1RUjgRoXEFn4GZrloYAmx0vv1t5MsRIllUTJO493gs1Gyxfq53uQVUxhLxznf7Yi8R DYFL04+q7KVcWJe/o/Uirm1Pt4aL+IS1Wwr36wsCFcmkH12JiZ0QBmZCdbtfT/KZ6BDfPNUJcFN A9eSpWI8w85NrBk3z6eJE+q70XtiwDm/JPEtYdMcW2J9EFcaTOLnvuWNJiWslLgNFYbhtfr9Y55 ZFz19uDr9fF5U/ZJczIrr2i55KRJCP/H0PX/GdB+j1Pp9kF5JyObvf5p3N1s5UiFUo55q+kuSJ+ 7+LyhUM/ROZpIaoshS1UK6IHeSTfko6R/uORt0GMA5JKPYCS+TPeCNbh9GInu9WYQcuSlXejEYD hKFAr7E+vp6q3hg== 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: INBOX X-GMAIL-THRID: 1771233011546740277 X-GMAIL-MSGID: 1771233011546740277 From: Geliang Tang Use a new env var fullmesh instead of passing 'fullmesh_*' to addr_nr_ns2. It can be set with the actual value of addr_nr_ns2 now: addr_nr_ns2=fullmesh_1 \ run_tests $ns1 $ns2 10.0.1.1 -> fullmesh=1 \ run_tests $ns1 $ns2 10.0.1.1. Signed-off-by: Geliang Tang Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts --- tools/testing/selftests/net/mptcp/mptcp_join.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh index 3e8c560938f2..5ad95cc382e6 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -56,6 +56,7 @@ unset addr_nr_ns1 unset addr_nr_ns2 unset sflags unset fastclose +unset fullmesh # generated using "nfbpf_compile '(ip && (ip[54] & 0xf0) == 0x30) || # (ip6 && (ip6[74] & 0xf0) == 0x30)'" @@ -832,11 +833,12 @@ pm_nl_set_endpoint() local addr_nr_ns1=${addr_nr_ns1:-0} local addr_nr_ns2=${addr_nr_ns2:-0} local sflags=${sflags:-""} + local fullmesh=${fullmesh:-""} local flags="subflow" - if [[ "${addr_nr_ns2}" = "fullmesh_"* ]]; then + if [ -n "${fullmesh}" ]; then flags="${flags},fullmesh" - addr_nr_ns2=${addr_nr_ns2:9} + addr_nr_ns2=${fullmesh} fi # let the mptcp subflow be established in background before @@ -2689,7 +2691,7 @@ mixed_tests() pm_nl_set_limits $ns2 2 4 pm_nl_add_endpoint $ns1 10.0.2.1 flags signal pm_nl_add_endpoint $ns1 dead:beef:2::1 flags signal - addr_nr_ns2=fullmesh_1 \ + fullmesh=1 \ run_tests $ns1 $ns2 dead:beef:1::1 slow chk_join_nr 4 4 4 fi @@ -3102,7 +3104,7 @@ fullmesh_tests() pm_nl_set_limits $ns1 1 3 pm_nl_set_limits $ns2 1 3 pm_nl_add_endpoint $ns1 10.0.2.1 flags signal - addr_nr_ns2=fullmesh_1 \ + fullmesh=1 \ run_tests $ns1 $ns2 10.0.1.1 slow chk_join_nr 3 3 3 chk_add_nr 1 1 @@ -3115,7 +3117,7 @@ fullmesh_tests() pm_nl_set_limits $ns1 2 5 pm_nl_set_limits $ns2 1 5 pm_nl_add_endpoint $ns1 10.0.2.1 flags signal - addr_nr_ns2=fullmesh_2 \ + fullmesh=2 \ run_tests $ns1 $ns2 10.0.1.1 slow chk_join_nr 5 5 5 chk_add_nr 1 1 @@ -3129,7 +3131,7 @@ fullmesh_tests() pm_nl_set_limits $ns1 2 4 pm_nl_set_limits $ns2 1 4 pm_nl_add_endpoint $ns1 10.0.2.1 flags signal - addr_nr_ns2=fullmesh_2 \ + fullmesh=2 \ run_tests $ns1 $ns2 10.0.1.1 slow chk_join_nr 4 4 4 chk_add_nr 1 1 @@ -3153,7 +3155,7 @@ fullmesh_tests() pm_nl_set_limits $ns1 4 4 pm_nl_add_endpoint $ns1 10.0.2.1 flags subflow,fullmesh pm_nl_set_limits $ns2 4 4 - addr_nr_ns2=fullmesh_1 sflags=nofullmesh \ + fullmesh=1 sflags=nofullmesh \ run_tests $ns1 $ns2 10.0.1.1 slow chk_join_nr 2 2 2 chk_rm_nr 0 1