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 DE39AC636CC for ; Fri, 27 Jan 2023 14:10:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233932AbjA0OJ7 (ORCPT ); Fri, 27 Jan 2023 09:09:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233544AbjA0OJy (ORCPT ); Fri, 27 Jan 2023 09:09:54 -0500 Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52D1238006 for ; Fri, 27 Jan 2023 06:09:53 -0800 (PST) Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 0735B3FFF3 for ; Fri, 27 Jan 2023 14:09:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1674828590; bh=MB6tARXi880QTsQwMRQ5MIMlnD9ffmA7vMVVeWbOrz8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=FncMqpJ9SouTzmWNvKJp1FGwu0wTRqc/waTUnz6jSpPcbx0a2HVfBDANAcCzsrmwo ImIgNG4g4HSzK46InCP3Zc3QkIYzVkbAmguk7s2n7W2+1jeQaLcU7734NKJxwACqZR ozh6eMwtvIYd9i6ynJCfL3h5ZAOIXNA3hgBvp3mIl3TYq1T6rA/4z811B4CDviG4fm Py+JBjYgy1GCUJrwZ2JDKW2oNkOV8RHnMKxCQemMpZLO9Ve897CMkiFJnBzw3WCkWB Sv4alrcukhvHvmiV89MtruhjFXVhIbJnbZG/lO2QUSR48PewR/ReNJ0ouXobpBPpxa XUboq9KPoitcQ== Received: by mail-wm1-f70.google.com with SMTP id l19-20020a05600c1d1300b003dc13fc9e42so2847213wms.3 for ; Fri, 27 Jan 2023 06:09:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MB6tARXi880QTsQwMRQ5MIMlnD9ffmA7vMVVeWbOrz8=; b=OdB7pKP3c6AtfWwqDV+3EfQC0yaYYyt+kPjr5ydA7sEYTYoQv8UANfPYyafErqeznr e77n8iOTn7jkcuAgtjMJ+jUaF5zO15T8IQDpAqsZaet31IWDtCMYHDoYFJzLYnqQo88h DIJPrzbg0lzcSb3Z/6SIXKJZO1H/AIR/TWi4+mLPu5V3u356PWhx6ovuuj8eBykSeTY/ kJGkYMeYTzsEmkS9hvP6qf1H0z03jsHCnaLK8sjGntIQ6O6qgmGoWCW17DiCQKnPYGLW Uenb/N1KmBA0Zz5mGEfQPefXkBuVRGCJ5FTruj0DGyOPirEVkN/AwLJ8Z010gTOHGiZW fp3w== X-Gm-Message-State: AFqh2kqcz88ky5w6DSYZuYkqvfiVaJgrdU15dl7sL9mj0sRg/MO9ccF0 Hf4+8K+xGlAlXCPZdfjRTK0Vhjq1OoRbuHNGbxCK34V/7G1ctGQ8YvW8t0eQzKHYvIIN5KHF9lp gquN7kWUqEqYj0n0Rax4Yk+9j5Dmf9q8MAnXQI3nK1Q== X-Received: by 2002:a5d:620a:0:b0:2bb:6b92:d4cc with SMTP id y10-20020a5d620a000000b002bb6b92d4ccmr32293115wru.53.1674828589670; Fri, 27 Jan 2023 06:09:49 -0800 (PST) X-Google-Smtp-Source: AMrXdXtjtC5+weCOvH9xY9DjnN1e6FzPPGLY0FEoGkcu1j4DBQe6IhUm9IRhuwIfUoi0c6giIHmbZA== X-Received: by 2002:a5d:620a:0:b0:2bb:6b92:d4cc with SMTP id y10-20020a5d620a000000b002bb6b92d4ccmr32293067wru.53.1674828588933; Fri, 27 Jan 2023 06:09:48 -0800 (PST) Received: from qwirkle.internal ([81.2.157.149]) by smtp.gmail.com with ESMTPSA id f21-20020a5d58f5000000b00236883f2f5csm4105833wrd.94.2023.01.27.06.09.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Jan 2023 06:09:48 -0800 (PST) From: Andrei Gherzan To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan Cc: Andrei Gherzan , netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org Subject: [PATCH v3 2/3] selftests: net: Unify references to nat6to4.o when running udpgro_frglist.sh Date: Fri, 27 Jan 2023 14:09:43 +0000 Message-Id: <20230127140944.265135-2-andrei.gherzan@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230127140944.265135-1-andrei.gherzan@canonical.com> References: <20230127140944.265135-1-andrei.gherzan@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This change refactors the nat6to4.o references to use a variable for consistency and also reformats two long lines. Signed-off-by: Andrei Gherzan --- tools/testing/selftests/net/udpgro_frglist.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/net/udpgro_frglist.sh b/tools/testing/selftests/net/udpgro_frglist.sh index 0a6359bed0b9..e1ca49de2491 100755 --- a/tools/testing/selftests/net/udpgro_frglist.sh +++ b/tools/testing/selftests/net/udpgro_frglist.sh @@ -6,6 +6,7 @@ readonly PEER_NS="ns-peer-$(mktemp -u XXXXXX)" BPF_FILE="../bpf/xdp_dummy.bpf.o" +BPF_NAT6TO4_FILE="nat6to4.o" cleanup() { local -r jobs="$(jobs -p)" @@ -40,9 +41,13 @@ run_one() { ip -n "${PEER_NS}" link set veth1 xdp object ${BPF_FILE} section xdp tc -n "${PEER_NS}" qdisc add dev veth1 clsact - tc -n "${PEER_NS}" filter add dev veth1 ingress prio 4 protocol ipv6 bpf object-file nat6to4.o section schedcls/ingress6/nat_6 direct-action - tc -n "${PEER_NS}" filter add dev veth1 egress prio 4 protocol ip bpf object-file nat6to4.o section schedcls/egress4/snat4 direct-action - echo ${rx_args} + tc -n "${PEER_NS}" filter add dev veth1 ingress prio 4 protocol \ + ipv6 bpf object-file "$BPF_NAT6TO4_FILE" section \ + schedcls/ingress6/nat_6 direct-action + tc -n "${PEER_NS}" filter add dev veth1 egress prio 4 protocol \ + ip bpf object-file "$BPF_NAT6TO4_FILE" section \ + schedcls/egress4/snat4 direct-action + echo ${rx_args} ip netns exec "${PEER_NS}" ./udpgso_bench_rx ${rx_args} -r & # Hack: let bg programs complete the startup @@ -88,7 +93,7 @@ if [ ! -f ${BPF_FILE} ]; then exit -1 fi -if [ ! -f nat6to4.o ]; then +if [ ! -f "$BPF_NAT6TO4_FILE" ]; then echo "Missing nat6to4 helper. Build bpf nat6to4.o selftest first" exit -1 fi -- 2.34.1