fe5d046213
This patch add packet dumping feature to ip_pipeline. Output port type SINK now supports dumping packets to PCAP file before releasing mbuf back to mempool. This feature can be applied by specifying parameters in configuration file as shown below: [PIPELINE1] type = PASS-THROUGH core = 1 pktq_in = SOURCE0 SOURCE1 pktq_out = SINK0 SINK1 pcap_file_wr = /path/to/eth1.pcap /path/to/eth2.pcap pcap_n_pkt_wr = 80 0 The configuration section "pcap_file_wr" contains full path and name of the PCAP file which the packets will be dumped to. If multiple SINKs exists, each shall have its own PCAP file path listed in this section, separated by spaces. Multiple SINK ports shall NOT share same PCAP file to be dumped. The configuration section "pcap_n_pkt_wr" contains integer value(s) and indicates the maximum number of packets to be dumped to the PCAP file. If this value is "0", the "infinite" dumping mode will be used. If this value is N (N > 0), the dumping will be finished when the number of packets dumped to the file reaches N. To enable PCAP dumping support to IP pipeline, the compiler option CONFIG_RTE_PORT_PCAP must be set to 'y'. It is possible to disable this feature by removing "pcap_file_wr" and "pcap_n_pkt_wr" lines from the configuration file. Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>