net/mlx5: support meter creation with policy
[dpdk.git] / drivers / net / mlx5 / windows / mlx5_os.c
index 4fbd889..814063b 100644 (file)
@@ -9,7 +9,7 @@
 #include <stdlib.h>
 
 #include <rte_windows.h>
-#include <rte_ethdev_pci.h>
+#include <ethdev_pci.h>
 
 #include <mlx5_glue.h>
 #include <mlx5_devx_cmds.h>
@@ -23,6 +23,8 @@
 #include "mlx5_common_os.h"
 #include "mlx5_utils.h"
 #include "mlx5_rxtx.h"
+#include "mlx5_rx.h"
+#include "mlx5_tx.h"
 #include "mlx5_autoconf.h"
 #include "mlx5_mr.h"
 #include "mlx5_flow.h"
@@ -165,7 +167,7 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv)
        if (!sh->flow_tbls)
                err = mlx5_alloc_table_hash_list(priv);
        else
-               DRV_LOG(DEBUG, "sh->flow_tbls[%p] already created, reuse\n",
+               DRV_LOG(DEBUG, "sh->flow_tbls[%p] already created, reuse",
                        (void *)sh->flow_tbls);
        return err;
 }
@@ -313,7 +315,6 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
        struct mlx5_priv *priv = NULL;
        int err = 0;
        unsigned int cqe_comp;
-       unsigned int cqe_pad = 0;
        struct rte_ether_addr mac;
        char name[RTE_ETH_NAME_MAX_LEN];
        int own_domain_id = 0;
@@ -461,12 +462,6 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
                DRV_LOG(WARNING, "Rx CQE compression isn't supported.");
                config->cqe_comp = 0;
        }
-       if (config->cqe_pad && !cqe_pad) {
-               DRV_LOG(WARNING, "Rx CQE padding isn't supported.");
-               config->cqe_pad = 0;
-       } else if (config->cqe_pad) {
-               DRV_LOG(INFO, "Rx CQE padding is enabled.");
-       }
        if (config->devx) {
                err = mlx5_devx_cmd_query_hca_attr(sh->ctx, &config->hca_attr);
                if (err) {
@@ -504,6 +499,9 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
                                                 (NS_PER_S / MS_PER_S))
                                config->rt_timestamp = 1;
                }
+               sh->rq_ts_format = config->hca_attr.rq_ts_format;
+               sh->sq_ts_format = config->hca_attr.sq_ts_format;
+               sh->qp_ts_format = config->hca_attr.qp_ts_format;
        }
        if (config->mprq.enabled) {
                DRV_LOG(WARNING, "Multi-Packet RQ isn't supported");
@@ -550,7 +548,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
                mac.addr_bytes[4], mac.addr_bytes[5]);
 #ifdef RTE_LIBRTE_MLX5_DEBUG
        {
-               char ifname[IF_NAMESIZE];
+               char ifname[MLX5_NAMESIZE];
 
                if (mlx5_get_ifname(eth_dev, &ifname) == 0)
                        DRV_LOG(DEBUG, "port %u ifname is \"%s\"",