Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1918164pxy; Mon, 2 Aug 2021 13:52:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxS+l2tx4l+lB4JZydhycjehxBFXRqmV1EGHuGtQaR4W417Fdzx6qVFRlcnL8Bug8IW5wOY X-Received: by 2002:a92:ca8f:: with SMTP id t15mr69081ilo.262.1627937535744; Mon, 02 Aug 2021 13:52:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627937535; cv=none; d=google.com; s=arc-20160816; b=InHFW3mzIT+rBA8AMCQQY4UfakgakMHmbXknFCgWDBB1526mY/1ZgQTJAP+QLE3DZF mUceMWQBL91sy4SA59IFjaj+7ABKFtunAHe3wtL3Q3JSBtqccqUTVOgW8fk0zcoCq4aN 5gnR1OqTCNyLm/yTUceVNEg+ZfHtVm3+4KMg9vNI4Lp3Kc6tejr25B2Zy99ZUgrx6Ckk 5GDMAWkttFnlHj47/qKCmDKKg12FSTy+w6pRj8EeVGkRceDVVS6AH8NQDEjzLIAHjUYg M79uqQl0paUWv5ppKABO7TcU/H/X+q+ibALKF8kwPMeZndb9MxiuW+hwd887YYS/NeBf skpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=cI3bAw8ypmiDHJdkJBXoE/YVWFtSuOmaJtoMVmodDns=; b=nNhpMTw03GVpI1I+gViV88pmHoJU8TeMokUJPbZN3fYqQRB8iNITJWJhGBebChTKEm a6cXlgnYjjEAaDqaHbObrgvmlvjLE4SOug26tbUE8oBNu2GkcaoUqA6qbEWOa1U+pTww EJC5+zkmCU9+ykvpPsdMQFb333sHF7OkoMmp406h0Y0M06PJ946wTq2Pkb9VfdZyIRlW UF0ze8juQPPEpHOfYJC1B4/hv5Mh19eTKOBD+n6BupBn+gz6HGRBGUJIcaM3z+m9FZcK zT9P9hXgEIjvs7bGptzy9C3bb5xCzLyv5oGCGkRfKVicixZcyz2sVosceNHqwWfozlnt RpxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=df+Nxs07; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b2si9626288jad.13.2021.08.02.13.52.03; Mon, 02 Aug 2021 13:52:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=df+Nxs07; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232127AbhHBUvJ (ORCPT + 99 others); Mon, 2 Aug 2021 16:51:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231433AbhHBUvI (ORCPT ); Mon, 2 Aug 2021 16:51:08 -0400 Received: from mail-qt1-x82e.google.com (mail-qt1-x82e.google.com [IPv6:2607:f8b0:4864:20::82e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B0F9C06175F; Mon, 2 Aug 2021 13:50:58 -0700 (PDT) Received: by mail-qt1-x82e.google.com with SMTP id w10so12598004qtj.3; Mon, 02 Aug 2021 13:50:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cI3bAw8ypmiDHJdkJBXoE/YVWFtSuOmaJtoMVmodDns=; b=df+Nxs07hhZVldp5Si0NYQLfbLRt8i7Mw869Pdb/LIBoaZNpqGq8RZMVNst6CzxuXJ JPslwzdvx9RBZrHA8dcACcLvLu9/RpRXy2b+JIqBirQvw1vD2WWAZV4bDqyndC/qtLMK dCgPmROybIJ8/5fX5kT1JwdMdj4yXELSJbs1Kdv+TBw+3x8M5ZtFrYVLIuccrRTYzT6e wY3v0CTGnblF3pSsusQGAhXzqb2UwEatgSOY5S0q68UAf7nLoAFMXEW7RUTYA4GnW44F vcRcmp6ZX9ljfSSuFzcaNl+MR+eiS8vwyGUyD2z9QV+SLJChADH6sdl//hA81A1VNSu9 kchA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cI3bAw8ypmiDHJdkJBXoE/YVWFtSuOmaJtoMVmodDns=; b=ISWqBeC8QDlGTSPpQXK5U5ie//fD9g4jfbAnoRUeESguXvAm6acI3Gfy25gqR6VpRy aG75DRFLSowMehE41TfX+wYiSdOnXXTBVbf+IF7dKns5q8u3bADkzDoQlpO+71bIgp4Y cK4uQMkdWC1ZWcUlNXIWgEtCIUCVLt7M3lHJQZmeZRZDnD+D9cqDHb4FbojuVy5nekbH QJbAxsyuww4yS+/2WcMqPkPBrj5Av7lVTojLR43KngsCiK869y1RcuSt5T822tVXfeND AlpBDhGM8zU6nNplHhwAEMz1QcH1AasClaIPm/PcFtdEr+aU9nLusIoeExmLlz9by8XH SYcg== X-Gm-Message-State: AOAM531wz/KWBBb34ThsiMNn8ZbnQzQSt+j411AbnIgsJ+UMp2tct1xc h7bqDcHyaIai3j7wnfcfjg== X-Received: by 2002:ac8:7e86:: with SMTP id w6mr16025808qtj.194.1627937457370; Mon, 02 Aug 2021 13:50:57 -0700 (PDT) Received: from bytedance.attlocal.net (ec2-13-57-97-131.us-west-1.compute.amazonaws.com. [13.57.97.131]) by smtp.gmail.com with ESMTPSA id f12sm6570944qke.37.2021.08.02.13.50.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Aug 2021 13:50:56 -0700 (PDT) From: Peilin Ye To: Shuah Khan , Jamal Hadi Salim , Cong Wang , Jiri Pirko , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Daniel Borkmann , Cong Wang , Peilin Ye , Peilin Ye Subject: [PATCH net-next 2/2] tc-testing/ingress: Add control-plane selftests for clsact egress mini-Qdisc option Date: Mon, 2 Aug 2021 13:50:36 -0700 Message-Id: <165f9fb53d04c62e11f87c98ee317fb9a5aaa277.1627936393.git.peilin.ye@bytedance.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <1931ca440b47344fe357d5438aeab4b439943d10.1627936393.git.peilin.ye@bytedance.com> References: <1931ca440b47344fe357d5438aeab4b439943d10.1627936393.git.peilin.ye@bytedance.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peilin Ye Recently we added a new clsact egress mini-Qdisc option for sch_ingress. Add a few control-plane tdc.py selftests for it. Depends on kernel patch "net/sched: sch_ingress: Support clsact egress mini-Qdisc option", as well as iproute2 patch "tc/ingress: Introduce clsact egress mini-Qdisc option". Reviewed-by: Cong Wang Signed-off-by: Peilin Ye --- .../tc-testing/tc-tests/qdiscs/ingress.json | 84 +++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/tools/testing/selftests/tc-testing/tc-tests/qdiscs/ingress.json b/tools/testing/selftests/tc-testing/tc-tests/qdiscs/ingress.json index d99dba6e2b1a..2cde11b2ea9b 100644 --- a/tools/testing/selftests/tc-testing/tc-tests/qdiscs/ingress.json +++ b/tools/testing/selftests/tc-testing/tc-tests/qdiscs/ingress.json @@ -98,5 +98,89 @@ "teardown": [ "$IP link del dev $DUMMY type dummy" ] + }, + { + "id": "8e8c", + "name": "Enable clsact egress mini-qdisc for ingress", + "category": [ + "qdisc", + "ingress" + ], + "setup": [ + "$IP link add dev $DUMMY type dummy || /bin/true", + "$TC qdisc add dev $DUMMY ingress" + ], + "cmdUnderTest": "$TC qdisc change dev $DUMMY ingress clsact-on", + "expExitCode": "0", + "verifyCmd": "$TC qdisc show dev $DUMMY", + "matchPattern": "qdisc ingress ffff:.*clsact", + "matchCount": "1", + "teardown": [ + "$IP link del dev $DUMMY type dummy" + ] + }, + { + "id": "3a76", + "name": "Disable clsact egress mini-qdisc for ingress", + "category": [ + "qdisc", + "ingress" + ], + "setup": [ + "$IP link add dev $DUMMY type dummy || /bin/true", + "$TC qdisc add dev $DUMMY ingress", + "$TC qdisc change dev $DUMMY ingress clsact-on" + ], + "cmdUnderTest": "$TC qdisc change dev $DUMMY ingress clsact-off", + "expExitCode": "0", + "verifyCmd": "$TC qdisc show dev $DUMMY", + "matchPattern": "qdisc ingress ffff:.*clsact", + "matchCount": "0", + "teardown": [ + "$IP link del dev $DUMMY type dummy" + ] + }, + { + "id": "7b2b", + "name": "Enable clsact egress mini-qdisc for ingress twice", + "category": [ + "qdisc", + "ingress" + ], + "setup": [ + "$IP link add dev $DUMMY type dummy || /bin/true", + "$TC qdisc add dev $DUMMY ingress", + "$TC qdisc change dev $DUMMY ingress clsact-on" + ], + "cmdUnderTest": "$TC qdisc change dev $DUMMY ingress clsact-on", + "expExitCode": "2", + "verifyCmd": "$TC qdisc show dev $DUMMY", + "matchPattern": "qdisc ingress ffff:.*clsact", + "matchCount": "1", + "teardown": [ + "$IP link del dev $DUMMY type dummy" + ] + }, + { + "id": "05ab", + "name": "Disable clsact egress mini-qdisc for ingress twice", + "category": [ + "qdisc", + "ingress" + ], + "setup": [ + "$IP link add dev $DUMMY type dummy || /bin/true", + "$TC qdisc add dev $DUMMY ingress", + "$TC qdisc change dev $DUMMY ingress clsact-on", + "$TC qdisc change dev $DUMMY ingress clsact-off" + ], + "cmdUnderTest": "$TC qdisc change dev $DUMMY ingress clsact-off", + "expExitCode": "2", + "verifyCmd": "$TC qdisc show dev $DUMMY", + "matchPattern": "qdisc ingress ffff:.*clsact", + "matchCount": "0", + "teardown": [ + "$IP link del dev $DUMMY type dummy" + ] } ] -- 2.20.1