[PATCH v4 3/3] l3fwd-graph: changes to configure pcap capture
Jerin Jacob
jerinjacobk at gmail.com
Tue Jan 31 09:14:55 CET 2023
On Tue, Jan 24, 2023 at 4:53 PM Amit Prakash Shukla
<amitprakashs at marvell.com> wrote:
>
> Added support to configure pcap capture.
>
> Signed-off-by: Amit Prakash Shukla <amitprakashs at marvell.com>
Change the subject as examples/l3fwd-graph:
> ---
> v2:
> - Fixed code style issue
> - Fixed CI compilation issue on github-robot
>
> v3:
> - Code review suggestion from Stephen
> - Fixed potential memory leak
>
> v4:
> - Code review suggestion from Jerin
>
> doc/guides/sample_app_ug/l3_forward_graph.rst | 23 +++++++
> examples/l3fwd-graph/main.c | 62 ++++++++++++++++++-
> 2 files changed, 83 insertions(+), 2 deletions(-)
>
> diff --git a/doc/guides/sample_app_ug/l3_forward_graph.rst b/doc/guides/sample_app_ug/l3_forward_graph.rst
> index 0a3e0d44ec..3043dba8e2 100644
> --- a/doc/guides/sample_app_ug/l3_forward_graph.rst
> +++ b/doc/guides/sample_app_ug/l3_forward_graph.rst
> @@ -51,6 +51,9 @@ The application has a number of command line options similar to l3fwd::
> [--max-pkt-len PKTLEN]
> [--no-numa]
> [--per-port-pool]
> + [--pcap-enable]
> + [--pcap-num-cap]
> + [--pcap-file-name]
>
> Where,
>
> @@ -69,6 +72,12 @@ Where,
>
> * ``--per-port-pool:`` Optional, set to use independent buffer pools per port. Without this option, single buffer pool is used for all ports.
>
> +* ``--pcap-enable:`` Optional, Enables packet capture in pcap format on each node with mbuf and node metadata.
> +
> +* ``--pcap-num-cap:`` Optional, Number of packets to be captured per core.
> +
> +* ``--pcap-file-name:`` Optional, Pcap filename to capture packets in.
> +
> For example, consider a dual processor socket platform with 8 physical cores, where cores 0-7 and 16-23 appear on socket 0,
> while cores 8-15 and 24-31 appear on socket 1.
>
> @@ -99,6 +108,20 @@ In this command:
> | | | | |
> +----------+-----------+-----------+-------------------------------------+
>
> +To enable pcap trace on each graph, use following command:
> +
> +.. code-block:: console
> +
> + ./<build_dir>/examples/dpdk-l3fwd-graph -l 1,2 -n 4 -- -p 0x3 --config="(0,0,1),(1,0,2)" --pcap-enable --pcap-num-cap=<number of packets> --pcap-file-name "</filepath/filename>"
</filepath/filename> can be changes as "/path/to/file"
More information about the dev
mailing list