net/mlx5: fix Rx queue timestamp format
authorViacheslav Ovsiienko <viacheslavo@nvidia.com>
Mon, 14 Jun 2021 13:52:42 +0000 (16:52 +0300)
committerRaslan Darawsheh <rasland@nvidia.com>
Thu, 24 Jun 2021 11:19:50 +0000 (13:19 +0200)
The timestamp format was not configured correctly for the
receiving queues created via DevX calls. It caused non-UTC
timestamps in CQEs  for real time configurations.

Fixes: d61381ad46d0 ("net/mlx5: support timestamp format")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx5/mlx5_devx.c

index 78b88f9..a1db535 100644 (file)
@@ -249,6 +249,7 @@ mlx5_rxq_create_devx_rq_resources(struct rte_eth_dev *dev, uint16_t idx)
        rq_attr.vsd = (rxq_data->vlan_strip) ? 0 : 1;
        rq_attr.cqn = rxq_ctrl->obj->cq_obj.cq->id;
        rq_attr.scatter_fcs = (rxq_data->crc_present) ? 1 : 0;
+       rq_attr.ts_format = mlx5_ts_format_conv(priv->sh->rq_ts_format);
        /* Fill WQ attributes for this RQ. */
        if (mlx5_rxq_mprq_enabled(rxq_data)) {
                rq_attr.wq_attr.wq_type = MLX5_WQ_TYPE_CYCLIC_STRIDING_RQ;