From patchwork Fri Feb 11 06:26:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 107348 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0B5B3A00BE; Fri, 11 Feb 2022 07:38:14 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C4FB941144; Fri, 11 Feb 2022 07:38:14 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id BB23E410E5 for ; Fri, 11 Feb 2022 07:38:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644561493; x=1676097493; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=neLrELxD22wJXS1fPFYmsJqxHSVV97Qx2Z9Mgiuw9G4=; b=br1reWhWOjZi7479LwdcyXJDB7diyEjGCRMK3Oymz4NCBLrlPE6t2zHS CeV/uDcJ6RpRvPTIQaVEUX99RJVXHU041iZekozo7sRtGu8/cXbK20Bs/ dRzO6kqKP26xoW4Iupo9BWSJlvburl4puBKVik6otMJMf/punW/8awmPl Tb1XkO++CINFS5SMG2jxDhjRzYjwG4tHyALWP/ux3KBgWFhtVe+88LPoQ lRPwlAvdibysQeUa3Afbk/beQ1lB8MRfJ/4eIOysYJf1/iUrKvctm+BGP i+NptUH0+FBi6fuFTPGmmqMJeZQoYyQqZOI+KfYqR+fPFkM3awSWH/XfV Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10254"; a="249619131" X-IronPort-AV: E=Sophos;i="5.88,359,1635231600"; d="scan'208";a="249619131" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2022 22:38:12 -0800 X-IronPort-AV: E=Sophos;i="5.88,359,1635231600"; d="scan'208";a="633980724" Received: from unknown (HELO localhost.localdomain) ([10.239.251.41]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2022 22:38:11 -0800 From: Weiyuan Li To: dts@dpdk.org, lijuan.tu@intel.com Cc: Weiyuan Li Subject: [dts][PATCH V2 1/2] tests/userspace_ethtool:remove duplicate vlan test case. Date: Fri, 11 Feb 2022 14:26:09 +0800 Message-Id: <20220211062610.2409668-1-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org This vlan test case is repeated. Remove the test case. Signed-off-by: Weiyuan Li --- v2: -Remove added sleep time tests/TestSuite_userspace_ethtool.py | 57 ---------------------------- 1 file changed, 57 deletions(-) diff --git a/tests/TestSuite_userspace_ethtool.py b/tests/TestSuite_userspace_ethtool.py index 4f104dca..2b84b0a7 100755 --- a/tests/TestSuite_userspace_ethtool.py +++ b/tests/TestSuite_userspace_ethtool.py @@ -443,63 +443,6 @@ class TestUserspaceEthtool(TestCase): self.verify(rx_pkts == ori_rx_pkts + 4, "Failed to forward after ring parameter changed") self.dut.send_expect("quit", "# ") - def test_ethtool_vlan(self): - """ - Test ethtool app vlan add and delete - """ - main_file = "examples/ethtool/ethtool-app/main.c" - # enable vlan filter - self.dut.send_expect("sed -i -e '/cfg_port.txmode.mq_mode = ETH_MQ_TX_NONE;$/a\\cfg_port.rxmode.offloads|=DEV_RX_OFFLOAD_VLAN_FILTER;' %s" % main_file, "# ") - - # build sample app - self.build_ethtool() - - self.dut.send_expect(self.cmd, "EthApp>", 60) - for index in range(len(self.ports)): - port = self.ports[index] - dst_mac = self.dut.get_mac_address(port) - # generate random vlan - vlan = random.randrange(0, 4095) - # add vlan on port, record original statistic - self.dut.send_expect("vlan %d add %d" % (index, vlan), "EthApp>") - ori_rx_pkts, ori_tx_pkts = self.strip_portstats(port) - - # send correct vlan packet to port - pkt = Packet(pkt_type='VLAN_UDP') - pkt.config_layer('ether', {'dst': dst_mac}) - pkt.config_layer('vlan', {'vlan': vlan}) - tester_port = self.tester.get_local_port(port) - intf = self.tester.get_interface(tester_port) - self.verify(self.ethapp_check_link_status(index, 'Up') == True, - 'Fail to Open port{}'.format(index)) - - pkt.send_pkt(self.tester, tx_port=intf, count=4) - rx_pkts, tx_pkts = self.strip_portstats(port) - self.verify(rx_pkts == ori_rx_pkts + 4, "Failed to Rx vlan packet") - self.verify(tx_pkts == ori_tx_pkts + 4, "Failed to Tx vlan packet") - - # send incorrect vlan packet to port - wrong_vlan = (vlan + 1) % 4096 - pkt.config_layer('vlan', {'vlan': wrong_vlan}) - pkt.send_pkt(self.tester, tx_port=intf, count=4) - time.sleep(2) - rx_pkts_wrong, tx_pkts_wrong = self.strip_portstats(port) - self.verify(tx_pkts_wrong == rx_pkts, "Failed to filter Rx vlan packet") - - # remove vlan - self.dut.send_expect("vlan %d del %d" % (index, vlan), "EthApp>") - # send same packet and make sure not received - pkt.config_layer('vlan', {'vlan': vlan}) - pkt.send_pkt(self.tester, tx_port=intf, count=4) - time.sleep(2) - rx_pkts_del, tx_pkts_del = self.strip_portstats(port) - self.verify(tx_pkts_del == rx_pkts, "Failed to remove Rx vlan filter") - - self.dut.send_expect("quit", "# ") - self.dut.send_expect("sed -i -e '/cfg_port.rxmode.offloads|=DEV_RX_OFFLOAD_VLAN_FILTER;$/d' %s" % main_file, "# ") - # build sample app - self.build_ethtool() - def test_mac_address(self): """ Test ethtool app mac function From patchwork Fri Feb 11 06:26:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 107349 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EB996A00C2; Fri, 11 Feb 2022 07:38:15 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E16CE41141; Fri, 11 Feb 2022 07:38:15 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id A46EC410E5 for ; Fri, 11 Feb 2022 07:38:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644561494; x=1676097494; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=VmYBOO2n09nZB22O2Y+c+J7+qxzCFoPwHUB+1KYsAEY=; b=Fz4pTPNe+PBQtAsgujcZMbipmnd8PQY/ZqCNtT5k7XG1vvKhU9s6n+oC kYXotvorss5l0n7d5bKWtfq/FcK8ypEOC0n5u16DB6w9AVxtwqToe3kFX 7MBLzd3q5syWbPkflXWRNA7yjMb80dJ4nzx+AhnyLq88KmQu7/31iVmXt w3Emk2cf1LiLpO+zfPNp9OLoe4KVerPG2xSjRpvlhe00IzD+qKcO4SMXE uFiEtp6krvwf7yyiRuk1C26aM5BqLtLEYExD2vCgyfZ3D8TyfMnqXRXRM BfJZ+MSBVn6cPgUnKv+q5ccG5f5XHOZROGKiqv+48ed7PK577LZgq5E51 A==; X-IronPort-AV: E=McAfee;i="6200,9189,10254"; a="249619135" X-IronPort-AV: E=Sophos;i="5.88,359,1635231600"; d="scan'208";a="249619135" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2022 22:38:14 -0800 X-IronPort-AV: E=Sophos;i="5.88,359,1635231600"; d="scan'208";a="633980727" Received: from unknown (HELO localhost.localdomain) ([10.239.251.41]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2022 22:38:12 -0800 From: Weiyuan Li To: dts@dpdk.org, lijuan.tu@intel.com Cc: Weiyuan Li Subject: [dts][PATCH V2 2/2] test_plans/userspace_ethtool:remove duplicate vlan test case. Date: Fri, 11 Feb 2022 14:26:10 +0800 Message-Id: <20220211062610.2409668-2-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220211062610.2409668-1-weiyuanx.li@intel.com> References: <20220211062610.2409668-1-weiyuanx.li@intel.com> MIME-Version: 1.0 X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sync remove duplicate test plans. Signed-off-by: Weiyuan Li --- v2: -Remove added sleep time test_plans/userspace_ethtool_test_plan.rst | 35 ---------------------- 1 file changed, 35 deletions(-) diff --git a/test_plans/userspace_ethtool_test_plan.rst b/test_plans/userspace_ethtool_test_plan.rst index 790e25e8..ab3fbc8f 100644 --- a/test_plans/userspace_ethtool_test_plan.rst +++ b/test_plans/userspace_ethtool_test_plan.rst @@ -159,41 +159,6 @@ send packet by scapy on Tester:: check tx/rx packets EthApp> portstats 0 -Test Case: Vlan test -==================== - -enable vlan filter flag in main.c of dpdk's ethtool:: - - sed -i -e '/cfg_port.txmode.mq_mode = ETH_MQ_TX_NONE;$/a\\cfg_port.rxmode.offloads|=DEV_RX_OFFLOAD_VLAN_FILTER;' examples/ethtool/ethtool-app/main.c - -re-compile examples/ethtool:: - - meson configure -Dexamples=ethtool x86_64-native-linuxapp-gcc - ninja -C x86_64-native-linuxapp-gcc - -Add vlan 0 to port 0 and vlan 1 to port1, send packet without vlan to port0,1 -Verify port0 and port1 received vlan packets:: - - EthApp> vlan 0 add 0 - VLAN vid 0 added - - EthApp> vlan 1 add 1 - VLAN vid 1 added - -Send packet with vlan0,1 to port0&1. Verify port0 and port1 received vlan -packets - -Send packet with vlan1,0 to port0&1. Verify port0 and port1 can not receive -vlan packets - -Remove vlan 0,1 from port0&1, send packet with vlan0,1 to port0,1. Verify -port0 and port1 can not receive vlan packet:: - - EthApp> vlan 0 del 0 - VLAN vid 0 removed - EthApp> vlan 1 del 1 - VLAN vid 1 removed - Test Case: Mac address test =========================== Use "macaddr" command to dump port mac address and then check that dumped