DPDK patches and discussions
 help / color / mirror / Atom feed
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
To: dev@dpdk.org
Cc: rasland@nvidia.com, matan@nvidia.com, orika@nvidia.com, stable@dpdk.org
Subject: [dpdk-dev] [PATCH v3 5/5] compress/mlx5: add timestamp format support
Date: Sun, 14 Mar 2021 12:13:02 +0000	[thread overview]
Message-ID: <20210314121302.5988-6-viacheslavo@nvidia.com> (raw)
In-Reply-To: <20210314121302.5988-1-viacheslavo@nvidia.com>

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: 8619fcd5161b ("compress/mlx5: support queue pair operations")
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/compress/mlx5/mlx5_compress.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/compress/mlx5/mlx5_compress.c b/drivers/compress/mlx5/mlx5_compress.c
index 46255ab5e0..fdd4e44848 100644
--- a/drivers/compress/mlx5/mlx5_compress.c
+++ b/drivers/compress/mlx5/mlx5_compress.c
@@ -43,6 +43,7 @@ struct mlx5_compress_priv {
 	void *uar;
 	uint32_t pdn; /* Protection Domain number. */
 	uint8_t min_block_size;
+	uint8_t sq_ts_format; /* Whether SQ supports timestamp formats. */
 	/* Minimum huffman block size supported by the device. */
 	struct ibv_pd *pd;
 	struct rte_compressdev_config dev_config;
@@ -245,6 +246,7 @@ mlx5_compress_qp_setup(struct rte_compressdev *dev, uint16_t qp_id,
 		goto err;
 	}
 	sq_attr.cqn = qp->cq.cq->id;
+	sq_attr.ts_format = mlx5_ts_format_conv(priv->sq_ts_format);
 	ret = mlx5_devx_sq_create(priv->ctx, &qp->sq, log_ops_n, &sq_attr,
 				  socket_id);
 	if (ret != 0) {
@@ -814,6 +816,7 @@ mlx5_compress_pci_probe(struct rte_pci_driver *pci_drv,
 	priv->pci_dev = pci_dev;
 	priv->cdev = cdev;
 	priv->min_block_size = att.compress_min_block_size;
+	priv->sq_ts_format = att.sq_ts_format;
 	if (mlx5_compress_hw_global_prepare(priv) != 0) {
 		rte_compressdev_pmd_destroy(priv->cdev);
 		claim_zero(mlx5_glue->close_device(priv->ctx));
-- 
2.28.0


  parent reply	other threads:[~2021-03-14 12:13 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-07 10:02 [dpdk-dev] [PATCH 0/5] mlx5: " Viacheslav Ovsiienko
2021-03-07 10:02 ` [dpdk-dev] [PATCH 1/5] common/mlx5: add timestamp format support to DevX Viacheslav Ovsiienko
2021-03-11 19:36   ` Matan Azrad
2021-03-07 10:02 ` [dpdk-dev] [PATCH 2/5] net/mlx5: add timestamp format support Viacheslav Ovsiienko
2021-03-11 19:52   ` Matan Azrad
2021-03-07 10:02 ` [dpdk-dev] [PATCH 3/5] vdpa/mlx5: " Viacheslav Ovsiienko
2021-03-11 19:55   ` Matan Azrad
2021-03-07 10:02 ` [dpdk-dev] [PATCH 4/5] regex/mlx5: " Viacheslav Ovsiienko
2021-03-11 19:56   ` Matan Azrad
2021-03-07 10:02 ` [dpdk-dev] [PATCH 5/5] compress/mlx5: " Viacheslav Ovsiienko
2021-03-11 19:56   ` Matan Azrad
2021-03-11 10:05 ` [dpdk-dev] [PATCH 0/5] mlx5: " Tom Barbette
2021-03-14 11:57 ` Viacheslav Ovsiienko
2021-03-14 11:57   ` [dpdk-dev] [PATCH 1/5] common/mlx5: add timestamp format support to DevX Viacheslav Ovsiienko
2021-03-14 11:58   ` [dpdk-dev] [PATCH 2/5] net/mlx5: add timestamp format support Viacheslav Ovsiienko
2021-03-14 11:58   ` [dpdk-dev] [PATCH 3/5] vdpa/mlx5: " Viacheslav Ovsiienko
2021-03-14 11:58   ` [dpdk-dev] [PATCH 4/5] regex/mlx5: " Viacheslav Ovsiienko
2021-03-14 11:58   ` [dpdk-dev] [PATCH 5/5] compress/mlx5: " Viacheslav Ovsiienko
2021-03-14 12:12 ` [dpdk-dev] [PATCH v3 0/5] mlx5: " Viacheslav Ovsiienko
2021-03-14 12:12   ` [dpdk-dev] [PATCH v3 1/5] common/mlx5: add timestamp format support to DevX Viacheslav Ovsiienko
2021-03-14 12:12   ` [dpdk-dev] [PATCH v3 2/5] net/mlx5: add timestamp format support Viacheslav Ovsiienko
2021-03-14 12:13   ` [dpdk-dev] [PATCH v3 3/5] vdpa/mlx5: " Viacheslav Ovsiienko
2021-03-14 12:13   ` [dpdk-dev] [PATCH v3 4/5] regex/mlx5: " Viacheslav Ovsiienko
2021-03-14 12:13   ` Viacheslav Ovsiienko [this message]
2021-03-16 14:51   ` [dpdk-dev] [PATCH v3 0/5] mlx5: " Raslan Darawsheh
2021-03-17 18:04   ` 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=20210314121302.5988-6-viacheslavo@nvidia.com \
    --to=viacheslavo@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=matan@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=rasland@nvidia.com \
    --cc=stable@dpdk.org \
    /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).