Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp54307ybg; Mon, 8 Jun 2020 16:14:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxkEXm6p2ApqUKmloFGMmoy5OnYPXrvkLWvf92wXACorhEs55NzlTPoiy2h9H0+UNIjDDyM X-Received: by 2002:a17:906:f185:: with SMTP id gs5mr22139116ejb.223.1591658098215; Mon, 08 Jun 2020 16:14:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591658098; cv=none; d=google.com; s=arc-20160816; b=zpoP0J4OLEY3beXyF9/M1uNCoZsCOtrnRMcv4qSf4b6LXUVIMjrnr/6Fau4KDJgow7 i2lc9BRiP5HsZL+wj/M+A7Dlr/WmmBhmNJgOC9P0HA4nl96zn5dHKkeCvS67oMVotpGA GY8Mw+2iz5zw8Zu0qN4/jwJmxEie/LcY3BfaP3cZRRTJI+SEp9ssbx/hStvxxEngJ/zu aEko9EgIKTU4YC4hEwBkD0q5Q9E9FE5JmLUaf7BuhM7oZhRfGEwKdhDyOA5+/swI+Eht wEDg0B9wImPR7TMA7dBtjSZYgp8thwoZay5vAe0XgwOKjv11YElyghdlILzh1eZVe08z mBTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=iueb9JMHETvFoZSLzZET0Su25eZrmSpMS8KextMvtsA=; b=xZaf9Y5VE495UggfB55mTyAXaSHQq7Jp6ukwJrUL2IDMBHPOGfoDoC0ilIjK0U3OeS RC3eN1x7/mVEJoKLPJJVD1mDX6xDU72+WeO4IWn+RQt/CQuuUv0ui6aVqLF1f7521Amp 7Lkf5G1VP3BXg62XJh3fQ3fDndRP0RSxfc5cBcXPA5DmTJtx/AtlJzQ76VrhuWoZLoNQ hFnMKxXX6R2XwNZgmRPUGaDKQ1OdvYhD06t820N1cju3nFn6Jg+ZiW75byzzl8JMBNxa tzjk4NyaW9GEDts3eBmT53ozy0EpQW1HM0k34zC8m9X1o8LROta0eOZKLJHgBxaepqfC yJaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=obkwcwzb; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ce20si8954978ejb.748.2020.06.08.16.14.35; Mon, 08 Jun 2020 16:14:58 -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=@kernel.org header.s=default header.b=obkwcwzb; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729063AbgFHXMO (ORCPT + 99 others); Mon, 8 Jun 2020 19:12:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:56688 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728691AbgFHXKd (ORCPT ); Mon, 8 Jun 2020 19:10:33 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B157A208C7; Mon, 8 Jun 2020 23:10:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591657833; bh=XzVd0lZiloehEKPbTGLt3ZQh1nAHtnKqZP4nBXUXmCk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=obkwcwzbpIbWtaeuj3uZqhjNZKUyVz44iNhHIHkj+DqV3nn32cMLZrpqauoctFwGE /Mjp6ugZhc93HLt1aAfzqTyz4DjZkp57qbikKyhxqVoZAcu0BXFnBXTUUX4ecsenGh ZOwc/pCSHZIag9Ng1l6vTv8VJVoZDIIeZZdLN1Ho= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Vlad Buslov , "David S . Miller" , Sasha Levin , linux-kselftest@vger.kernel.org Subject: [PATCH AUTOSEL 5.7 203/274] selftests: fix flower parent qdisc Date: Mon, 8 Jun 2020 19:04:56 -0400 Message-Id: <20200608230607.3361041-203-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200608230607.3361041-1-sashal@kernel.org> References: <20200608230607.3361041-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vlad Buslov [ Upstream commit 0531b0357ba37464e5c0033e1b7c69bbf5ecd8fb ] Flower tests used to create ingress filter with specified parent qdisc "parent ffff:" but dump them on "ingress". With recent commit that fixed tcm_parent handling in dump those are not considered same parent anymore, which causes iproute2 tc to emit additional "parent ffff:" in first line of filter dump output. The change in output causes filter match in tests to fail. Prevent parent qdisc output when dumping filters in flower tests by always correctly specifying "ingress" parent both when creating and dumping filters. Fixes: a7df4870d79b ("net_sched: fix tcm_parent in tc filter dump") Signed-off-by: Vlad Buslov Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- .../selftests/tc-testing/tc-tests/filters/tests.json | 6 +++--- tools/testing/selftests/tc-testing/tdc_batch.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/testing/selftests/tc-testing/tc-tests/filters/tests.json b/tools/testing/selftests/tc-testing/tc-tests/filters/tests.json index 8877f7b2b809..12aa4bc1f6a0 100644 --- a/tools/testing/selftests/tc-testing/tc-tests/filters/tests.json +++ b/tools/testing/selftests/tc-testing/tc-tests/filters/tests.json @@ -32,7 +32,7 @@ "setup": [ "$TC qdisc add dev $DEV2 ingress" ], - "cmdUnderTest": "$TC filter add dev $DEV2 protocol ip pref 1 parent ffff: handle 0xffffffff flower action ok", + "cmdUnderTest": "$TC filter add dev $DEV2 protocol ip pref 1 ingress handle 0xffffffff flower action ok", "expExitCode": "0", "verifyCmd": "$TC filter show dev $DEV2 ingress", "matchPattern": "filter protocol ip pref 1 flower.*handle 0xffffffff", @@ -77,9 +77,9 @@ }, "setup": [ "$TC qdisc add dev $DEV2 ingress", - "$TC filter add dev $DEV2 protocol ip prio 1 parent ffff: flower dst_mac e4:11:22:11:4a:51 src_mac e4:11:22:11:4a:50 ip_proto tcp src_ip 1.1.1.1 dst_ip 2.2.2.2 action drop" + "$TC filter add dev $DEV2 protocol ip prio 1 ingress flower dst_mac e4:11:22:11:4a:51 src_mac e4:11:22:11:4a:50 ip_proto tcp src_ip 1.1.1.1 dst_ip 2.2.2.2 action drop" ], - "cmdUnderTest": "$TC filter add dev $DEV2 protocol ip prio 1 parent ffff: flower dst_mac e4:11:22:11:4a:51 src_mac e4:11:22:11:4a:50 ip_proto tcp src_ip 1.1.1.1 dst_ip 2.2.2.2 action drop", + "cmdUnderTest": "$TC filter add dev $DEV2 protocol ip prio 1 ingress flower dst_mac e4:11:22:11:4a:51 src_mac e4:11:22:11:4a:50 ip_proto tcp src_ip 1.1.1.1 dst_ip 2.2.2.2 action drop", "expExitCode": "2", "verifyCmd": "$TC -s filter show dev $DEV2 ingress", "matchPattern": "filter protocol ip pref 1 flower chain 0 handle", diff --git a/tools/testing/selftests/tc-testing/tdc_batch.py b/tools/testing/selftests/tc-testing/tdc_batch.py index 6a2bd2cf528e..995f66ce43eb 100755 --- a/tools/testing/selftests/tc-testing/tdc_batch.py +++ b/tools/testing/selftests/tc-testing/tdc_batch.py @@ -72,21 +72,21 @@ mac_prefix = args.mac_prefix def format_add_filter(device, prio, handle, skip, src_mac, dst_mac, share_action): - return ("filter add dev {} {} protocol ip parent ffff: handle {} " + return ("filter add dev {} {} protocol ip ingress handle {} " " flower {} src_mac {} dst_mac {} action drop {}".format( device, prio, handle, skip, src_mac, dst_mac, share_action)) def format_rep_filter(device, prio, handle, skip, src_mac, dst_mac, share_action): - return ("filter replace dev {} {} protocol ip parent ffff: handle {} " + return ("filter replace dev {} {} protocol ip ingress handle {} " " flower {} src_mac {} dst_mac {} action drop {}".format( device, prio, handle, skip, src_mac, dst_mac, share_action)) def format_del_filter(device, prio, handle, skip, src_mac, dst_mac, share_action): - return ("filter del dev {} {} protocol ip parent ffff: handle {} " + return ("filter del dev {} {} protocol ip ingress handle {} " "flower".format(device, prio, handle)) -- 2.25.1