DPDK patches and discussions
 help / color / mirror / Atom feed
From: Haifei Luo <haifeil@nvidia.com>
To: "Kinsella, Ray" <mdr@ashroe.eu>, "dev@dpdk.org" <dev@dpdk.org>,
	David Marchand <david.marchand@redhat.com>
Cc: Ori Kam <orika@nvidia.com>,
	Slava Ovsiienko <viacheslavo@nvidia.com>,
	Raslan Darawsheh <rasland@nvidia.com>,
	"Xueming(Steven) Li" <xuemingl@nvidia.com>,
	Matan Azrad <matan@nvidia.com>,
	Shahaf Shuler <shahafs@nvidia.com>,
	Neil Horman <nhorman@tuxdriver.com>,
	David Marchand <david.marchand@redhat.com>
Subject: Re: [dpdk-dev] [PATCH v2 3/5] common/mlx5: add mlx5 APIs for single flow dump feature
Date: Wed, 14 Apr 2021 02:40:23 +0000	[thread overview]
Message-ID: <MW2PR12MB4667F2B61ABB96CF0DFC65BFCE4E9@MW2PR12MB4667.namprd12.prod.outlook.com> (raw)
In-Reply-To: <4b4fff72-1f94-830f-71d5-adf60697a57d@ashroe.eu>

HI David,
      In current release, is the exports file necessary? I will keep the modification if yes. Thank you.

drivers/common/mlx5/rte_common_mlx5_exports.def 

-----Original Message-----
From: Kinsella, Ray <mdr@ashroe.eu> 
Sent: Wednesday, April 14, 2021 12:44 AM
To: Haifei Luo <haifeil@nvidia.com>; dev@dpdk.org
Cc: Ori Kam <orika@nvidia.com>; Slava Ovsiienko <viacheslavo@nvidia.com>; Raslan Darawsheh <rasland@nvidia.com>; Xueming(Steven) Li <xuemingl@nvidia.com>; Matan Azrad <matan@nvidia.com>; Shahaf Shuler <shahafs@nvidia.com>; Neil Horman <nhorman@tuxdriver.com>; David Marchand <david.marchand@redhat.com>
Subject: Re: [PATCH v2 3/5] common/mlx5: add mlx5 APIs for single flow dump feature

External email: Use caution opening links or attachments


On 07/04/2021 07:09, Haifei Luo wrote:
> add mlx5 APIs for single flow dump feature
>
> Signed-off-by: Haifei Luo <haifeil@nvidia.com>
> ---
>  drivers/common/mlx5/linux/meson.build           |  2 ++
>  drivers/common/mlx5/linux/mlx5_glue.c           | 13 +++++++++++++
>  drivers/common/mlx5/linux/mlx5_glue.h           |  1 +
>  drivers/common/mlx5/mlx5_devx_cmds.c            | 14 ++++++++++++++
>  drivers/common/mlx5/mlx5_devx_cmds.h            |  2 ++
>  drivers/common/mlx5/rte_common_mlx5_exports.def |  1 +

Perhaps check with David Marchand on this, I suspect amendments to the exports file will soon be redundant.

