DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ori Kam <orika@nvidia.com>
To: Haifei Luo <haifeil@nvidia.com>,
	"ferruh.yigit@intel.com" <ferruh.yigit@intel.com>,
	Slava Ovsiienko <viacheslavo@nvidia.com>,
	Matan Azrad <matan@nvidia.com>,
	"xiaoyun.li@intel.com" <xiaoyun.li@intel.com>,
	NBU-Contact-Thomas Monjalon <thomas@monjalon.net>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	Raslan Darawsheh <rasland@nvidia.com>, Ori Kam <orika@nvidia.com>,
	"Xueming(Steven) Li" <xuemingl@nvidia.com>
Subject: Re: [dpdk-dev] [PATCH 1/4] ethdev: add rte API for single flow dump
Date: Wed, 10 Mar 2021 07:05:37 +0000	[thread overview]
Message-ID: <DM6PR12MB4987E0D2C57A5B26FFBE04C2D6919@DM6PR12MB4987.namprd12.prod.outlook.com> (raw)
In-Reply-To: <1615277716-64404-2-git-send-email-haifeil@nvidia.com>

Hi Haifei,

PSB

> -----Original Message-----
> From: Haifei Luo <haifeil@nvidia.com>
> Subject: [PATCH 1/4] ethdev: add rte API for single flow dump
> 
> Previous implementations support dump all the flows.Add new ones
> to dump one flow.
> New API added: rte_flow_dump.
> 
> Signed-off-by: Haifei Luo <haifeil@nvidia.com>
> ---
>  doc/guides/nics/mlx5.rst            | 10 +++++++--
>  doc/guides/prog_guide/rte_flow.rst  | 44
> +++++++++++++++++++++++++++++++++++++
>  lib/librte_ethdev/rte_flow.c        | 21 ++++++++++++++++++
>  lib/librte_ethdev/rte_flow.h        | 24 ++++++++++++++++++++
>  lib/librte_ethdev/rte_flow_driver.h |  6 +++++
>  lib/librte_ethdev/version.map       |  1 +
>  6 files changed, 104 insertions(+), 2 deletions(-)
> 
> diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
> index 7c50497..b8b6b02 100644
> --- a/doc/guides/nics/mlx5.rst
> +++ b/doc/guides/nics/mlx5.rst
> @@ -1778,13 +1778,19 @@ all flows with assistance of external tools.
> 
>     .. code-block:: console
> 
> -       testpmd> flow dump <port> <output_file>
> +       To dump all flows:
> +       testpmd> flow dump <port> all <output_file>
> +       and dump one flow:
> +       testpmd> flow dump <port> rule <rule_id> <output_file>
> 
>     - call rte_flow_dev_dump api:
> 
>     .. code-block:: console
> 
> +       To dump all flows:
>         rte_flow_dev_dump(port, file, NULL);
> +       and dump one flow:
> +       rte_flow_dump(port, flow, file, NULL);
> 
>  #. Dump human-readable flows from raw file:
> 
> @@ -1792,4 +1798,4 @@ all flows with assistance of external tools.
> 
>     .. code-block:: console
> 
> -       mlx_steering_dump.py -f <output_file>
> +       mlx_steering_dump.py -f <output_file> -flowptr <flow_ptr>
> diff --git a/doc/guides/prog_guide/rte_flow.rst
> b/doc/guides/prog_guide/rte_flow.rst
> index 62a5791..17e4351 100644
> --- a/doc/guides/prog_guide/rte_flow.rst
> +++ b/doc/guides/prog_guide/rte_flow.rst
> @@ -3023,6 +3023,50 @@ Return values:
> 
>  - 0 on success, a negative errno value otherwise and ``rte_errno`` is set.
> 
> +Dump
> +~~~~~
> +
> +Dump information for all or one flows.
> +
> +This Function rte_flow_dev_dump will dump the information for all the flows.
> +
> +.. code-block:: c
> +
> +   int
> +   rte_flow_dev_dump(uint16_t port_id, FILE *file,
> +                     struct rte_flow_error *error);
> +
> +Arguments:
> +
> +- ``port_id``: port identifier of Ethernet device.
> +- ``file``: a pointer to a file for output
> +- ``error``: perform verbose error reporting if not NULL. PMDs initialize
> +  this structure in case of error only.
> +
> +Return values:
> +
> +- 0 on success, a negative errno value otherwise and ``rte_errno`` is set.
> +
> +This Function rte_flow_dump will dump the information for one flow.
> +
> +.. code-block:: c
> +
> +   int
> +   rte_flow_dump(uint16_t port_id, struct rte_flow *flow, FILE *file,
> +                 struct rte_flow_error *error);
> +
> +Arguments:
> +
> +- ``port_id``: port identifier of Ethernet device.
> +- ``file``: a pointer to a file for output
> +- ``flow``: flow rule handle to dump.
> +- ``error``: perform verbose error reporting if not NULL. PMDs initialize
> +  this structure in case of error only.
> +
> +Return values:
> +
> +- 0 on success, a negative errno value otherwise and ``rte_errno`` is set.
> +
>  Query
>  ~~~~~
> 
> diff --git a/lib/librte_ethdev/rte_flow.c b/lib/librte_ethdev/rte_flow.c
> index 241af6c..ff051e7 100644
> --- a/lib/librte_ethdev/rte_flow.c
> +++ b/lib/librte_ethdev/rte_flow.c
> @@ -1044,6 +1044,27 @@ enum rte_flow_conv_item_spec_type {
>  }
> 
>  int
> +rte_flow_dump(uint16_t port_id, struct rte_flow *flow,
> +			FILE *file, struct rte_flow_error *error)

Why not update the current dump function to support dumping one flow?


