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 B7D271B4A8 for ; Fri, 1 Feb 2019 06:20:01 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Jan 2019 21:20:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,547,1539673200"; d="scan'208";a="315418687" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga006.fm.intel.com with ESMTP; 31 Jan 2019 21:20:00 -0800 Received: from fmsmsx121.amr.corp.intel.com (10.18.125.36) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 31 Jan 2019 21:20:00 -0800 Received: from shsmsx106.ccr.corp.intel.com (10.239.4.159) by fmsmsx121.amr.corp.intel.com (10.18.125.36) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 31 Jan 2019 21:20:00 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.110]) by SHSMSX106.ccr.corp.intel.com ([169.254.10.174]) with mapi id 14.03.0415.000; Fri, 1 Feb 2019 13:19:58 +0800 From: "Tu, Lijuan" To: "Peng, Yuan" , "dts@dpdk.org" CC: "Peng, Yuan" Thread-Topic: [dts] [PATCH v2]test_plans: add rxtx_offload_test_plan.rst Thread-Index: AQHUuSnJPjh337JaGUqOHPJFyLJu0aXKaS3Q Date: Fri, 1 Feb 2019 05:19:57 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BA1FD0B@SHSMSX101.ccr.corp.intel.com> References: <1548914402-46209-1-git-send-email-yuan.peng@intel.com> In-Reply-To: <1548914402-46209-1-git-send-email-yuan.peng@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTk3NWJjOTctZGFjMy00MWQ4LTg4ZTktMTI4M2FmNmM5ZmU1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiTXRlNUs1bVhzNUl4bVwvM0taXC9sU3VDc1dVMGgyVUV1WG1kMDRtY1I3SzlZUnpudXdMTVM4ZXYxVG50aXdxQ3V1In0= x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH v2]test_plans: add rxtx_offload_test_plan.rst 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: Fri, 01 Feb 2019 05:20:03 -0000 Applied, thanks > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Peng Yuan > Sent: Thursday, January 31, 2019 2:00 PM > To: dts@dpdk.org > Cc: Peng, Yuan > Subject: [dts] [PATCH v2]test_plans: add rxtx_offload_test_plan.rst >=20 > Add rxtx_offload_test_plan.rst to test_plans >=20 > Signed-off-by: Peng Yuan >=20 > diff --git a/test_plans/rxtx_offload_test_plan.rst > b/test_plans/rxtx_offload_test_plan.rst > new file mode 100644 > index 0000000..8ecf366 > --- /dev/null > +++ b/test_plans/rxtx_offload_test_plan.rst > @@ -0,0 +1,601 @@ > +.. 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. > + > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +PMD drivers adaption for new RXTX offload APIs > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +Description > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > + Adapt all the Intel drivers for the new RX/TX offload APIs. > + There're new RX/TX offload APIs accepted in 17.11, > + These new APIs are more friendly and easier to use. > + Currently, they co-exist with the old APIs. Some adaption work is > + here to make the drivers can use the old ones or the new ones. > + But suppose the target is to let all the NICs support the new APIs > + and then remove the old ones. > + So, in driver layer, we can begin to support the new ones and remove > + the old ones. > + Eight new commands are added. > + > + Rx test commands:: > + > + testpmd > show port rx_offload capabilities > + testpmd > show port rx_offload configuration > + testmpd > port config rx_offload on|off > + testpmd > port rxq rx_offload on|off > + > + Tx test commands:: > + > + testpmd > show port tx_offload capabilities > + testpmd > show port tx_offload configuration > + testmpd > port config tx_offload on|off > + testpmd > port txq tx_offload on|off > + > +Prerequisites > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. Hardware: > + FVL/NNT > + > +2. Software: > + dpdk: http://dpdk.org/git/dpdk > + scapy: http://www.secdev.org/projects/scapy/ > + > +3. Bind the pf port to dpdk driver:: > + > + ./usertools/dpdk-devbind.py -b igb_uio 05:00.0 05:00.1 > + > +4. There are different capabilities between i40e and ixgbe. > + So define different test cases for the two types of NIC. > + There is no rx_offload per_queue parameter in i40e setting now. > + There is no tx_offload per_queue parameter in ixgbe setting now. > + > + i40e:: > + > + testpmd> show port 0 rx_offload capabilities > + Rx Offloading Capabilities of port 0 : > + Per Queue : > + Per Port : VLAN_STRIP IPV4_CKSUM UDP_CKSUM TCP_CKSUM QINQ_STRIP > + OUTER_IPV4_CKSUM VLAN_FILTER VLAN_EXTEND JUMBO_FRAME SCATTER > KEEP_CRC > + > + testpmd> show port 0 tx_offload capabilities > + Tx Offloading Capabilities of port 0 : > + Per Queue : MBUF_FAST_FREE > + Per Port : VLAN_INSERT IPV4_CKSUM UDP_CKSUM TCP_CKSUM > SCTP_CKSUM > + TCP_TSO OUTER_IPV4_CKSUM QINQ_INSERT VXLAN_TNL_TSO GRE_TNL_TSO > + IPIP_TNL_TSO GENEVE_TNL_TSO MULTI_SEGS > + > + ixgbe:: > + > + testpmd> show port 0 rx_offload capabilities > + Rx Offloading Capabilities of port 0 : > + Per Queue : VLAN_STRIP > + Per Port : IPV4_CKSUM UDP_CKSUM TCP_CKSUM TCP_LRO MACSEC_STRIP > + VLAN_FILTER VLAN_EXTEND JUMBO_FRAME SCATTER SECURITY KEEP_CRC > + > + testpmd> show port 0 tx_offload capabilities > + Tx Offloading Capabilities of port 0 : > + Per Queue : > + Per Port : VLAN_INSERT IPV4_CKSUM UDP_CKSUM TCP_CKSUM > SCTP_CKSUM > + TCP_TSO MACSEC_INSERT MULTI_SEGS SECURITY > + > + > +Rx Offload > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +Test case: Rx offload per-port setting > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. Enable jumboframe when start testpmd:: > + > + ./testpmd -c f -n 4 -- -i --rxq=3D4 --txq=3D4 --max-pkt-len=3D9000 > + testpmd> set fwd rxonly > + testpmd> set verbose 1 > + testpmd> start > + testpmd> show port 0 rx_offload configuration > + Rx Offloading Configuration of port 0 : > + Port : JUMBO_FRAME > + Queue[ 0] : > + Queue[ 1] : > + Queue[ 2] : > + Queue[ 3] : > + > +2. Improve the tester ports's mtu:: > + > + ifconfig enp131s0f0 mtu 9200 > + ifconfig enp131s0f1 mtu 9200 > + > + Send a jumboframe packet:: > + > + pkt1 =3D Ether(dst=3D"52:54:00:00:00:01", > src=3D"52:00:00:00:00:00")/IP(dst=3D"192.168.0.1", src=3D"192.168.0.2", > len=3D8981)/Raw(load=3D"P"*8961) > + pkt2 =3D Ether(dst=3D"52:54:00:00:00:01", > + src=3D"52:00:00:00:00:00")/IP(dst=3D"192.168.0.1", src=3D"192.168.0.3", > + len=3D8981)/Raw(load=3D"P"*8961) > + > + pkt1 was distributed to queue 1, pkt2 was distributed to queue 0. > + > +3. Failed to disable jumboframe per_queue:: > + > + testpmd> port stop 0 > + testpmd> port 0 rxq 1 rx_offload jumbo_frame off > + testpmd> port start 0 > + > + The port can be started normally, but the setting doesn't take effect= . > + Pkt1 still can be distributed to queue 1. > + > +4. Succeed to disable jumboframe per_port:: > + > + testpmd> port stop 0 > + testpmd> port config 0 rx_offload jumbo_frame off > + testpmd> port start 0 > + testpmd> show port 0 rx_offload configuration > + Rx Offloading Configuration of port 0 : > + Port : > + Queue[ 0] : > + Queue[ 1] : > + Queue[ 2] : > + Queue[ 3] : > + testpmd> start > + > + Send the same two packet, there is no packet received. > + > +5. Failed to enable jumboframe per_queue:: > + > + testpmd> port stop 0 > + testpmd> port 0 rxq 1 rx_offload jumbo_frame on > + testpmd> port start 0 > + Configuring Port 0 (socket 0) > + Ethdev port_id=3D0 rx_queue_id=3D1, new added offloads 0x800 must be= within > pre-queue offload capabilities 0x1 in rte_eth_rx_queue_setup() > + Fail to configure port 0 rx queues > + > +6. Succeed to enable jumboframe per_port:: > + > + testpmd> port stop 0 > + testpmd> port config 0 rx_offload jumbo_frame on > + testpmd> port start 0 > + testpmd> show port 0 rx_offload configuration > + Rx Offloading Configuration of port 0 : > + Port : JUMBO_FRAME > + Queue[ 0] : JUMBO_FRAME > + Queue[ 1] : JUMBO_FRAME > + Queue[ 2] : JUMBO_FRAME > + Queue[ 3] : JUMBO_FRAME > + > + Send the same two packet, pkt1 was distributed to queue 1, > + pkt2 was distributed to queue 0. > + > +Test case: Rx offload per-port setting in command-line > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > + > +1. Enable rx cksum in command-line:: > + > + ./testpmd -c f -n 4 -- -i --rxq=3D4 --txq=3D4 --enable-rx-cksum > + testpmd> show port 0 rx_offload configuration > + Rx Offloading Configuration of port 0 : > + Port : IPV4_CKSUM UDP_CKSUM TCP_CKSUM > + Queue[ 0] : > + Queue[ 1] : > + Queue[ 2] : > + Queue[ 3] : > + > +2. Disable the rx cksum per_port:: > + > + testpmd> port stop 0 > + testpmd> port config 0 rx_offload udp_cksum off > + testpmd> show port 0 rx_offload configuration > + Rx Offloading Configuration of port 0 : > + Port : IPV4_CKSUM TCP_CKSUM > + Queue[ 0] : > + Queue[ 1] : > + Queue[ 2] : > + Queue[ 3] : > + testpmd> port start 0 > + > + The port can start normally. > + Try this step with "tcp_cksum/ipv4_cksum", the port can start normall= y. > + > +3. Enable the rx cksum per_port, all the configuration can be set succes= sfully. > + The port can start normally. > + > +Test case: Rx offload per-port and per_queue setting > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > + > +1. Check all the rx_offload capability:: > + > + testpmd> show port 0 rx_offload capabilities > + > +2. Enable and disable per_port and per_queue capabilities. > + > + Check the configuration and the port can start normally. > + > +Test case: NNT Rx offload per-queue setting > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. Start testpmd:: > + > + ./testpmd -c f -n 4 -- -i --rxq=3D4 --txq=3D4 > + testpmd> set fwd mac > + testpmd> set verbose 1 > + testpmd> show port info all > + VLAN offload: > + strip off > + > +2. Show the rx_offload configuration:: > + > + testpmd> show port 0 rx_offload configuration > + Rx Offloading Configuration of port 0 : > + Port : > + Queue[ 0] : > + Queue[ 1] : > + Queue[ 2] : > + Queue[ 3] : > + > +3. Enable vlan_strip per_queue:: > + > + testpmd> port stop 0 > + testpmd> port 0 rxq 0 rx_offload vlan_strip on > + testpmd> port 0 rxq 2 rx_offload vlan_strip on > + testpmd> port start 0 > + testpmd> show port 0 rx_offload configuration > + Rx Offloading Configuration of port 0 : > + Port : > + Queue[ 0] : VLAN_STRIP > + Queue[ 1] : > + Queue[ 2] : VLAN_STRIP > + Queue[ 3] : > + testpmd> show port info 0 > + VLAN offload: > + strip on > + > +4. Send two packets:: > + > + pkt1 =3D Ether(dst=3D"00:00:00:00:01:00", > src=3D"00:02:00:00:00:01")/Dot1Q(vlan=3D1)/IP(src=3D"192.168.0.1", > dst=3D"192.168.0.3")/UDP(sport=3D33,dport=3D34)/Raw('x'*20) > + pkt2 =3D Ether(dst=3D"00:00:00:00:01:00", > + src=3D"00:02:00:00:00:01")/Dot1Q(vlan=3D1)/IP(src=3D"192.168.0.2", > + dst=3D"192.168.0.3")/UDP(sport=3D33,dport=3D34)/Raw('x'*20) > + > + Port0 receive the two packets in queue2 and queue3. > + Queue2 should capture strip vlan information like "VLAN tci=3D0x1" an= d > "PKT_RX_VLAN_STRIPPED", > + queue3 doesn't support vlan strip. > + > + If set "set fwd mac", > + Check the tester port connected to port1 which receive the forwarded = packet > + So you can check that there is vlan id in pkt1, while there is not vl= an id in pkt2. > + The result is consistent to the DUT port receive packets. > + > +5. Disable vlan_strip per_queue:: > + > + testpmd> port stop 0 > + testpmd> port 0 rxq 3 rx_offload vlan_strip on > + testpmd> port 0 rxq 2 rx_offload vlan_strip off > + testpmd> port start 0 > + testpmd> show port 0 rx_offload configuration > + Rx Offloading Configuration of port 0 : > + Port : > + Queue[ 0] : VLAN_STRIP > + Queue[ 1] : > + Queue[ 2] : > + Queue[ 3] : VLAN_STRIP > + > + Send the same packets, > + Queue3 should capture strip vlan information like "VLAN tci=3D0x1" an= d > "PKT_RX_VLAN_STRIPPED", > + queue2 doesn't support vlan strip. > + > +6. Enable vlan_strip per_port:: > + > + testpmd> port stop 0 > + testpmd> port config 0 rx_offload vlan_strip on > + testpmd> port start 0 > + testpmd> show port 0 rx_offload configuration > + Rx Offloading Configuration of port 0 : > + Port : VLAN_STRIP > + Queue[ 0] : VLAN_STRIP > + Queue[ 1] : VLAN_STRIP > + Queue[ 2] : VLAN_STRIP > + Queue[ 3] : VLAN_STRIP > + > + Send the two packets. queue3 and queue2 both implement vlan_strip > + > +7. Disable vlan_strip per_port:: > + > + testpmd> port stop 0 > + testpmd> port config 0 rx_offload vlan_strip off > + testpmd> port start 0 > + testpmd> show port 0 rx_offload configuration > + Rx Offloading Configuration of port 0 : > + Port : > + Queue[ 0] : > + Queue[ 1] : > + Queue[ 2] : > + Queue[ 3] : > + > + testpmd> show port info 0 > + VLAN offload: > + strip off > + > + send the two packets. queue3 and queue2 both don't support > + vlan_strip > + > + Note 1: there is no rx_offload per_queue parameter in i40e driver, > + so this case is just only for ixgbe. > + > + Note 2: per_port setting has higher priority than per_queue setting. > + If you has set an offload by port, you can't change the setting by qu= eue. > + > +Tx Offload > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +Test case: Tx offload per-port setting > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. Start testpmd:: > + > + ./testpmd -c 0x6 -n 4 -- -i --rxq=3D4 --txq=3D4 --port-topology=3Dl= oop > + testpmd> set fwd txonly > + testpmd> set verbose 1 > + testpmd> show port 0 tx_offload configuration > + Tx Offloading Configuration of port 0 : > + Port : > + Queue[ 0] : > + Queue[ 1] : > + Queue[ 2] : > + Queue[ 3] : > + testpmd> start > + > + Tester port0 received the packet. > + There is no vlan infomation in the received packet. > + > +2. Enable vlan_insert per_port:: > + > + testpmd> port stop 0 > + testpmd> port config 0 tx_offload vlan_insert on > + testpmd> tx_vlan set 0 1 > + testpmd> port start 0 > + Configuring Port 0 (socket 0) > + Port 0: 90:E2:BA:AC:9B:44 > + Checking link statuses... > + Done > + testpmd> show port 0 tx_offload configuration > + Tx Offloading Configuration of port 0 : > + Port : VLAN_INSERT > + Queue[ 0] : VLAN_INSERT > + Queue[ 1] : VLAN_INSERT > + Queue[ 2] : VLAN_INSERT > + Queue[ 3] : VLAN_INSERT > + testpmd> start > + > + Tester port0 receive the packet. > + There is vlan ID in the received packet. > + > +3. Disable vlan_insert per_port:: > + > + testpmd> port stop 0 > + testpmd> port config 0 tx_offload vlan_insert off > + testpmd> port start 0 > + testpmd> show port 0 tx_offload configuration > + Tx Offloading Configuration of port 0 : > + Port : > + Queue[ 0] : > + Queue[ 1] : > + Queue[ 2] : > + Queue[ 3] : > + testpmd> start > + > + There is no vlan infomation in the received packet. > + The disable command takes effect. > + > +Test case: Tx offload per-port setting in command-line > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > + > +1. Start testpmd with "--tx-offloads":: > + > + ./testpmd -c 0xf -n 4 -- -i --rxq=3D4 --txq=3D4 --port-topology=3Dl= oop --tx- > offloads=3D0x0001 > + testpmd> show port 0 tx_offload configuration > + Tx Offloading Configuration of port 0 : > + Port : VLAN_INSERT > + Queue[ 0] : > + Queue[ 1] : > + Queue[ 2] : > + Queue[ 3] : > + > + Set the insert vlan ID:: > + > + testpmd> port stop 0 > + testpmd> tx_vlan set 0 1 > + testpmd> port start 0 > + testpmd> set fwd txonly > + testpmd> start > + > + Tester port0 can receive the packets with vlan ID. > + > +2. Disable vlan_insert per_queue:: > + > + testpmd> port stop 0 > + testpmd> port 0 txq 0 tx_offload vlan_insert off > + testpmd> port 0 txq 1 tx_offload vlan_insert off > + testpmd> port 0 txq 2 tx_offload vlan_insert off > + testpmd> port 0 txq 3 tx_offload vlan_insert off > + testpmd> port start 0 > + testpmd> show port 0 tx_offload configuration > + Tx Offloading Configuration of port 0 : > + Port : VLAN_INSERT > + Queue[ 0] : > + Queue[ 1] : > + Queue[ 2] : > + Queue[ 3] : > + testpmd> start > + > + The tester port0 still receive packets with vlan ID. > + The per_port capability can't be disabled by per_queue command. > + > +3. Disable vlan_insert per_port:: > + > + testpmd> port stop 0 > + testpmd> port config 0 tx_offload vlan_insert off > + testpmd> port start 0 > + testpmd> show port 0 tx_offload configuration > + Tx Offloading Configuration of port 0 : > + Port : > + Queue[ 0] : > + Queue[ 1] : > + Queue[ 2] : > + Queue[ 3] : > + testpmd> start > + > + The tester port receive packets without vlan ID. > + The per_port capability can be disabled by per_port command. > + > +4. Enable vlan_insert per_queue:: > + > + testpmd> port stop 0 > + testpmd> port 0 txq 0 tx_offload vlan_insert on > + testpmd> port 0 txq 1 tx_offload vlan_insert on > + testpmd> port 0 txq 2 tx_offload vlan_insert on > + testpmd> port 0 txq 3 tx_offload vlan_insert on > + testpmd> show port 0 tx_offload configuration > + Tx Offloading Configuration of port 0 : > + Port : > + Queue[ 0] : VLAN_INSERT > + Queue[ 1] : VLAN_INSERT > + Queue[ 2] : VLAN_INSERT > + Queue[ 3] : VLAN_INSERT > + testpmd> port start 0 > + Configuring Port 0 (socket 0) > + Ethdev port_id=3D0 tx_queue_id=3D0, new added offloads 0x1 must be w= ithin > pre-queue offload capabilities 0x0 in rte_eth_tx_queue_setup() > + Fail to configure port 0 tx queues > + > + The port failed to start. > + The per_port capability can't be enabled by per_queue command. > + > +5. Enable vlan_insert per_port:: > + > + testpmd> port stop 0 > + testpmd> port config 0 tx_offload vlan_insert on > + testpmd> show port 0 tx_offload configuration > + Tx Offloading Configuration of port 0 : > + Port : VLAN_INSERT > + Queue[ 0] : VLAN_INSERT > + Queue[ 1] : VLAN_INSERT > + Queue[ 2] : VLAN_INSERT > + Queue[ 3] : VLAN_INSERT > + testpmd> port start 0 > + testpmd> start > + > + The tester port received packets with vlan ID. > + The per_port capability can be enabled by per_port command. > + > +Test case: Tx offload per-queue and per-port setting > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > + > +1. Check all the tx_offload capability:: > + > + testpmd> show port 0 tx_offload capabilities > + > +2. Enable and disable per_port and per_queue capabilities. > + > + Check the configuration and the port can start normally. > + > +Test case: FVL Tx offload per-queue setting > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. Start testpmd and get the tx_offload capability and configuration:: > + > + ./testpmd -c f -n 4 -- -i --rxq=3D4 --txq=3D4 > + testpmd> show port 0 tx_offload capabilities > + Tx Offloading Capabilities of port 0 : > + Per Queue : MBUF_FAST_FREE > + Per Port : VLAN_INSERT IPV4_CKSUM UDP_CKSUM TCP_CKSUM > SCTP_CKSUM TCP_TSO OUTER_IPV4_CKSUM QINQ_INSERT VXLAN_TNL_TSO > GRE_TNL_TSO IPIP_TNL_TSO GENEVE_TNL_TSO MULTI_SEGS > + testpmd> show port 0 tx_offload configuration > + Tx Offloading Configuration of port 0 : > + Port : MBUF_FAST_FREE > + Queue[ 0] : > + Queue[ 1] : > + Queue[ 2] : > + Queue[ 3] : > + > +2. Disable mbuf_fast_free per_port:: > + > + testpmd> port stop 0 > + testpmd> port config 0 tx_offload mbuf_fast_free off > + testpmd> port start 0 > + testpmd> show port 0 tx_offload configuration > + Tx Offloading Configuration of port 0 : > + Port : > + Queue[ 0] : > + Queue[ 1] : > + Queue[ 2] : > + Queue[ 3] : > + > +3. Enable mbuf_fast_free per_queue:: > + > + testpmd> port stop 0 > + testpmd> port 0 txq 0 tx_offload mbuf_fast_free on > + testpmd> port 0 txq 1 tx_offload mbuf_fast_free on > + testpmd> port 0 txq 2 tx_offload mbuf_fast_free on > + testpmd> port 0 txq 3 tx_offload mbuf_fast_free on > + testpmd> port start 0 > + testpmd> show port 0 tx_offload configuration > + Tx Offloading Configuration of port 0 : > + Port : > + Queue[ 0] : MBUF_FAST_FREE > + Queue[ 1] : MBUF_FAST_FREE > + Queue[ 2] : MBUF_FAST_FREE > + Queue[ 3] : MBUF_FAST_FREE > + testpmd> start > + > + The port fwd can be started normally. > + > +4. Disable mbuf_fast_free per_queue:: > + > + testpmd> port stop 0 > + testpmd> port 0 txq 0 tx_offload mbuf_fast_free off > + testpmd> port 0 txq 1 tx_offload mbuf_fast_free off > + testpmd> port 0 txq 2 tx_offload mbuf_fast_free off > + testpmd> port 0 txq 3 tx_offload mbuf_fast_free off > + testpmd> port start 0 > + testpmd> show port 0 tx_offload configuration > + Tx Offloading Configuration of port 0 : > + Port : > + Queue[ 0] : > + Queue[ 1] : > + Queue[ 2] : > + Queue[ 3] : > + > +5. Enable mbuf_fast_free per_port:: > + > + testpmd> port stop 0 > + testpmd> port config 0 tx_offload mbuf_fast_free on > + testpmd> port start 0 > + testpmd> show port 0 tx_offload configuration > + Tx Offloading Configuration of port 0 : > + Port : MBUF_FAST_FREE > + Queue[ 0] : MBUF_FAST_FREE > + Queue[ 1] : MBUF_FAST_FREE > + Queue[ 2] : MBUF_FAST_FREE > + Queue[ 3] : MBUF_FAST_FREE > + testpmd> start > + > + The port fwd can be started normally. > + > + Note 1: there is no tx_offload per_queue parameter in ixgbe driver, > + so this case is just only for i40e. > -- > 2.5.0