>  drivers/common/mlx5/version.map                 |  1 +
>  7 files changed, 34 insertions(+)
>
> diff --git a/drivers/common/mlx5/linux/meson.build 
> b/drivers/common/mlx5/linux/meson.build
> index 220de35..3f42163 100644
> --- a/drivers/common/mlx5/linux/meson.build
> +++ b/drivers/common/mlx5/linux/meson.build
> @@ -186,6 +186,8 @@ has_sym_args = [
>       'mlx5dv_dr_action_create_aso' ],
>       [ 'HAVE_INFINIBAND_VERBS_H', 'infiniband/verbs.h',
>       'INFINIBAND_VERBS_H' ],
> +     [ 'HAVE_MLX5_DR_FLOW_DUMP_RULE', 'infiniband/mlx5dv.h',
> +     'mlx5dv_dump_dr_rule' ],
>  ]
>  config = configuration_data()
>  foreach arg:has_sym_args
> diff --git a/drivers/common/mlx5/linux/mlx5_glue.c 
> b/drivers/common/mlx5/linux/mlx5_glue.c
> index 964f7e7..d3bd645 100644
> --- a/drivers/common/mlx5/linux/mlx5_glue.c
> +++ b/drivers/common/mlx5/linux/mlx5_glue.c
> @@ -1101,6 +1101,18 @@
>  }
>
>  static int
> +mlx5_glue_dr_dump_single_rule(FILE *file, void *rule) { #ifdef 
> +HAVE_MLX5_DR_FLOW_DUMP_RULE
> +     return mlx5dv_dump_dr_rule(file, rule); #else
> +     RTE_SET_USED(file);
> +     RTE_SET_USED(rule);
> +     return -ENOTSUP;
> +#endif
> +}
> +
> +static int
>  mlx5_glue_dr_dump_domain(FILE *file, void *domain)  {  #ifdef 
> HAVE_MLX5_DR_FLOW_DUMP @@ -1423,6 +1435,7 @@
>       .devx_wq_query = mlx5_glue_devx_wq_query,
>       .devx_port_query = mlx5_glue_devx_port_query,
>       .dr_dump_domain = mlx5_glue_dr_dump_domain,
> +     .dr_dump_rule = mlx5_glue_dr_dump_single_rule,
>       .dr_reclaim_domain_memory = mlx5_glue_dr_reclaim_domain_memory,
>       .dr_create_flow_action_sampler =
>               mlx5_glue_dr_create_flow_action_sampler,
> diff --git a/drivers/common/mlx5/linux/mlx5_glue.h 
> b/drivers/common/mlx5/linux/mlx5_glue.h
> index 9e385be..97462e9 100644
> --- a/drivers/common/mlx5/linux/mlx5_glue.h
> +++ b/drivers/common/mlx5/linux/mlx5_glue.h
> @@ -313,6 +313,7 @@ struct mlx5_glue {
>                              uint32_t port_num,
>                              struct mlx5dv_devx_port *mlx5_devx_port);
>       int (*dr_dump_domain)(FILE *file, void *domain);
> +     int (*dr_dump_rule)(FILE *file, void *rule);
>       int (*devx_query_eqn)(struct ibv_context *context, uint32_t cpus,
>                             uint32_t *eqn);
>       struct mlx5dv_devx_event_channel *(*devx_create_event_channel) 
> diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c 
> b/drivers/common/mlx5/mlx5_devx_cmds.c
> index c90e020..c0b6fdb 100644
> --- a/drivers/common/mlx5/mlx5_devx_cmds.c
> +++ b/drivers/common/mlx5/mlx5_devx_cmds.c
> @@ -1579,6 +1579,20 @@ struct mlx5_devx_obj *
>       return -ret;
>  }
>
> +int
> +mlx5_devx_cmd_flow_single_dump(void *rule_info __rte_unused,
> +                     FILE *file __rte_unused) {
> +     int ret = 0;
> +#ifdef HAVE_MLX5_DR_FLOW_DUMP_RULE
> +     if (rule_info)
> +             ret = mlx5_glue->dr_dump_rule(file, rule_info); #else
> +     ret = ENOTSUP;
> +#endif
> +     return -ret;
> +}
> +
>  /*
>   * Create CQ using DevX API.
>   *
> diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h
> index 2826c0b..f587d0c 100644
> --- a/drivers/common/mlx5/mlx5_devx_cmds.h
> +++ b/drivers/common/mlx5/mlx5_devx_cmds.h
> @@ -474,6 +474,8 @@ struct mlx5_devx_obj *mlx5_devx_cmd_create_tis(void *ctx,
>  int mlx5_devx_cmd_flow_dump(void *fdb_domain, void *rx_domain, void *tx_domain,
>                           FILE *file);
>  __rte_internal
> +int mlx5_devx_cmd_flow_single_dump(void *rule, FILE *file);
> +__rte_internal
>  struct mlx5_devx_obj *mlx5_devx_cmd_create_cq(void *ctx,
>                                             struct mlx5_devx_cq_attr *attr);
>  __rte_internal
> diff --git a/drivers/common/mlx5/rte_common_mlx5_exports.def b/drivers/common/mlx5/rte_common_mlx5_exports.def
> index fd62b80..0e6d6d3 100644
> --- a/drivers/common/mlx5/rte_common_mlx5_exports.def
> +++ b/drivers/common/mlx5/rte_common_mlx5_exports.def
> @@ -20,6 +20,7 @@ EXPORTS
>       mlx5_devx_cmd_flow_counter_alloc
>       mlx5_devx_cmd_flow_counter_query
>       mlx5_devx_cmd_flow_dump
> +     mlx5_devx_cmd_flow_single_dump
>       mlx5_devx_cmd_mkey_create
>       mlx5_devx_cmd_modify_qp_state
>       mlx5_devx_cmd_modify_rq
> diff --git a/drivers/common/mlx5/version.map b/drivers/common/mlx5/version.map
> index 91f3fa5..4d49011 100644
> --- a/drivers/common/mlx5/version.map
> +++ b/drivers/common/mlx5/version.map
> @@ -28,6 +28,7 @@ INTERNAL {
>       mlx5_devx_cmd_flow_counter_alloc;
>       mlx5_devx_cmd_flow_counter_query;
>       mlx5_devx_cmd_flow_dump;
> +     mlx5_devx_cmd_flow_single_dump;
>       mlx5_devx_cmd_mkey_create;
>       mlx5_devx_cmd_modify_qp_state;
>       mlx5_devx_cmd_modify_rq;
>

  reply	other threads:[~2021-04-14  2:40 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
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 [this message]
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=MW2PR12MB4667F2B61ABB96CF0DFC65BFCE4E9@MW2PR12MB4667.namprd12.prod.outlook.com \
    --to=haifeil@nvidia.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=matan@nvidia.com \
    --cc=mdr@ashroe.eu \
    --cc=nhorman@tuxdriver.com \
    --cc=orika@nvidia.com \
    --cc=rasland@nvidia.com \
    --cc=shahafs@nvidia.com \
    --cc=viacheslavo@nvidia.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).