From: huilongx xu <huilongx.xu@intel.com>
To: dts@dpdk.org
Cc: jingguox.fu@intel.com
Subject: [dts] [dts 2/5] [v2] add dynamic config test plan
Date: Thu, 21 May 2015 16:30:17 +0800 [thread overview]
Message-ID: <1432197020-12725-3-git-send-email-huilongx.xu@intel.com> (raw)
In-Reply-To: <1432197020-12725-1-git-send-email-huilongx.xu@intel.com>
From: huilong xu <huilongx.xu@intel.com>
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 <huilongx.xu@intel.com>
---
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
next prev parent reply other threads:[~2015-05-21 8:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-21 8:30 [dts] [dts 0/5] [v2] add dynamic config test and update checksum offload test code huilongx xu
2015-05-21 8:30 ` [dts] [dts 1/5] [v2] add dynamic config test in default test huilongx xu
2015-05-21 8:30 ` huilongx xu [this message]
2015-05-21 8:30 ` [dts] [dts 3/5] [v2] add dynamic config test script huilongx xu
2015-05-21 8:30 ` [dts] [dts 4/5] [v2] update checksum offload test code huilongx xu
2015-05-21 8:30 ` [dts] [dts 5/5] [v2] add fortville nic test config huilongx xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1432197020-12725-3-git-send-email-huilongx.xu@intel.com \
--to=huilongx.xu@intel.com \
--cc=dts@dpdk.org \
--cc=jingguox.fu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).