From: Ori Kam <orika@mellanox.com>
To: Yongseok Koh <yskoh@mellanox.com>, Shahaf Shuler <shahafs@mellanox.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 1/5] net/mlx5: add warning message for Direct Verbs flow
Date: Wed, 17 Oct 2018 05:11:29 +0000 [thread overview]
Message-ID: <AM4PR05MB3425742F2F5CB275F03F5947DBFF0@AM4PR05MB3425.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <20181017020739.11203-1-yskoh@mellanox.com>
> -----Original Message-----
> From: Yongseok Koh
> Sent: Wednesday, October 17, 2018 5:08 AM
> To: Shahaf Shuler <shahafs@mellanox.com>
> Cc: dev@dpdk.org; Yongseok Koh <yskoh@mellanox.com>; Ori Kam
> <orika@mellanox.com>
> Subject: [PATCH 1/5] net/mlx5: add warning message for Direct Verbs flow
>
> In case that the library doesn't support DV flow, if enabled by
> 'dv_flow_en=1', print out a warning message and disable it.
>
> Fixes: 51e72d386c99 ("net/mlx5: add runtime parameter to enable Direct
> Verbs")
> Cc: orika@mellanox.com
>
> Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
> Acked-by: Ori Kam <orika@mellanox.com>
> ---
> drivers/net/mlx5/mlx5.c | 6 ++++++
> drivers/net/mlx5/mlx5_flow.c | 20 +++++++-------------
> 2 files changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
> index 795a219771..70b8626126 100644
> --- a/drivers/net/mlx5/mlx5.c
> +++ b/drivers/net/mlx5/mlx5.c
> @@ -1016,6 +1016,12 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
> cs_desc.counter_type, cs_desc.num_of_cs,
> cs_desc.attributes);
> #endif
> +#ifndef HAVE_IBV_FLOW_DV_SUPPORT
> + if (config.dv_flow_en) {
> + DRV_LOG(WARNING, "DV flow is not supported");
> + config.dv_flow_en = 0;
> + }
> +#endif
> config.ind_table_max_size =
> attr.rss_caps.max_rwq_indirection_table_size;
> /*
> diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
> index bd70fce248..04e287f160 100644
> --- a/drivers/net/mlx5/mlx5_flow.c
> +++ b/drivers/net/mlx5/mlx5_flow.c
> @@ -1673,25 +1673,19 @@ const struct mlx5_flow_driver_ops
> mlx5_flow_null_drv_ops = {
> * Pointer to the flow attributes.
> *
> * @return
> - * flow driver type if supported, MLX5_FLOW_TYPE_MAX otherwise.
> + * flow driver type, MLX5_FLOW_TYPE_MAX otherwise.
> */
> static enum mlx5_flow_drv_type
> -flow_get_drv_type(struct rte_eth_dev *dev __rte_unused,
> - const struct rte_flow_attr *attr)
> +flow_get_drv_type(struct rte_eth_dev *dev, const struct rte_flow_attr *attr)
> {
> - struct priv *priv __rte_unused = dev->data->dev_private;
> + struct priv *priv = dev->data->dev_private;
> enum mlx5_flow_drv_type type = MLX5_FLOW_TYPE_MAX;
>
> - if (attr->transfer) {
> + if (attr->transfer)
> type = MLX5_FLOW_TYPE_TCF;
> - } else {
> -#ifdef HAVE_IBV_FLOW_DV_SUPPORT
> - type = priv->config.dv_flow_en ? MLX5_FLOW_TYPE_DV :
> - MLX5_FLOW_TYPE_VERBS;
> -#else
> - type = MLX5_FLOW_TYPE_VERBS;
> -#endif
> - }
> + else
> + type = priv->config.dv_flow_en ? MLX5_FLOW_TYPE_DV :
> + MLX5_FLOW_TYPE_VERBS;
> return type;
> }
>
> --
> 2.11.0
Acked-by: Ori Kam <orika@mellanox.com>
Thanks,
Ori
next prev parent reply other threads:[~2018-10-17 5:11 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-17 2:07 Yongseok Koh
2018-10-17 2:07 ` [dpdk-dev] [PATCH 2/5] net/mlx5: fix UDP hash field flag in Direct Verbs Yongseok Koh
2018-10-17 5:11 ` Ori Kam
2018-10-17 2:07 ` [dpdk-dev] [PATCH 3/5] net/mlx5: fix item validation " Yongseok Koh
2018-10-17 2:07 ` [dpdk-dev] [PATCH 4/5] net/mlx5: fix wildcard item for " Yongseok Koh
2018-10-23 7:42 ` Shahaf Shuler
2018-10-23 15:25 ` Ori Kam
2018-10-23 17:22 ` Yongseok Koh
2018-10-17 2:07 ` [dpdk-dev] [PATCH 5/5] net/mlx5: fix flow mark ID conversion in " Yongseok Koh
2018-10-17 5:15 ` Ori Kam
2018-10-17 5:11 ` Ori Kam [this message]
2018-10-23 16:52 ` [dpdk-dev] [PATCH v2 0/5] net/mlx5: fixes for Direct Verbs flow Yongseok Koh
2018-10-23 16:52 ` [dpdk-dev] [PATCH v2 1/5] net/mlx5: add warning message " Yongseok Koh
2018-10-23 16:52 ` [dpdk-dev] [PATCH v2 2/5] net/mlx5: fix UDP hash field flag in Direct Verbs Yongseok Koh
2018-10-23 16:52 ` [dpdk-dev] [PATCH v2 3/5] net/mlx5: fix item validation " Yongseok Koh
2018-10-23 16:52 ` [dpdk-dev] [PATCH v2 4/5] net/mlx5: fix wildcard item for " Yongseok Koh
2018-10-23 16:52 ` [dpdk-dev] [PATCH v2 5/5] net/mlx5: fix flow mark ID conversion in " Yongseok Koh
2018-10-24 12:30 ` [dpdk-dev] [PATCH v2 0/5] net/mlx5: fixes for Direct Verbs flow Shahaf Shuler
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=AM4PR05MB3425742F2F5CB275F03F5947DBFF0@AM4PR05MB3425.eurprd05.prod.outlook.com \
--to=orika@mellanox.com \
--cc=dev@dpdk.org \
--cc=shahafs@mellanox.com \
--cc=yskoh@mellanox.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).