net/hns3: support SVE Rx
[dpdk.git] / drivers / net / mlx5 / mlx5_rxq.c
index 487f997..f1d8373 100644 (file)
@@ -484,11 +484,11 @@ rxq_sync_cq(struct mlx5_rxq_data *rxq)
                cqe->op_own = MLX5_CQE_INVALIDATE;
        }
        /* Resync CQE and WQE (WQ in RESET state). */
-       rte_cio_wmb();
+       rte_io_wmb();
        *rxq->cq_db = rte_cpu_to_be_32(rxq->cq_ci);
-       rte_cio_wmb();
+       rte_io_wmb();
        *rxq->rq_db = rte_cpu_to_be_32(0);
-       rte_cio_wmb();
+       rte_io_wmb();
 }
 
 /**
@@ -513,7 +513,7 @@ mlx5_rx_queue_stop_primary(struct rte_eth_dev *dev, uint16_t idx)
        int ret;
 
        MLX5_ASSERT(rte_eal_process_type() == RTE_PROC_PRIMARY);
-       ret = priv->obj_ops.rxq_obj_modify(rxq_ctrl->obj, false);
+       ret = priv->obj_ops.rxq_obj_modify(rxq_ctrl->obj, MLX5_RXQ_MOD_RDY2RST);
        if (ret) {
                DRV_LOG(ERR, "Cannot change Rx WQ state to RESET:  %s",
                        strerror(errno));
@@ -562,7 +562,7 @@ mlx5_rx_queue_stop(struct rte_eth_dev *dev, uint16_t idx)
         * The routine pointer depends on the process
         * type, should perform check there.
         */
-       if (pkt_burst == mlx5_rx_burst) {
+       if (pkt_burst == mlx5_rx_burst_vec) {
                DRV_LOG(ERR, "Rx queue stop is not supported "
                        "for vectorized Rx");
                rte_errno = EINVAL;
@@ -606,13 +606,13 @@ mlx5_rx_queue_start_primary(struct rte_eth_dev *dev, uint16_t idx)
                rte_errno = errno;
                return ret;
        }
-       rte_cio_wmb();
+       rte_io_wmb();
        *rxq->cq_db = rte_cpu_to_be_32(rxq->cq_ci);
-       rte_cio_wmb();
-       /* Reset RQ consumer before moving queue to READY state. */
+       rte_io_wmb();
+       /* Reset RQ consumer before moving queue ro READY state. */
        *rxq->rq_db = rte_cpu_to_be_32(0);
-       rte_cio_wmb();
-       ret = priv->obj_ops.rxq_obj_modify(rxq_ctrl->obj, true);
+       rte_io_wmb();
+       ret = priv->obj_ops.rxq_obj_modify(rxq_ctrl->obj, MLX5_RXQ_MOD_RST2RDY);
        if (ret) {
                DRV_LOG(ERR, "Cannot change Rx WQ state to READY:  %s",
                        strerror(errno));
@@ -1090,7 +1090,7 @@ mlx5_mprq_buf_init(struct rte_mempool *mp, void *opaque_arg,
 
        memset(_m, 0, sizeof(*buf));
        buf->mp = mp;
-       rte_atomic16_set(&buf->refcnt, 1);
+       __atomic_store_n(&buf->refcnt, 1, __ATOMIC_RELAXED);
        for (j = 0; j != strd_n; ++j) {
                shinfo = &buf->shinfos[j];
                shinfo->free_cb = mlx5_mprq_buf_free_cb;