From patchwork Thu Jun 14 16:04:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kodanev X-Patchwork-Id: 929534 X-Patchwork-Delegate: petr.vorel@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=oracle.com header.i=@oracle.com header.b="QaDzzU0M"; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4167W51vFyz9ry1 for ; Fri, 15 Jun 2018 01:55:27 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 6B4BC1A9819 for ; Thu, 14 Jun 2018 17:55:24 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-2.smtp.seeweb.it (in-2.smtp.seeweb.it [IPv6:2001:4b78:1:20::2]) by picard.linux.it (Postfix) with ESMTP id 2E62F1A96C8 for ; Thu, 14 Jun 2018 17:55:22 +0200 (CEST) Received: from aserp2130.oracle.com (aserp2130.oracle.com [141.146.126.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by in-2.smtp.seeweb.it (Postfix) with ESMTPS id 26D3E601CDA for ; Thu, 14 Jun 2018 17:55:21 +0200 (CEST) Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w5EFsOVH105424 for ; Thu, 14 Jun 2018 15:55:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id; s=corp-2017-10-26; bh=bMqKNHlWLxceAVh4opL/lqtKzoncbAYfl103b7iTNaU=; b=QaDzzU0MMBjfOhyQKFz+Nooh9UQgRLqpUCQK8FjLmsSsKZtXDArzATtnQdeZVYIgzb1u hA+bvc+DZvGzLsjrKOsM8QNoctjGRugipJw6p0lDJ41iXtrzdAnkC2rqjqyv+TY18Fn1 707jaUVPXaRvAVcPiA4VHZ2NURRr1IxV7C3QS0RYWwWfh7rwrkW5NR5oZCLWEm5YNn8/ ZbCCh25C1jkeMi+k6aEdK+aAhbH7YQoZPA+5eoV1MlNh7dnY5HbpMb0rohuP1RXODtk7 kEMTBvA7hUZVoSDCWJSzV7t+MRWYXhwLqcbk3rhXnzlIHvPlLJRtTPuQsSClnZ4C8bRK Ag== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2130.oracle.com with ESMTP id 2jk0xqwqm9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 14 Jun 2018 15:55:19 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w5EFtIZ9019160 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 14 Jun 2018 15:55:18 GMT Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w5EFtI2O022091 for ; Thu, 14 Jun 2018 15:55:18 GMT Received: from ak.ru.oracle.com (/10.162.80.29) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 14 Jun 2018 08:55:17 -0700 From: Alexey Kodanev To: ltp@lists.linux.it Date: Thu, 14 Jun 2018 19:04:54 +0300 Message-Id: <1528992297-23920-1-git-send-email-alexey.kodanev@oracle.com> X-Mailer: git-send-email 1.7.1 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8923 signatures=668702 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=722 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806140174 X-Virus-Scanned: clamav-milter 0.99.2 at in-2.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, SPF_HELO_PASS, SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-2.smtp.seeweb.it Subject: [LTP] [PATCH 1/4] network/busy_poll: use smaller packets and a single thread X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" This should make the results more stable for better performance comparison with/without busy polling. Signed-off-by: Alexey Kodanev Acked-by: Petr Vorel --- Tested on ixgbe NIC testcases/network/busy_poll/busy_poll01.sh | 2 +- testcases/network/busy_poll/busy_poll02.sh | 2 +- testcases/network/busy_poll/busy_poll03.sh | 3 ++- testcases/network/busy_poll/busy_poll_lib.sh | 3 +++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/testcases/network/busy_poll/busy_poll01.sh b/testcases/network/busy_poll/busy_poll01.sh index 12d3cb5..a9c8cbd 100755 --- a/testcases/network/busy_poll/busy_poll01.sh +++ b/testcases/network/busy_poll/busy_poll01.sh @@ -58,7 +58,7 @@ trap "tst_brkm TBROK 'test interrupted'" INT for x in 50 0; do tst_resm TINFO "set low latency busy poll to $x" set_busy_poll $x - tst_netload -H $(tst_ipaddr rhost) -d res_$x + tst_netload -H $(tst_ipaddr rhost) -n 10 -N 10 -d res_$x done poll_cmp=$(( 100 - ($(cat res_50) * 100) / $(cat res_0) )) diff --git a/testcases/network/busy_poll/busy_poll02.sh b/testcases/network/busy_poll/busy_poll02.sh index 4873dc3..95eeee3 100755 --- a/testcases/network/busy_poll/busy_poll02.sh +++ b/testcases/network/busy_poll/busy_poll02.sh @@ -49,7 +49,7 @@ trap "tst_brkm TBROK 'test interrupted'" INT for x in 50 0; do tst_resm TINFO "set low latency busy poll to $x per socket" set_busy_poll $x - tst_netload -H $(tst_ipaddr rhost) -d res_$x -b $x + tst_netload -H $(tst_ipaddr rhost) -n 10 -N 10 -d res_$x -b $x done poll_cmp=$(( 100 - ($(cat res_50) * 100) / $(cat res_0) )) diff --git a/testcases/network/busy_poll/busy_poll03.sh b/testcases/network/busy_poll/busy_poll03.sh index 0144465..699bee2 100755 --- a/testcases/network/busy_poll/busy_poll03.sh +++ b/testcases/network/busy_poll/busy_poll03.sh @@ -51,7 +51,8 @@ do_test() for x in 50 0; do tst_resm TINFO "set low latency busy poll to $x per $1 socket" set_busy_poll $x - tst_netload -H $(tst_ipaddr rhost) -d res_$x -b $x -T $1 + tst_netload -H $(tst_ipaddr rhost) -n 10 -N 10 -d res_$x \ + -b $x -T $1 done poll_cmp=$(( 100 - ($(cat res_50) * 100) / $(cat res_0) )) diff --git a/testcases/network/busy_poll/busy_poll_lib.sh b/testcases/network/busy_poll/busy_poll_lib.sh index a00c74d..271c01b 100755 --- a/testcases/network/busy_poll/busy_poll_lib.sh +++ b/testcases/network/busy_poll/busy_poll_lib.sh @@ -14,6 +14,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# for more stable results set to a single thread +TST_NETLOAD_CLN_NUMBER=1 + if tst_kvcmp -lt "3.11"; then tst_brkm TCONF "test must be run with kernel 3.11 or newer" fi From patchwork Thu Jun 14 16:04:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kodanev X-Patchwork-Id: 929535 X-Patchwork-Delegate: petr.vorel@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=oracle.com header.i=@oracle.com header.b="bdyc3suZ"; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4167W72pX6z9s19 for ; Fri, 15 Jun 2018 01:55:31 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 95B851A9A71 for ; Thu, 14 Jun 2018 17:55:28 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-3.smtp.seeweb.it (in-3.smtp.seeweb.it [217.194.8.3]) by picard.linux.it (Postfix) with ESMTP id 8080E1A96C8 for ; Thu, 14 Jun 2018 17:55:23 +0200 (CEST) Received: from aserp2120.oracle.com (aserp2120.oracle.com [141.146.126.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by in-3.smtp.seeweb.it (Postfix) with ESMTPS id 6C8BA1A0107B for ; Thu, 14 Jun 2018 17:55:22 +0200 (CEST) Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w5EFsMTU038595 for ; Thu, 14 Jun 2018 15:55:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=corp-2017-10-26; bh=VzEOBKNSbp7yaOzycA1KihPEcokUIvcBuasa/z0W+tk=; b=bdyc3suZoKRbUi6B2tQLYPH4QV21AN0qiyt3el5eSGRg8/L8fsuSlxG0F7EaBZ3blh0J 09miAu7rqWD0CUvAgFbBAcAgX8DTjYq/AZEHsa/plDxCpQRq/U+ItH88Zg+YGI2xep24 4qk1Iaevxl4yt0GL0fRa+XKihACrJLRvv/yGR7kSI2T0MZjYQ8oKPBPbxa6PPYi4JI1G 3c0jgaKBi+O+vwBUDFjjuUjOYfDEs0jNOmBMiig3uaNLttH/CmNfgyafEArhTpX+l2V6 VVtkR2gl1VHUygXgmIPS8Wmyf2xaqJjsOnUiHCjNiHnKNw3Lmj49T7eNIRSbfhRxGUYF jg== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2120.oracle.com with ESMTP id 2jk0xrnqc1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 14 Jun 2018 15:55:20 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w5EFtJMU012709 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 14 Jun 2018 15:55:19 GMT Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w5EFtJ32022095 for ; Thu, 14 Jun 2018 15:55:19 GMT Received: from ak.ru.oracle.com (/10.162.80.29) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 14 Jun 2018 08:55:18 -0700 From: Alexey Kodanev To: ltp@lists.linux.it Date: Thu, 14 Jun 2018 19:04:55 +0300 Message-Id: <1528992297-23920-2-git-send-email-alexey.kodanev@oracle.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1528992297-23920-1-git-send-email-alexey.kodanev@oracle.com> References: <1528992297-23920-1-git-send-email-alexey.kodanev@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8923 signatures=668702 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=789 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806140174 X-Virus-Scanned: clamav-milter 0.99.2 at in-3.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, SPF_HELO_PASS, SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-3.smtp.seeweb.it Subject: [LTP] [PATCH 2/4] network/busy_poll: use SPDX-License-Identifier X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Alexey Kodanev Acked-by: Petr Vorel --- testcases/network/busy_poll/Makefile | 16 ++-------------- testcases/network/busy_poll/busy_poll01.sh | 17 ++--------------- testcases/network/busy_poll/busy_poll02.sh | 17 ++--------------- testcases/network/busy_poll/busy_poll03.sh | 15 +-------------- testcases/network/busy_poll/busy_poll_lib.sh | 16 ++-------------- 5 files changed, 9 insertions(+), 72 deletions(-) diff --git a/testcases/network/busy_poll/Makefile b/testcases/network/busy_poll/Makefile index 8feb006..3a85c7d 100644 --- a/testcases/network/busy_poll/Makefile +++ b/testcases/network/busy_poll/Makefile @@ -1,17 +1,5 @@ -# Copyright (c) 2015-2016 Oracle and/or its affiliates. All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it would be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2015-2018 Oracle and/or its affiliates. All Rights Reserved. top_srcdir ?= ../../.. diff --git a/testcases/network/busy_poll/busy_poll01.sh b/testcases/network/busy_poll/busy_poll01.sh index a9c8cbd..5c59643 100755 --- a/testcases/network/busy_poll/busy_poll01.sh +++ b/testcases/network/busy_poll/busy_poll01.sh @@ -1,21 +1,8 @@ #!/bin/sh -# Copyright (c) 2015-2016 Oracle and/or its affiliates. All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it would be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2015-2018 Oracle and/or its affiliates. All Rights Reserved. # # Author: Alexey Kodanev -# TST_TOTAL=1 TCID="busy_poll01" diff --git a/testcases/network/busy_poll/busy_poll02.sh b/testcases/network/busy_poll/busy_poll02.sh index 95eeee3..f0e4a0e 100755 --- a/testcases/network/busy_poll/busy_poll02.sh +++ b/testcases/network/busy_poll/busy_poll02.sh @@ -1,21 +1,8 @@ #!/bin/sh -# Copyright (c) 2015-2016 Oracle and/or its affiliates. All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it would be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2015-2018 Oracle and/or its affiliates. All Rights Reserved. # # Author: Alexey Kodanev -# TST_TOTAL=1 TCID="busy_poll02" diff --git a/testcases/network/busy_poll/busy_poll03.sh b/testcases/network/busy_poll/busy_poll03.sh index 699bee2..b5fb28e 100755 --- a/testcases/network/busy_poll/busy_poll03.sh +++ b/testcases/network/busy_poll/busy_poll03.sh @@ -1,21 +1,8 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (c) 2016-2018 Oracle and/or its affiliates. # -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it would be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# # Author: Alexey Kodanev -# TST_TOTAL=2 TCID="busy_poll03" diff --git a/testcases/network/busy_poll/busy_poll_lib.sh b/testcases/network/busy_poll/busy_poll_lib.sh index 271c01b..6b2de07 100755 --- a/testcases/network/busy_poll/busy_poll_lib.sh +++ b/testcases/network/busy_poll/busy_poll_lib.sh @@ -1,18 +1,6 @@ #!/bin/sh -# Copyright (c) 2016 Oracle and/or its affiliates. All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it would be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2016-2018 Oracle and/or its affiliates. All Rights Reserved. # for more stable results set to a single thread TST_NETLOAD_CLN_NUMBER=1 From patchwork Thu Jun 14 16:04:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kodanev X-Patchwork-Id: 929536 X-Patchwork-Delegate: petr.vorel@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=oracle.com header.i=@oracle.com header.b="rof2hccD"; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4167WD1DTdz9ry1 for ; Fri, 15 Jun 2018 01:55:34 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 3DED61A9B0A for ; Thu, 14 Jun 2018 17:55:32 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-2.smtp.seeweb.it (in-2.smtp.seeweb.it [217.194.8.2]) by picard.linux.it (Postfix) with ESMTP id 144F71A96FA for ; Thu, 14 Jun 2018 17:55:24 +0200 (CEST) Received: from aserp2120.oracle.com (aserp2120.oracle.com [141.146.126.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by in-2.smtp.seeweb.it (Postfix) with ESMTPS id 437F4600BDC for ; Thu, 14 Jun 2018 17:55:23 +0200 (CEST) Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w5EFsPsr038612 for ; Thu, 14 Jun 2018 15:55:21 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=corp-2017-10-26; bh=aVvNbobaPgOjNeBTDxDc5G+aT8HJRsEXUyrlIuj1RPw=; b=rof2hccD1/WOFO5/xdIEQYnu/EGMPzW3WVQPLLNaghsIlBMtAHtXlZPqEKrQljWoXZVF D/I39Bkbu7xPt2QjboGyEZQBmMv2fuJBIvYsRglXVkiwELBfsZXmvS69QRJtvRhHy8lV sREAP0EZUu7P+efroW1bPNkLNeSfjxVnhIQIsDSZ6zCnye3OJiWo0CD0Ph2fPG+yzNRu y8+pVy8G+QxfrksE7PdmfF9YCmKc7CDE1Zy8QeFSW64H7V8Y37DyHn1aYLE/iUCB+oga uZHx1dhCntOxSkb5bPGJTUgm1gw2GZzVpa/gsVEw+fzc/5BMzA9bIO7JRMRoJ8sMlWyW yA== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2120.oracle.com with ESMTP id 2jk0xrnqc4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 14 Jun 2018 15:55:21 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w5EFtK4h012746 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 14 Jun 2018 15:55:20 GMT Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w5EFtKjL006320 for ; Thu, 14 Jun 2018 15:55:20 GMT Received: from ak.ru.oracle.com (/10.162.80.29) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 14 Jun 2018 08:55:19 -0700 From: Alexey Kodanev To: ltp@lists.linux.it Date: Thu, 14 Jun 2018 19:04:56 +0300 Message-Id: <1528992297-23920-3-git-send-email-alexey.kodanev@oracle.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1528992297-23920-1-git-send-email-alexey.kodanev@oracle.com> References: <1528992297-23920-1-git-send-email-alexey.kodanev@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8923 signatures=668702 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=899 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806140174 X-Virus-Scanned: clamav-milter 0.99.2 at in-2.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, SPF_HELO_PASS, SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-2.smtp.seeweb.it Subject: [LTP] [PATCH 3/4] network/busy_poll: convert to new API X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Alexey Kodanev Acked-by: Petr Vorel --- testcases/network/busy_poll/busy_poll01.sh | 53 ++++++++++++------------- testcases/network/busy_poll/busy_poll02.sh | 49 +++++++++++------------- testcases/network/busy_poll/busy_poll03.sh | 35 +++++++---------- testcases/network/busy_poll/busy_poll_lib.sh | 44 ++++++++++++---------- 4 files changed, 86 insertions(+), 95 deletions(-) diff --git a/testcases/network/busy_poll/busy_poll01.sh b/testcases/network/busy_poll/busy_poll01.sh index 5c59643..1749e52 100755 --- a/testcases/network/busy_poll/busy_poll01.sh +++ b/testcases/network/busy_poll/busy_poll01.sh @@ -4,18 +4,10 @@ # # Author: Alexey Kodanev -TST_TOTAL=1 -TCID="busy_poll01" -TST_NEEDS_TMPDIR=1 - -TST_USE_LEGACY_API=1 -. tst_net.sh . busy_poll_lib.sh cleanup() { - tst_rmdir - sysctl -q -w net.core.busy_read=$busy_read_old sysctl -q -w net.core.busy_poll=$busy_poll_old @@ -33,27 +25,32 @@ set_busy_poll() tst_rhost_run -s -c "sysctl -q -w net.core.busy_poll=$value" } -busy_read_old="$(cat /proc/sys/net/core/busy_read)" -busy_poll_old="$(cat /proc/sys/net/core/busy_poll)" - -rbusy_read_old=$(tst_rhost_run -c 'cat /proc/sys/net/core/busy_read') -rbusy_poll_old=$(tst_rhost_run -c 'cat /proc/sys/net/core/busy_poll') - -TST_CLEANUP="cleanup" -trap "tst_brkm TBROK 'test interrupted'" INT +setup() +{ + busy_poll_check_config -for x in 50 0; do - tst_resm TINFO "set low latency busy poll to $x" - set_busy_poll $x - tst_netload -H $(tst_ipaddr rhost) -n 10 -N 10 -d res_$x -done + busy_read_old="$(cat /proc/sys/net/core/busy_read)" + busy_poll_old="$(cat /proc/sys/net/core/busy_poll)" -poll_cmp=$(( 100 - ($(cat res_50) * 100) / $(cat res_0) )) + rbusy_read_old=$(tst_rhost_run -c 'cat /proc/sys/net/core/busy_read') + rbusy_poll_old=$(tst_rhost_run -c 'cat /proc/sys/net/core/busy_poll') +} -if [ "$poll_cmp" -lt 1 ]; then - tst_resm TFAIL "busy poll result is '$poll_cmp' %" -else - tst_resm TPASS "busy poll increased performance by '$poll_cmp' %" -fi +test() +{ + for x in 50 0; do + tst_res TINFO "set low latency busy poll to $x" + set_busy_poll $x + tst_netload -H $(tst_ipaddr rhost) -n 10 -N 10 -d res_$x + done + + local poll_cmp=$(( 100 - ($(cat res_50) * 100) / $(cat res_0) )) + + if [ "$poll_cmp" -lt 1 ]; then + tst_res TFAIL "busy poll result is '$poll_cmp' %" + else + tst_res TPASS "busy poll increased performance by '$poll_cmp' %" + fi +} -tst_exit +tst_run diff --git a/testcases/network/busy_poll/busy_poll02.sh b/testcases/network/busy_poll/busy_poll02.sh index f0e4a0e..d0083c2 100755 --- a/testcases/network/busy_poll/busy_poll02.sh +++ b/testcases/network/busy_poll/busy_poll02.sh @@ -4,18 +4,10 @@ # # Author: Alexey Kodanev -TST_TOTAL=1 -TCID="busy_poll02" -TST_NEEDS_TMPDIR=1 - -TST_USE_LEGACY_API=1 -. tst_net.sh . busy_poll_lib.sh cleanup() { - tst_rmdir - sysctl -q -w net.core.busy_poll=$busy_poll_old tst_rhost_run -c "sysctl -q -w net.core.busy_poll=$rbusy_poll_old" } @@ -27,24 +19,29 @@ set_busy_poll() tst_rhost_run -s -c "sysctl -q -w net.core.busy_poll=$value" } -busy_poll_old="$(cat /proc/sys/net/core/busy_poll)" -rbusy_poll_old=$(tst_rhost_run -c 'cat /proc/sys/net/core/busy_poll') - -TST_CLEANUP="cleanup" -trap "tst_brkm TBROK 'test interrupted'" INT - -for x in 50 0; do - tst_resm TINFO "set low latency busy poll to $x per socket" - set_busy_poll $x - tst_netload -H $(tst_ipaddr rhost) -n 10 -N 10 -d res_$x -b $x -done +setup() +{ + busy_poll_check_config -poll_cmp=$(( 100 - ($(cat res_50) * 100) / $(cat res_0) )) + busy_poll_old="$(cat /proc/sys/net/core/busy_poll)" + rbusy_poll_old=$(tst_rhost_run -c 'cat /proc/sys/net/core/busy_poll') +} -if [ "$poll_cmp" -lt 1 ]; then - tst_resm TFAIL "busy poll result is '$poll_cmp' %" -else - tst_resm TPASS "busy poll increased performance by '$poll_cmp' %" -fi +test() +{ + for x in 50 0; do + tst_res TINFO "set low latency busy poll to $x per socket" + set_busy_poll $x + tst_netload -H $(tst_ipaddr rhost) -n 10 -N 10 -d res_$x -b $x + done + + local poll_cmp=$(( 100 - ($(cat res_50) * 100) / $(cat res_0) )) + + if [ "$poll_cmp" -lt 1 ]; then + tst_res TFAIL "busy poll result is '$poll_cmp' %" + else + tst_res TPASS "busy poll increased performance by '$poll_cmp' %" + fi +} -tst_exit +tst_run diff --git a/testcases/network/busy_poll/busy_poll03.sh b/testcases/network/busy_poll/busy_poll03.sh index b5fb28e..b55e220 100755 --- a/testcases/network/busy_poll/busy_poll03.sh +++ b/testcases/network/busy_poll/busy_poll03.sh @@ -4,18 +4,12 @@ # # Author: Alexey Kodanev -TST_TOTAL=2 -TCID="busy_poll03" -TST_NEEDS_TMPDIR=1 +TST_TEST_DATA="udp udp_lite" -TST_USE_LEGACY_API=1 -. tst_net.sh . busy_poll_lib.sh cleanup() { - tst_rmdir - sysctl -q -w net.core.busy_poll=$busy_poll_old tst_rhost_run -c "sysctl -q -w net.core.busy_poll=$rbusy_poll_old" } @@ -27,31 +21,30 @@ set_busy_poll() tst_rhost_run -s -c "sysctl -q -w net.core.busy_poll=$value" } -busy_poll_old="$(cat /proc/sys/net/core/busy_poll)" -rbusy_poll_old=$(tst_rhost_run -c 'cat /proc/sys/net/core/busy_poll') +setup() +{ + busy_poll_check_config -TST_CLEANUP="cleanup" -trap "tst_brkm TBROK 'test interrupted'" INT + busy_poll_old="$(cat /proc/sys/net/core/busy_poll)" + rbusy_poll_old=$(tst_rhost_run -c 'cat /proc/sys/net/core/busy_poll') +} -do_test() +test() { for x in 50 0; do - tst_resm TINFO "set low latency busy poll to $x per $1 socket" + tst_res TINFO "set low latency busy poll to $x per $2 socket" set_busy_poll $x tst_netload -H $(tst_ipaddr rhost) -n 10 -N 10 -d res_$x \ - -b $x -T $1 + -b $x -T $2 done - poll_cmp=$(( 100 - ($(cat res_50) * 100) / $(cat res_0) )) + local poll_cmp=$(( 100 - ($(cat res_50) * 100) / $(cat res_0) )) if [ "$poll_cmp" -lt 1 ]; then - tst_resm TFAIL "busy poll result is '$poll_cmp' %" + tst_res TFAIL "busy poll result is '$poll_cmp' %" else - tst_resm TPASS "busy poll increased performance by '$poll_cmp' %" + tst_res TPASS "busy poll increased performance by '$poll_cmp' %" fi } -do_test udp -do_test udp_lite - -tst_exit +tst_run diff --git a/testcases/network/busy_poll/busy_poll_lib.sh b/testcases/network/busy_poll/busy_poll_lib.sh index 6b2de07..5270a1b 100755 --- a/testcases/network/busy_poll/busy_poll_lib.sh +++ b/testcases/network/busy_poll/busy_poll_lib.sh @@ -2,28 +2,32 @@ # SPDX-License-Identifier: GPL-2.0-or-later # Copyright (c) 2016-2018 Oracle and/or its affiliates. All Rights Reserved. +TST_SETUP="setup" +TST_TESTFUNC="test" +TST_CLEANUP="cleanup" +TST_MIN_KVER="3.11" +TST_NEEDS_TMPDIR=1 +TST_NEEDS_ROOT=1 +TST_NEEDS_CMDS="pkill sysctl ethtool" # for more stable results set to a single thread TST_NETLOAD_CLN_NUMBER=1 -if tst_kvcmp -lt "3.11"; then - tst_brkm TCONF "test must be run with kernel 3.11 or newer" -fi +. tst_net.sh -if [ ! -f "/proc/sys/net/core/busy_read" -a \ - ! -f "/proc/sys/net/core/busy_poll" ]; then - tst_brkm TCONF "busy poll not configured, CONFIG_NET_RX_BUSY_POLL" -fi +busy_poll_check_config() +{ + if [ ! -f "/proc/sys/net/core/busy_read" -a \ + ! -f "/proc/sys/net/core/busy_poll" ]; then + tst_brk TCONF "busy poll not configured, CONFIG_NET_RX_BUSY_POLL" + fi -tst_check_cmds pkill sysctl ethtool - -if tst_kvcmp -lt "4.5"; then - ethtool --show-features $(tst_iface) | \ - grep -q 'busy-poll.*on' || \ - tst_brkm TCONF "busy poll not supported by driver" -else - drvs="bnx2x|bnxt|cxgb4|enic|benet|ixgbe|ixgbevf|mlx4|mlx5|myri10ge|sfc|virtio" - ethtool -i $(tst_iface) | grep -qE "driver: ($drvs)" || \ - tst_brkm TCONF "busy poll not supported" -fi - -tst_require_root + if tst_kvcmp -lt "4.5"; then + ethtool --show-features $(tst_iface) | \ + grep -q 'busy-poll.*on' || \ + tst_brk TCONF "busy poll not supported by driver" + else + drvs="bnx2x|bnxt|cxgb4|enic|benet|ixgbe|ixgbevf|mlx4|mlx5|myri10ge|sfc|virtio" + ethtool -i $(tst_iface) | grep -qE "driver: ($drvs)" || \ + tst_brk TCONF "busy poll not supported" + fi +} From patchwork Thu Jun 14 16:04:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kodanev X-Patchwork-Id: 929537 X-Patchwork-Delegate: petr.vorel@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=oracle.com header.i=@oracle.com header.b="mFfmFDsk"; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4167WH3CsSz9ry1 for ; Fri, 15 Jun 2018 01:55:39 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id DF2AA1A9B1F for ; Thu, 14 Jun 2018 17:55:36 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-2.smtp.seeweb.it (in-2.smtp.seeweb.it [IPv6:2001:4b78:1:20::2]) by picard.linux.it (Postfix) with ESMTP id 6073B1A980D for ; Thu, 14 Jun 2018 17:55:24 +0200 (CEST) Received: from userp2120.oracle.com (userp2120.oracle.com [156.151.31.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by in-2.smtp.seeweb.it (Postfix) with ESMTPS id C364E600127 for ; Thu, 14 Jun 2018 17:55:23 +0200 (CEST) Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w5EFsKhS192209 for ; Thu, 14 Jun 2018 15:55:22 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=corp-2017-10-26; bh=fI2tMKIufTO9iWXnhMD5OMWEKGR9w7L6fPfDZUZijVA=; b=mFfmFDsk9Q+i0bnNI7dbJJRql2R/h5XIjkR8RRB3++dritVhM4REpSmv3yqqd/seQyCg 0lolcV9Tt5DSKWPS0ro0SIrsRfXQfpUHrn2xeEjQjlUXnQSnRPPFzrMcPiNsZr4uOCz8 cHb/DmZY8BhCvwKFs+ztjyxT1lhYAivL6q3EEBx79F7GmDL9XbgIDB8C+KMoqXebqhKN /5GujQv3fYJLI8thi+Xi/80mNUF4ki8RYgUBphbX+Twd3zUCMcLH2KBCEWATDDvXz1Kn Te/vdI1HmWzWCEaQ3irwRtA4SDldru3JDMsfASep8SADYYHvLc+mXQjelL/WyRc5NkZC 3A== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2120.oracle.com with ESMTP id 2jk0xrdqsv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 14 Jun 2018 15:55:22 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w5EFtLDA015229 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 14 Jun 2018 15:55:21 GMT Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w5EFtL3Q022106 for ; Thu, 14 Jun 2018 15:55:21 GMT Received: from ak.ru.oracle.com (/10.162.80.29) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 14 Jun 2018 08:55:21 -0700 From: Alexey Kodanev To: ltp@lists.linux.it Date: Thu, 14 Jun 2018 19:04:57 +0300 Message-Id: <1528992297-23920-4-git-send-email-alexey.kodanev@oracle.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1528992297-23920-1-git-send-email-alexey.kodanev@oracle.com> References: <1528992297-23920-1-git-send-email-alexey.kodanev@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8923 signatures=668702 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=566 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806140174 X-Virus-Scanned: clamav-milter 0.99.2 at in-2.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, SPF_HELO_PASS, SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-2.smtp.seeweb.it Subject: [LTP] [PATCH 4/4] network/busy_poll: check that we changed sysctl knobs in cleanup X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Alexey Kodanev Acked-by: Petr Vorel --- testcases/network/busy_poll/busy_poll01.sh | 13 ++++++++----- testcases/network/busy_poll/busy_poll02.sh | 6 ++++-- testcases/network/busy_poll/busy_poll03.sh | 6 ++++-- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/testcases/network/busy_poll/busy_poll01.sh b/testcases/network/busy_poll/busy_poll01.sh index 1749e52..0023f6c 100755 --- a/testcases/network/busy_poll/busy_poll01.sh +++ b/testcases/network/busy_poll/busy_poll01.sh @@ -8,11 +8,14 @@ cleanup() { - sysctl -q -w net.core.busy_read=$busy_read_old - sysctl -q -w net.core.busy_poll=$busy_poll_old - - tst_rhost_run -c "sysctl -q -w net.core.busy_read=$rbusy_read_old" - tst_rhost_run -c "sysctl -q -w net.core.busy_poll=$rbusy_poll_old" + [ -n "$busy_read_old" ] && \ + sysctl -q -w net.core.busy_read=$busy_read_old + [ -n "$busy_poll_old" ] && \ + sysctl -q -w net.core.busy_poll=$busy_poll_old + [ -n "$rbusy_read_old" ] && \ + tst_rhost_run -c "sysctl -q -w net.core.busy_read=$rbusy_read_old" + [ -n "$rbusy_poll_old" ] && \ + tst_rhost_run -c "sysctl -q -w net.core.busy_poll=$rbusy_poll_old" } set_busy_poll() diff --git a/testcases/network/busy_poll/busy_poll02.sh b/testcases/network/busy_poll/busy_poll02.sh index d0083c2..1f25b73 100755 --- a/testcases/network/busy_poll/busy_poll02.sh +++ b/testcases/network/busy_poll/busy_poll02.sh @@ -8,8 +8,10 @@ cleanup() { - sysctl -q -w net.core.busy_poll=$busy_poll_old - tst_rhost_run -c "sysctl -q -w net.core.busy_poll=$rbusy_poll_old" + [ -n "$busy_poll_old" ] && \ + sysctl -q -w net.core.busy_poll=$busy_poll_old + [ -n "$rbusy_poll_old" ] && \ + tst_rhost_run -c "sysctl -q -w net.core.busy_poll=$rbusy_poll_old" } set_busy_poll() diff --git a/testcases/network/busy_poll/busy_poll03.sh b/testcases/network/busy_poll/busy_poll03.sh index b55e220..3c70299 100755 --- a/testcases/network/busy_poll/busy_poll03.sh +++ b/testcases/network/busy_poll/busy_poll03.sh @@ -10,8 +10,10 @@ TST_TEST_DATA="udp udp_lite" cleanup() { - sysctl -q -w net.core.busy_poll=$busy_poll_old - tst_rhost_run -c "sysctl -q -w net.core.busy_poll=$rbusy_poll_old" + [ -n "$busy_poll_old" ] && \ + sysctl -q -w net.core.busy_poll=$busy_poll_old + [ -n "$rbusy_poll_old" ] && \ + tst_rhost_run -c "sysctl -q -w net.core.busy_poll=$rbusy_poll_old" } set_busy_poll()