From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 23283100C for ; Tue, 7 Aug 2018 12:24:53 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Aug 2018 03:24:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,454,1526367600"; d="scan'208";a="222599731" Received: from dpdk-test60.sh.intel.com ([10.67.111.98]) by orsmga004.jf.intel.com with ESMTP; 07 Aug 2018 03:24:51 -0700 From: Xueqin Lin To: dts@dpdk.org Cc: "xueqin.lin" Date: Tue, 7 Aug 2018 00:23:27 -0400 Message-Id: <1533615807-108447-1-git-send-email-xueqin.lin@intel.com> X-Mailer: git-send-email 2.5.5 Subject: [dts] [PATCH] test_plan/dynamic_queue: add dynamic queue 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: Tue, 07 Aug 2018 10:24:54 -0000 From: "xueqin.lin" Signed-off-by: Xueqin Lin --- test_plans/dynamic_queue_test_plan.rst | 203 +++++++++++++++++++++++++++++++++ 1 file changed, 203 insertions(+) create mode 100644 test_plans/dynamic_queue_test_plan.rst diff --git a/test_plans/dynamic_queue_test_plan.rst b/test_plans/dynamic_queue_test_plan.rst new file mode 100644 index 0000000..780063d --- /dev/null +++ b/test_plans/dynamic_queue_test_plan.rst @@ -0,0 +1,203 @@ +.. Copyright (c) <2018>, 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. + +============= +Dynamic queue +============= +According to existing implementation, rte_eth_[rx|tx]_queue_setup will +always return fail if device is already started(rte_eth_dev_start). +This can't satisfy the usage when application wants to defer to setup +part of the queues while keeping traffic running on those queues already +be setup. +Basically this is not a general hardware limitation, because for NIC +like i40e, ixgbe, it is not necessary to stop the whole device before +configure a fresh queue or reconfigure an existing queue with no traffic +on it. +Dynamic queue lets etherdev driver exposes the capability flag through +rte_eth_dev_info_get when it supports deferred queue configuraiton, +then base on this flag, rte_eth_[rx|tx]_queue_setup could decide to +continue to setup the queue or just return fail when device already +started. +Allow ethdevs to setup/reconfigure/tear down queues at runtime without +stopping the device. Given an ethdev configuration with a specified +number of Tx and Rx queues, requirements as below: +1.The application should be able to start the device with only some of the +queues set up. +2.The application should be able to set up additional queues at runtime +without calling dev_stop(). +3.The application should be able to reconfigure existing queues at runtime +without calling dev_stop(). +4.This support should be implemented in such a way that it does not break +existing PMDs. + +Prerequisites +============= +1. Host PF in DPDK driver:: + + ./tools/dpdk-devbind.py -b igb_uio 81:00.0 + +2. Start testpmd on host, set chained port topology mode, add txq/rxq to + enable multi-queues:: + + ./testpmd -c 0xf -n 4 -- -i --port-topology=chained --txq=64 --rxq=64 + + +Test Case: Rx queue setup at runtime +==================================== +Stop some Rx queues on port 0:: + + testpmd> port 0 rxq stop + +Set rxonly forward, start testpmd + +Send different src or dst IPv4 packets:: + + p=Ether()/IP(src="192.168.0.1", dst="192.168.0.1")/Raw("x"*20) + +Stop testpmd, find stopped queues can't receive packets, but other queues +could receive packets + +Setup these stopped queues on the port:: + + testpmd> port 0 rxq setup + +Start these stopped queues on the port, start testpmd:: + + testpmd> port 0 rxq start + +Send different src or dst IPv4 packets + +Stop testpmd, check all the setup queues could receive packets + + +Test Case: Tx queue setup at runtime +==================================== +Check txq ring size is 256:: + + testpmd> show txq info 0 + Number of TXDs: 256 + +Stop one Tx queue on port 0:: + + testpmd> port 0 txq stop + +Set txonly forward, start testpmd + +Start testpmd, then stop, check this stopped queue only transmits 255 packets + +Setup this stopped queue on the port:: + + testpmd> port 0 txq setup + +Start this stopped queue on the port:: + + testpmd> port 0 txq start + +Start then stop testpmd, check all queues could transmit lots of packets, +not only 255 packets + +Repeat above steps for 2 times + + +Test Case: Rx queue configure at runtime +======================================== +Stop some Rx queues on port 0:: + + testpmd> port 0 rxq stop + +Set rxonly forward, start testpmd + +Send different src or dst IPv4 packets:: + + p=Ether()/IP(src="192.168.0.1", dst="192.168.0.1")/Raw("x"*20) + +Stop testpmd, find stopped queues can't receive packets, but other queues +could receive packets + +Check rxq ring size is 256:: + + testpmd> show rxq info 0 + Number of RXDs: 256 + +Reconfigure ring size as 512 for the stopped queues on port 0:: + + testpmd> port config 0 rxq ring_size 512 + +Setup these stopped queues on the port:: + + testpmd> port 0 rxq setup + +Check stopped rxq ring sizes have been changed to 512 + +Start these stopped queues on the port, start testpmd:: + + testpmd> port 0 rxq start + +Send different src or dst IPv4 packets + +Stop testpmd, check all the setup queues could receive packets + + +Test Case: Tx queue configure at runtime +======================================== +Check txq ring size is 256:: + + testpmd> show txq info 0 + Number of TXDs: 256 + +Stop one Tx queue on port 0:: + + testpmd> port 0 txq stop + +Set txonly forward, start testpmd + +Start testpmd, then stop, check this stopped queue only transmits 255 packets + +Reconfigure ring size as 512 for the stopped queue on port 0:: + + testpmd> port config 0 txq ring_size 512 + +Setup this stopped queue on the port:: + + testpmd> port 0 txq setup + +Check stopped txq ring size has been changed to 512 + +Start this stopped queue on the port, start testpmd:: + + testpmd> port 0 txq start + +Stop testpmd, check all queues could transmit lots of packets, +not only 511 packets + +Repeat above steps for 2 times + -- 2.7.5