patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 20.11] regex/mlx5: support timestamp format
@ 2021-05-19 18:35 Viacheslav Ovsiienko
  2021-05-31 11:33 ` Xueming(Steven) Li
  0 siblings, 1 reply; 2+ messages in thread
From: Viacheslav Ovsiienko @ 2021-05-19 18:35 UTC (permalink / raw)
  To: stable; +Cc: bluca, xuemingl

[ upstream commit dd25bd201d18729b883acc4d4120a5e751807f5f ]

This patch adds support for the timestamp format settings for
the receive and send queues. If the firmware version x.30.1000
or above is installed and the NIC timestamps are configured
with the real-time format, the default zero values for newly
added fields cause the queue creation to fail.

The patch queries the timestamp formats supported by the hardware
and sets the configuration values in queue context accordingly.

Fixes: 92f2c6a30fe0 ("regex/mlx5: add send queue")
Cc: stable@dpdk.org

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 drivers/regex/mlx5/mlx5_regex.c         | 1 +
 drivers/regex/mlx5/mlx5_regex.h         | 1 +
 drivers/regex/mlx5/mlx5_regex_control.c | 1 +
 3 files changed, 3 insertions(+)

diff --git a/drivers/regex/mlx5/mlx5_regex.c b/drivers/regex/mlx5/mlx5_regex.c
index c91c444dda..34827fa133 100644
--- a/drivers/regex/mlx5/mlx5_regex.c
+++ b/drivers/regex/mlx5/mlx5_regex.c
@@ -159,6 +159,7 @@ mlx5_regex_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 		rte_errno = ENOMEM;
 		goto dev_error;
 	}
+	priv->sq_ts_format = attr.sq_ts_format;
 	priv->ctx = ctx;
 	priv->nb_engines = 2; /* attr.regexp_num_of_engines */
 	/* Default RXP programming mode to Shared. */
diff --git a/drivers/regex/mlx5/mlx5_regex.h b/drivers/regex/mlx5/mlx5_regex.h
index 2c4877c37d..3fe7bb4a52 100644
--- a/drivers/regex/mlx5/mlx5_regex.h
+++ b/drivers/regex/mlx5/mlx5_regex.h
@@ -80,6 +80,7 @@ struct mlx5_regex_priv {
 	struct ibv_pd *pd;
 	struct mlx5_dbr_page_list dbrpgs; /* Door-bell pages. */
 	struct mlx5_mr_share_cache mr_scache; /* Global shared MR cache. */
+	uint8_t sq_ts_format; /* Whether SQ supports timestamp formats. */
 };
 
 /* mlx5_regex.c */
diff --git a/drivers/regex/mlx5/mlx5_regex_control.c b/drivers/regex/mlx5/mlx5_regex_control.c
index d6f452bb6b..7373495e6b 100644
--- a/drivers/regex/mlx5/mlx5_regex_control.c
+++ b/drivers/regex/mlx5/mlx5_regex_control.c
@@ -233,6 +233,7 @@ regex_ctrl_create_sq(struct mlx5_regex_priv *priv, struct mlx5_regex_qp *qp,
 	attr.tis_num = 0;
 	attr.user_index = q_ind;
 	attr.cqn = qp->cq.obj->id;
+	attr.ts_format = mlx5_ts_format_conv(priv->sq_ts_format);
 	wq_attr->uar_page = priv->uar->page_id;
 	regex_get_pdn(priv->pd, &pd_num);
 	wq_attr->pd = pd_num;
-- 
2.18.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-stable] [PATCH 20.11] regex/mlx5: support timestamp format
  2021-05-19 18:35 [dpdk-stable] [PATCH 20.11] regex/mlx5: support timestamp format Viacheslav Ovsiienko
@ 2021-05-31 11:33 ` Xueming(Steven) Li
  0 siblings, 0 replies; 2+ messages in thread
From: Xueming(Steven) Li @ 2021-05-31 11:33 UTC (permalink / raw)
  To: Slava Ovsiienko, stable; +Cc: bluca