Best,
Ori

  parent reply	other threads:[~2021-03-10  7:05 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-09  8:15 [dpdk-dev] [PATCH 0/4] *** Support for one flow dump *** Haifei Luo
2021-03-09  8:15 ` [dpdk-dev] [PATCH 1/4] ethdev: add rte API for single flow dump Haifei Luo
2021-03-10  0:39   ` Stephen Hemminger
2021-03-10  7:05   ` Ori Kam [this message]
2021-03-09  8:15 ` [dpdk-dev] [PATCH 2/4] app/testpmd: add CLIs for single flow dump feature Haifei Luo
2021-03-09  8:15 ` [dpdk-dev] [PATCH 3/4] common/mlx5: add mlx5 APIs " Haifei Luo
2021-03-09  8:15 ` [dpdk-dev] [PATCH 4/4] net/mlx5: " Haifei Luo
2021-04-07  6:09 ` [dpdk-dev] [PATCH v2 0/5] support single flow dump Haifei Luo
2021-04-07  6:09   ` [dpdk-dev] [PATCH v2 1/5] ethdev: modify rte API for " Haifei Luo
2021-04-12 19:33     ` Ori Kam
2021-04-13  4:38     ` Ajit Khaparde
2021-04-07  6:09   ` [dpdk-dev] [PATCH v2 2/5] app/testpmd: add CLIs for single flow dump feature Haifei Luo
2021-04-13 16:36     ` Ajit Khaparde
2021-04-07  6:09   ` [dpdk-dev] [PATCH v2 3/5] common/mlx5: add mlx5 APIs " Haifei Luo
2021-04-12  7:32     ` Slava Ovsiienko
2021-04-13 16:44     ` Kinsella, Ray
2021-04-14  2:40       ` Haifei Luo
2021-04-14  6:21         ` David Marchand
2021-04-14  6:23           ` Haifei Luo
2021-04-07  6:09   ` [dpdk-dev] [PATCH v2 4/5] net/mlx5: " Haifei Luo
2021-04-12  7:29     ` Slava Ovsiienko
2021-04-12  7:37     ` Slava Ovsiienko
2021-04-13  1:29       ` Haifei Luo
2021-04-13  7:22         ` Haifei Luo
2021-04-13  7:39           ` Slava Ovsiienko
2021-04-07  6:09   ` [dpdk-dev] [PATCH v2 5/5] doc: add single flow dump to guides Haifei Luo
2021-04-14  6:13 ` [dpdk-dev] [PATCH v3 0/3] support single flow dump Haifei Luo
2021-04-14  6:13   ` [dpdk-dev] [PATCH v3 1/3] ethdev: modify rte API for " Haifei Luo
2021-04-14  6:13   ` [dpdk-dev] [PATCH v3 2/3] app/testpmd: add CLIs for single flow dump feature Haifei Luo
2021-04-14  6:13   ` [dpdk-dev] [PATCH v3 3/3] doc: add single flow dump to guides Haifei Luo
2021-04-14  8:23     ` Ferruh Yigit
2021-04-14  8:25       ` Haifei Luo
2021-04-14 10:00       ` Haifei Luo
2021-04-14  8:41 ` [dpdk-dev] [PATCH v4 0/3] support single flow dump Haifei Luo
2021-04-14  8:41   ` [dpdk-dev] [PATCH v4 1/3] ethdev: modify rte API for " Haifei Luo
2021-04-14  8:57     ` Thomas Monjalon
2021-04-14  9:10       ` Haifei Luo
2021-04-14  9:01     ` Thomas Monjalon
2021-04-14  9:07       ` Haifei Luo
2021-04-14  9:31         ` Thomas Monjalon
2021-04-14  8:41   ` [dpdk-dev] [PATCH v4 2/3] app/testpmd: add CLIs for single flow dump feature Haifei Luo
2021-04-14  8:41   ` [dpdk-dev] [PATCH v4 3/3] doc: add single flow dump to guides Haifei Luo
2021-04-14  9:15     ` Ferruh Yigit
2021-04-14  9:51 ` [dpdk-dev] [PATCH v5 0/3] support single flow dump Haifei Luo
2021-04-14  9:51   ` [dpdk-dev] [PATCH v5 1/3] ethdev: dump single flow rule Haifei Luo
2021-04-14 10:33     ` Thomas Monjalon
2021-04-14 10:37       ` Haifei Luo
2021-04-14  9:51   ` [dpdk-dev] [PATCH v5 2/3] app/testpmd: add CLIs for single flow dump feature Haifei Luo
2021-04-14  9:51   ` [dpdk-dev] [PATCH v5 3/3] doc: add single flow dump to guides Haifei Luo
2021-04-14 10:19 ` [dpdk-dev] [PATCH v6 0/2] single flow dump Haifei Luo
2021-04-14 10:19   ` [dpdk-dev] [PATCH v6 1/2] ethdev: dump single flow rule Haifei Luo
2021-04-14 10:20   ` [dpdk-dev] [PATCH v6 2/2] app/testpmd: add CLIs for single flow dump feature Haifei Luo
2021-04-14 11:26   ` [dpdk-dev] [PATCH v6 0/2] single flow dump Ferruh Yigit

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=DM6PR12MB4987E0D2C57A5B26FFBE04C2D6919@DM6PR12MB4987.namprd12.prod.outlook.com \
    --to=orika@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=haifeil@nvidia.com \
    --cc=matan@nvidia.com \
    --cc=rasland@nvidia.com \
    --cc=thomas@monjalon.net \
    --cc=viacheslavo@nvidia.com \
    --cc=xiaoyun.li@intel.com \
    --cc=xuemingl@nvidia.com \
    /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).