[dts] [PATCH V1 2/2] add ip_pipeline source_sink test plan

xu,gang gangx.xu at intel.com
Tue Aug 23 11:26:32 CEST 2016


Signed-off-by: xu,gang <gangx.xu at intel.com>
---
 test_plans/ip_pipeline_source_sink_test_plan.rst | 1106 ++++++++++++++++++++++
 1 file changed, 1106 insertions(+)
 create mode 100644 test_plans/ip_pipeline_source_sink_test_plan.rst

diff --git a/test_plans/ip_pipeline_source_sink_test_plan.rst b/test_plans/ip_pipeline_source_sink_test_plan.rst
new file mode 100644
index 0000000..7d8a656
--- /dev/null
+++ b/test_plans/ip_pipeline_source_sink_test_plan.rst
@@ -0,0 +1,1106 @@
+==========
+Prequisite
+==========
+1. change the CONFIG_RTE_PORT_PCAP compiler option lies in config/common_base
+2. config file should be use source and sink not rxq and txq, config file as follows
+[PIPELINE1]
+type = PASS-THROUGH
+core = 1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+pcap_file_rd = /root/eth1.pcap /root/eth2.pcap
+pcap_bytes_rd_per_pkt = 0 64
+pcap_file_wr = /root/eth1.1.pcap /root/eth2.1.pcap
+pcap_n_pkt_wr = 80 0
+3. Since there is only source/sink port in the config file, there is no physical port, so it should be no -p in the command line, command should be as follows
+./build/ip_pipeline -f ./config/config_file_name.cfg
+4. change the folder/file to the pcap file to be root, for example, pcap is installed in the folder /home/anna/file.pcap, then should use linux command 
+chmod 777 /home
+chmod 777 /anna
+chmod 777 file.pcap
+5. pcap_bytes_rd_per_pkt can be 0 or anyother value, 0 means read whole frame, which takes more memory, if only need IP header, then it can be 64, 
+which saves lots of memory
+
+===========
+Test cases
+===========
+----------------------------------------------------------
+1. Functional test for source port on passthrough pipeline
+----------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = PASS-THROUGH
+core = 1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+pcap_file_rd = /root/eth1.pcap /root/eth2.pcap
+pcap_bytes_rd_per_pkt = 64 0
+Command to run
+./build/ip_pipeline -f ./config/source_port.cfg
+The app sends the packets by reading the eth1.pcap and eth2.pcap file and drops the packets, check that the app runs successfully and quit
+normally, then test pass
+
+--------------------------------------------------------
+2. Functional test for sink port on passthrough pipeline
+--------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = PASS-THROUGH
+core = 1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+pcap_file_wr = /root/eth1.1.pcap /root/eth2.1.pcap
+pcap_n_pkt_wr = 80 0
+Command to run
+./build/ip_pipeline -f ./config/sink_port.cfg
+After the app finished runing, since the app send null frames from the source port, check that the pcap file size is 0, and check the 
+time stamp when the app finished runing, compare with the eth1.pcap and eth2.pcap last modified time, if it's the same, test pass, 
+otherwise, test fail
+---------------------------------------------------------------
+3. Functional test for source+sink port on passthrough pipeline
+---------------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = PASS-THROUGH
+core = 1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+pcap_file_rd = /root/eth1.pcap /root/eth2.pcap
+pcap_bytes_rd_per_pkt = 0 64
+pcap_file_wr = /home/eth1.1.pcap /home/eth2.1.pcap
+pcap_n_pkt_wr = 80 200
+command to run
+./build/ip_pipeline -f ./config/source_sink_port.cfg
+After the app finished running, eth1.pcap and eth1.1.pcap should have the same size, eth2.pcap and eth2.1.pcap should have the same size, and,
+in eth2.1.pcap, the first frame and the 101 frame should have the same frame which is the first 64 byte of 1st frame in eth2.pcap.
+
+-------------------------------------------------
+4. Same pcap read file, different pcap write file
+-------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = PASS-THROUGH
+core = 1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+pcap_file_rd = /root/eth1.pcap /root/eth1.pcap
+pcap_bytes_rd_per_pkt = 0 64
+pcap_file_wr = /root/eth1.1.pcap /root/eth2.1.pcap
+pcap_n_pkt_wr = 80 81
+command to run
+./build/ip_pipeline -f ./config/source_sink_port_1.cfg
+
+After the app finsihed runing, check that the eth1.1.pcap and eth2.1.pcap have the same first 80 frames, and check that the eth2.1.pcap have 81 frames
+1st frame and 81th frame should be the same frame, which is the first 64 bytes of 1st frame of eth1.pcap file.
+
+--------------------------------------------------
+5. Same pcap write file, different pcap read file
+--------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = PASS-THROUGH
+core = 1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+pcap_file_rd = /root/eth1.pcap /root/eth2.pcap
+pcap_bytes_rd_per_pkt = 0 64
+pcap_file_wr = /root/eth1.1.pcap /root/eth1.1.pcap
+pcap_n_pkt_wr = 80 200
+comand to run
+./build/ip_pipeline -f ./config/source_sink_port_2.cfg
+After the app finished runing, check that the eth1.1.pcap should have 200?(280?) frames, check that the app finished runing correctly
+
+-----------------------------------------------------
+6. pcap_n_pkt_wr equals 0, continuous write sink file
+-----------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = PASS-THROUGH
+core = 1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+pcap_file_rd = /root/eth1.pcap /root/eth2.pcap
+pcap_bytes_rd_per_pkt = 0 64
+pcap_file_wr = /root/eth1.1.pcap /root/eth2.1.pcap
+pcap_n_pkt_wr = 0 200
+command to run
+./build/ip_pipeline -f ./config/source_sink_port_3.cfg
+After the app finished running, check that the eth1.pcap should have more than 80 frames, check that the eth2.1.pcap have 200 frames
+
+--------------------------------
+7. 4 source port and 4 sink port
+--------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = PASS-THROUGH
+core = 1
+pktq_in = SOURCE0 SOURCE1 SOURCE2 SOURCE3
+pktq_out = SINK0 SINK1 SINK2 SINK3
+pcap_file_rd = /root/eth1.pcap /root/eth2.pcap /root/eth1.pcap /root/eth1.1.pcap
+pcap_bytes_rd_per_pkt = 0 64 0 64
+pcap_file_wr = /root/eth1.1.pcap /root/eth2.1.pcap /root/eth3.1.pcap /root/eth4.1.pcap
+pcap_n_pkt_wr = 80 200 80 200
+command to run
+./build/ip_pipeline -f ./config/source_sink_port_4.cfg
+After the app finished running, check that the eth1.1.pcap and eth5.pcap should have the same size and frames, eth2.1.pcap and eth6.pcap should
+have the sme size and frames
+
+----------------------------------------------------------------
+8. Add source and sink into the EDGE_ROUTER_DOWNSTREAM.CFG, need to check with zhang, fan about which pipeline to add the SOURCE/SINK
+----------------------------------------------------------------
+[PIPELINE0]
+type = MASTER
+core = 0
+
+[PIPELINE1]
+type = ROUTING
+core = 1
+pktq_in = SOURCE0 SOURCE1 SOURCE2 SOURCE3
+pktq_out = SWQ0 SWQ1 SWQ2 SWQ3
+encap = ethernet_qinq
+qinq_sched = test
+ip_hdr_offset = 270; mbuf (128) + headroom (128) + ethernet header (14) = 270
+pcap_file_rd = /root/eth1.pcap /root/eth2.pcap /root/eth1.pcap /root/eth1.1.pcap
+pcap_bytes_rd_per_pkt = 0 64 0 64
+
+[PIPELINE2]
+type = PASS-THROUGH
+core = 2
+pktq_in = SWQ0 SWQ1 SWQ2 SWQ3
+pktq_out = SWQ4 SWQ5 SWQ6 SWQ7
+
+[PIPELINE3]
+type = PASS-THROUGH
+core = 3
+pktq_in = SWQ4 SWQ5 SWQ6 SWQ7
+pktq_out = SINK0 SINK1 SINK2 SINK3
+pcap_file_wr = /root/eth1.1.pcap /root/eth2.1.pcap /root/eth3.1.pcap /root/eth4.1.pcap
+pcap_n_pkt_wr = 80 200 80 200
+
+[MEMPOOL0]
+pool_size = 512
+
+only use 1 or 2 ports pcap_n_pkt_wr = 80
+---------------------------------------
+9. Source port and sink port not paired, negative
+---------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = PASS-THROUGH
+core = 1
+pktq_in = SOURCE0 SOURCE1 SOURCE2
+pktq_out = SINK0 SINK1
+pcap_file_rd = /root/eth1.pcap /root/eth2.pcap
+pcap_bytes_rd_per_pkt = 64 0
+Command to run
+./build/ip_pipeline -f ./config/source_port.cfg
+The app sends the packets by reading the eth1.pcap and eth2.pcap file and drops the packets, check that the app report errors successfully and quit
+normally, then test pass
+
+-----------------------------------------
+10. Source port and pcap file read not paired, negative
+-----------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = PASS-THROUGH
+core = 1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+pcap_file_rd = /root/eth1.pcap
+pcap_bytes_rd_per_pkt = 64 0
+pcap_file_wr = /root/eth1.1.pcap /root/eth2.1.pcap
+pcap_n_pkt_wr = 0 200
+Command to run
+./build/ip_pipeline -f ./config/source_port.cfg
+The app sends the packets by reading the eth1.pcap drops the packets, check that the app report errors successfully and quit
+normally, then test pass
+
+-----------------------------------------------------
+11. Source port and pcap bytes read per packet not paired, negative
+-----------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = PASS-THROUGH
+core = 1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+pcap_file_rd = /root/eth1.pcap /root/eth2.pcap
+pcap_bytes_rd_per_pkt = 64
+Command to run
+./build/ip_pipeline -f ./config/source_port.cfg
+The app sends the packets by reading the eth1.pcap and eth2.pcap file and drops the packets, check that the app report errors successfully and quit
+normally, then test pass
+
+--------------------------------------------
+12. Sink port and pcap file write not paired, negative
+--------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = PASS-THROUGH
+core = 1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+pcap_file_wr = /root/eth1.1.pcap 
+pcap_n_pkt_wr = 80 0
+Command to run
+./build/ip_pipeline -f ./config/sink_port.cfg
+After the app finished runing, since the app send null frames from the source port, check that the pcap file size is 0, and check the 
+time stamp when the app finished runing, compare with the eth1.pcap last modified time, if it's the same, test pass, 
+otherwise, test fail
+
+------------------------------------------------
+13. Sink port and pcap n packet write not paired, negative
+------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = PASS-THROUGH
+core = 1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+pcap_file_wr = /root/eth1.1.pcap /root/eth2.1.pcap
+pcap_n_pkt_wr = 80
+Command to run
+./build/ip_pipeline -f ./config/sink_port.cfg
+After the app finished runing, since the app send null frames from the source port, check that the pcap file size is 0, and check the 
+time stamp when the app finished runing, compare with the eth1.pcap and eth2.pcaplast modified time, if it's the same, test pass, 
+otherwise, test fail
+
+-------------------------------------------------------------------
+14. Functional test for source port on flow classification pipeline (Fan will double check it)
+-------------------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = FLOW_CLASSIFICATION
+core = s1c2
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+n_flows = 512
+key_offset = 192; dma_dst_offset
+key_size = 16; dma_size
+hash_offset = 208; dma_hash_offset = 80
+pcap_file_rd = /root/eth1.pcap /root/eth2.pcap
+pcap_bytes_rd_per_pkt = 64 0
+Command to run
+./build/ip_pipeline -f ./config/source_port.cfg
+The app sends the packets by reading the eth1.pcap and eth2.pcap file and drops the packets, check that the app runs successfully and quit
+normally, then test pass
+
+-----------------------------------------------------------------
+15. Functional test for sink port on flow classification pipeline
+-----------------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = FLOW_CLASSIFICATION
+core = s1c2
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+n_flows = 512
+key_offset = 192; dma_dst_offset
+key_size = 16; dma_size
+hash_offset = 208; dma_hash_offset = 80
+pcap_file_wr = /root/eth1.pcap /root/eth2.pcap
+pcap_n_pkt_wr = 80 0
+Command to run
+./build/ip_pipeline -f ./config/sink_port.cfg
+After the app finished runing, since the app send null frames from the source port, check that the pcap file size is 0, and check the 
+time stamp when the app finished runing, compare with the eth1.pcap and eth2.pcap last modified time, if it's the same, test pass, 
+otherwise, test fail
+------------------------------------------------------------------------
+16. Functional test for source+sink port on flow classification pipeline(need to run with rules)
+------------------------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = FLOW_CLASSIFICATION
+core = s1c2
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+n_flows = 512
+key_offset = 192; dma_dst_offset
+key_size = 16; dma_size
+hash_offset = 208; dma_hash_offset = 80
+pcap_file_rd = /root/eth1.pcap /root/eth2.pcap
+pcap_bytes_rd_per_pkt = 0 64
+pcap_file_wr = /root/eth1.1.pcap /root/eth2.1.pcap
+pcap_n_pkt_wr = 80 200
+command to run
+./build/ip_pipeline -f ./config/source_sink_port.cfg
+After the app finished running, eth1.pcap and eth1.1.pcap should have the same size, eth2.pcap and eth2.1.pcap should have the same size, and,
+in eth2.1.pcap, the first frame and the 101 frame should have the same frame which is the first 64 byte of 1st frame in eth2.pcap.
+
+-----------------------------------------------------------
+17. Functional test for source port on flow action pipeline
+-----------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = FLOW_ACTIONS
+core = 1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+n_flows = 16
+n_meters_per_flow = 1
+flow_id_offset = 286; mbuf (128) + headroom (128) + ethernet (14) + ip dst offset (16) 
+ip_hdr_offset = 270; mbuf (128) + headroom (128) + ethernet (14) = 270
+color_offset = 192; mbuf (128) + 64
+pcap_file_rd = /root/eth1.pcap /root/eth2.pcap
+pcap_bytes_rd_per_pkt = 64 0
+Command to run
+./build/ip_pipeline -f ./config/source_port.cfg
+The app sends the packets by reading the eth1.pcap and eth2.pcap file and drops the packets, check that the app runs successfully and quit
+normally, then test pass
+
+---------------------------------------------------------
+18. Functional test for sink port on flow action pipeline
+---------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = FLOW_ACTIONS
+core = 1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+n_flows = 16
+n_meters_per_flow = 1
+flow_id_offset = 286; mbuf (128) + headroom (128) + ethernet (14) + ip dst offset (16) 
+ip_hdr_offset = 270; mbuf (128) + headroom (128) + ethernet (14) = 270
+color_offset = 192; mbuf (128) + 64
+pcap_file_wr = /root/eth1.1.pcap /root/eth2.1.pcap
+pcap_n_pkt_wr = 80 0
+Command to run
+./build/ip_pipeline -f ./config/sink_port.cfg
+After the app finished runing, since the app send null frames from the source port, check that the pcap file size is 0, and check the 
+time stamp when the app finished runing, compare with the eth1.pcap and eth2.pcap last modified time, if it's the same, test pass, 
+otherwise, test fail
+----------------------------------------------------------------
+19. Functional test for source+sink port on flow action pipeline
+----------------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = FLOW_ACTIONS
+core = 1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+n_flows = 16
+n_meters_per_flow = 1
+flow_id_offset = 286; mbuf (128) + headroom (128) + ethernet (14) + ip dst offset (16) 
+ip_hdr_offset = 270; mbuf (128) + headroom (128) + ethernet (14) = 270
+color_offset = 192; mbuf (128) + 64
+pcap_file_rd = /root/eth1.pcap /root/eth2.pcap
+pcap_bytes_rd_per_pkt = 0 64
+pcap_file_wr = /root/eth1.1.pcap /root/eth2.1.pcap
+pcap_n_pkt_wr = 80 200
+command to run
+./build/ip_pipeline -f ./config/source_sink_port.cfg
+After the app finished running, eth1.pcap and eth1.1.pcap should have the same size, eth2.pcap and eth2.1.pcap should have the same size, and,
+in eth2.1.pcap, the first frame and the 101 frame should have the same frame which is the first 64 byte of 1st frame in eth2.pcap.
+
+-----------------------------------------------------------
+20. Functional test for source port on rt arp on pipeline
+-----------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = ROUTING
+core = s1c1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+n_arp_entries = 1024
+ip_hdr_offset = 270; mbuf (128) + headroom (128) + ethernet header (14) = 270
+arp_key_offset = 192; mbuf (128) + 64
+pcap_file_rd = /root/eth1.pcap /root/eth2.pcap
+pcap_bytes_rd_per_pkt = 64 0
+Command to run
+./build/ip_pipeline -f ./config/source_port.cfg
+The app sends the packets by reading the eth1.pcap and eth2.pcap file and drops the packets, check that the app runs successfully and quit
+normally, then test pass
+
+---------------------------------------------------------
+21. Functional test for sink port on rt arp on pipeline
+---------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = ROUTING
+core = s1c1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+n_arp_entries = 1024
+ip_hdr_offset = 270; mbuf (128) + headroom (128) + ethernet header (14) = 270
+arp_key_offset = 192; mbuf (128) + 64
+pcap_file_wr = /root/eth1.1.pcap /root/eth2.1.pcap
+pcap_n_pkt_wr = 80 0
+Command to run
+./build/ip_pipeline -f ./config/sink_port.cfg
+After the app finished runing, since the app send null frames from the source port, check that the pcap file size is 0, and check the 
+time stamp when the app finished runing, compare with the eth1.pcap and eth2.pcap last modified time, if it's the same, test pass, 
+otherwise, test fail
+----------------------------------------------------------------
+22. Functional test for source+sink port on rt arp on pipeline
+----------------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = ROUTING
+core = s1c1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+n_arp_entries = 1024
+ip_hdr_offset = 270; mbuf (128) + headroom (128) + ethernet header (14) = 270
+arp_key_offset = 192; mbuf (128) + 64
+pcap_file_rd = /root/eth1.pcap /root/eth2.pcap
+pcap_bytes_rd_per_pkt = 0 64
+pcap_file_wr = /root/eth1.1.pcap /root/eth2.1.pcap
+pcap_n_pkt_wr = 80 200
+command to run
+./build/ip_pipeline -f ./config/source_sink_port.cfg
+After the app finished running, eth1.pcap and eth1.1.pcap should have the same size, eth2.pcap and eth2.1.pcap should have the same size, and,
+in eth2.1.pcap, the first frame and the 101 frame should have the same frame which is the first 64 byte of 1st frame in eth2.pcap.
+
+-----------------------------------------------------------
+23. Functional test for source port on rt arp off pipeline
+-----------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = ROUTING
+core = s1c1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+n_routes = 4096
+;ip_hdr_offset = 142; headroom (128) + ethernet header (14) = 142
+ip_hdr_offset = 270; headroom (128) + ethernet header (14) = 142
+pcap_file_rd = /root/eth1.pcap /root/eth2.pcap
+pcap_bytes_rd_per_pkt = 64 0
+Command to run
+./build/ip_pipeline -f ./config/source_port.cfg
+The app sends the packets by reading the eth1.pcap and eth2.pcap file and drops the packets, check that the app runs successfully and quit
+normally, then test pass
+
+---------------------------------------------------------
+24. Functional test for sink port on rt arp off pipeline
+---------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = ROUTING
+core = s1c1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+n_routes = 4096
+;ip_hdr_offset = 142; headroom (128) + ethernet header (14) = 142
+ip_hdr_offset = 270; headroom (128) + ethernet header (14) = 142
+pcap_file_wr = /root/eth1.1.pcap /root/eth2.1.pcap
+pcap_n_pkt_wr = 80 0
+Command to run
+./build/ip_pipeline -f ./config/sink_port.cfg
+After the app finished runing, since the app send null frames from the source port, check that the pcap file size is 0, and check the 
+time stamp when the app finished runing, compare with the eth1.pcap and eth2.pcap last modified time, if it's the same, test pass, 
+otherwise, test fail
+----------------------------------------------------------------
+25. Functional test for source+sink port on rt arp off pipeline
+----------------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = ROUTING
+core = s1c1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+n_routes = 4096
+;ip_hdr_offset = 142; headroom (128) + ethernet header (14) = 142
+ip_hdr_offset = 270; headroom (128) + ethernet header (14) = 142
+pcap_file_rd = /root/eth1.pcap /root/eth2.pcap
+pcap_bytes_rd_per_pkt = 0 64
+pcap_file_wr = /root/eth1.1.pcap /root/eth2.1.pcap
+pcap_n_pkt_wr = 80 200
+command to run
+./build/ip_pipeline -f ./config/source_sink_port.cfg
+After the app finished running, eth1.pcap and eth1.1.pcap should have the same size, eth2.pcap and eth2.1.pcap should have the same size, and,
+in eth2.1.pcap, the first frame and the 101 frame should have the same frame which is the first 64 byte of 1st frame in eth2.pcap.
+
+-----------------------------------------------------------
+26. Functional test for source port on rt mpls arp off pipeline
+-----------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = ROUTING
+core = 1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+n_routes = 4096
+encap = ethernet_mpls
+;ip_hdr_offset = 142; headroom (128) + ethernet header (14) = 142
+ip_hdr_offset = 270; headroom (128) + ethernet header (14) = 142
+pcap_file_rd = /root/eth1.pcap /root/eth1.pcap
+pcap_bytes_rd_per_pkt = 0 0
+;pcap_file_wr = /home/fanzhan2/eth3.pcap /home/fanzhan2/eth2.pcap 
+;pcap_n_pkt_wr = 80 0 
+Command to run
+./build/ip_pipeline -f ./config/source_port.cfg
+The app sends the packets by reading the eth1.pcap and eth2.pcap file and drops the packets, check that the app runs successfully and quit
+normally, then test pass
+
+---------------------------------------------------------
+27. Functional test for sink port on rt mpls arp off pipeline
+---------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = ROUTING
+core = 1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+n_routes = 4096
+encap = ethernet_mpls
+;ip_hdr_offset = 142; headroom (128) + ethernet header (14) = 142
+ip_hdr_offset = 270; headroom (128) + ethernet header (14) = 142
+;pcap_file_rd = /root/eth1.pcap /root/eth1.pcap
+;pcap_bytes_rd_per_pkt = 0 0
+pcap_file_wr = /root/eth1.1.pcap /root/eth2.1.pcap 
+pcap_n_pkt_wr = 80 0 
+Command to run
+./build/ip_pipeline -f ./config/sink_port.cfg
+After the app finished runing, since the app send null frames from the source port, check that the pcap file size is 0, and check the 
+time stamp when the app finished runing, compare with the eth1.pcap and eth2.pcap last modified time, if it's the same, test pass, 
+otherwise, test fail
+----------------------------------------------------------------
+28. Functional test for source+sink port on rt mpls arp off pipeline
+----------------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = ROUTING
+core = 1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+n_routes = 4096
+encap = ethernet_mpls
+;ip_hdr_offset = 142; headroom (128) + ethernet header (14) = 142
+ip_hdr_offset = 270; headroom (128) + ethernet header (14) = 142
+pcap_file_rd = /root/eth1.pcap /root/eth1.pcap
+pcap_bytes_rd_per_pkt = 0 0
+pcap_file_wr = /root/eth1.1.pcap /root/eth2.1.pcap 
+pcap_n_pkt_wr = 80 0 
+command to run
+./build/ip_pipeline -f ./config/source_sink_port.cfg
+After the app finished running, eth1.pcap and eth1.1.pcap should have the same size, eth2.pcap and eth2.1.pcap should have the same size, and,
+in eth2.1.pcap, the first frame and the 101 frame should have the same frame which is the first 64 byte of 1st frame in eth2.pcap.
+
+-----------------------------------------------------------
+29. Functional test for source port on rt mpls arp on pipeline
+-----------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = ROUTING
+core = s1c1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+n_arp_entries = 1024
+encap = ethernet_mpls
+mpls_color_mark = no
+ip_hdr_offset = 270; mbuf (128) + headroom (128) + ethernet header (14) = 270
+arp_key_offset = 192; mbuf (128) + 64
+;color_offset = 256; mbuf (128) + headroom (128) = 256
+pcap_file_rd = /root/eth1.pcap /root/eth2.pcap
+pcap_bytes_rd_per_pkt = 64 0
+Command to run
+./build/ip_pipeline -f ./config/source_port.cfg
+The app sends the packets by reading the eth1.pcap and eth2.pcap file and drops the packets, check that the app runs successfully and quit
+normally, then test pass
+
+---------------------------------------------------------
+30. Functional test for sink port on rt mpls arp on pipeline
+---------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = ROUTING
+core = s1c1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+n_arp_entries = 1024
+encap = ethernet_mpls
+mpls_color_mark = no
+ip_hdr_offset = 270; mbuf (128) + headroom (128) + ethernet header (14) = 270
+arp_key_offset = 192; mbuf (128) + 64
+;color_offset = 256; mbuf (128) + headroom (128) = 256
+;pcap_file_rd = /root/eth1.pcap /root/eth2.pcap
+;pcap_bytes_rd_per_pkt = 64 0
+pcap_file_wr = /root/eth1.1.pcap /root/eth2.1.pcap 
+pcap_n_pkt_wr = 80 0 
+Command to run
+./build/ip_pipeline -f ./config/sink_port.cfg
+After the app finished runing, since the app send null frames from the source port, check that the pcap file size is 0, and check the 
+time stamp when the app finished runing, compare with the eth1.pcap and eth2.pcap last modified time, if it's the same, test pass, 
+otherwise, test fail
+----------------------------------------------------------------
+31. Functional test for source+sink port on rt mpls arp on pipeline
+----------------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = ROUTING
+core = s1c1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+n_arp_entries = 1024
+encap = ethernet_mpls
+mpls_color_mark = no
+ip_hdr_offset = 270; mbuf (128) + headroom (128) + ethernet header (14) = 270
+arp_key_offset = 192; mbuf (128) + 64
+;color_offset = 256; mbuf (128) + headroom (128) = 256
+pcap_file_rd = /root/eth1.pcap /root/eth2.pcap
+pcap_bytes_rd_per_pkt = 64 0
+pcap_file_wr = /root/eth1.1.pcap /root/eth2.1.pcap 
+pcap_n_pkt_wr = 80 0 
+command to run
+./build/ip_pipeline -f ./config/source_sink_port.cfg
+After the app finished running, eth1.pcap and eth1.1.pcap should have the same size, eth2.pcap and eth2.1.pcap should have the same size, and,
+in eth2.1.pcap, the first frame and the 101 frame should have the same frame which is the first 64 byte of 1st frame in eth2.pcap.
+
+-----------------------------------------------------------
+32. Functional test for source port on rt qinq arp off pipeline
+-----------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = ROUTING
+core = 1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+n_routes = 4096
+encap = ethernet_qinq
+;ip_hdr_offset = 142; headroom (128) + ethernet header (14) = 142
+ip_hdr_offset = 270; headroom (128) + ethernet header (14) = 142
+pcap_file_rd = /root/eth1.pcap /root/eth1.pcap
+pcap_bytes_rd_per_pkt = 0 0
+;pcap_file_wr = /home/fanzhan2/eth3.pcap /home/fanzhan2/eth2.pcap 
+;pcap_n_pkt_wr = 80 0 
+Command to run
+./build/ip_pipeline -f ./config/source_port.cfg
+The app sends the packets by reading the eth1.pcap and eth2.pcap file and drops the packets, check that the app runs successfully and quit
+normally, then test pass
+
+---------------------------------------------------------
+33. Functional test for sink port on rt qinq arp off pipeline
+---------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = ROUTING
+core = 1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+n_routes = 4096
+encap = ethernet_qinq
+;ip_hdr_offset = 142; headroom (128) + ethernet header (14) = 142
+ip_hdr_offset = 270; headroom (128) + ethernet header (14) = 142
+;pcap_file_rd = /root/eth1.pcap /root/eth1.pcap
+;pcap_bytes_rd_per_pkt = 0 0
+pcap_file_wr = /root/eth1.1.pcap /root/eth2.1.pcap 
+pcap_n_pkt_wr = 80 0 
+Command to run
+./build/ip_pipeline -f ./config/sink_port.cfg
+After the app finished runing, since the app send null frames from the source port, check that the pcap file size is 0, and check the 
+time stamp when the app finished runing, compare with the eth1.pcap and eth2.pcap last modified time, if it's the same, test pass, 
+otherwise, test fail
+----------------------------------------------------------------
+34. Functional test for source+sink port on rt qinq arp off pipeline
+----------------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = ROUTING
+core = 1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+n_routes = 4096
+encap = ethernet_qinq
+;ip_hdr_offset = 142; headroom (128) + ethernet header (14) = 142
+ip_hdr_offset = 270; headroom (128) + ethernet header (14) = 142
+pcap_file_rd = /root/eth1.pcap /root/eth1.pcap
+pcap_bytes_rd_per_pkt = 0 0
+pcap_file_wr = /root/eth1.1.pcap /root/eth2.1.pcap 
+pcap_n_pkt_wr = 80 0 
+command to run
+./build/ip_pipeline -f ./config/source_sink_port.cfg
+After the app finished running, eth1.pcap and eth1.1.pcap should have the same size, eth2.pcap and eth2.1.pcap should have the same size, and,
+in eth2.1.pcap, the first frame and the 101 frame should have the same frame which is the first 64 byte of 1st frame in eth2.pcap.
+
+-----------------------------------------------------------
+35. Functional test for source port on rt qinq arp on pipeline
+-----------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = ROUTING
+core = s1c1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+n_arp_entries = 1024
+encap = ethernet_qinq
+qinq_sched = no
+ip_hdr_offset = 270; mbuf (128) + headroom (128) + ethernet header (14) = 270
+arp_key_offset = 192; mbuf (128) + 64 = 192
+pcap_file_rd = /root/eth1.pcap /root/eth2.pcap
+pcap_bytes_rd_per_pkt = 64 0
+Command to run
+./build/ip_pipeline -f ./config/source_port.cfg
+The app sends the packets by reading the eth1.pcap and eth2.pcap file and drops the packets, check that the app runs successfully and quit
+normally, then test pass
+
+---------------------------------------------------------
+36. Functional test for sink port on rt qinq arp on pipeline
+---------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = ROUTING
+core = s1c1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+n_arp_entries = 1024
+encap = ethernet_qinq
+qinq_sched = no
+ip_hdr_offset = 270; mbuf (128) + headroom (128) + ethernet header (14) = 270
+arp_key_offset = 192; mbuf (128) + 64 = 192
+;pcap_file_rd = /root/eth1.pcap /root/eth2.pcap
+;pcap_bytes_rd_per_pkt = 64 0
+pcap_file_wr = /root/eth1.1.pcap /root/eth2.1.pcap
+pcap_n_pkt_wr = 80 0
+Command to run
+./build/ip_pipeline -f ./config/sink_port.cfg
+After the app finished runing, since the app send null frames from the source port, check that the pcap file size is 0, and check the 
+time stamp when the app finished runing, compare with the eth1.pcap and eth2.pcap last modified time, if it's the same, test pass, 
+otherwise, test fail
+----------------------------------------------------------------
+37. Functional test for source+sink port on rt qinq arp on pipeline
+----------------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = ROUTING
+core = s1c1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+n_arp_entries = 1024
+encap = ethernet_qinq
+qinq_sched = no
+ip_hdr_offset = 270; mbuf (128) + headroom (128) + ethernet header (14) = 270
+arp_key_offset = 192; mbuf (128) + 64 = 192
+pcap_file_rd = /root/eth1.pcap /root/eth2.pcap
+pcap_bytes_rd_per_pkt = 0 64
+pcap_file_wr = /root/eth1.1.pcap /root/eth2.1.pcap
+pcap_n_pkt_wr = 80 200
+command to run
+./build/ip_pipeline -f ./config/source_sink_port.cfg
+After the app finished running, eth1.pcap and eth1.1.pcap should have the same size, eth2.pcap and eth2.1.pcap should have the same size, and,
+in eth2.1.pcap, the first frame and the 101 frame should have the same frame which is the first 64 byte of 1st frame in eth2.pcap.
+
+----------------------------------------------------------
+38. Functional test for source port on passthrough pipeline for pcap_file_rd
+----------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = PASS-THROUGH
+core = 1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+pcap_file_rd = /root/eth1.pcap /root/eth2.pcap
+;pcap_bytes_rd_per_pkt = 64 0
+Command to run
+./build/ip_pipeline -f ./config/source_port.cfg
+The app sends the packets by reading the eth1.pcap and eth2.pcap file and drops the packets, check that the app runs successfully and quit
+normally, then test pass
+----------------------------------------------------------
+39. Functional test for source port on passthrough pipeline for pcap_file_rd and pcap_bytes_rd_per_pkt(negative)
+----------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = PASS-THROUGH
+core = 1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+;pcap_file_rd = /root/eth1.pcap /root/eth2.pcap
+;pcap_bytes_rd_per_pkt = 64 0
+Command to run
+./build/ip_pipeline -f ./config/source_port.cfg
+Check that the app reports parser errors successfully and quit, then test pass, otherwise, test fail
+----------------------------------------------------------
+40. Functional test for source port on passthrough pipeline for pcap_file_rd_per_pkt(negative)
+----------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = PASS-THROUGH
+core = 1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+;pcap_file_rd = /root/eth1.pcap /root/eth2.pcap
+pcap_bytes_rd_per_pkt = 64 0
+Command to run
+./build/ip_pipeline -f ./config/source_port.cfg
+Check that the app reports parser errors successfully and quit, then test pass, otherwise, test fail
+
+--------------------------------------------------------
+41. Functional test for sink port on passthrough pipeline for pcap_file_wr
+--------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = PASS-THROUGH
+core = 1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+pcap_file_wr = /root/eth1.1.pcap /root/eth2.1.pcap
+;pcap_n_pkt_wr = 80 0
+Command to run
+./build/ip_pipeline -f ./config/sink_port.cfg
+After the app finished runing, since the app send null frames from the source port, check that the pcap file size is 0, and check the 
+time stamp when the app finished runing, compare with the eth1.pcap and eth2.pcap last modified time, if it's the same, test pass, 
+otherwise, test fail
+--------------------------------------------------------
+42. Functional test for sink port on passthrough pipeline for pcap_file_wr and pcap_n_pkt_wr
+--------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = PASS-THROUGH
+core = 1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+;pcap_file_wr = /root/eth1.1.pcap /root/eth2.1.pcap
+;pcap_n_pkt_wr = 80 0
+Command to run
+./build/ip_pipeline -f ./config/sink_port.cfg
+After the app finished runing, since the app send null frames from the source port, check that the pcap file size is 0, and check the 
+time stamp when the app finished runing, compare with the eth1.pcap and eth2.pcap last modified time, if it's the same, test pass, 
+otherwise, test fail
+--------------------------------------------------------
+43. Functional test for sink port on passthrough pipeline for pcap_n_pkt_wr
+--------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = PASS-THROUGH
+core = 1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+;pcap_file_wr = /root/eth1.1.pcap /root/eth2.1.pcap
+pcap_n_pkt_wr = 80 0
+Command to run
+./build/ip_pipeline -f ./config/sink_port.cfg
+After the app finished runing, since the app send null frames from the source port, check that the pcap file size is 0, and check the 
+time stamp when the app finished runing, compare with the eth1.pcap and eth2.pcap last modified time, if it's the same, test pass, 
+otherwise, test fail
+
+CONFIG_RTE_PORT_PCAP=n
+----------------------------------------------------------
+44. Functional test for source port on passthrough pipeline for pcap_file_rd(negative)
+----------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = PASS-THROUGH
+core = 1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+pcap_file_rd = /root/eth1.pcap /root/eth2.pcap
+;pcap_bytes_rd_per_pkt = 64 0
+Command to run
+./build/ip_pipeline -f ./config/source_port.cfg
+Check that the app reports errors successfully and quit normally, then test pass, otherwise, test fail
+----------------------------------------------------------
+45. Functional test for source port on passthrough pipeline for pcap_file_rd and pcap_bytes_rd_per_pkt
+----------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = PASS-THROUGH
+core = 1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+pcap_file_rd = /root/eth1.pcap /root/eth2.pcap
+pcap_bytes_rd_per_pkt = 64 0
+Command to run
+./build/ip_pipeline -f ./config/source_port.cfg
+Check that the app runs successfully and quit, then test pass, otherwise, test fail
+----------------------------------------------------------
+46. Functional test for source port on passthrough pipeline for pcap_file_rd_per_pkt
+----------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = PASS-THROUGH
+core = 1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+;pcap_file_rd = /root/eth1.pcap /root/eth2.pcap
+pcap_bytes_rd_per_pkt = 64 0
+Command to run
+./build/ip_pipeline -f ./config/source_port.cfg
+Check that the app runs successfully and quit, then test pass, otherwise, test fail
+
+--------------------------------------------------------
+47. Functional test for sink port on passthrough pipeline for pcap_file_wr(negative)
+--------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = PASS-THROUGH
+core = 1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+pcap_file_wr = /root/eth1.1.pcap /root/eth2.1.pcap
+;pcap_n_pkt_wr = 80 0
+Command to run
+./build/ip_pipeline -f ./config/sink_port.cfg
+Check the app reports parser errors successfully, then test pass, otherwise, test fail
+--------------------------------------------------------
+48. Functional test for sink port on passthrough pipeline for pcap_file_wr and pcap_n_pkt_wr
+--------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = PASS-THROUGH
+core = 1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+;pcap_file_wr = /root/eth1.1.pcap /root/eth2.1.pcap
+;pcap_n_pkt_wr = 80 0
+Command to run
+./build/ip_pipeline -f ./config/sink_port.cfg
+After the app finished runing, since the app send null frames from the source port, check that the pcap file size is 0, and check the 
+time stamp when the app finished runing, compare with the eth1.pcap and eth2.pcap last modified time, if it's the same, test pass, 
+otherwise, test fail
+--------------------------------------------------------
+49. Functional test for sink port on passthrough pipeline for pcap_n_pkt_wr(negative)
+--------------------------------------------------------
+config file as follows
+[PIPELINE0]
+type = MASTER
+core = 0
+[PIPELINE1]
+type = PASS-THROUGH
+core = 1
+pktq_in = SOURCE0 SOURCE1
+pktq_out = SINK0 SINK1
+;pcap_file_wr = /root/eth1.1.pcap /root/eth2.1.pcap
+pcap_n_pkt_wr = 80 0
+Command to run
+./build/ip_pipeline -f ./config/sink_port.cfg
+Check that the app reports parser errors successfully, then test pass, otherwise, test fail
-- 
1.9.3



More information about the dts mailing list