From patchwork Mon Oct 29 13:03:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kodanev X-Patchwork-Id: 990188 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="QnFBtJE/"; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42kF014ZfJz9s5c for ; Mon, 29 Oct 2018 23:53:37 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id AE70A3E7946 for ; Mon, 29 Oct 2018 13:53:34 +0100 (CET) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-6.smtp.seeweb.it (in-6.smtp.seeweb.it [217.194.8.6]) by picard.linux.it (Postfix) with ESMTP id 5C8303E78CE for ; Mon, 29 Oct 2018 13:53:28 +0100 (CET) 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-6.smtp.seeweb.it (Postfix) with ESMTPS id A96AD140076E for ; Mon, 29 Oct 2018 13:53:27 +0100 (CET) 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 w9TChkr7175905 for ; Mon, 29 Oct 2018 12:53:26 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-2018-07-02; bh=HqCd8IDBGEFiVKIN0drm+8OsVz25lmTbuL5LdKmX1Wo=; b=QnFBtJE/uCFcxZwW72/Kx6pjTaDMFxtq0a1rV96li0k8/otzA+5H0d9aU7jIbrFpup9n 8vPNq6yrg0tV9hrbaj5m05uYyANghMGUFhxhgDaM7ILQLnynVR9BsFbhQCf156K15kt8 3jsJ0sOVtuOg7KMoCLIh64anB7m1dUplBADzepAZC9qx3qmnjxmO9D8TSygtSmSjX19E FQ6bpQHVVvMrYp8m9LWjCgXJ6JxNcTUCpAbUwNgdBm32jmByqYD/XvrkK/a/be9LWbjT 82ZICOzNi+h+mXGi4j0rQInsOZrJZqgByHu50JbMHPbT5dwzKX0DdCzV77EwE0F66zZ3 zA== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2120.oracle.com with ESMTP id 2ncgnqnc6m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 29 Oct 2018 12:53:25 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w9TCrPjx029653 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 29 Oct 2018 12:53:25 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w9TCrOXb004214 for ; Mon, 29 Oct 2018 12:53:25 GMT Received: from ak.ru.oracle.com (/10.162.80.29) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 29 Oct 2018 05:53:24 -0700 From: Alexey Kodanev To: ltp@lists.linux.it Date: Mon, 29 Oct 2018 16:03:17 +0300 Message-Id: <1540818202-11247-2-git-send-email-alexey.kodanev@oracle.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1540818202-11247-1-git-send-email-alexey.kodanev@oracle.com> References: <1540818202-11247-1-git-send-email-alexey.kodanev@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9060 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=723 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810290121 X-Virus-Scanned: clamav-milter 0.99.2 at in-6.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-6.smtp.seeweb.it Subject: [LTP] [PATCH 1/6] network/virt: add support for sit tunnel 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 --- testcases/network/virt/virt_lib.sh | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/testcases/network/virt/virt_lib.sh b/testcases/network/virt/virt_lib.sh index de3aba6..c9fe80c 100644 --- a/testcases/network/virt/virt_lib.sh +++ b/testcases/network/virt/virt_lib.sh @@ -116,10 +116,13 @@ virt_add() [ -z "$opt" ] && \ opt="remote $(tst_ipaddr rhost) dev $(tst_iface)" ;; + sit) + [ -z "$opt" ] && opt="remote $(tst_ipaddr rhost) local $(tst_ipaddr)" + ;; esac case $virt_type in - vxlan|geneve) + vxlan|geneve|sit) ip li add $vname type $virt_type $opt ;; gre|ip6gre) @@ -140,6 +143,9 @@ virt_add_rhost() [ "$vxlan_dstport" -eq 1 ] && opt="$opt dstport 0" tst_rhost_run -s -c "ip li add ltp_v0 type $virt_type $@ $opt" ;; + sit) + tst_rhost_run -s -c "ip link add ltp_v0 type $virt_type $@" + ;; gre|ip6gre) tst_rhost_run -s -c "ip -f inet$TST_IPV6 tu add ltp_v0 \ mode $virt_type $@" From patchwork Mon Oct 29 13:03:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kodanev X-Patchwork-Id: 990190 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="U7JW35Ao"; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42kF08148Tz9s3Z for ; Mon, 29 Oct 2018 23:53:44 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id A0D533E78E0 for ; Mon, 29 Oct 2018 13:53:41 +0100 (CET) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-6.smtp.seeweb.it (in-6.smtp.seeweb.it [217.194.8.6]) by picard.linux.it (Postfix) with ESMTP id E2CC03E78E1 for ; Mon, 29 Oct 2018 13:53:29 +0100 (CET) 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-6.smtp.seeweb.it (Postfix) with ESMTPS id 05BCD1400743 for ; Mon, 29 Oct 2018 13:53:28 +0100 (CET) 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 w9TCiX6b176531 for ; Mon, 29 Oct 2018 12:53:27 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-2018-07-02; bh=WNv+gQceb/MfVumayN/h4RP4WCzviiBQ2ZJSDuWURME=; b=U7JW35AomYF2eOqGlaqGrEAg9SnOATuyD9a3R9waIWUj8CboaCFyerh0X39yJCvuUloV 9+vuQ12vhMoiKbl/zq9Wih4we2Ousj8ekvkvyNaD9GwmeD/imOfYWYFNCLiCLHccT5l0 vdcsGGop2t2XdLp2LxN5p6IQKm2KTpPL+N9mpN3J9Ii2F8Y0FeLWlT0RNyrNu9XSfoXP R1j8m5M0gHqXl1wQauSr4kbAGhsjldZtGXQTtL0tKYvAw3HrlQTte6VflCzHauJnDkzE 8Fa8KetXLTzddL0mRrv85kIKZZ17qBFHEf8Y/0F5APavQxOokSsLKPoUzEKv0reokbTs 0Q== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2120.oracle.com with ESMTP id 2ncgnqnc6p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 29 Oct 2018 12:53:27 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w9TCrPUk029709 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 29 Oct 2018 12:53:26 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w9TCrP9x004228 for ; Mon, 29 Oct 2018 12:53:25 GMT Received: from ak.ru.oracle.com (/10.162.80.29) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 29 Oct 2018 05:53:25 -0700 From: Alexey Kodanev To: ltp@lists.linux.it Date: Mon, 29 Oct 2018 16:03:18 +0300 Message-Id: <1540818202-11247-3-git-send-email-alexey.kodanev@oracle.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1540818202-11247-1-git-send-email-alexey.kodanev@oracle.com> References: <1540818202-11247-1-git-send-email-alexey.kodanev@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9060 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=716 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810290121 X-Virus-Scanned: clamav-milter 0.99.2 at in-6.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-6.smtp.seeweb.it Subject: [LTP] [PATCH 2/6] network/sit01: new test for sit tunnel 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 --- runtest/net.features | 2 ++ testcases/network/virt/sit01.sh | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 0 deletions(-) create mode 100755 testcases/network/virt/sit01.sh diff --git a/runtest/net.features b/runtest/net.features index eac1b2b..de49e76 100644 --- a/runtest/net.features +++ b/runtest/net.features @@ -58,3 +58,5 @@ dctcp_ipv6_01 dctcp01.sh -6 geneve01 geneve01.sh geneve01_ipv6 geneve01.sh -6 + +sit01 sit01.sh diff --git a/testcases/network/virt/sit01.sh b/testcases/network/virt/sit01.sh new file mode 100755 index 0000000..4ecc1f8 --- /dev/null +++ b/testcases/network/virt/sit01.sh @@ -0,0 +1,23 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2018 Oracle and/or its affiliates. + +TST_NEEDS_TMPDIR=1 +TST_TESTFUNC=virt_netperf_msg_sizes +TST_SETUP=do_setup +TST_CLEANUP=virt_cleanup +virt_type="sit" +. virt_lib.sh + +do_setup() +{ + [ -n "$TST_IPV6" ] && tst_res TBROK "invalid option '-6' for sit tunnel" + + virt_lib_setup + + tst_res TINFO "test $virt_type" + virt_setup "local $(tst_ipaddr) remote $(tst_ipaddr rhost)" \ + "local $(tst_ipaddr rhost) remote $(tst_ipaddr)" +} + +tst_run From patchwork Mon Oct 29 13:03:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kodanev X-Patchwork-Id: 990191 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="3kHmsZZm"; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42kF0C64Zmz9s3Z for ; Mon, 29 Oct 2018 23:53:47 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 4125C3E79CB for ; Mon, 29 Oct 2018 13:53:45 +0100 (CET) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-5.smtp.seeweb.it (in-5.smtp.seeweb.it [217.194.8.5]) by picard.linux.it (Postfix) with ESMTP id 487DE3E790F for ; Mon, 29 Oct 2018 13:53:30 +0100 (CET) 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-5.smtp.seeweb.it (Postfix) with ESMTPS id 664BB600748 for ; Mon, 29 Oct 2018 13:53:29 +0100 (CET) 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 w9TChk9k175910 for ; Mon, 29 Oct 2018 12:53:27 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-2018-07-02; bh=sXb00Gf+V+eyFZvKzN3o1wT2xNteBlqTs/L6nwRGaI8=; b=3kHmsZZm0JRnCzXv2waT6kZtiyEwIC/ckLUdmEsfhKP36fgP8M+jzwjPDyML2FyE2xay u3v8U1SIwsETQcEYjCY5orFSHCbP+NBpJZb/prlmZb/4ndM4LVDrnv8m4BKTettmGTDm UkcG0XwwxC7hl8/le47ltJDAQhnvI3+2UrpQoOaE/P5Knl3MPCUHw2pvK//v0zunfI3K QC77kYuLkH0Sf+2wtu8aj05K1S0A9/NBkjSegfGWRr76N5mNJ5nY5Hv47+2267hPrr2H 0E90XdSf7xLZuf3Tt/TEO69EDhVgYO3iP6rMDTXVs7DQCBNgV92PxJRh+JCb8IZ1L1rh 1w== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2120.oracle.com with ESMTP id 2ncgnqnc6r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 29 Oct 2018 12:53:27 +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 w9TCrREG029778 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 29 Oct 2018 12:53:27 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w9TCrQWN031828 for ; Mon, 29 Oct 2018 12:53:27 GMT Received: from ak.ru.oracle.com (/10.162.80.29) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 29 Oct 2018 05:53:26 -0700 From: Alexey Kodanev To: ltp@lists.linux.it Date: Mon, 29 Oct 2018 16:03:19 +0300 Message-Id: <1540818202-11247-4-git-send-email-alexey.kodanev@oracle.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1540818202-11247-1-git-send-email-alexey.kodanev@oracle.com> References: <1540818202-11247-1-git-send-email-alexey.kodanev@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9060 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=839 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810290121 X-Virus-Scanned: clamav-milter 0.99.2 at in-5.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-5.smtp.seeweb.it Subject: [LTP] [PATCH 3/6] network/mpls01: new test for mpls labels 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" Checks basic functionality (adds/deletes routes), related sysctl parameters. Signed-off-by: Alexey Kodanev --- runtest/net.features | 2 + testcases/network/mpls/Makefile | 10 +++++ testcases/network/mpls/mpls01.sh | 70 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+), 0 deletions(-) create mode 100644 testcases/network/mpls/Makefile create mode 100755 testcases/network/mpls/mpls01.sh diff --git a/runtest/net.features b/runtest/net.features index de49e76..f858421 100644 --- a/runtest/net.features +++ b/runtest/net.features @@ -60,3 +60,5 @@ geneve01 geneve01.sh geneve01_ipv6 geneve01.sh -6 sit01 sit01.sh + +mpls01 mpls01.sh diff --git a/testcases/network/mpls/Makefile b/testcases/network/mpls/Makefile new file mode 100644 index 0000000..3a54269 --- /dev/null +++ b/testcases/network/mpls/Makefile @@ -0,0 +1,10 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2018 Oracle and/or its affiliates. All Rights Reserved. + +top_srcdir ?= ../../.. + +include $(top_srcdir)/include/mk/testcases.mk + +INSTALL_TARGETS := *.sh + +include $(top_srcdir)/include/mk/generic_leaf_target.mk diff --git a/testcases/network/mpls/mpls01.sh b/testcases/network/mpls/mpls01.sh new file mode 100755 index 0000000..c7788b5 --- /dev/null +++ b/testcases/network/mpls/mpls01.sh @@ -0,0 +1,70 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2018 Oracle and/or its affiliates. All Rights Reserved. + +TST_SETUP="setup" +TST_TESTFUNC="test" +TST_CLEANUP="cleanup" +TST_CNT=3 +TST_MIN_KVER="4.1" +TST_NEEDS_TMPDIR=1 +TST_NEEDS_ROOT=1 +TST_NEEDS_DRIVERS="mpls_router" +TST_NEEDS_CMDS="sysctl modprobe" + +. tst_net.sh + +cleanup() +{ + ip -f mpls route flush dev lo > /dev/null 2>&1 + ip -f mpls route flush dev $(tst_iface) > /dev/null 2>&1 +} + +setup() +{ + ROD modprobe mpls_router +} + +test1() +{ + ROD sysctl -q net.mpls.platform_labels=0xfffff + ROD ip -f mpls route add 0xffffe dev lo + ROD ip -f mpls route show \> /dev/null + ROD ip -f mpls route del 0xffffe dev lo + tst_res TPASS "added label 0xffffe to lo dev" +} + +test2() +{ + ROD sysctl -q net.mpls.platform_labels=0xffffe + ip -f mpls route add 0xffffe dev lo > /dev/null 2>&1 + if [ $? -eq 0 ]; then + tst_res TFAIL "can add label that is >= platform_labels" + return + fi + + tst_res TPASS "can't add label >= platform_lables" +} + +test3() +{ + local start=16 + local end=$((start + NS_TIMES)) + + ROD sysctl -q net.mpls.platform_labels=$((end + 1)) + tst_res TINFO "creating mpls routes with labels from $start..$end" + for l in $(seq $start $end); do + ROD ip -f mpls route add $l dev $(tst_iface) + done + + tst_res TINFO "listing created routes" + ROD ip -f mpls route show \> /dev/null + + tst_res TINFO "removing the routes" + for l in $(seq $start $end); do + ROD ip -f mpls route del $l dev $(tst_iface) + done + tst_res TPASS "created and removed mpls routes" +} + +tst_run From patchwork Mon Oct 29 13:03:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kodanev X-Patchwork-Id: 990192 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="3Dy+Qecb"; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42kF0H3TRyz9s3Z for ; Mon, 29 Oct 2018 23:53:51 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id A97743E79C1 for ; Mon, 29 Oct 2018 13:53:48 +0100 (CET) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-5.smtp.seeweb.it (in-5.smtp.seeweb.it [217.194.8.5]) by picard.linux.it (Postfix) with ESMTP id 6AAD33E7921 for ; Mon, 29 Oct 2018 13:53:31 +0100 (CET) Received: from userp2130.oracle.com (userp2130.oracle.com [156.151.31.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by in-5.smtp.seeweb.it (Postfix) with ESMTPS id 9F03C600748 for ; Mon, 29 Oct 2018 13:53:30 +0100 (CET) Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w9TChuXM026658 for ; Mon, 29 Oct 2018 12:53:28 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-2018-07-02; bh=saRI6Mpzpo0VXDHBxPI8h9vHr10nj1I8zWMEW8y+tYE=; b=3Dy+QecbL/FQgg9zTGrB0qrfhIonBYs9kWpMBCiSYgnXAHz65cu7yNalpuNtjP5OSRrM g+12I3BTom0QcJviUtphnLDWTLdL58DDECuGdL/bzjT3sT52C/nT5jJR381PjGDhAY9W DrXsNOBeyjv3qwQ+QSz/JwxHJRpkrJzYXlvG7E9zH19vFRk3ilZGk7M7s+42NBCsp5bM OvutzQiw1bZHW39zUVv6fYffbZgSWOXOaMdftsRCjyxSYeJMAhZ8zee/o1Or8gJqlYuP rnFys8HjQih1JmJN7gNG3akmQfWkmivNFbjb5H5Ci+WmbNraPg8BdxNMhIQy4/M8cO6d 6A== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2130.oracle.com with ESMTP id 2nduckt293-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 29 Oct 2018 12:53:28 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w9TCrSb4029821 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 29 Oct 2018 12:53:28 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w9TCrR6J019023 for ; Mon, 29 Oct 2018 12:53:28 GMT Received: from ak.ru.oracle.com (/10.162.80.29) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 29 Oct 2018 05:53:27 -0700 From: Alexey Kodanev To: ltp@lists.linux.it Date: Mon, 29 Oct 2018 16:03:20 +0300 Message-Id: <1540818202-11247-5-git-send-email-alexey.kodanev@oracle.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1540818202-11247-1-git-send-email-alexey.kodanev@oracle.com> References: <1540818202-11247-1-git-send-email-alexey.kodanev@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9060 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=850 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810290121 X-Virus-Scanned: clamav-milter 0.99.2 at in-5.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, LOTS_OF_MONEY, SPF_HELO_PASS, SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-5.smtp.seeweb.it Subject: [LTP] [PATCH 4/6] network/mpls02: new test with lwtunnel 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" Setup MPLS encapsulation over the default test network setup, use ICMP, UDP and TCP inner protocols. Signed-off-by: Alexey Kodanev Reviewed-by: Petr Vorel --- runtest/net.features | 2 + testcases/network/mpls/mpls02.sh | 53 ++++++++++++++++++++++++++++++++++++ testcases/network/mpls/mpls_lib.sh | 46 +++++++++++++++++++++++++++++++ 3 files changed, 101 insertions(+), 0 deletions(-) create mode 100755 testcases/network/mpls/mpls02.sh create mode 100755 testcases/network/mpls/mpls_lib.sh diff --git a/runtest/net.features b/runtest/net.features index f858421..29d5092 100644 --- a/runtest/net.features +++ b/runtest/net.features @@ -62,3 +62,5 @@ geneve01_ipv6 geneve01.sh -6 sit01 sit01.sh mpls01 mpls01.sh +mpls02 mpls02.sh +mpls02_ipv6 mpls02.sh -6 diff --git a/testcases/network/mpls/mpls02.sh b/testcases/network/mpls/mpls02.sh new file mode 100755 index 0000000..745a414 --- /dev/null +++ b/testcases/network/mpls/mpls02.sh @@ -0,0 +1,53 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2018 Oracle and/or its affiliates. All Rights Reserved. + +TST_SETUP="setup" +TST_TESTFUNC="do_test" +TST_CLEANUP="cleanup" + +. mpls_lib.sh + +cleanup() +{ + ip route del $ip_rmt/$mask > /dev/null 2>&1 + tst_rhost_run -c "ip route del $ip_loc/$mask" > /dev/null + + [ -n "$ip_loc" ] && ip addr del $ip_loc/$mask dev lo > /dev/null 2>&1 + [ -n "$ip_rmt" ] && tst_rhost_run -c "ip addr del $ip_rmt/$mask dev lo" > \ + /dev/null 2>&1 + + mpls_cleanup +} + +setup() +{ + mpls_setup 61 + + ip_loc=$(tst_ipaddr_un) + ip_rmt=$(tst_ipaddr_un rhost) + [ -n "$TST_IPV6" ] && mask=128 || mask=32 + + ROD ip addr add $ip_loc/$mask dev lo + ROD ip route add $ip_rmt/$mask encap mpls 50 via inet$TST_IPV6 $(tst_ipaddr rhost) + ROD ip -f mpls route add 60 dev lo + + tst_rhost_run -s -c "ip addr add $ip_rmt/$mask dev lo" + tst_rhost_run -s -c "ip route add $ip_loc/$mask encap mpls 60 via inet$TST_IPV6 $(tst_ipaddr)" + tst_rhost_run -s -c "ip -f mpls route add 50 dev lo" +} + +do_test() +{ + local type=$2 + local max_size=10000 + + if [ "$type" = "icmp" ]; then + tst_ping $ip_loc $ip_rmt 10 100 1000 2000 $max_size + else + tst_netload -S $ip_loc -H $ip_rmt -T $type -n 10 -N 10 + tst_netload -S $ip_loc -H $ip_rmt -T $type -A $max_size + fi +} + +tst_run diff --git a/testcases/network/mpls/mpls_lib.sh b/testcases/network/mpls/mpls_lib.sh new file mode 100755 index 0000000..87aec5c --- /dev/null +++ b/testcases/network/mpls/mpls_lib.sh @@ -0,0 +1,46 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2018 Oracle and/or its affiliates. All Rights Reserved. + +TST_MIN_KVER="4.3" +TST_NEEDS_TMPDIR=1 +TST_NEEDS_ROOT=1 +TST_NEEDS_DRIVERS="mpls_router mpls_iptunnel" +TST_NEEDS_CMDS="sysctl modprobe" +TST_TEST_DATA="icmp tcp udp" + +. tst_net.sh + +mpls_cleanup() +{ + local flush_dev="ip -f mpls route flush dev" + + $flush_dev lo > /dev/null 2>&1 + tst_rhost_run -c "$flush_dev lo" > /dev/null + + [ -n $rpf_loc ] && sysctl -q net.ipv4.conf.all.rp_filter=$rpf_loc + [ -n $rpf_rmt ] && tst_rhost_run -s -c "sysctl -q net.ipv4.conf.all.rp_filter=$rpf_rmt" +} + +mpls_setup() +{ + local label="$1" + + ROD modprobe mpls_router + ROD modprobe mpls_iptunnel + ROD modprobe mpls_gso + ROD sysctl -q net.mpls.conf.$(tst_iface).input=1 + ROD sysctl -q net.mpls.conf.lo.input=1 + ROD sysctl -q net.mpls.platform_labels=$label + rpf_loc="$(sysctl -n net.ipv4.conf.all.rp_filter)" + ROD sysctl -q net.ipv4.conf.all.rp_filter=2 + + tst_rhost_run -s -c "modprobe mpls_router" + tst_rhost_run -s -c "modprobe mpls_iptunnel" + tst_rhost_run -s -c "modprobe mpls_gso" + tst_rhost_run -s -c "sysctl -q net.mpls.conf.$(tst_iface rhost).input=1" + tst_rhost_run -s -c "sysctl -q net.mpls.conf.lo.input=1" + tst_rhost_run -s -c "sysctl -q net.mpls.platform_labels=$label" + rpf_rmt="$(tst_rhost_run -c 'sysctl -n net.ipv4.conf.all.rp_filter')" + tst_rhost_run -s -c "sysctl -q net.ipv4.conf.all.rp_filter=2" +} From patchwork Mon Oct 29 13:03:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kodanev X-Patchwork-Id: 990194 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="hDcuvg9u"; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42kF0R2yFlz9s3Z for ; Mon, 29 Oct 2018 23:53:59 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id AA6893E79F8 for ; Mon, 29 Oct 2018 13:53:56 +0100 (CET) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-6.smtp.seeweb.it (in-6.smtp.seeweb.it [IPv6:2001:4b78:1:20::6]) by picard.linux.it (Postfix) with ESMTP id 59EF73E7926 for ; Mon, 29 Oct 2018 13:53:37 +0100 (CET) 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-6.smtp.seeweb.it (Postfix) with ESMTPS id 9A240140096C for ; Mon, 29 Oct 2018 13:53:36 +0100 (CET) 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 w9TChjWe030507 for ; Mon, 29 Oct 2018 12:53:35 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-2018-07-02; bh=tR/P0/w32wUn4JM21lCngP/M1dX1INzuG85X4uHvg8E=; b=hDcuvg9uuV1yAAe7tkm65rkJK3nPL7BdTcPHSX+SAAlBgqx5nJC14IoVjGGJdejrBgQ2 ecmOmWnSzIGUj/aVhAvmmsWowFvbs8YINK4nTNd9tgVg9XcYWW4J42At2auqm5+ApHGg GyRbSKggqhCLquSAe1HhR/wGKNTfc+aEzwipidyn32q37/T72Q7akkgdcNfDuxnULRmX N8EwUTfFZxGSmwFNkaL2z2b8Z7CKpO9d7QioedS6gtIVjoYH6Yrw7tBeislMek8wt0qX pGwEnGDI3RkyxlrspL12JFdSB+um7Z7MGpBNiPSMO2QI2Z8kl8aJlFC/uXepmjFL221i qA== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp2120.oracle.com with ESMTP id 2ncfypndsx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 29 Oct 2018 12:53:35 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w9TCrT52016571 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 29 Oct 2018 12:53:29 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w9TCrSqx019030 for ; Mon, 29 Oct 2018 12:53:29 GMT Received: from ak.ru.oracle.com (/10.162.80.29) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 29 Oct 2018 05:53:28 -0700 From: Alexey Kodanev To: ltp@lists.linux.it Date: Mon, 29 Oct 2018 16:03:21 +0300 Message-Id: <1540818202-11247-6-git-send-email-alexey.kodanev@oracle.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1540818202-11247-1-git-send-email-alexey.kodanev@oracle.com> References: <1540818202-11247-1-git-send-email-alexey.kodanev@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9060 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=924 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810290121 X-Virus-Scanned: clamav-milter 0.99.2 at in-6.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, LOTS_OF_MONEY, SPF_HELO_PASS, SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-6.smtp.seeweb.it Subject: [LTP] [PATCH 5/6] network/mpls03: add MPLS over GRE and GREv6 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" Note, support for GREv6 was added in Linux 4.19. Signed-off-by: Alexey Kodanev Acked-by: Petr Vorel --- runtest/net.features | 3 ++ testcases/network/mpls/mpls03.sh | 24 ++++++++++++++ testcases/network/mpls/mpls_lib.sh | 59 ++++++++++++++++++++++++++++++++++++ 3 files changed, 86 insertions(+), 0 deletions(-) create mode 100755 testcases/network/mpls/mpls03.sh diff --git a/runtest/net.features b/runtest/net.features index 29d5092..6076e2a 100644 --- a/runtest/net.features +++ b/runtest/net.features @@ -64,3 +64,6 @@ sit01 sit01.sh mpls01 mpls01.sh mpls02 mpls02.sh mpls02_ipv6 mpls02.sh -6 +mpls03 mpls03.sh +mpls03_ipv6 mpls03.sh -6 + diff --git a/testcases/network/mpls/mpls03.sh b/testcases/network/mpls/mpls03.sh new file mode 100755 index 0000000..0db6dbf --- /dev/null +++ b/testcases/network/mpls/mpls03.sh @@ -0,0 +1,24 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2018 Oracle and/or its affiliates. All Rights Reserved. + +TST_SETUP="setup" +TST_TESTFUNC="mpls_virt_test" +TST_CLEANUP="mpls_virt_cleanup" + +. virt_lib.sh +. mpls_lib.sh + +setup() +{ + virt_type="gre" + if [ -n "$TST_IPV6" ]; then + tst_kvcmp -lt "4.19" && \ + tst_brk TCONF "mpls + ip6gre requires kernel 4.19+" + virt_type="ip6gre" + fi + + mpls_virt_setup +} + +tst_run diff --git a/testcases/network/mpls/mpls_lib.sh b/testcases/network/mpls/mpls_lib.sh index 87aec5c..36c2335 100755 --- a/testcases/network/mpls/mpls_lib.sh +++ b/testcases/network/mpls/mpls_lib.sh @@ -22,6 +22,17 @@ mpls_cleanup() [ -n $rpf_rmt ] && tst_rhost_run -s -c "sysctl -q net.ipv4.conf.all.rp_filter=$rpf_rmt" } +mpls_virt_cleanup() +{ + ip route del $ip_virt_remote/32 dev ltp_v0 > /dev/null 2>&1 + ip route del $ip6_virt_remote/128 dev ltp_v0 > /dev/null 2>&1 + tst_rhost_run -c "ip route del $ip_virt_local/32 dev ltp_v0" > /dev/null + tst_rhost_run -c "ip route del $ip6_virt_local/128 dev ltp_v0" > /dev/null + + virt_cleanup + mpls_cleanup +} + mpls_setup() { local label="$1" @@ -44,3 +55,51 @@ mpls_setup() rpf_rmt="$(tst_rhost_run -c 'sysctl -n net.ipv4.conf.all.rp_filter')" tst_rhost_run -s -c "sysctl -q net.ipv4.conf.all.rp_filter=2" } + +mpls_setup_tnl() +{ + local ip_loc="$1" + local ip_rmt="$2" + local label="$3" + local mask + + echo "$ip_loc" | grep -q ':' && mask=128 || mask=32 + + ROD ip route add $ip_rmt/$mask encap mpls $label dev ltp_v0 + ROD ip -f mpls route add $((label + 1)) dev lo + + tst_rhost_run -s -c "ip route add $ip_loc/$mask encap mpls $((label + 1)) dev ltp_v0" + tst_rhost_run -s -c "ip -f mpls route add $label dev lo" +} +mpls_virt_setup() +{ + mpls_setup 62 + + virt_lib_setup + + tst_res TINFO "test $virt_type with MPLS" + virt_setup "local $(tst_ipaddr) remote $(tst_ipaddr rhost) dev $(tst_iface)" \ + "local $(tst_ipaddr rhost) remote $(tst_ipaddr) dev $(tst_iface rhost)" + + mpls_setup_tnl $ip_virt_local $ip_virt_remote 60 + mpls_setup_tnl $ip6_virt_local $ip6_virt_remote 50 + + ROD sysctl -q net.mpls.conf.ltp_v0.input=1 + tst_rhost_run -s -c "sysctl -q net.mpls.conf.ltp_v0.input=1" +} + +mpls_virt_test() +{ + local type=$2 + local max_size=10000 + + if [ "$type" = "icmp" ]; then + tst_ping $ip_virt_local $ip_virt_remote 10 100 1000 2000 $max_size + tst_ping $ip6_virt_local $ip6_virt_remote 10 100 1000 2000 $max_size + else + tst_netload -S $ip_virt_local -H $ip_virt_remote -T $type -n 10 -N 10 + tst_netload -S $ip6_virt_local -H $ip6_virt_remote -T $type -n 10 -N 10 + tst_netload -S $ip_virt_local -H $ip_virt_remote -T $type -A $max_size + tst_netload -S $ip6_virt_local -H $ip6_virt_remote -T $type -A $max_size + fi +} From patchwork Mon Oct 29 13:03:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kodanev X-Patchwork-Id: 990193 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="cnDAqJYt"; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42kF0M1FJ2z9s3Z for ; Mon, 29 Oct 2018 23:53:55 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id A79AD3E78DB for ; Mon, 29 Oct 2018 13:53:52 +0100 (CET) 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 [IPv6:2001:4b78:1:20::3]) by picard.linux.it (Postfix) with ESMTP id 706B73E797C for ; Mon, 29 Oct 2018 13:53:34 +0100 (CET) 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 C1CC01A00FBD for ; Mon, 29 Oct 2018 13:53:33 +0100 (CET) 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 w9TCiAVk030758 for ; Mon, 29 Oct 2018 12:53:31 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-2018-07-02; bh=4QSiStmldZBSJkiwxfQ4V3uvTHxLJM8diXKs2QU7GVg=; b=cnDAqJYtaR3DiEwfGtSdJUWOWAYI/1tPEGariQxu55PJK/xZO96N94zTpP7INdFF4iIG Zg1UKhmtqMLt5V94561C19/JiOlOC2H8donVaRx/ZTkibQK/UGbiJ4XhBUpDS0hyFmZS JW48pJeq4oj1A1FrA5td0P9vtOb3QoMpi7r7h0TFR4JiDp1HGVTS3CJSvgAkZFlgVbB/ I5SreIQlCbM756xcsST2+uq4m6KFF7I8MLNx+JW1zPs0NjyMwl0io1xJ+R/T4WrhF5Z2 j2nX80WyleYSsA4cCtffvVQzbT2LEvP+xbZC5PgK/ed7G1iD1mKOs6V3/b5cZ1Mm8zCt MQ== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2120.oracle.com with ESMTP id 2ncfypndsn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 29 Oct 2018 12:53:31 +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 w9TCrUcl016284 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 29 Oct 2018 12:53:30 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w9TCrU7k031838 for ; Mon, 29 Oct 2018 12:53:30 GMT Received: from ak.ru.oracle.com (/10.162.80.29) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 29 Oct 2018 05:53:29 -0700 From: Alexey Kodanev To: ltp@lists.linux.it Date: Mon, 29 Oct 2018 16:03:22 +0300 Message-Id: <1540818202-11247-7-git-send-email-alexey.kodanev@oracle.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1540818202-11247-1-git-send-email-alexey.kodanev@oracle.com> References: <1540818202-11247-1-git-send-email-alexey.kodanev@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9060 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=604 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810290121 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 6/6] network/mpls04: new test with mpls over sit tunnel 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" The same as in mpls03 but with sit tunnel. Signed-off-by: Alexey Kodanev --- runtest/net.features | 1 + testcases/network/mpls/mpls04.sh | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 0 deletions(-) create mode 100755 testcases/network/mpls/mpls04.sh diff --git a/runtest/net.features b/runtest/net.features index 6076e2a..b37104b 100644 --- a/runtest/net.features +++ b/runtest/net.features @@ -66,4 +66,5 @@ mpls02 mpls02.sh mpls02_ipv6 mpls02.sh -6 mpls03 mpls03.sh mpls03_ipv6 mpls03.sh -6 +mpls04 mpls04.sh diff --git a/testcases/network/mpls/mpls04.sh b/testcases/network/mpls/mpls04.sh new file mode 100755 index 0000000..639a13e --- /dev/null +++ b/testcases/network/mpls/mpls04.sh @@ -0,0 +1,19 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2018 Oracle and/or its affiliates. All Rights Reserved. + +TST_SETUP="setup" +TST_TESTFUNC="mpls_virt_test" +TST_CLEANUP="mpls_virt_cleanup" + +. virt_lib.sh +. mpls_lib.sh + +setup() +{ + virt_type="sit" + + mpls_virt_setup +} + +tst_run