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:
6152534e211e ("crypto/mlx5: support queue pairs operations")
Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
attr.wq_umem_id = qp->umem_obj->umem_id;
attr.wq_umem_offset = 0;
attr.dbr_umem_id = qp->umem_obj->umem_id;
+ attr.ts_format = mlx5_ts_format_conv(priv->qp_ts_format);
attr.dbr_address = RTE_BIT64(log_nb_desc) * priv->wqe_set_size;
qp->qp_obj = mlx5_devx_cmd_create_qp(priv->ctx, &attr);
if (qp->qp_obj == NULL) {
priv->ctx = ctx;
priv->login_obj = login;
priv->crypto_dev = crypto_dev;
+ priv->qp_ts_format = attr.qp_ts_format;
if (mlx5_crypto_hw_global_prepare(priv) != 0) {
rte_cryptodev_pmd_destroy(priv->crypto_dev);
claim_zero(mlx5_glue->close_device(priv->ctx));
volatile uint64_t *uar_addr;
uint32_t pdn; /* Protection Domain number. */
uint32_t max_segs_num; /* Maximum supported data segs. */
+ uint8_t qp_ts_format; /* Whether QP supports timestamp formats. */
struct ibv_pd *pd;
struct mlx5_hlist *dek_hlist; /* Dek hash list. */
struct rte_cryptodev_config dev_config;