Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3012680pxj; Mon, 17 May 2021 15:33:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWFpLduffOi4tOOItKWS6PtuSkOmrHTmuqYIE/O+NoML4rXNtekxiOZ9SFuQKDmHFtoTE2 X-Received: by 2002:a05:6402:2786:: with SMTP id b6mr2941932ede.20.1621290802156; Mon, 17 May 2021 15:33:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621290802; cv=none; d=google.com; s=arc-20160816; b=DkIn4I95vO7zZTnylVK0CV9T//MHpXfyyOSFyHStOBY0RgJn+IdfChvtgNynfUIjRI 7lODOJFzayY5DG91+tEkNJyKt4SINM0akCTeeXWhaxLBQtrJWtxoAp7aSsChZ5mf+Vhv GWXtZz0AVUB419guktHx3YbWRSMp/m/jvVXVSy8Mi0dXegztYcTIhvjCvRumcXc+Ukh+ 8sLoikjrHHiYLlbUE/9wFDan+YNuuL5FqyWSEVNLo5Ix1AqKvTigNUbBETHodcgse9pp ftDHJfjfHpm4FiY+D64DNVU1kGGF/fYPo75L2/tMHnrOF7t919Tk0r3ZQxSWL/F3+zK3 c1hw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=DgsLWYgSlInw4uM3Sf1HPI+ucyAjqg8JcE/I6GPI29Y=; b=IT91tGEBZRoKN1J3upH8kxl4bWPSIf38ToVGrM+tiB+eRtq5mX3kti8dhG3eoO7ByJ 4ZHXY0KI9yizPGqeq+gWUIqARRlOEue2ZaB5sNnGo3IUplETPBkM7/OG+g/NDqCvq5IP VFetLcc52WV7LKgP5qBNF0KfmoNkaYq63zFML6laLIyMolbx2fUM/tbeia9G8h5KnqAH gyE7JvOOo1uBusNHojwTqkPFu8y/0paI2shqqPVXrIvkNSupSWjSxDWqKcqslqqzum5W Eg3eKoyn+DMhUaQbzozOsTadv70A1/h3xW2KZ5MgWa9KzP1LULkWSvKQbMobxk9YSufW Fd9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=BzZ9wWXj; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l15si9246239edv.507.2021.05.17.15.32.59; Mon, 17 May 2021 15:33:22 -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=@linuxfoundation.org header.s=korg header.b=BzZ9wWXj; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238564AbhEQOQA (ORCPT + 99 others); Mon, 17 May 2021 10:16:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:46734 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238482AbhEQONB (ORCPT ); Mon, 17 May 2021 10:13:01 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5E5AA61377; Mon, 17 May 2021 14:08:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621260507; bh=UWpbrYskpnh6yjz5JX5jnlSxDsV2p+ybcsR7Fj3BBc8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BzZ9wWXjZLDhMCuYtCaM0o/ZTlgJU+JWTbV4Z2KVaNiEJyJe/W4afRNuqH2YLAVeW iNpRE4a2xGUd902MzvyyGyBfG+/Z2fbyd24B5kGn1BMO/Hr5fcz+LFu/F/Pr2YtQ+l u0nqFw0RVVQlAGESv2NtmUYxb2pJRxseOTLLW6RA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Petr Machata , Jiri Pirko , "David S. Miller" , Sasha Levin Subject: [PATCH 5.12 113/363] selftests: mlxsw: Increase the tolerance of backlog buildup Date: Mon, 17 May 2021 15:59:39 +0200 Message-Id: <20210517140306.440088319@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140302.508966430@linuxfoundation.org> References: <20210517140302.508966430@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Petr Machata [ Upstream commit dda7f4fa55839baeb72ae040aeaf9ccf89d3e416 ] The intention behind this test is to make sure that qdisc limit is correctly projected to the HW. However, first, due to rounding in the qdisc, and then in the driver, the number cannot actually be accurate. And second, the approach to testing this is to oversubscribe the port with traffic generated on the same switch. The actual backlog size therefore fluctuates. In practice, this test proved to be noisier than the rest, and spuriously fails every now and then. Increase the tolerance to 10 % to avoid these issues. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh b/tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh index b0cb1aaffdda..33ddd01689be 100644 --- a/tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh +++ b/tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh @@ -507,8 +507,8 @@ do_red_test() check_err $? "backlog $backlog / $limit Got $pct% marked packets, expected == 0." local diff=$((limit - backlog)) pct=$((100 * diff / limit)) - ((0 <= pct && pct <= 5)) - check_err $? "backlog $backlog / $limit expected <= 5% distance" + ((0 <= pct && pct <= 10)) + check_err $? "backlog $backlog / $limit expected <= 10% distance" log_test "TC $((vlan - 10)): RED backlog > limit" stop_traffic -- 2.30.2