From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id F261C902 for ; Thu, 21 May 2015 10:30:58 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 21 May 2015 01:30:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,467,1427785200"; d="scan'208";a="496452249" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by FMSMGA003.fm.intel.com with ESMTP; 21 May 2015 01:30:31 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t4L8USYw007959; Thu, 21 May 2015 16:30:28 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t4L8UPgS012773; Thu, 21 May 2015 16:30:27 +0800 Received: (from huilongx@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t4L8UPfZ012769; Thu, 21 May 2015 16:30:25 +0800 From: huilongx xu To: dts@dpdk.org Date: Thu, 21 May 2015 16:30:17 +0800 Message-Id: <1432197020-12725-3-git-send-email-huilongx.xu@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1432197020-12725-1-git-send-email-huilongx.xu@intel.com> References: <1432197020-12725-1-git-send-email-huilongx.xu@intel.com> Cc: jingguox.fu@intel.com Subject: [dts] [dts 2/5] [v2] add dynamic config test plan X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 08:30:59 -0000 From: huilong xu add dynamic config test plan this test suite include three cases. a)nic start by testpmd app used PMD driver with default mode,it can forward package b)nic start by testpmd app used PMD driver with default mode, then set promiscuous off, it can't forward package,if the package dst mac isn't received port mac. c)nic start by testpmd app used PMD driver with default mod, then set promiscuous on, it can forward package, although the package dst mac isn't received port mac Signed-off-by: huilong xu --- test_plans/dynamic_config_test_plan.rst | 199 +++++++++++++++++++++++++++++++ 1 files changed, 199 insertions(+), 0 deletions(-) create mode 100644 test_plans/dynamic_config_test_plan.rst diff --git a/test_plans/dynamic_config_test_plan.rst b/test_plans/dynamic_config_test_plan.rst new file mode 100644 index 0000000..f1dbd1b --- /dev/null +++ b/test_plans/dynamic_config_test_plan.rst @@ -0,0 +1,199 @@ +.. Copyright (c) <2010, 2011>, Intel Corporation + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + - Neither the name of Intel Corporation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + +======================================= +Change driver configuration dynamically +======================================= + +The purpose of this test is to check that it is possible to change the +configuration of a port dynamically. The following command can be used +to change the promiscuous mode of a specific port:: + + set promisc PORTID on|off + +A traffic generator sends traffic with a different destination mac +address than the one that is configured on the port. Once the +``testpmd`` application is started, it is possible to display the +statistics of a port using:: + + show port stats PORTID + +When promiscuous mode is disabled, packet must not be received. When +it is enabled, packets must be received. The change occurs without +stopping the device or restarting the application. + + +Prerequisites +============= + +Support igb_uio and vfio driver, if used vfio, kernel need 3.6+ and enable vt-d in bios. +When used vfio , used "modprobe vfio" and "modprobe vfio-pci" insmod vfiod driver, then used +"./tools/dpdk_nic_bind.py --bind=vfio-pci device_bus_id" to bind vfio driver to test driver. + +Connect the traffic generator to one of the ports (8 in this example). +The size of the packets is not important, in this example it was 64. + +Start the testpmd application. + +Use the 'show port' command to see the MAC address and promiscuous mode for port 8. +The default value for promosuous mode should be enabled:: + + testpmd> show port info 8 + + ********************* Infos for port 8 ********************* + MAC address: 00:1B:21:6D:A3:6E + Link status: up + Link speed: 1000 Mbps + Link duplex: full-duplex + Promiscuous mode: enabled + Allmulticast mode: disabled + + +Test Case: Default Mode +======================= + +The promiscuous mode should be enabled by default. +In promiscuous mode all packets should be received. + +Read the stats for port 8 before sending packets.:: + + testpmd> show port stats 8 + + ######################## NIC statistics for port 8 ######################## + RX-packets: 1 RX-errors: 0 RX-bytes: 64 + TX-packets: 0 TX-errors: 0 TX-bytes: 0 + ############################################################################ + +Send a packet with destination MAC address different than the port 8 address.:: + + testpmd> show port stats 8 + + ######################## NIC statistics for port 8 ######################## + RX-packets: 2 RX-errors: 0 RX-bytes: 128 + TX-packets: 0 TX-errors: 0 TX-bytes: 0 + ############################################################################ + +Verify that the packet was received (RX-packets incremented). +Send a packet with with destination MAC address equal with the port 8 address.:: + + testpmd> show port stats 8 + + ######################## NIC statistics for port 8 ######################## + RX-packets: 3 RX-errors: 0 RX-bytes: 192 + TX-packets: 0 TX-errors: 0 TX-bytes: 0 + ############################################################################ + +Verify that the packet was received (RX-packets incremented). + + +Test Case: Disable Promiscuous Mode +=================================== + +Disable promiscuous mode and verify that the packets are received only for the +packet with destination address matching the port 8 address.:: + + testpmd> set promisc 8 off + +Send a packet with destination MAC address different than the port 8 address.:: + + testpmd> show port stats 8 + + ######################## NIC statistics for port 8 ######################## + RX-packets: 3 RX-errors: 0 RX-bytes: 192 + TX-packets: 0 TX-errors: 0 TX-bytes: 0 + ############################################################################ + +Verify that no packet was received (RX-packets is the same). + +Send a packet with destination MAC address equal to the port 8 address.:: + + ######################## NIC statistics for port 8 ######################## + RX-packets: 4 RX-errors: 0 RX-bytes: 256 + TX-packets: 0 TX-errors: 0 TX-bytes: 0 + ############################################################################ + +Verify that the packet was received (RX-packets incremented). + + + +Test Case: Enable Promiscuous Mode +================================== + +Verify that promiscous mode is still disabled::: + + testpmd> show port info 8 + + ********************* Infos for port 8 ********************* + MAC address: 00:1B:21:6D:A3:6E + Link status: up + Link speed: 1000 Mbps + Link duplex: full-duplex + Promiscuous mode: disabled + Allmulticast mode: disabled + +Enable promiscuous mode and verify that the packets are received for any +destination MAC address.:: + + testpmd> set promisc 8 on + testpmd> show port stats 8 + + ######################## NIC statistics for port 8 ######################## + RX-packets: 4 RX-errors: 0 RX-bytes: 256 + TX-packets: 0 TX-errors: 0 TX-bytes: 0 + ############################################################################ + testpmd> show port stats 8 + +Send a packet with destination MAC address different than the port 8 address.:: + + testpmd> show port stats 8 + + ######################## NIC statistics for port 8 ######################## + RX-packets: 5 RX-errors: 0 RX-bytes: 320 + TX-packets: 0 TX-errors: 0 TX-bytes: 0 + ############################################################################ + +Verify that the packet was received (RX-packets incremented). + +Send a packet with with destination MAC address equal with the port 8 address.:: + + testpmd> show port stats 8 + + ######################## NIC statistics for port 8 ######################## + RX-packets: 6 RX-errors: 0 RX-bytes: 384 + TX-packets: 0 TX-errors: 0 TX-bytes: 0 + ############################################################################ + +Verify that the packet was received (RX-packets incremented). + + + + -- 1.7.4.4