From: Peng Yuan <yuan.peng@intel.com>
To: dts@dpdk.org
Cc: Peng Yuan <yuan.peng@intel.com>
Subject: [dts] [PATCH]test_plans: command-line parameter changed
Date: Mon, 13 May 2019 15:58:13 +0800 [thread overview]
Message-ID: <1557734293-42620-1-git-send-email-yuan.peng@intel.com> (raw)
Change command-line parameter of macsec_for_ixgbe_test_plan.rst
Signed-off-by: Peng Yuan <yuan.peng@intel.com>
diff --git a/test_plans/macsec_for_ixgbe_test_plan.rst b/test_plans/macsec_for_ixgbe_test_plan.rst
index 4b8a762..893e7a6 100644
--- a/test_plans/macsec_for_ixgbe_test_plan.rst
+++ b/test_plans/macsec_for_ixgbe_test_plan.rst
@@ -73,6 +73,13 @@ Prerequisites
1. Hardware:
* 1x Niantic NIC (2x 10G)
+ port0:
+ pci address: 07:00.0
+ mac address: 00:00:00:00:00:01
+ port1:
+ pci address: 07:00.1
+ mac address: 00:00:00:00:00:02
+
* 2x IXIA ports (10G)
2. Software:
@@ -82,13 +89,13 @@ Prerequisites
3. Added command::
- testpmd>set macsec offload (port_id) on encrypt (on|off) replay-protect (on|off)
+ testpmd> set macsec offload (port_id) on encrypt (on|off) replay-protect (on|off)
" Enable MACsec offload. "
- testpmd>set macsec offload (port_id) off
+ testpmd> set macsec offload (port_id) off
" Disable MACsec offload. "
- testpmd>set macsec sc (tx|rx) (port_id) (mac) (pi)
+ testpmd> set macsec sc (tx|rx) (port_id) (mac) (pi)
" Configure MACsec secure connection (SC). "
- testpmd>set macsec sa (tx|rx) (port_id) (idx) (an) (pn) (key)
+ testpmd> set macsec sa (tx|rx) (port_id) (idx) (an) (pn) (key)
" Configure MACsec secure association (SA). "
@@ -102,255 +109,306 @@ Test Case 1: MACsec packets send and receive
2. Config the rx port
- 1. Start the testpmd of rx port::
+ 1. Start the testpmd of rx port::
+
+ ./testpmd -c 0xf --socket-mem 1024,0 --file-prefix=rx -w 0000:07:00.1 \
+ -- -i --port-topology=chained
+
+ 2. Set MACsec offload on::
- ./testpmd -c 0xc --socket-mem 1024,1024 --file-prefix=rx -w 0000:07:00.1 \
- -- --port-topology=chained -i --crc-strip
+ testpmd> set macsec offload 0 on encrypt on replay-protect on
- 2. Set MACsec offload on::
+ Show port port tx configuration::
- testpmd>set macsec offload 0 on encrypt on replay-protect on
+ testpmd> show port 0 tx_offload configuration
+ Tx Offloading Configuration of port 0 :
+ Port : MACSEC_INSERT
+ Queue[ 0] :
- 3. Set MACsec parameters as rx_port::
+ 3. Set MACsec parameters as rx_port::
- testpmd>set macsec sc rx 0 00:00:00:00:00:01 0
- testpmd>set macsec sa rx 0 0 0 0 00112200000000000000000000000000
+ testpmd> set macsec sc rx 0 00:00:00:00:00:01 0
+ testpmd> set macsec sa rx 0 0 0 0 00112200000000000000000000000000
- 4. Set MACsec parameters as tx_port::
+ 4. Set MACsec parameters as tx_port::
- testpmd>set macsec sc tx 0 00:00:00:00:00:02 0
- testpmd>set macsec sa tx 0 0 0 0 00112200000000000000000000000000
+ testpmd> set macsec sc tx 0 00:00:00:00:00:02 0
+ testpmd> set macsec sa tx 0 0 0 0 00112200000000000000000000000000
- 5. Set rxonly::
+ 5. Set rxonly::
- testpmd>set fwd rxonly
+ testpmd> set fwd rxonly
- 6. Start::
+ 6. Start::
- testpmd>set promisc all on
- testpmd>start
+ testpmd> set promisc all on
+ testpmd> start
3. Config the tx port
- 1. Start the testpmd of tx port::
+ 1. Start the testpmd of tx port::
+
+ ./testpmd -c 0xf0 --socket-mem 1024,0 --file-prefix=tx -w 0000:07:00.0 \
+ -- -i --port-topology=chained --tx-offloads=0x00002000
+
+ 2. Set MACsec offload on::
- ./testpmd -c 0x30 --socket-mem 1024,1024 --file-prefix=tx -w 0000:07:00.0 \
- -- --port-topology=chained -i --crc-strip --tx-offloads=0x8fff
+ testpmd> set macsec offload 0 on encrypt on replay-protect on
- 2. Set MACsec offload on::
+ Show port port tx configuration::
- testpmd>set macsec offload 0 on encrypt on replay-protect on
+ testpmd> show port 0 tx_offload configuration
+ Tx Offloading Configuration of port 0 :
+ Port : MACSEC_INSERT
+ Queue[ 0] : MACSEC_INSERT
- 3. Set MACsec parameters as tx_port::
+ 3. Set MACsec parameters as tx_port::
- testpmd>set macsec sc tx 0 00:00:00:00:00:01 0
- testpmd>set macsec sa tx 0 0 0 0 00112200000000000000000000000000
+ testpmd> set macsec sc tx 0 00:00:00:00:00:01 0
+ testpmd> set macsec sa tx 0 0 0 0 00112200000000000000000000000000
- 4. Set MACsec parameters as rx_port::
+ 4. Set MACsec parameters as rx_port::
- testpmd>set macsec sc rx 0 00:00:00:00:00:02 0
- testpmd>set macsec sa rx 0 0 0 0 00112200000000000000000000000000
+ testpmd> set macsec sc rx 0 00:00:00:00:00:02 0
+ testpmd> set macsec sa rx 0 0 0 0 00112200000000000000000000000000
- 5. Set txonly::
+ 5. Set txonly::
- testpmd>set fwd txonly
+ testpmd> set fwd txonly
- 6. Start::
+ 6. Start::
- testpmd>start
+ testpmd> start
4. Check the result::
- testpmd>stop
- testpmd>show port xstats 0
+ testpmd> stop
+ testpmd> show port xstats 0
- stop the packet transmitting on tx_port first, then stop the packet receiving
+ Stop the packet transmitting on tx_port first, then stop the packet receiving
on rx_port.
- check the rx data and tx data::
+ Check the rx data and tx data::
- tx_good_packets == rx_good_packets
- out_pkts_encrypted == in_pkts_ok == tx_good_packets == rx_good_packets
- out_octets_encrypted == in_octets_decrypted
- out_octets_protected == in_octets_validated
+ out_pkts_protected == 0
+ out_pkts_encrypted == in_pkts_ok == tx_good_packets == rx_good_packets !=0
+ out_octets_encrypted == in_octets_decrypted != 0
+ out_octets_protected == in_octets_validated != 0
- if you want to check the content of the packet, use the command::
+ If you want to check the content of the packet, use the command::
- testpmd>set verbose 1
+ testpmd> set verbose 1
- the received packets are Decrypted.
+ The received packets are Decrypted.
- check the ol_flags::
+ Check the ol_flags::
PKT_RX_IP_CKSUM_GOOD
- check the content of the packet::
+ Check the content of the packet::
+
+ hw ptype: L2_ETHER L3_IPV4 L4_UDP - sw ptype: L2_ETHER L3_IPV4 L4_UDP
+
+
+Test Case 2: MACsec encrypt off and replay-protect off
+======================================================
+
+1. Start testpmd as test case 1, then set on tx port::
- type=0x0800, the ptype of L2,L3,L4: L2_ETHER L3_IPV4 L4_UDP
+ testpmd> set macsec offload 0 on encrypt off replay-protect on
+ Other settings are the same as test case 1.
-Test Case 2: MACsec send and receive with different parameters
+2. Start packet transfer, check the rx data and tx data::
+
+ out_pkts_encrypted == 0
+ out_pkts_protected == in_pkts_ok == tx_good_packets == rx_good_packets != 0
+ in_octets_decrypted == out_octets_encrypted == 0
+ out_octets_protected == in_octets_validated != 0
+
+3. Clear the port xstats, then set on tx port::
+
+ testpmd> set macsec offload 0 on encrypt on replay-protect off
+
+4. Start packet transfer, check the rx data and tx data.
+ Get the same result as test case 1.
+
+
+Test Case 3: MACsec send and receive with different parameters
==============================================================
1. Set "idx" to 1 on both rx and tx sides.
- check the MACsec packets can be received correctly.
+ Check the MACsec packets can be received correctly.
- set "idx" to 2 on both rx and tx sides.
- it can't be set successfully.
+ Set "idx" to 2 on both rx and tx sides.
+ It can't be set successfully.
2. Set "an" to 1/2/3 on both rx and tx sides.
- check the MACsec packets can be received correctly.
+ Check the MACsec packets can be received correctly.
- set "an " to 4 on both rx and tx sides.
- it can't be set successfully.
+ Set "an " to 4 on both rx and tx sides.
+ It can't be set successfully.
3. Set "pn" to 0xffffffec on both rx and tx sides.
- rx port can receive four packets.
+ Rx port can receive four packets.
- set "pn" to 0xffffffed on both rx and tx sides.
- rx port can receive three packets.
+ Set "pn" to 0xffffffed on both rx and tx sides.
+ Rx port can receive three packets.
- set "pn" to 0xffffffee/0xffffffef on both rx and tx sides.
- rx port can receive three packets too. But the expected number
+ Set "pn" to 0xffffffee/0xffffffef on both rx and tx sides.
+ Rx port can receive three packets too. But the expected number
of packets is 2/1. While the explanation that DPDK developers
gave is that it's hardware's behavior.
- Once the PN reaches a value of 0xFFFFFFF0, hardware clears
- the Enable Tx LinkSec field in the LSECTXCTRL register to 00b
- so when pn get to 0xfffffff0, the number of packets received can't
+ Once the "pn" reaches a value of 0xfffffff0, hardware clears
+ the Enable Tx LinkSec field in the LSECTXCTRL register to 00b.
+ So when "pn" get to 0xfffffff0, the number of packets received can't
be expected.
- set "pn" to 0x100000000 on both rx and tx sides.
- it can't be set successfully.
+ Set "pn" to 0x100000000 on both rx and tx sides.
+ It can't be set successfully.
4. Set "key" to 00000000000000000000000000000000 and
ffffffffffffffffffffffffffffffff on both rx and tx sides.
- check the MACsec packets can be received correctly.
+ Check the MACsec packets can be received correctly.
5. Set "pi" to 1/0xffff on both rx and tx sides.
- check the MACsec packets can not be received.
+ Check the MACsec packets can not be received.
- set "pi" to 0x10000 on both rx and tx sides.
- it can't be set successfully.
+ Set "pi" to 0x10000 on both rx and tx sides.
+ It can't be set successfully.
-Test Case 3: MACsec packets send and normal receive
+Test Case 4: MACsec packets send and normal receive
===================================================
1. Disable MACsec offload on rx port::
- testpmd>set macsec offload 0 off
+ testpmd> set macsec offload 0 off
+
+ Show port port tx configuration::
+
+ testpmd> show port 0 tx_offload configuration
+ Tx Offloading Configuration of port 0 :
+ Port :
+ Queue[ 0] :
2. Start the the packets transfer
3. Check the result::
- testpmd>stop
- testpmd>show port xstats 0
+ testpmd> stop
+ testpmd> show port xstats 0
- stop the testpmd on tx_port first, then stop the testpmd on rx_port.
- the received packets are encrypted.
+ Stop the testpmd on tx_port first, then stop the testpmd on rx_port.
+ The received packets are encrypted.
- check the content of the packet::
+ Check the content of the packet::
- type=0x88e5 sw ptype: L2_ETHER - l2_len=14 - Receive queue=0x0
+ hw ptype: L2_ETHER - sw ptype: L2_ETHER
- you can't find L3 and L4 information in the packet
- in_octets_decrypted and in_octets_validated doesn't increase on last data
+ You can't find L3 and L4 information in the packet
+ in_octets_decrypted and in_octets_validated doesn't increase on data
transfer.
-Test Case 4: normal packet send and MACsec receive
+Test Case 5: normal packet send and MACsec receive
==================================================
1. Enable MACsec offload on rx port::
- testpmd>set macsec offload 0 on encrypt on replay-protect on
+ testpmd> set macsec offload 0 on encrypt on replay-protect on
2. Disable MACsec offload on tx port::
- testpmd>set macsec offload 0 off
+ testpmd> set macsec offload 0 off
+ testpmd> show port 0 tx_offload configuration
+ Tx Offloading Configuration of port 0 :
+ Port :
+ Queue[ 0] : MACSEC_INSERT
3. Start the the packets transfer::
- testpmd>start
+ testpmd> start
4. Check the result::
- testpmd>stop
- testpmd>show port xstats 0
+ testpmd> stop
+ testpmd> show port xstats 0
- stop the testpmd on tx_port first, then stop the testpmd on rx_port.
- the received packets are not encrypted.
+ Stop the testpmd on tx_port first, then stop the testpmd on rx_port.
+ The received packets are not encrypted.
- check the content of the packet::
+ Check the content of the packet::
- type=0x0800, the ptype of L2,L3,L4: L2_ETHER L3_IPV4 L4_UDP
+ hw ptype: L2_ETHER L3_IPV4 L4_UDP - sw ptype: L2_ETHER L3_IPV4 L4_UDP
- in_octets_decrypted and out_pkts_encrypted doesn't increase on last data
+ in_octets_decrypted and out_pkts_encrypted doesn't increase on data
transfer.
-Test Case 5: MACsec send and receive with wrong parameters
+Test Case 6: MACsec send and receive with wrong parameters
==========================================================
-1. Don't add "--tx-offloads=0x8fff" in the tx_port command line.
- the MACsec offload can't work. The tx packets are normal packets.
+1. Don't add "--tx-offloads=0x00002000" in the tx_port command line.
+ The MACsec offload can't work. The tx packets are normal packets.
2. Set different pn on rx and tx port, then start the data transfer.
- 1. Set the parameters as test case 1, start and stop the data transfer.
- check the result, rx port can receive and decrypt the packets normally.
+ 1. Set the parameters as test case 1, start and stop the data transfer.
+ Check the result, rx port can receive and decrypt the packets normally.
- 2. Reset the pn of tx port to 0::
+ 2. Reset the pn of tx port to 0::
- testpmd>set macsec sa tx 0 0 0 0 00112200000000000000000000000000
+ testpmd> set macsec sa tx 0 0 0 0 00112200000000000000000000000000
- rx port can receive the packets until the pn equals the pn of tx port::
+ Rx port can receive the packets until the pn equals the pn of tx port::
- out_pkts_encrypted = in_pkts_late + in_pkts_ok
+ out_pkts_encrypted = in_pkts_late + in_pkts_ok
3. Set different keys on rx and tx port, then start the data transfer::
- the RX-packets=0,
- in_octets_decrypted == out_octets_encrypted,
- in_pkts_notvalid == out_pkts_encrypted,
- in_pkts_ok=0,
- rx_good_packets=0
+ the RX-packets=0,
+ in_octets_decrypted == out_octets_encrypted,
+ in_pkts_notvalid == out_pkts_encrypted,
+ in_pkts_ok=0,
+ rx_good_packets=0
-4. Set different pi on rx and tx port(reset on rx_port), then start the data
- transfer::
+4. Set different pi on rx and tx port, then start the data transfer::
- in_octets_decrypted == out_octets_encrypted,
- in_pkts_ok = 0,
- in_pkts_nosci == out_pkts_encrypted
+ in_octets_decrypted == out_octets_encrypted,
+ in_pkts_ok = 0,
+ in_pkts_nosci == out_pkts_encrypted
5. Set different an on rx and tx port, then start the data transfer::
- rx_good_packets=0,
- in_octets_decrypted == out_octets_encrypted,
- in_pkts_notusingsa == out_pkts_encrypted,
- in_pkts_ok=0,
+ rx_good_packets=0,
+ in_octets_decrypted == out_octets_encrypted,
+ in_pkts_notusingsa == out_pkts_encrypted,
+ in_pkts_ok=0,
6. Set different index on rx and tx port, then start the data transfer::
- in_octets_decrypted == out_octets_encrypted,
- in_pkts_ok == out_pkts_encrypted
+ in_octets_decrypted == out_octets_encrypted,
+ in_pkts_ok == out_pkts_encrypted
-Test Case 6: performance test of MACsec offload packets
-==========================================================
+Test Case 7: performance test of MACsec offload packets
+=======================================================
1. Tx linerate
- port0 connected to IXIA port5, port1 connected to IXIA port6, set port0
+ Port0 connected to IXIA port5, port1 connected to IXIA port6, set port0
MACsec offload on, set fwd mac::
- ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xc -- -i \
- --port-topology=chained --crc-strip --tx-offloads=0x8fff
+ ./testpmd -c 0xf --socket-mem 1024,0 -- -i \
+ --port-topology=chained --tx-offloads=0x00002000
+ testpmd> set macsec offload 0 on encrypt on replay-protect on
+ testpmd> set fwd mac
+ testpmd> start
- on IXIA side, start IXIA port6 transmit, start the IXIA capture.
- view the IXIA port5 captured packet, the protocol is MACsec, the EtherType
+ On IXIA side, start IXIA port6 transmit, start the IXIA capture.
+ View the IXIA port5 captured packet, the protocol is MACsec, the EtherType
is 0x88E5, and the packet length is 96bytes, while the normal packet length
is 32bytes.
@@ -358,47 +416,47 @@ Test Case 6: performance test of MACsec offload packets
2. Rx linerate
- there are three ports 05:00.0 07:00.0 07:00.1. Connect 07:00.0 to 07:00.1
+ There are three ports 05:00.0 07:00.0 07:00.1. Connect 07:00.0 to 07:00.1
with cable, connect 05:00.0 to IXIA. Bind the three ports to dpdk driver.
- start two testpmd::
-
- ./testpmd -c 0x3 --socket-mem 1024,1024 --file-prefix=rx -w 0000:07:00.1 \
- -- --port-topology=chained -i --crc-strip --tx-offloads=0x8fff
-
- testpmd>set macsec offload 0 on encrypt on replay-protect on
- testpmd>set macsec sc rx 0 00:00:00:00:00:01 0
- testpmd>set macsec sa rx 0 0 0 0 00112200000000000000000000000000
- testpmd>set macsec sc tx 0 00:00:00:00:00:02 0
- testpmd>set macsec sa tx 0 0 0 0 00112200000000000000000000000000
- testpmd>set fwd rxonly
-
- ./testpmd -c 0xc --socket-mem 1024,1024 --file-prefix=tx -b 0000:07:00.1 \
- -- --port-topology=chained -i --crc-strip --tx-offloads=0x8fff
-
- testpmd>set macsec offload 1 on encrypt on replay-protect on
- testpmd>set macsec sc rx 1 00:00:00:00:00:02 0
- testpmd>set macsec sa rx 1 0 0 0 00112200000000000000000000000000
- testpmd>set macsec sc tx 1 00:00:00:00:00:01 0
- testpmd>set macsec sa tx 1 0 0 0 00112200000000000000000000000000
- testpmd>set fwd mac
-
- start on both two testpmd.
- start data transmit from IXIA port, the frame size is 64bytes,
+ Start two testpmd::
+
+ ./testpmd -c 0xf --socket-mem 1024,0 --file-prefix=rx -w 0000:07:00.1 \
+ -- -i --port-topology=chained --tx-offloads=0x00002000
+
+ testpmd> set macsec offload 0 on encrypt on replay-protect on
+ testpmd> set macsec sc rx 0 00:00:00:00:00:01 0
+ testpmd> set macsec sa rx 0 0 0 0 00112200000000000000000000000000
+ testpmd> set macsec sc tx 0 00:00:00:00:00:02 0
+ testpmd> set macsec sa tx 0 0 0 0 00112200000000000000000000000000
+ testpmd> set fwd rxonly
+
+ ./testpmd -c 0xf0 --socket-mem 1024,0 --file-prefix=tx -b 0000:07:00.1 \
+ -- -i --port-topology=chained --tx-offloads=0x00002000
+
+ testpmd> set macsec offload 1 on encrypt on replay-protect on
+ testpmd> set macsec sc rx 1 00:00:00:00:00:02 0
+ testpmd> set macsec sa rx 1 0 0 0 00112200000000000000000000000000
+ testpmd> set macsec sc tx 1 00:00:00:00:00:01 0
+ testpmd> set macsec sa tx 1 0 0 0 00112200000000000000000000000000
+ testpmd> set fwd mac
+
+ Start on both two testpmd.
+ Start data transmit from IXIA port, the frame size is 64bytes,
the Ethertype is 0x0800. The rate is 14.88Mpps.
- check the linerate on rxonly port::
+ Check the linerate on rxonly port::
- testpmd>show port stats 0
+ testpmd> show port stats 0
It shows "Rx-pps: 10775697", so the rx %linerate is 100%.
- check the MACsec packets number on tx side::
+ Check the MACsec packets number on tx side::
- testpmd>show port xstats 1
+ testpmd> show port xstats 1
- on rx side::
+ On rx side::
- testpmd>show port xstats 0
+ testpmd> show port xstats 0
- check the rx data and tx data::
+ Check the rx data and tx data::
- in_pkts_ok == out_pkts_encrypted
+ in_pkts_ok == out_pkts_encrypted
--
2.14.3
next reply other threads:[~2019-05-13 7:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-13 7:58 Peng Yuan [this message]
2019-05-22 8:58 ` Tu, Lijuan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1557734293-42620-1-git-send-email-yuan.peng@intel.com \
--to=yuan.peng@intel.com \
--cc=dts@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).