* [dts] [PATCH] test_plans: Add rxtx_offload_test_plan.rst
@ 2019-01-16 8:52 Peng Yuan
0 siblings, 0 replies; 3+ messages in thread
From: Peng Yuan @ 2019-01-16 8:52 UTC (permalink / raw)
To: dts; +Cc: Peng Yuan
Add rxtx_offload_test_plan.rst to test_plans
Signed-off-by: Peng Yuan <yuan.peng@intel.com>
diff --git a/test_plans/rxtx_offload_test_plan.rst b/test_plans/rxtx_offload_test_plan.rst
new file mode 100644
index 0000000..99f810e
--- /dev/null
+++ b/test_plans/rxtx_offload_test_plan.rst
@@ -0,0 +1,628 @@
+.. 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.
+
+==============================================
+PMD drivers adaption for new RXTX offload APIs
+==============================================
+Description
+===========
+
+ 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:
+ 1. testpmd > show port <port_id> rx_offload capabilities
+ 2. testpmd > show port <port_id> rx_offload configuration
+ 3. testmpd > port config <port_id> rx_offload <offload> on|off
+ 4. testpmd > port <port_id> rxq <queue_id> rx_offload <offload> on|off
+ Tx test commands:
+ 1. testpmd > show port <port_id> tx_offload capabilities
+ 2. testpmd > show port <port_id> tx_offload configuration
+ 3. testmpd > port config <port_id> tx_offload <offload> on|off
+ 4. testpmd > port <port_id> txq <queue_id> tx_offload <offload> on|off
+
+Prerequisites
+=============
+
+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
+
+Notes: 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.
+There are some different printing in general cases between NNT and FVL,
+I just show the printing of NNT.
+
+Test case: NNT Rx offload per-queue setting
+===========================================
+
+1. Start testpmd::
+
+ ./testpmd -c f -n 4 -- -i --rxq=4 --txq=4
+ testpmd> set fwd mac
+ testpmd> set verbose 1
+ testpmd> show port info all
+ VLAN offload:
+ strip off
+
+2. Get the rx_offload capability and configuration::
+
+ 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 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 : CRC_STRIP
+ 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 = Ether(dst="00:00:00:00:01:00", src="00:02:00:00:00:01")/Dot1Q(vlan=1)/IP(src="192.168.0.1", dst="192.168.0.3")/UDP(sport=33,dport=34)/Raw('x'*20)
+ pkt2 = Ether(dst="00:00:00:00:01:00", src="00:02:00:00:00:01")/Dot1Q(vlan=1)/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=33,dport=34)/Raw('x'*20)
+
+ Port0 receive the two packets in queue2 and queue3.
+ Queue2 should capture strip vlan information like "VLAN tci=0x1" and "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 vlan 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 : CRC_STRIP
+ 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=0x1" and "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 CRC_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 : CRC_STRIP
+ 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
+ Notes: there is no per_queue parameter in i40e driver,
+ so this case is just only for ixgbe.
+
+Test case: Rx offload per-port setting
+===========================================
+
+1. Enable jumboframe when start testpmd::
+
+ ./testpmd -c f -n 4 -- -i --rxq=4 --txq=4 --max-pkt-len=9000
+ testpmd> set fwd rxonly
+ testpmd> set verbose 1
+ testpmd> start
+ 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 CRC_STRIP SCATTER SECURITY KEEP_CRC
+ 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 = Ether(dst="52:54:00:00:00:01", src="52:00:00:00:00:00")/IP(dst="192.168.0.1", src="192.168.0.2", len=8981)/Raw(load="P"*8961)
+ pkt2 = Ether(dst="52:54:00:00:00:01", src="52:00:00:00:00:00")/IP(dst="192.168.0.1", src="192.168.0.3", len=8981)/Raw(load="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=0 rx_queue_id=1, 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.
+ Notes: There is some difference printing between NNT and FVL,
+ which has no impact to the test result.
+
+Test case: Rx offload per-port setting in command-line
+======================================================
+
+1. Enable rx cksum in command-line::
+
+ ./testpmd -c f -n 4 -- -i --rxq=4 --txq=4 --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 normally.
+
+3. Enable the rx cksum per_port, all the configuration can be set successfully.
+ The port can start normally.
+
+Test case: NNT Rx offload per-queue and per_queue setting
+=========================================================
+
+1. Check all the rx_offload capability::
+
+ 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
+
+2. Enable and disable per_port and per_queue capabilities::
+
+ TCP_LRO MACSEC_STRIP VLAN_FILTER VLAN_EXTEND CRC_STRIP SCATTER SECURITY KEEP_CRC
+
+ Check the configuration and the port can start normally.
+ Notes: It's not allowed to set both TCP_LRO and KEEP_CRC offload flags.
+ So if you want to config TCP_LRO on, you must config KEEP_CRC off first.
+
+Test case: Tx offload vlan insert per-port setting
+==================================================
+
+1. Start testpmd::
+
+ ./testpmd -c 0x6 -n 4 -- -i --rxq=4 --txq=4 --port-topology=loop
+ testpmd> set fwd txonly
+ testpmd> set verbose 1
+ 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
+ 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> 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
+
+ There is still not vlan infomation in the received packet.
+
+3. Set the insert vlan ID::
+
+ testpmd> tx_vlan set 0 1
+
+ Tester port0 receive the packet.
+ There is vlan ID in the received packet.
+ The old command can take effect.
+
+4. 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 vlan insert per-queue setting failed
+==========================================================
+
+1. Start testpmd with "--tx-offloads"::
+
+ ./testpmd -c 0xf -n 4 -- -i --rxq=4 --txq=4 --port-topology=loop --tx-offloads=0x0001
+ 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
+ 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 packet 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=0 tx_queue_id=0, new added offloads 0x1 must be within 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 receive packet with vlan ID.
+ The per_port capability can be enabled by per_port command.
+
+Test case: NNT Tx offload per-port setting
+==========================================
+
+1. Check all the tx_offload capability::
+
+ 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
+
+ Notes: There is not per_queue capability in tx_offload of ixgbe.
+
+2. Enable and disable capabilities per_port::
+
+ IPV4_CKSUM UDP_CKSUM TCP_CKSUM SCTP_CKSUM TCP_TSO MACSEC_INSERT MULTI_SEGS SECURITY
+
+ Check the configuration and the port can start normally.
+
+Test case: FVL Rx offload per-port and port-queue setting
+=========================================================
+
+1. Check all the rx_offload capability::
+
+ 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
+
+2. Enable and disable per_port and per_queue capabilities::
+
+ VLAN_STRIP QINQ_STRIP OUTER_IPV4_CKSUM VLAN_FILTER VLAN_EXTEND SCATTER KEEP_CRC
+
+ Check the configuration and the port can start normally.
+ Notes: It's not allowed to set both CRC_STRIP and KEEP_CRC offload flags.
+ So if you want to config keep_crc on, you must config crc_strip off first.
+
+Test case: FVL Tx offload per-queue setting
+===========================================
+
+1. Start testpmd and get the tx_offload capability and configuration::
+
+ ./testpmd -c f -n 4 -- -i --rxq=4 --txq=4
+ 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
+
+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
+
+Test case: FVL Tx offload per-port setting
+==========================================
+
+1. Check all the tx_offload capability::
+
+ 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
+
+2. Enable and disable per_port capabilities::
+
+ TCP_TSO OUTER_IPV4_CKSUM QINQ_INSERT VXLAN_TNL_TSO GRE_TNL_TSO IPIP_TNL_TSO GENEVE_TNL_TSO MULTI_SEG
+
+ Check the configuration and the port can start normally.
--
2.7.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dts] [PATCH] test_plans: Add rxtx_offload_test_plan.rst
2018-08-07 11:12 Peng Yuan
@ 2018-08-20 2:07 ` Liu, Yong
0 siblings, 0 replies; 3+ messages in thread
From: Liu, Yong @ 2018-08-20 2:07 UTC (permalink / raw)
To: Peng, Yuan, dts; +Cc: Peng, Yuan
Hi Yuan,
Some comments are inline. Please change the naming format of test case and remove some reductant outputs from the plan.
Thanks,
Marvin
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Peng Yuan
> Sent: Tuesday, August 07, 2018 7:13 PM
> To: dts@dpdk.org
> Cc: Peng, Yuan <yuan.peng@intel.com>
> Subject: [dts] [PATCH] test_plans: Add rxtx_offload_test_plan.rst
>
> Add test plan of Intel PMD drivers adaption for new RXTX offload APIs
>
> Signed-off-by: Peng Yuan <yuan.peng@intel.com>
>
> diff --git a/test_plans/rxtx_offload_test_plan.rst
> b/test_plans/rxtx_offload_test_plan.rst
> new file mode 100644
> index 0000000..023e490
> --- /dev/null
> +++ b/test_plans/rxtx_offload_test_plan.rst
> @@ -0,0 +1,1005 @@
> +.. 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.
> +
> +==============================================
> +PMD drivers adaption for new RXTX offload APIs
> +==============================================
> +Description
> +===========
> +
> + 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:
> + 1. testpmd > show port <port_id> rx_offload capabilities
> + 2. testpmd > show port <port_id> rx_offload configuration
> + 3. testmpd > port config <port_id> rx_offload <offload> on|off
> + 4. testpmd > port <port_id> rxq <queue_id> rx_offload <offload> on|off
> + Tx test commands:
> + 1. testpmd > show port <port_id> tx_offload capabilities
> + 2. testpmd > show port <port_id> tx_offload configuration
> + 3. testmpd > port config <port_id> tx_offload <offload> on|off
> + 4. testpmd > port <port_id> txq <queue_id> tx_offload <offload> on|off
> +
Suggest to remove the useless spaces in the description.
> +Prerequisites
> +=============
> +
> +1. Hardware:
> + Fortville/82599
> +
Please use code name NNT replace of 82599. Since this test plan only cover FVL and NNT hardware, please update "support list file" in following patches.
> +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
> +
> +Notes: There is 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.
> +
> +Ixgbe cases:
> +===========
> +
> +Test case: rx_offload set per_queue parameter
> +=============================================
I'd like to add NNT in the title, rename case name like "NNT Rx offload per-queue setting".
> +
> +1. Start testpmd::
> +
> + ./testpmd -c f -n 4 -- -i --rxq=4 --txq=4
> + testpmd> set fwd mac
> + testpmd> set verbose 1
> + testpmd> show port info all
> + VLAN offload:
> + strip off
> +
> +2. Get the rx_offload capability and configuration::
> +
> + 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 CRC_STRIP SCATTER SECURITY KEEP_CRC
> +
> + testpmd> show port 0 rx_offload configuration
> + Rx Offloading Configuration of port 0 :
> + Port : CRC_STRIP
> + 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 : CRC_STRIP
> + 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 = Ether(dst="00:00:00:00:01:00",
> src="00:02:00:00:00:01")/Dot1Q(vlan=1)/IP(src="192.168.0.1",
> dst="192.168.0.3")/UDP(sport=33,dport=34)/Raw('x'*20)
> + pkt2 = Ether(dst="00:00:00:00:01:00",
> src="00:02:00:00:00:01")/Dot1Q(vlan=1)/IP(src="192.168.0.2",
> dst="192.168.0.3")/UDP(sport=33,dport=34)/Raw('x'*20)
> +
> + Port0 receive the two packets::
> +
> + testpmd> port 0/queue 3: received 1 packets
> + src=00:02:00:00:00:01 - dst=00:00:00:00:01:00 - type=0x8100 -
> length=66 - nb_segs=1 - RSS hash=0x6bfdcb2f - RSS queue=0x3 - hw ptype:
> L2_ETHER L3_IPV4 L4_UDP - sw ptype: L2_ETHER_VLAN L3_IPV4 L4_UDP -
> l2_len=18 - l3_len=20 - l4_len=8 - Receive queue=0x3
> + ol_flags: PKT_RX_VLAN PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD
> PKT_RX_IP_CKSUM_GOOD
> + port 0/queue 2: received 1 packets
> + src=00:02:00:00:00:01 - dst=00:00:00:00:01:00 - type=0x0800 -
> length=62 - nb_segs=1 - RSS hash=0xf0068ffe - RSS queue=0x2 - VLAN tci=0x1 -
> hw ptype: L2_ETHER L3_IPV4 L4_UDP - sw ptype: L2_ETHER L3_IPV4 L4_UDP -
> l2_len=14 - l3_len=20 - l4_len=8 - Receive queue=0x2
> + ol_flags: PKT_RX_VLAN PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD
> PKT_RX_IP_CKSUM_GOOD PKT_RX_VLAN_STRIPPED
> +
> + Queue2 implement the vlan strip "PKT_RX_VLAN_STRIPPED", queue3 doesn't
> support vlan strip.
Too much details in the test plan may make it not easy to catch the main point.
Comment like 'Queue 2 should capture strip vlan information like "VLAN tci=0x1" and "PKT_RX_VLAN_STRIPPED"' is enough.
> +
> + If set "set fwd mac",
> + Check the tester port connected to port1 which receive the forwarded
> packet::
> +
> + [root@pengyuan ~]# tcpdump -i ens785f1 -e -n -v -x
> + tcpdump: listening on ens785f1, link-type EN10MB (Ethernet), capture
> size 262144 bytes
> + 16:41:42.488211 90:e2:ba:ac:9b:45 > 02:00:00:00:00:01, ethertype 802.1Q
> (0x8100), length 66: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1,
> offset 0, flags [none], proto UDP (17), length 48)
> + 192.168.0.1.dsp > 192.168.0.3.34: UDP, length 20
> + 0x0000: 0001 0800 4500 0030 0001 0000 4011 f967
> + 0x0010: c0a8 0001 c0a8 0003 0021 0022 001c c969
> + 0x0020: 7878 7878 7878 7878 7878 7878 7878 7878
> + 0x0030: 7878 7878
> + 16:41:48.778225 90:e2:ba:ac:9b:45 > 02:00:00:00:00:01, ethertype IPv4
> (0x0800), length 62: (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto
> UDP (17), length 48)
> + 192.168.0.2.dsp > 192.168.0.3.34: UDP, length 20
> + 0x0000: 4500 0030 0001 0000 4011 f966 c0a8 0002
> + 0x0010: c0a8 0003 0021 0022 001c c968 7878 7878
> + 0x0020: 7878 7878 7878 7878 7878 7878 7878 7878
> +
> + So you can check that there is vlan id in pkt1, while there is not vlan
> id in pkt2.
> + The result is consistent to the DUT port receive packets.
> +
Same comment as previous one, no need to list the dumped hex value in test plan.
> +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 : CRC_STRIP
> + Queue[ 0] : VLAN_STRIP
> + Queue[ 1] :
> + Queue[ 2] :
> + Queue[ 3] : VLAN_STRIP
> +
> + Send the same packets::
> +
> + testpmd> port 0/queue 3: received 1 packets
> + src=00:02:00:00:00:01 - dst=00:00:00:00:01:00 - type=0x0800 -
> length=62 - nb_segs=1 - RSS hash=0x6bfdcb2f - RSS queue=0x3 - VLAN tci=0x1 -
> hw ptype: L2_ETHER L3_IPV4 L4_UDP - sw ptype: L2_ETHER L3_IPV4 L4_UDP -
> l2_len=14 - l3_len=20 - l4_len=8 - Receive queue=0x3
> + ol_flags: PKT_RX_VLAN PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD
> PKT_RX_IP_CKSUM_GOOD PKT_RX_VLAN_STRIPPED
> + port 0/queue 2: received 1 packets
> + src=00:02:00:00:00:01 - dst=00:00:00:00:01:00 - type=0x8100 -
> length=66 - nb_segs=1 - RSS hash=0xf0068ffe - RSS queue=0x2 - hw ptype:
> L2_ETHER L3_IPV4 L4_UDP - sw ptype: L2_ETHER_VLAN L3_IPV4 L4_UDP -
> l2_len=18 - l3_len=20 - l4_len=8 - Receive queue=0x2
> + ol_flags: PKT_RX_VLAN PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD
> PKT_RX_IP_CKSUM_GOOD
> +
> + Queue3 implement the vlan strip, 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 CRC_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 : CRC_STRIP
> + 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
> + Notes: there is no per_queue parameter in i40e driver,
> + so this case is just only for ixgbe.
> +
> +Test case: rx_offload set per_port parameter
> +============================================
> +
> +1. Enable jumboframe when start testpmd::
> +
> + ./testpmd -c f -n 4 -- -i --rxq=4 --txq=4 --max-pkt-len=9000
> + testpmd> set fwd rxonly
> + testpmd> set verbose 1
> + testpmd> start
> + 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 CRC_STRIP SCATTER SECURITY KEEP_CRC
> + testpmd> show port 0 rx_offload configuration
> + Rx Offloading Configuration of port 0 :
> + Port : JUMBO_FRAME CRC_STRIP
> + 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 = Ether(dst="52:54:00:00:00:01",
> src="52:00:00:00:00:00")/IP(dst="192.168.0.1", src="192.168.0.2",
> len=8981)/Raw(load="P"*8961)
> + pkt2 = Ether(dst="52:54:00:00:00:01",
> src="52:00:00:00:00:00")/IP(dst="192.168.0.1", src="192.168.0.3",
> len=8981)/Raw(load="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 : CRC_STRIP
> + 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=0 rx_queue_id=1, 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 CRC_STRIP
> + 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 1 command-line parameter covers 3 per_port parameter
> +==========================================================================
Case name is little bit confusing, name like "NNT Rx chksum offload per-port setting" should be better.
> +
> +1. Enable rx cksum in command-line::
> +
> + ./testpmd -c f -n 4 -- -i --rxq=4 --txq=4 --enable-rx-cksum
> + testpmd> show port 0 rx_offload configuration
> + Rx Offloading Configuration of port 0 :
> + Port : IPV4_CKSUM UDP_CKSUM TCP_CKSUM CRC_STRIP
> + 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 CRC_STRIP
> + 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 normally.
> +
> +3. Enable the rx cksum per_port, all the configuration can be set
> successfully.
> + The port can start normally.
> +
> +Test case: rx_offload set other capability per_port and per_queue
> +=================================================================
> +
Can't get clear mind of the case content by case name, please suitable name.
> +1. Check all the rx_offload capability::
> +
> + 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 CRC_STRIP SCATTER SECURITY KEEP_CRC
> +
Please note which kind of capability will be tested in this case.
> +2. Enable and disable other capability per_port and per_queue.
> + Check the configuration and the port can start normally.
> + It's not allowed to set both CRC STRIP and KEEP CRC offload flags.
> + So if you want to config keep_crc on, you must config crc_strip off first.
> +
Description about CRC_STRIP and KEEP_CRC is more like note.
> +Test case: tx_offload set vlan_insert per_port
> +==============================================
> +
I assume this case support both on FVL and NNT, so it can be named like "Tx offload vlan insert setting".
> +1. Start testpmd::
> +
> + ./testpmd -c 0x6 -n 4 -- -i --rxq=4 --txq=4 --port-topology=loop
> + testpmd> set fwd txonly
> + testpmd> set verbose 1
> + 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
> + 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::
> +
> + # tcpdump -i enp131s0f1 -e -n -v -x
> + 17:07:17.683840 90:e2:ba:ac:9b:44 > 02:00:00:00:00:00, ethertype IPv4
> (0x0800), length 64: (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto
> UDP (17), length 50)
> + 192.168.0.1.1024 > 192.168.0.2.1024: UDP, length 22
> + 0x0000: 4500 0032 0000 0000 4011 f967 c0a8 0001
> + 0x0010: c0a8 0002 0400 0400 001e 0000 0000 0000
> + 0x0020: 0000 0000 0000 0000 0000 0000 0000 0000
> + 0x0030: 0000
> +
> + There is no vlan infomation.
> +
> +2. Enable vlan_insert per_port::
> +
> + testpmd> port stop 0
> + testpmd> port config 0 tx_offload vlan_insert on
> + 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
> + 17:07:17.683840 90:e2:ba:ac:9b:44 > 02:00:00:00:00:00, ethertype IPv4
> (0x0800), length 64: (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto
> UDP (17), length 50)
> + 192.168.0.1.1024 > 192.168.0.2.1024: UDP, length 22
> + 0x0000: 4500 0032 0000 0000 4011 f967 c0a8 0001
> + 0x0010: c0a8 0002 0400 0400 001e 0000 0000 0000
> + 0x0020: 0000 0000 0000 0000 0000 0000 0000 0000
> + 0x0030: 0000
> +
> + There is not vlan infomation in the received packet.
> +
> +3. Set the insert vlan ID::
> +
> + testpmd> tx_vlan set 0 1
> +
> + Receive the packet::
> +
> + 17:12:25.988130 90:e2:ba:ac:9b:44 > 02:00:00:00:00:00, ethertype 802.1Q
> (0x8100), length 68: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 0,
> offset 0, flags [none], proto UDP (17), length 50)
> + 192.168.0.1.1024 > 192.168.0.2.1024: UDP, length 22
> + 0x0000: 0001 0800 4500 0032 0000 0000 4011 f967
> + 0x0010: c0a8 0001 c0a8 0002 0400 0400 001e 0000
> + 0x0020: 0000 0000 0000 0000 0000 0000 0000 0000
> + 0x0030: 0000 0000 0000
> +
> + The old command can take effect.
> +
> +4. 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
> + 17:14:50.291419 90:e2:ba:ac:9b:44 > 02:00:00:00:00:00, ethertype IPv4
> (0x0800), length 64: (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto
> UDP (17), length 50)
> + 192.168.0.1.1024 > 192.168.0.2.1024: UDP, length 22
> + 0x0000: 4500 0032 0000 0000 4011 f967 c0a8 0001
> + 0x0010: c0a8 0002 0400 0400 001e 0000 0000 0000
> + 0x0020: 0000 0000 0000 0000 0000 0000 0000 0000
> + 0x0030: 0000
> +
> + There is no vlan infomation in the received packet.
> + The disable command take effect.
> +
> +Test case: tx_offload failed to set vlan_insert per_queue
> +=========================================================
> +
> +1. Start testpmd with "--tx-offloads"::
> +
> + ./testpmd -c 0xf -n 4 -- -i --rxq=4 --txq=4 --port-topology=loop --tx-
> offloads=0x0001
> + 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
> + 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
> +
> + Receive the packet::
> +
> + 17:18:08.148797 90:e2:ba:ac:9b:44 > 02:00:00:00:00:00, ethertype 802.1Q
> (0x8100), length 68: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 0,
> offset 0, flags [none], proto UDP (17), length 50)
> + 192.168.0.1.1024 > 192.168.0.2.1024: UDP, length 22
> + 0x0000: 0001 0800 4500 0032 0000 0000 4011 f967
> + 0x0010: c0a8 0001 c0a8 0002 0400 0400 001e 0000
> + 0x0020: 0000 0000 0000 0000 0000 0000 0000 0000
> + 0x0030: 0000 0000 0000
> +
> +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 port 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=0 tx_queue_id=0, new added offloads 0x1 must be within
> 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 receive packet with vlan ID.
> + The per_port capability can be enabled by per_port command.
> +
> +Test case: tx_offload set other capability per_port
> +===================================================
> +
> +1. Check all the tx_offload capability::
> +
> + 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
> +
> + Ixgbe There is not per_queue capability in tx_offload.
> +
> +2. Enable and disable other capability per_port.
> + Check the configuration and the port can start normally.
> +
> +I40e cases:
> +===========
> +
> +Test case: rx_offload set per_port parameter
> +============================================
> +
> +1. Enable jumboframe when start testpmd::
> +
> + ./testpmd -c f -n 4 -- -i --rxq=4 --txq=4 --max-pkt-len=9000
> + testpmd> set fwd rxonly
> + testpmd> set verbose 1
> + testpmd> start
> + 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 CRC_STRIP KEEP_CRC
> + testpmd> show port 0 rx_offload configuration
> + Rx Offloading Configuration of port 0 :
> + Port : JUMBO_FRAME CRC_STRIP
> + Queue[ 0] :
> + Queue[ 1] :
> + Queue[ 2] :
> + Queue[ 3] :
> +
> +2. Improve the tester ports's mtu::
> +
> + ifconfig ens785f2 mtu 9200
> + ifconfig ens785f3 mtu 9200
> +
> + Send a jumboframe packet::
> +
> + pkt1 = Ether(dst="52:54:00:00:00:01",
> src="52:00:00:00:00:00")/IP(dst="192.168.0.1", src="192.168.0.2",
> len=8981)/Raw(load="P"*8961)
> + pkt2 = Ether(dst="52:54:00:00:00:01",
> src="52:00:00:00:00:00")/IP(dst="192.168.0.1", src="192.168.0.3",
> len=8981)/Raw(load="P"*8961)
> +
> + pkt1 was distributed to queue 2, pkt2 was distributed to queue 3.
> +
> +3. Failed to disable jumboframe per_queue::
> +
> + testpmd> port stop 0
> + testpmd> port 0 rxq 2 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 2.
> +
> +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 : CRC_STRIP
> + 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=0 rx_queue_id=1, new added offloads 0x800 must be within
> pre-queue offload capabilities 0x0 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 CRC_STRIP
> + 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 2,
> + pkt2 was distributed to queue 3.
> +
> +Test case: rx_offload 1 command-line parameter covers 3 per_port parameter
> +==========================================================================
> +
> +1. Enable rx cksum in command-line::
> +
> + ./testpmd -c f -n 4 -- -i --rxq=4 --txq=4 --enable-rx-cksum
> + testpmd> show port 0 rx_offload configuration
> + Rx Offloading Configuration of port 0 :
> + Port : IPV4_CKSUM UDP_CKSUM TCP_CKSUM CRC_STRIP
> + 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 CRC_STRIP
> + 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 normally.
> +
> +3. Enable the rx cksum per_port, all the configuration can be set
> successfully.
> + The port can start normally.
> +
> +Test case: rx_offload set other capability per_port and per_queue
> +=================================================================
> +
> +1. Check all the rx_offload capability::
> +
> + 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 CRC_STRIP KEEP_CRC
> +
> +2. Enable and disable other capability per_port and per_queue.
> + Check the configuration and the port can start normally.
> + It's not allowed to set both CRC_STRIP and KEEP_CRC offload flags.
> + So if you want to config keep_crc on, you must config crc_strip off first.
> +
> +Test case: tx_offload set mbuf_fast_free per_queue
> +==================================================
> +
> +1. Start testpmd and get the tx_offload capability and configuration::
> +
> + ./testpmd -c f -n 4 -- -i --rxq=4 --txq=4
> + 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
> +
> +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
> +
> +Test case: tx_offload set vlan_insert per_port
> +==============================================
> +
> +1. Start testpmd::
> +
> + ./testpmd -c 0x6 -n 4 -- -i --rxq=4 --txq=4 --port-topology=loop
> + testpmd> set fwd txonly
> + testpmd> set verbose 1
> + 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] :
> + testpmd> start
> +
> + Tester port0 received the packet::
> +
> + # tcpdump -i ens785f2 -e -n -v -x
> + 19:04:23.234770 00:00:00:00:01:00 > 02:00:00:00:00:00, ethertype IPv4
> (0x0800), length 64: (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto
> UDP (17), length 50)
> + 192.168.0.1.1024 > 192.168.0.2.1024: UDP, length 22
> + 0x0000: 4500 0032 0000 0000 4011 f967 c0a8 0001
> + 0x0010: c0a8 0002 0400 0400 001e 0000 0000 0000
> + 0x0020: 0000 0000 0000 0000 0000 0000 0000 0000
> + 0x0030: 0000
> +
> + There is no vlan infomation.
> +
> +2. Enable vlan_insert per_port::
> +
> + testpmd> port stop 0
> + testpmd> port config 0 tx_offload vlan_insert on
> + 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 MBUF_FAST_FREE
> + Queue[ 0] : VLAN_INSERT
> + Queue[ 1] : VLAN_INSERT
> + Queue[ 2] : VLAN_INSERT
> + Queue[ 3] : VLAN_INSERT
> + testpmd> start
> + 19:05:33.788932 00:00:00:00:01:00 > 02:00:00:00:00:00, ethertype IPv4
> (0x0800), length 64: (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto
> UDP (17), length 50)
> + 192.168.0.1.1024 > 192.168.0.2.1024: UDP, length 22
> + 0x0000: 4500 0032 0000 0000 4011 f967 c0a8 0001
> + 0x0010: c0a8 0002 0400 0400 001e 0000 0000 0000
> + 0x0020: 0000 0000 0000 0000 0000 0000 0000 0000
> + 0x0030: 0000
> +
> + There is not vlan infomation in the received packet.
> +
> +3. Set the insert vlan ID::
> +
> + testpmd> tx_vlan set 0 1
> +
> + Receive the packet::
> +
> + 19:06:50.483522 00:00:00:00:01:00 > 02:00:00:00:00:00, ethertype 802.1Q
> (0x8100), length 68: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 0,
> offset 0, flags [none], proto UDP (17), length 50)
> + 192.168.0.1.1024 > 192.168.0.2.1024: UDP, length 22
> + 0x0000: 0001 0800 4500 0032 0000 0000 4011 f967
> + 0x0010: c0a8 0001 c0a8 0002 0400 0400 001e 0000
> + 0x0020: 0000 0000 0000 0000 0000 0000 0000 0000
> + 0x0030: 0000 0000 0000
> +
> + The old command can take effect.
> +
> +4. 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 : MBUF_FAST_FREE
> + Queue[ 0] :
> + Queue[ 1] :
> + Queue[ 2] :
> + Queue[ 3] :
> + testpmd> start
> + 19:08:41.718884 00:00:00:00:01:00 > 02:00:00:00:00:00, ethertype IPv4
> (0x0800), length 64: (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto
> UDP (17), length 50)
> + 192.168.0.1.1024 > 192.168.0.2.1024: UDP, length 22
> + 0x0000: 4500 0032 0000 0000 4011 f967 c0a8 0001
> + 0x0010: c0a8 0002 0400 0400 001e 0000 0000 0000
> + 0x0020: 0000 0000 0000 0000 0000 0000 0000 0000
> + 0x0030: 0000
> +
> + There is no vlan infomation in the received packet.
> + The disable command take effect.
> +
> +Test case: tx_offload failed to set vlan_insert per_queue
> +=========================================================
> +
> +1. Start testpmd with "--tx-offloads"::
> +
> + ./testpmd -c 0xf -n 4 -- -i --rxq=4 --txq=4 --port-topology=loop --tx-
> offloads=0x0001
> + 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 : 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
> +
> + Receive the packet::
> +
> + 19:13:21.743624 00:00:00:00:01:00 > 02:00:00:00:00:00, ethertype 802.1Q
> (0x8100), length 68: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 0,
> offset 0, flags [none], proto UDP (17), length 50)
> + 192.168.0.1.1024 > 192.168.0.2.1024: UDP, length 22
> + 0x0000: 0001 0800 4500 0032 0000 0000 4011 f967
> + 0x0010: c0a8 0001 c0a8 0002 0400 0400 001e 0000
> + 0x0020: 0000 0000 0000 0000 0000 0000 0000 0000
> + 0x0030: 0000 0000 0000
> +
> +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 port 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=0 tx_queue_id=0, new added offloads 0x1 must be within
> pre-queue offload capabilities 0x10000 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 receive packet with vlan ID.
> + The per_port capability can be enabled by per_port command.
> +
> +Test case: tx_offload set other capability per_port
> +===================================================
> +
> +1. Check all the tx_offload capability::
> +
> + 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
> +
> +2. Enable and disable other capability per_queue and per_port.
> + Check the configuration and the port can start normally.
> --
> 2.5.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [dts] [PATCH] test_plans: Add rxtx_offload_test_plan.rst
@ 2018-08-07 11:12 Peng Yuan
2018-08-20 2:07 ` Liu, Yong
0 siblings, 1 reply; 3+ messages in thread
From: Peng Yuan @ 2018-08-07 11:12 UTC (permalink / raw)
To: dts; +Cc: Peng Yuan
Add test plan of Intel PMD drivers adaption for new RXTX offload APIs
Signed-off-by: Peng Yuan <yuan.peng@intel.com>
diff --git a/test_plans/rxtx_offload_test_plan.rst b/test_plans/rxtx_offload_test_plan.rst
new file mode 100644
index 0000000..023e490
--- /dev/null
+++ b/test_plans/rxtx_offload_test_plan.rst
@@ -0,0 +1,1005 @@
+.. 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.
+
+==============================================
+PMD drivers adaption for new RXTX offload APIs
+==============================================
+Description
+===========
+
+ 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:
+ 1. testpmd > show port <port_id> rx_offload capabilities
+ 2. testpmd > show port <port_id> rx_offload configuration
+ 3. testmpd > port config <port_id> rx_offload <offload> on|off
+ 4. testpmd > port <port_id> rxq <queue_id> rx_offload <offload> on|off
+ Tx test commands:
+ 1. testpmd > show port <port_id> tx_offload capabilities
+ 2. testpmd > show port <port_id> tx_offload configuration
+ 3. testmpd > port config <port_id> tx_offload <offload> on|off
+ 4. testpmd > port <port_id> txq <queue_id> tx_offload <offload> on|off
+
+Prerequisites
+=============
+
+1. Hardware:
+ Fortville/82599
+
+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
+
+Notes: There is 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.
+
+Ixgbe cases:
+============
+
+Test case: rx_offload set per_queue parameter
+=============================================
+
+1. Start testpmd::
+
+ ./testpmd -c f -n 4 -- -i --rxq=4 --txq=4
+ testpmd> set fwd mac
+ testpmd> set verbose 1
+ testpmd> show port info all
+ VLAN offload:
+ strip off
+
+2. Get the rx_offload capability and configuration::
+
+ 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 CRC_STRIP SCATTER SECURITY KEEP_CRC
+
+ testpmd> show port 0 rx_offload configuration
+ Rx Offloading Configuration of port 0 :
+ Port : CRC_STRIP
+ 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 : CRC_STRIP
+ 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 = Ether(dst="00:00:00:00:01:00", src="00:02:00:00:00:01")/Dot1Q(vlan=1)/IP(src="192.168.0.1", dst="192.168.0.3")/UDP(sport=33,dport=34)/Raw('x'*20)
+ pkt2 = Ether(dst="00:00:00:00:01:00", src="00:02:00:00:00:01")/Dot1Q(vlan=1)/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=33,dport=34)/Raw('x'*20)
+
+ Port0 receive the two packets::
+
+ testpmd> port 0/queue 3: received 1 packets
+ src=00:02:00:00:00:01 - dst=00:00:00:00:01:00 - type=0x8100 - length=66 - nb_segs=1 - RSS hash=0x6bfdcb2f - RSS queue=0x3 - hw ptype: L2_ETHER L3_IPV4 L4_UDP - sw ptype: L2_ETHER_VLAN L3_IPV4 L4_UDP - l2_len=18 - l3_len=20 - l4_len=8 - Receive queue=0x3
+ ol_flags: PKT_RX_VLAN PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD
+ port 0/queue 2: received 1 packets
+ src=00:02:00:00:00:01 - dst=00:00:00:00:01:00 - type=0x0800 - length=62 - nb_segs=1 - RSS hash=0xf0068ffe - RSS queue=0x2 - VLAN tci=0x1 - hw ptype: L2_ETHER L3_IPV4 L4_UDP - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - Receive queue=0x2
+ ol_flags: PKT_RX_VLAN PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_VLAN_STRIPPED
+
+ Queue2 implement the vlan strip "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::
+
+ [root@pengyuan ~]# tcpdump -i ens785f1 -e -n -v -x
+ tcpdump: listening on ens785f1, link-type EN10MB (Ethernet), capture size 262144 bytes
+ 16:41:42.488211 90:e2:ba:ac:9b:45 > 02:00:00:00:00:01, ethertype 802.1Q (0x8100), length 66: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto UDP (17), length 48)
+ 192.168.0.1.dsp > 192.168.0.3.34: UDP, length 20
+ 0x0000: 0001 0800 4500 0030 0001 0000 4011 f967
+ 0x0010: c0a8 0001 c0a8 0003 0021 0022 001c c969
+ 0x0020: 7878 7878 7878 7878 7878 7878 7878 7878
+ 0x0030: 7878 7878
+ 16:41:48.778225 90:e2:ba:ac:9b:45 > 02:00:00:00:00:01, ethertype IPv4 (0x0800), length 62: (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto UDP (17), length 48)
+ 192.168.0.2.dsp > 192.168.0.3.34: UDP, length 20
+ 0x0000: 4500 0030 0001 0000 4011 f966 c0a8 0002
+ 0x0010: c0a8 0003 0021 0022 001c c968 7878 7878
+ 0x0020: 7878 7878 7878 7878 7878 7878 7878 7878
+
+ So you can check that there is vlan id in pkt1, while there is not vlan 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 : CRC_STRIP
+ Queue[ 0] : VLAN_STRIP
+ Queue[ 1] :
+ Queue[ 2] :
+ Queue[ 3] : VLAN_STRIP
+
+ Send the same packets::
+
+ testpmd> port 0/queue 3: received 1 packets
+ src=00:02:00:00:00:01 - dst=00:00:00:00:01:00 - type=0x0800 - length=62 - nb_segs=1 - RSS hash=0x6bfdcb2f - RSS queue=0x3 - VLAN tci=0x1 - hw ptype: L2_ETHER L3_IPV4 L4_UDP - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - Receive queue=0x3
+ ol_flags: PKT_RX_VLAN PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_VLAN_STRIPPED
+ port 0/queue 2: received 1 packets
+ src=00:02:00:00:00:01 - dst=00:00:00:00:01:00 - type=0x8100 - length=66 - nb_segs=1 - RSS hash=0xf0068ffe - RSS queue=0x2 - hw ptype: L2_ETHER L3_IPV4 L4_UDP - sw ptype: L2_ETHER_VLAN L3_IPV4 L4_UDP - l2_len=18 - l3_len=20 - l4_len=8 - Receive queue=0x2
+ ol_flags: PKT_RX_VLAN PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD
+
+ Queue3 implement the vlan strip, 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 CRC_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 : CRC_STRIP
+ 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
+ Notes: there is no per_queue parameter in i40e driver,
+ so this case is just only for ixgbe.
+
+Test case: rx_offload set per_port parameter
+============================================
+
+1. Enable jumboframe when start testpmd::
+
+ ./testpmd -c f -n 4 -- -i --rxq=4 --txq=4 --max-pkt-len=9000
+ testpmd> set fwd rxonly
+ testpmd> set verbose 1
+ testpmd> start
+ 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 CRC_STRIP SCATTER SECURITY KEEP_CRC
+ testpmd> show port 0 rx_offload configuration
+ Rx Offloading Configuration of port 0 :
+ Port : JUMBO_FRAME CRC_STRIP
+ 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 = Ether(dst="52:54:00:00:00:01", src="52:00:00:00:00:00")/IP(dst="192.168.0.1", src="192.168.0.2", len=8981)/Raw(load="P"*8961)
+ pkt2 = Ether(dst="52:54:00:00:00:01", src="52:00:00:00:00:00")/IP(dst="192.168.0.1", src="192.168.0.3", len=8981)/Raw(load="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 : CRC_STRIP
+ 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=0 rx_queue_id=1, 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 CRC_STRIP
+ 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 1 command-line parameter covers 3 per_port parameter
+==========================================================================
+
+1. Enable rx cksum in command-line::
+
+ ./testpmd -c f -n 4 -- -i --rxq=4 --txq=4 --enable-rx-cksum
+ testpmd> show port 0 rx_offload configuration
+ Rx Offloading Configuration of port 0 :
+ Port : IPV4_CKSUM UDP_CKSUM TCP_CKSUM CRC_STRIP
+ 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 CRC_STRIP
+ 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 normally.
+
+3. Enable the rx cksum per_port, all the configuration can be set successfully.
+ The port can start normally.
+
+Test case: rx_offload set other capability per_port and per_queue
+=================================================================
+
+1. Check all the rx_offload capability::
+
+ 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 CRC_STRIP SCATTER SECURITY KEEP_CRC
+
+2. Enable and disable other capability per_port and per_queue.
+ Check the configuration and the port can start normally.
+ It's not allowed to set both CRC STRIP and KEEP CRC offload flags.
+ So if you want to config keep_crc on, you must config crc_strip off first.
+
+Test case: tx_offload set vlan_insert per_port
+==============================================
+
+1. Start testpmd::
+
+ ./testpmd -c 0x6 -n 4 -- -i --rxq=4 --txq=4 --port-topology=loop
+ testpmd> set fwd txonly
+ testpmd> set verbose 1
+ 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
+ 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::
+
+ # tcpdump -i enp131s0f1 -e -n -v -x
+ 17:07:17.683840 90:e2:ba:ac:9b:44 > 02:00:00:00:00:00, ethertype IPv4 (0x0800), length 64: (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto UDP (17), length 50)
+ 192.168.0.1.1024 > 192.168.0.2.1024: UDP, length 22
+ 0x0000: 4500 0032 0000 0000 4011 f967 c0a8 0001
+ 0x0010: c0a8 0002 0400 0400 001e 0000 0000 0000
+ 0x0020: 0000 0000 0000 0000 0000 0000 0000 0000
+ 0x0030: 0000
+
+ There is no vlan infomation.
+
+2. Enable vlan_insert per_port::
+
+ testpmd> port stop 0
+ testpmd> port config 0 tx_offload vlan_insert on
+ 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
+ 17:07:17.683840 90:e2:ba:ac:9b:44 > 02:00:00:00:00:00, ethertype IPv4 (0x0800), length 64: (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto UDP (17), length 50)
+ 192.168.0.1.1024 > 192.168.0.2.1024: UDP, length 22
+ 0x0000: 4500 0032 0000 0000 4011 f967 c0a8 0001
+ 0x0010: c0a8 0002 0400 0400 001e 0000 0000 0000
+ 0x0020: 0000 0000 0000 0000 0000 0000 0000 0000
+ 0x0030: 0000
+
+ There is not vlan infomation in the received packet.
+
+3. Set the insert vlan ID::
+
+ testpmd> tx_vlan set 0 1
+
+ Receive the packet::
+
+ 17:12:25.988130 90:e2:ba:ac:9b:44 > 02:00:00:00:00:00, ethertype 802.1Q (0x8100), length 68: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto UDP (17), length 50)
+ 192.168.0.1.1024 > 192.168.0.2.1024: UDP, length 22
+ 0x0000: 0001 0800 4500 0032 0000 0000 4011 f967
+ 0x0010: c0a8 0001 c0a8 0002 0400 0400 001e 0000
+ 0x0020: 0000 0000 0000 0000 0000 0000 0000 0000
+ 0x0030: 0000 0000 0000
+
+ The old command can take effect.
+
+4. 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
+ 17:14:50.291419 90:e2:ba:ac:9b:44 > 02:00:00:00:00:00, ethertype IPv4 (0x0800), length 64: (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto UDP (17), length 50)
+ 192.168.0.1.1024 > 192.168.0.2.1024: UDP, length 22
+ 0x0000: 4500 0032 0000 0000 4011 f967 c0a8 0001
+ 0x0010: c0a8 0002 0400 0400 001e 0000 0000 0000
+ 0x0020: 0000 0000 0000 0000 0000 0000 0000 0000
+ 0x0030: 0000
+
+ There is no vlan infomation in the received packet.
+ The disable command take effect.
+
+Test case: tx_offload failed to set vlan_insert per_queue
+=========================================================
+
+1. Start testpmd with "--tx-offloads"::
+
+ ./testpmd -c 0xf -n 4 -- -i --rxq=4 --txq=4 --port-topology=loop --tx-offloads=0x0001
+ 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
+ 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
+
+ Receive the packet::
+
+ 17:18:08.148797 90:e2:ba:ac:9b:44 > 02:00:00:00:00:00, ethertype 802.1Q (0x8100), length 68: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto UDP (17), length 50)
+ 192.168.0.1.1024 > 192.168.0.2.1024: UDP, length 22
+ 0x0000: 0001 0800 4500 0032 0000 0000 4011 f967
+ 0x0010: c0a8 0001 c0a8 0002 0400 0400 001e 0000
+ 0x0020: 0000 0000 0000 0000 0000 0000 0000 0000
+ 0x0030: 0000 0000 0000
+
+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 port 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=0 tx_queue_id=0, new added offloads 0x1 must be within 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 receive packet with vlan ID.
+ The per_port capability can be enabled by per_port command.
+
+Test case: tx_offload set other capability per_port
+===================================================
+
+1. Check all the tx_offload capability::
+
+ 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
+
+ Ixgbe There is not per_queue capability in tx_offload.
+
+2. Enable and disable other capability per_port.
+ Check the configuration and the port can start normally.
+
+I40e cases:
+===========
+
+Test case: rx_offload set per_port parameter
+============================================
+
+1. Enable jumboframe when start testpmd::
+
+ ./testpmd -c f -n 4 -- -i --rxq=4 --txq=4 --max-pkt-len=9000
+ testpmd> set fwd rxonly
+ testpmd> set verbose 1
+ testpmd> start
+ 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 CRC_STRIP KEEP_CRC
+ testpmd> show port 0 rx_offload configuration
+ Rx Offloading Configuration of port 0 :
+ Port : JUMBO_FRAME CRC_STRIP
+ Queue[ 0] :
+ Queue[ 1] :
+ Queue[ 2] :
+ Queue[ 3] :
+
+2. Improve the tester ports's mtu::
+
+ ifconfig ens785f2 mtu 9200
+ ifconfig ens785f3 mtu 9200
+
+ Send a jumboframe packet::
+
+ pkt1 = Ether(dst="52:54:00:00:00:01", src="52:00:00:00:00:00")/IP(dst="192.168.0.1", src="192.168.0.2", len=8981)/Raw(load="P"*8961)
+ pkt2 = Ether(dst="52:54:00:00:00:01", src="52:00:00:00:00:00")/IP(dst="192.168.0.1", src="192.168.0.3", len=8981)/Raw(load="P"*8961)
+
+ pkt1 was distributed to queue 2, pkt2 was distributed to queue 3.
+
+3. Failed to disable jumboframe per_queue::
+
+ testpmd> port stop 0
+ testpmd> port 0 rxq 2 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 2.
+
+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 : CRC_STRIP
+ 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=0 rx_queue_id=1, new added offloads 0x800 must be within pre-queue offload capabilities 0x0 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 CRC_STRIP
+ 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 2,
+ pkt2 was distributed to queue 3.
+
+Test case: rx_offload 1 command-line parameter covers 3 per_port parameter
+==========================================================================
+
+1. Enable rx cksum in command-line::
+
+ ./testpmd -c f -n 4 -- -i --rxq=4 --txq=4 --enable-rx-cksum
+ testpmd> show port 0 rx_offload configuration
+ Rx Offloading Configuration of port 0 :
+ Port : IPV4_CKSUM UDP_CKSUM TCP_CKSUM CRC_STRIP
+ 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 CRC_STRIP
+ 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 normally.
+
+3. Enable the rx cksum per_port, all the configuration can be set successfully.
+ The port can start normally.
+
+Test case: rx_offload set other capability per_port and per_queue
+=================================================================
+
+1. Check all the rx_offload capability::
+
+ 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 CRC_STRIP KEEP_CRC
+
+2. Enable and disable other capability per_port and per_queue.
+ Check the configuration and the port can start normally.
+ It's not allowed to set both CRC_STRIP and KEEP_CRC offload flags.
+ So if you want to config keep_crc on, you must config crc_strip off first.
+
+Test case: tx_offload set mbuf_fast_free per_queue
+==================================================
+
+1. Start testpmd and get the tx_offload capability and configuration::
+
+ ./testpmd -c f -n 4 -- -i --rxq=4 --txq=4
+ 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
+
+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
+
+Test case: tx_offload set vlan_insert per_port
+==============================================
+
+1. Start testpmd::
+
+ ./testpmd -c 0x6 -n 4 -- -i --rxq=4 --txq=4 --port-topology=loop
+ testpmd> set fwd txonly
+ testpmd> set verbose 1
+ 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] :
+ testpmd> start
+
+ Tester port0 received the packet::
+
+ # tcpdump -i ens785f2 -e -n -v -x
+ 19:04:23.234770 00:00:00:00:01:00 > 02:00:00:00:00:00, ethertype IPv4 (0x0800), length 64: (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto UDP (17), length 50)
+ 192.168.0.1.1024 > 192.168.0.2.1024: UDP, length 22
+ 0x0000: 4500 0032 0000 0000 4011 f967 c0a8 0001
+ 0x0010: c0a8 0002 0400 0400 001e 0000 0000 0000
+ 0x0020: 0000 0000 0000 0000 0000 0000 0000 0000
+ 0x0030: 0000
+
+ There is no vlan infomation.
+
+2. Enable vlan_insert per_port::
+
+ testpmd> port stop 0
+ testpmd> port config 0 tx_offload vlan_insert on
+ 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 MBUF_FAST_FREE
+ Queue[ 0] : VLAN_INSERT
+ Queue[ 1] : VLAN_INSERT
+ Queue[ 2] : VLAN_INSERT
+ Queue[ 3] : VLAN_INSERT
+ testpmd> start
+ 19:05:33.788932 00:00:00:00:01:00 > 02:00:00:00:00:00, ethertype IPv4 (0x0800), length 64: (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto UDP (17), length 50)
+ 192.168.0.1.1024 > 192.168.0.2.1024: UDP, length 22
+ 0x0000: 4500 0032 0000 0000 4011 f967 c0a8 0001
+ 0x0010: c0a8 0002 0400 0400 001e 0000 0000 0000
+ 0x0020: 0000 0000 0000 0000 0000 0000 0000 0000
+ 0x0030: 0000
+
+ There is not vlan infomation in the received packet.
+
+3. Set the insert vlan ID::
+
+ testpmd> tx_vlan set 0 1
+
+ Receive the packet::
+
+ 19:06:50.483522 00:00:00:00:01:00 > 02:00:00:00:00:00, ethertype 802.1Q (0x8100), length 68: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto UDP (17), length 50)
+ 192.168.0.1.1024 > 192.168.0.2.1024: UDP, length 22
+ 0x0000: 0001 0800 4500 0032 0000 0000 4011 f967
+ 0x0010: c0a8 0001 c0a8 0002 0400 0400 001e 0000
+ 0x0020: 0000 0000 0000 0000 0000 0000 0000 0000
+ 0x0030: 0000 0000 0000
+
+ The old command can take effect.
+
+4. 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 : MBUF_FAST_FREE
+ Queue[ 0] :
+ Queue[ 1] :
+ Queue[ 2] :
+ Queue[ 3] :
+ testpmd> start
+ 19:08:41.718884 00:00:00:00:01:00 > 02:00:00:00:00:00, ethertype IPv4 (0x0800), length 64: (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto UDP (17), length 50)
+ 192.168.0.1.1024 > 192.168.0.2.1024: UDP, length 22
+ 0x0000: 4500 0032 0000 0000 4011 f967 c0a8 0001
+ 0x0010: c0a8 0002 0400 0400 001e 0000 0000 0000
+ 0x0020: 0000 0000 0000 0000 0000 0000 0000 0000
+ 0x0030: 0000
+
+ There is no vlan infomation in the received packet.
+ The disable command take effect.
+
+Test case: tx_offload failed to set vlan_insert per_queue
+=========================================================
+
+1. Start testpmd with "--tx-offloads"::
+
+ ./testpmd -c 0xf -n 4 -- -i --rxq=4 --txq=4 --port-topology=loop --tx-offloads=0x0001
+ 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 : 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
+
+ Receive the packet::
+
+ 19:13:21.743624 00:00:00:00:01:00 > 02:00:00:00:00:00, ethertype 802.1Q (0x8100), length 68: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto UDP (17), length 50)
+ 192.168.0.1.1024 > 192.168.0.2.1024: UDP, length 22
+ 0x0000: 0001 0800 4500 0032 0000 0000 4011 f967
+ 0x0010: c0a8 0001 c0a8 0002 0400 0400 001e 0000
+ 0x0020: 0000 0000 0000 0000 0000 0000 0000 0000
+ 0x0030: 0000 0000 0000
+
+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 port 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=0 tx_queue_id=0, new added offloads 0x1 must be within pre-queue offload capabilities 0x10000 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 receive packet with vlan ID.
+ The per_port capability can be enabled by per_port command.
+
+Test case: tx_offload set other capability per_port
+===================================================
+
+1. Check all the tx_offload capability::
+
+ 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
+
+2. Enable and disable other capability per_queue and per_port.
+ Check the configuration and the port can start normally.
--
2.5.0
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-01-16 8:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-16 8:52 [dts] [PATCH] test_plans: Add rxtx_offload_test_plan.rst Peng Yuan
-- strict thread matches above, loose matches on Subject: below --
2018-08-07 11:12 Peng Yuan
2018-08-20 2:07 ` Liu, Yong
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).