Thanks, applied to work queue.

> -----Original Message-----
> From: Slava Ovsiienko <viacheslavo@nvidia.com>
> Sent: Thursday, May 20, 2021 2:36 AM
> To: stable@dpdk.org
> Cc: bluca@debian.org; Xueming(Steven) Li <xuemingl@nvidia.com>
> Subject: [PATCH 20.11] regex/mlx5: support timestamp format
> 
> [ upstream commit dd25bd201d18729b883acc4d4120a5e751807f5f ]
> 
> This patch adds support for the timestamp format settings for the receive and send queues. If the firmware version x.30.1000 or
> above is installed and the NIC timestamps are configured with the real-time format, the default zero values for newly added fields
> cause the queue creation to fail.
> 
> The patch queries the timestamp formats supported by the hardware and sets the configuration values in queue context accordingly.
> 
> Fixes: 92f2c6a30fe0 ("regex/mlx5: add send queue")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
> Acked-by: Matan Azrad <matan@nvidia.com>
> Acked-by: Ori Kam <orika@nvidia.com>
> ---
>  drivers/regex/mlx5/mlx5_regex.c         | 1 +
>  drivers/regex/mlx5/mlx5_regex.h         | 1 +
>  drivers/regex/mlx5/mlx5_regex_control.c | 1 +
>  3 files changed, 3 insertions(+)
> 
> diff --git a/drivers/regex/mlx5/mlx5_regex.c b/drivers/regex/mlx5/mlx5_regex.c index c91c444dda..34827fa133 100644
> --- a/drivers/regex/mlx5/mlx5_regex.c
> +++ b/drivers/regex/mlx5/mlx5_regex.c
> @@ -159,6 +159,7 @@ mlx5_regex_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
>  		rte_errno = ENOMEM;
>  		goto dev_error;
>  	}
> +	priv->sq_ts_format = attr.sq_ts_format;
>  	priv->ctx = ctx;
>  	priv->nb_engines = 2; /* attr.regexp_num_of_engines */
>  	/* Default RXP programming mode to Shared. */ diff --git a/drivers/regex/mlx5/mlx5_regex.h
> b/drivers/regex/mlx5/mlx5_regex.h index 2c4877c37d..3fe7bb4a52 100644
> --- a/drivers/regex/mlx5/mlx5_regex.h
> +++ b/drivers/regex/mlx5/mlx5_regex.h
> @@ -80,6 +80,7 @@ struct mlx5_regex_priv {
>  	struct ibv_pd *pd;
>  	struct mlx5_dbr_page_list dbrpgs; /* Door-bell pages. */
>  	struct mlx5_mr_share_cache mr_scache; /* Global shared MR cache. */
> +	uint8_t sq_ts_format; /* Whether SQ supports timestamp formats. */
>  };
> 
>  /* mlx5_regex.c */
> diff --git a/drivers/regex/mlx5/mlx5_regex_control.c b/drivers/regex/mlx5/mlx5_regex_control.c
> index d6f452bb6b..7373495e6b 100644
> --- a/drivers/regex/mlx5/mlx5_regex_control.c
> +++ b/drivers/regex/mlx5/mlx5_regex_control.c
> @@ -233,6 +233,7 @@ regex_ctrl_create_sq(struct mlx5_regex_priv *priv, struct mlx5_regex_qp *qp,
>  	attr.tis_num = 0;
>  	attr.user_index = q_ind;
>  	attr.cqn = qp->cq.obj->id;
> +	attr.ts_format = mlx5_ts_format_conv(priv->sq_ts_format);
>  	wq_attr->uar_page = priv->uar->page_id;
>  	regex_get_pdn(priv->pd, &pd_num);
>  	wq_attr->pd = pd_num;
> --
> 2.18.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-31 11:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-19 18:35 [dpdk-stable] [PATCH 20.11] regex/mlx5: support timestamp format Viacheslav Ovsiienko
2021-05-31 11:33 ` Xueming(Steven) Li

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git