]> git.droids-corp.org - dpdk.git/commitdiff
eal: remove deprecated coherent IO memory barriers
authorPhil Yang <phil.yang@arm.com>
Wed, 23 Sep 2020 09:16:37 +0000 (17:16 +0800)
committerDavid Marchand <david.marchand@redhat.com>
Wed, 23 Sep 2020 11:40:26 +0000 (13:40 +0200)
Since the 20.08 release deprecated rte_cio_*mb APIs because these APIs
provide the same functionality as rte_io_*mb APIs on all platforms, so
remove them and use rte_io_*mb instead.

Signed-off-by: Phil Yang <phil.yang@arm.com>
Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: David Marchand <david.marchand@redhat.com>
38 files changed:
doc/guides/rel_notes/deprecation.rst
doc/guides/rel_notes/release_20_11.rst
drivers/common/mlx5/mlx5_common.h
drivers/crypto/octeontx2/otx2_cryptodev_ops.c
drivers/crypto/octeontx2/otx2_cryptodev_sec.c
drivers/event/octeontx/ssovf_worker.c
drivers/event/octeontx2/otx2_worker.h
drivers/net/bnxt/bnxt_hwrm.c
drivers/net/bnxt/bnxt_ring.h
drivers/net/bnxt/bnxt_rxtx_vec_neon.c
drivers/net/e1000/em_rxtx.c
drivers/net/i40e/i40e_rxtx.c
drivers/net/i40e/i40e_rxtx_vec_neon.c
drivers/net/mlx5/mlx5_flow.c
drivers/net/mlx5/mlx5_flow_dv.c
drivers/net/mlx5/mlx5_rxq.c
drivers/net/mlx5/mlx5_rxtx.c
drivers/net/mlx5/mlx5_rxtx.h
drivers/net/mlx5/mlx5_rxtx_vec.h
drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
drivers/net/mlx5/mlx5_rxtx_vec_neon.h
drivers/net/mlx5/mlx5_rxtx_vec_sse.h
drivers/net/mlx5/mlx5_txq.c
drivers/net/octeontx/octeontx_rxtx.h
drivers/net/octeontx2/otx2_ethdev_sec.c
drivers/net/octeontx2/otx2_ethdev_sec_tx.h
drivers/net/octeontx2/otx2_rx.c
drivers/net/octeontx2/otx2_tx.c
drivers/net/virtio/virtio_rxtx.c
drivers/net/virtio/virtio_rxtx_simple_neon.c
drivers/net/virtio/virtqueue.h
drivers/raw/octeontx2_ep/otx2_ep_enqdeq.c
drivers/regex/mlx5/mlx5_regex_fastpath.c
lib/librte_eal/arm/include/rte_atomic_32.h
lib/librte_eal/arm/include/rte_atomic_64.h
lib/librte_eal/include/generic/rte_atomic.h
lib/librte_eal/ppc/include/rte_atomic.h
lib/librte_eal/x86/include/rte_atomic.h

index 95a31c72bb2ff18b4e4571db4e4db4b1ca38128e..67caedb11bfd0f7aa4ba2855df2d816a50f7ac73 100644 (file)
@@ -83,12 +83,6 @@ Deprecation Notices
   These wrappers must be used for patches that need to be merged in 20.08
   onwards. This change will not introduce any performance degradation.
 
-* rte_cio_*mb: Since the IO barriers for ARMv8 platforms are relaxed from DSB
-  to DMB, rte_cio_*mb APIs provide the same functionality as rte_io_*mb
-  APIs (taking all platforms into consideration). rte_io_*mb APIs should be
-  used in the place of rte_cio_*mb APIs. The rte_cio_*mb APIs will be
-  deprecated in 20.11 release.
-
 * igb_uio: In the view of reducing the kernel dependency from the main tree,
   as a first step, the Technical Board decided to move ``igb_uio``
   kernel module to the dpdk-kmods repository in the /linux/igb_uio/ directory
index c6642f5f949dc0817af6f1ea8323ccec723ff79d..f377ab8e873fe0a7b8fbaa6079876bb9cb30059b 100644 (file)
@@ -113,6 +113,9 @@ API Changes
 * eal: Made the ``rte_dev_event`` structure private to the EAL as no public API
   used it.
 
+* eal: ``rte_cio_rmb()`` and ``rte_cio_wmb()`` were deprecated since 20.08
+  and are removed in this release.
+
 * mem: Removed the unioned field ``phys_addr`` from
   the structures ``rte_memseg`` and ``rte_memzone``.
   The field ``iova`` is remaining from the old unions.
index 2cdb226f38e0f72a0067e58f78c57a802997c8ef..ed44a45a811e23df2527f8d8e2183a09a0b86b88 100644 (file)
@@ -193,7 +193,7 @@ check_cqe(volatile struct mlx5_cqe *cqe, const uint16_t cqes_n,
 
        if (unlikely((op_owner != (!!(idx))) || (op_code == MLX5_CQE_INVALID)))
                return MLX5_CQE_STATUS_HW_OWN;
-       rte_cio_rmb();
+       rte_io_rmb();
        if (unlikely(op_code == MLX5_CQE_RESP_ERR ||
                     op_code == MLX5_CQE_REQ_ERR))
                return MLX5_CQE_STATUS_ERR;
index 9d51b17dddc92224ab8787aa0d3a9b92894775a4..df39cde9577b3b8e9ede1be02afddb2a4d154990 100644 (file)
@@ -469,7 +469,7 @@ otx2_cpt_enqueue_req(const struct otx2_cpt_qp *qp,
                 * buffer immediately, a DMB is not required to push out
                 * LMTSTs.
                 */
-               rte_cio_wmb();
+               rte_io_wmb();
                lmt_status = otx2_lmt_submit(qp->lf_nq_reg);
        } while (lmt_status == 0);
 
index 0741a592cd47bd5148caeebb40d4abd390b3426a..72e6c418e8963ea54f9374e0f0e58808d3a8851d 100644 (file)
@@ -107,7 +107,7 @@ otx2_cpt_enq_sa_write(struct otx2_sec_session_ipsec_lp *lp,
        inst.u64[3] = 0;
        inst.res_addr = rte_mempool_virt2iova(res);
 
-       rte_cio_wmb();
+       rte_io_wmb();
 
        do {
                /* Copy CPT command to LMTLINE */
@@ -124,7 +124,7 @@ otx2_cpt_enq_sa_write(struct otx2_sec_session_ipsec_lp *lp,
                        otx2_err("Request timed out");
                        return -ETIMEDOUT;
                }
-           rte_cio_rmb();
+           rte_io_rmb();
        }
 
        if (unlikely(res->compcode != CPT_9X_COMP_E_GOOD)) {
index 18b7926e8c30f061fdb1d40c94bb2956dea4fbd0..3dfe665a2fe32161552019aa5f2e78eacefa42cf 100644 (file)
@@ -286,17 +286,17 @@ __sso_event_tx_adapter_enqueue(void *port, struct rte_event ev[],
        switch (ev->sched_type) {
        case SSO_SYNC_ORDERED:
                ssows_swtag_norm(ws, ev->event, SSO_SYNC_ATOMIC);
-               rte_cio_wmb();
+               rte_io_wmb();
                ssows_swtag_wait(ws);
                break;
        case SSO_SYNC_UNTAGGED:
                ssows_swtag_full(ws, ev->u64, ev->event, SSO_SYNC_ATOMIC,
                                ev->queue_id);
-               rte_cio_wmb();
+               rte_io_wmb();
                ssows_swtag_wait(ws);
                break;
        case SSO_SYNC_ATOMIC:
-               rte_cio_wmb();
+               rte_io_wmb();
                break;
        }
 
index 924ff7ff42b7f2f0ba698eae71caf73ea879e297..cde1288d951dfee38c3e167991bfb32c1690a34c 100644 (file)
@@ -256,7 +256,7 @@ otx2_ssogws_order(struct otx2_ssogws *ws, const uint8_t wait_flag)
        if (wait_flag)
                otx2_ssogws_head_wait(ws);
 
-       rte_cio_wmb();
+       rte_io_wmb();
 }
 
 static __rte_always_inline const struct otx2_eth_txq *
index 57d1026f96770b78bfc5641a584397a9667e8c2c..d0b820f149bf9dfbf834bf91efa99eccef32b611 100644 (file)
@@ -148,7 +148,7 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg,
        /* Poll for the valid bit */
        for (i = 0; i < timeout; i++) {
                /* Sanity check on the resp->resp_len */
-               rte_cio_rmb();
+               rte_io_rmb();
                if (resp->resp_len && resp->resp_len <= bp->max_resp_len) {
                        /* Last byte of resp contains the valid key */
                        valid = (uint8_t *)resp + resp->resp_len - 1;
index 9913aed05ef664c156e9f5e4ce64d4666922b1fa..daf980495614aa1f77a55fa9db025d0c54715886 100644 (file)
@@ -82,7 +82,7 @@ void bnxt_free_rxtx_nq_ring(struct bnxt *bp);
 
 static inline void bnxt_db_write(struct bnxt_db_info *db, uint32_t idx)
 {
-       rte_cio_wmb();
+       rte_io_wmb();
 
        if (db->db_64)
                rte_write64_relaxed(db->db_key64 | idx, db->doorbell);
@@ -96,7 +96,7 @@ static inline void bnxt_db_nq(struct bnxt_cp_ring_info *cpr)
        if (unlikely(!cpr->cp_db.db_64))
                return;
 
-       rte_cio_wmb();
+       rte_io_wmb();
        rte_write64_relaxed(cpr->cp_db.db_key64 | DBR_TYPE_NQ |
                            RING_CMP(cpr->cp_ring_struct, cpr->cp_raw_cons),
                            cpr->cp_db.doorbell);
@@ -108,7 +108,7 @@ static inline void bnxt_db_nq_arm(struct bnxt_cp_ring_info *cpr)
        if (unlikely(!cpr->cp_db.db_64))
                return;
 
-       rte_cio_wmb();
+       rte_io_wmb();
        rte_write64_relaxed(cpr->cp_db.db_key64 | DBR_TYPE_NQ_ARM |
                            RING_CMP(cpr->cp_ring_struct, cpr->cp_raw_cons),
                            cpr->cp_db.doorbell);
index 4075669e95bc46212ae991df333b8bd8d1cc89b7..299b6b86dfaa182560f36315730a71d0c92f7596 100644 (file)
@@ -258,21 +258,21 @@ bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
                 * reverse order to ensure consistent state.
                 */
                rxcmp1[3] = vld1q_u32((void *)&cpr->cp_desc_ring[cons + 7]);
-               rte_cio_rmb();
+               rte_io_rmb();
                rxcmp[3] = vld1q_u32((void *)&cpr->cp_desc_ring[cons + 6]);
 
                rxcmp1[2] = vld1q_u32((void *)&cpr->cp_desc_ring[cons + 5]);
-               rte_cio_rmb();
+               rte_io_rmb();
                rxcmp[2] = vld1q_u32((void *)&cpr->cp_desc_ring[cons + 4]);
 
                t1 = vreinterpretq_u64_u32(vzip2q_u32(rxcmp1[2], rxcmp1[3]));
 
                rxcmp1[1] = vld1q_u32((void *)&cpr->cp_desc_ring[cons + 3]);
-               rte_cio_rmb();
+               rte_io_rmb();
                rxcmp[1] = vld1q_u32((void *)&cpr->cp_desc_ring[cons + 2]);
 
                rxcmp1[0] = vld1q_u32((void *)&cpr->cp_desc_ring[cons + 1]);
-               rte_cio_rmb();
+               rte_io_rmb();
                rxcmp[0] = vld1q_u32((void *)&cpr->cp_desc_ring[cons + 0]);
 
                t0 = vreinterpretq_u64_u32(vzip2q_u32(rxcmp1[0], rxcmp1[1]));
index 67a271e8ce83935ecbda44204c0dcee7c9d6f412..19e3bffd468f314d9f1d8f40da0f60868118811d 100644 (file)
@@ -2051,7 +2051,7 @@ e1000_flush_tx_ring(struct rte_eth_dev *dev)
                tx_desc->lower.data = rte_cpu_to_le_32(txd_lower | size);
                tx_desc->upper.data = 0;
 
-               rte_cio_wmb();
+               rte_io_wmb();
                txq->tx_tail++;
                if (txq->tx_tail == txq->nb_tx_desc)
                        txq->tx_tail = 0;
index 60b33d20a1f395879f0dbd9d8a51c0d49d602875..322fc1ed75b094142957b37c9604ba2f21ec547c 100644 (file)
@@ -1248,7 +1248,7 @@ end_of_tx:
                   (unsigned) txq->port_id, (unsigned) txq->queue_id,
                   (unsigned) tx_id, (unsigned) nb_tx);
 
-       rte_cio_wmb();
+       rte_io_wmb();
        I40E_PCI_REG_WRITE_RELAXED(txq->qtx_tail, tx_id);
        txq->tx_tail = tx_id;
 
index 6f874e45b40ad6030581f7f04a21c86a697253a5..543ecadb07abf38e95b88be62ec48307029683bd 100644 (file)
@@ -72,7 +72,7 @@ i40e_rxq_rearm(struct i40e_rx_queue *rxq)
        rx_id = (uint16_t)((rxq->rxrearm_start == 0) ?
                             (rxq->nb_rx_desc - 1) : (rxq->rxrearm_start - 1));
 
-       rte_cio_wmb();
+       rte_io_wmb();
        /* Update the tail pointer on the NIC */
        I40E_PCI_REG_WRITE_RELAXED(rxq->qrx_tail, rx_id);
 }
@@ -566,7 +566,7 @@ i40e_xmit_fixed_burst_vec(void *__rte_restrict tx_queue,
 
        txq->tx_tail = tx_id;
 
-       rte_cio_wmb();
+       rte_io_wmb();
        I40E_PCI_REG_WRITE_RELAXED(txq->qtx_tail, tx_id);
 
        return nb_pkts;
index 416505f1c89ccdb76d7cd4d7f82ea87e6b8d5307..ffa7646ca443b1fa79ee85d78b97d280b75f68a3 100644 (file)
@@ -6118,7 +6118,7 @@ mlx5_flow_async_pool_query_handle(struct mlx5_dev_ctx_shared *sh,
                pool->raw = pool->raw_hw;
                rte_spinlock_unlock(&pool->sl);
                /* Be sure the new raw counters data is updated in memory. */
-               rte_cio_wmb();
+               rte_io_wmb();
                if (!TAILQ_EMPTY(&pool->counters[query_gen])) {
                        rte_spinlock_lock(&cont->csl);
                        TAILQ_CONCAT(&cont->counters,
index 56529c854bc7924678e5f51710b2c5d36b6e9f12..ca1f39f7c0b2d82c3fcf95832d134314ff6703a1 100644 (file)
@@ -4452,7 +4452,7 @@ flow_dv_pool_create(struct rte_eth_dev *dev, struct mlx5_devx_obj *dcs,
                cont->last_pool_idx = pool->index;
        }
        /* Pool initialization must be updated before host thread access. */
-       rte_cio_wmb();
+       rte_io_wmb();
        rte_atomic16_add(&cont->n_valid, 1);
        return pool;
 }
index 487f9973bb251eda09b1b855f4cf29cac117ee95..9f68a5cb985b0826081c8b2deb1ddac93dad3d81 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();
 }
 
 /**
@@ -606,12 +606,12 @@ 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();
+       rte_io_wmb();
        ret = priv->obj_ops.rxq_obj_modify(rxq_ctrl->obj, true);
        if (ret) {
                DRV_LOG(ERR, "Cannot change Rx WQ state to READY:  %s",
index 1b71e94221a130bc1987fa8367de20f45c0da18d..101555ed031da20fd3710a1857c1f1906a89dfe9 100644 (file)
@@ -873,7 +873,7 @@ mlx5_rxq_initialize(struct mlx5_rxq_data *rxq)
        };
        /* Update doorbell counter. */
        rxq->rq_ci = wqe_n >> rxq->sges_n;
-       rte_cio_wmb();
+       rte_io_wmb();
        *rxq->rq_db = rte_cpu_to_be_32(rxq->rq_ci);
 }
 
@@ -1113,15 +1113,15 @@ mlx5_rx_err_handle(struct mlx5_rxq_data *rxq, uint8_t vec)
        case MLX5_RXQ_ERR_STATE_NEED_READY:
                ret = check_cqe(u.cqe, cqe_n, rxq->cq_ci);
                if (ret == MLX5_CQE_STATUS_HW_OWN) {
-                       rte_cio_wmb();
+                       rte_io_wmb();
                        *rxq->cq_db = rte_cpu_to_be_32(rxq->cq_ci);
-                       rte_cio_wmb();
+                       rte_io_wmb();
                        /*
                         * The RQ consumer index must be zeroed while moving
                         * from RESET state to RDY state.
                         */
                        *rxq->rq_db = rte_cpu_to_be_32(0);
-                       rte_cio_wmb();
+                       rte_io_wmb();
                        sm.is_wq = 1;
                        sm.queue_id = rxq->idx;
                        sm.state = IBV_WQS_RDY;
@@ -1515,9 +1515,9 @@ mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
                return 0;
        /* Update the consumer index. */
        rxq->rq_ci = rq_ci >> sges_n;
-       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(rxq->rq_ci);
 #ifdef MLX5_PMD_SOFT_COUNTERS
        /* Increment packets counter. */
@@ -1893,11 +1893,11 @@ mlx5_rx_burst_mprq(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
 out:
        /* Update the consumer indexes. */
        rxq->consumed_strd = consumed_strd;
-       rte_cio_wmb();
+       rte_io_wmb();
        *rxq->cq_db = rte_cpu_to_be_32(rxq->cq_ci);
        if (rq_ci != rxq->rq_ci) {
                rxq->rq_ci = rq_ci;
-               rte_cio_wmb();
+               rte_io_wmb();
                *rxq->rq_db = rte_cpu_to_be_32(rxq->rq_ci);
        }
 #ifdef MLX5_PMD_SOFT_COUNTERS
index a8e6837ba161717a7d585ab4d80f1da458c8af95..6876c1bc4a5a8a1816eb5c106a733e302a0d3dcd 100644 (file)
@@ -627,7 +627,7 @@ mlx5_tx_dbrec_cond_wmb(struct mlx5_txq_data *txq, volatile struct mlx5_wqe *wqe,
        uint64_t *dst = MLX5_TX_BFREG(txq);
        volatile uint64_t *src = ((volatile uint64_t *)wqe);
 
-       rte_cio_wmb();
+       rte_io_wmb();
        *txq->qp_db = rte_cpu_to_be_32(txq->wqe_ci);
        /* Ensure ordering between DB record and BF copy. */
        rte_wmb();
index 6ddcbfb0ad28faf65cd4802fecc46a06b9c4f938..a8d6c4f4113358444a4340ee8b1a43df3280fdbe 100644 (file)
@@ -118,7 +118,7 @@ mlx5_rx_replenish_bulk_mbuf(struct mlx5_rxq_data *rxq, uint16_t n)
        elts_idx = rxq->rq_ci & q_mask;
        for (i = 0; i < MLX5_VPMD_DESCS_PER_LOOP; ++i)
                (*rxq->elts)[elts_idx + i] = &rxq->fake_mbuf;
-       rte_cio_wmb();
+       rte_io_wmb();
        *rxq->rq_db = rte_cpu_to_be_32(rxq->rq_ci);
 }
 
index cb4ce1a09949702d8dcd26159870069cd69cdc85..6bf0c9b540052e25adfb1310943238df11e1aa2e 100644 (file)
@@ -788,7 +788,7 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
                /* B.2 copy mbuf pointers. */
                *(vector unsigned char *)&pkts[pos] = mbp1;
                *(vector unsigned char *)&pkts[pos + 2] = mbp2;
-               rte_cio_rmb();
+               rte_io_rmb();
 
                /* C.1 load remaining CQE data and extract necessary fields. */
                cqe_tmp2 = *(vector unsigned char *)
index af924b70924b6fee85f89a27f97f2128cca56da4..d122dad4fe10587e88ed826691baa8126c08cb4f 100644 (file)
@@ -554,7 +554,7 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
                /* B.0 (CQE 0) load a block having op_own. */
                c0 = vld1q_u64((uint64_t *)(p0 + 48));
                /* Synchronize for loading the rest of blocks. */
-               rte_cio_rmb();
+               rte_io_rmb();
                /* Prefetch next 4 CQEs. */
                if (pkts_n - pos >= 2 * MLX5_VPMD_DESCS_PER_LOOP) {
                        unsigned int next = pos + MLX5_VPMD_DESCS_PER_LOOP;
@@ -803,7 +803,7 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
                        rxq->decompressed -= n;
                }
        }
-       rte_cio_wmb();
+       rte_io_wmb();
        *rxq->cq_db = rte_cpu_to_be_32(rxq->cq_ci);
        *no_cq = !rcvd_pkt;
        return rcvd_pkt;
index 554924d7fcfd3454fc9f0e3e9cac8fc6bc316569..0bbcbeefff784d8a7bbcbf0c7024d388d23d785c 100644 (file)
@@ -552,7 +552,7 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
                /* B.2 copy mbuf pointers. */
                _mm_storeu_si128((__m128i *)&pkts[pos], mbp1);
                _mm_storeu_si128((__m128i *)&pkts[pos + 2], mbp2);
-               rte_cio_rmb();
+               rte_io_rmb();
                /* C.1 load remained CQE data and extract necessary fields. */
                cqe_tmp2 = _mm_load_si128((__m128i *)&cq[pos + p3]);
                cqe_tmp1 = _mm_load_si128((__m128i *)&cq[pos + p2]);
index 450d9641defbf1a5fc6c287e6ddcb928dc0b67d4..1bb667d469a194a468fcd3196ade4f4deb49e18f 100644 (file)
@@ -155,9 +155,9 @@ txq_sync_cq(struct mlx5_txq_data *txq)
                cqe->op_own = MLX5_CQE_INVALIDATE;
        }
        /* Resync CQE and WQE (WQ in reset state). */
-       rte_cio_wmb();
+       rte_io_wmb();
        *txq->cq_db = rte_cpu_to_be_32(txq->cq_ci);
-       rte_cio_wmb();
+       rte_io_wmb();
 }
 
 /**
index 8b46105b6353f8906c541f8460777cae5f92f11c..af596cd2dd5fb345ccb3658440c58afd2618b6a8 100644 (file)
@@ -418,7 +418,7 @@ __octeontx_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
        struct octeontx_txq *txq = tx_queue;
        octeontx_dq_t *dq = &txq->dq;
        uint16_t count = 0, nb_desc;
-       rte_cio_wmb();
+       rte_io_wmb();
 
        while (count < nb_pkts) {
                if (unlikely(*((volatile int64_t *)dq->fc_status_va) < 0))
index a155594e25d3be44fbd256240c4d8c98d0ea29f9..0cbeed012383d5198113256699be9803fd1fb78c 100644 (file)
@@ -312,7 +312,7 @@ hmac_init(struct otx2_ipsec_fp_sa_ctl *ctl, struct otx2_cpt_qp *qp,
 
        timeout = rte_get_timer_cycles() + 5 * rte_get_timer_hz();
 
-       rte_cio_wmb();
+       rte_io_wmb();
 
        do {
                otx2_lmt_mov(qp->lmtline, &inst, 2);
index 15122b41545b2765b6bab5fa3afc61082877e978..5bf8c199950117c5c4a699f9e7fb0b12a14956b5 100644 (file)
@@ -160,7 +160,7 @@ otx2_sec_event_tx(struct otx2_ssogws *ws, struct rte_event *ev,
        sess->ip_id++;
        sess->esn++;
 
-       rte_cio_wmb();
+       rte_io_wmb();
 
        do {
                otx2_lmt_mov(sess->cpt_lmtline, &inst, 2);
index ac40704b6e6eb6b433ea708578566a7b6e96b5f8..2da8efe77cf55e67c94635639f12e8c93610b2a2 100644 (file)
@@ -303,7 +303,7 @@ nix_recv_pkts_vector(void *rx_queue, struct rte_mbuf **rx_pkts,
        rxq->head = head;
        rxq->available -= packets;
 
-       rte_cio_wmb();
+       rte_io_wmb();
        /* Free all the CQs that we've processed */
        otx2_write64((rxq->wdata | packets), rxq->cq_door);
 
index 1af6fa649af1050b1f7944a851524f3711512430..1b75cd559be2cf4b25df52911b5e978af12c09dd 100644 (file)
@@ -39,7 +39,7 @@ nix_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
        }
 
        /* Lets commit any changes in the packet */
-       rte_cio_wmb();
+       rte_io_wmb();
 
        for (i = 0; i < pkts; i++) {
                otx2_nix_xmit_prepare(tx_pkts[i], cmd, flags);
@@ -75,7 +75,7 @@ nix_xmit_pkts_mseg(void *tx_queue, struct rte_mbuf **tx_pkts,
        }
 
        /* Lets commit any changes in the packet */
-       rte_cio_wmb();
+       rte_io_wmb();
 
        for (i = 0; i < pkts; i++) {
                otx2_nix_xmit_prepare(tx_pkts[i], cmd, flags);
@@ -128,7 +128,7 @@ nix_xmit_pkts_vector(void *tx_queue, struct rte_mbuf **tx_pkts,
        txq->fc_cache_pkts -= pkts;
 
        /* Lets commit any changes in the packet */
-       rte_cio_wmb();
+       rte_io_wmb();
 
        senddesc01_w0 = vld1q_dup_u64(&txq->cmd[0]);
        senddesc23_w0 = senddesc01_w0;
index f915b8a2c993a4131b2dfa696cbe01950c1c3b46..0ade3521515b5634f219fe3161e6c9bda2e00e29 100644 (file)
@@ -147,7 +147,7 @@ virtqueue_dequeue_burst_rx_packed(struct virtqueue *vq,
 
        for (i = 0; i < num; i++) {
                used_idx = vq->vq_used_cons_idx;
-               /* desc_is_used has a load-acquire or rte_cio_rmb inside
+               /* desc_is_used has a load-acquire or rte_io_rmb inside
                 * and wait for used desc in virtqueue.
                 */
                if (!desc_is_used(&desc[used_idx], vq))
index 02520fda83a2c8ec09a61e1e5f7e50a6ed151a14..12e034dc0a2ed4f1cc4fdeb7eabbd2419b00861e 100644 (file)
@@ -84,7 +84,7 @@ virtio_recv_pkts_vec(void *rx_queue,
        if (unlikely(nb_pkts < RTE_VIRTIO_DESC_PER_LOOP))
                return 0;
 
-       /* virtqueue_nused has a load-acquire or rte_cio_rmb inside */
+       /* virtqueue_nused has a load-acquire or rte_io_rmb inside */
        nb_used = virtqueue_nused(vq);
 
        if (unlikely(nb_used == 0))
index 6ed50648c4974a5703d5574a73c4672e4d0f8efe..738b1a519c4349e6daf8c1b4677c88ec4489c5d5 100644 (file)
@@ -47,7 +47,7 @@ virtio_rmb(uint8_t weak_barriers)
        if (weak_barriers)
                rte_smp_rmb();
        else
-               rte_cio_rmb();
+               rte_io_rmb();
 }
 
 static inline void
@@ -56,7 +56,7 @@ virtio_wmb(uint8_t weak_barriers)
        if (weak_barriers)
                rte_smp_wmb();
        else
-               rte_cio_wmb();
+               rte_io_wmb();
 }
 
 static inline uint16_t
@@ -68,7 +68,7 @@ virtqueue_fetch_flags_packed(struct vring_packed_desc *dp,
        if (weak_barriers) {
 /* x86 prefers to using rte_smp_rmb over __atomic_load_n as it reports
  * a better perf(~1.5%), which comes from the saved branch by the compiler.
- * The if and else branch are identical with the smp and cio barriers both
+ * The if and else branch are identical with the smp and io barriers both
  * defined as compiler barriers on x86.
  */
 #ifdef RTE_ARCH_X86_64
@@ -79,7 +79,7 @@ virtqueue_fetch_flags_packed(struct vring_packed_desc *dp,
 #endif
        } else {
                flags = dp->flags;
-               rte_cio_rmb();
+               rte_io_rmb();
        }
 
        return flags;
@@ -92,7 +92,7 @@ virtqueue_store_flags_packed(struct vring_packed_desc *dp,
        if (weak_barriers) {
 /* x86 prefers to using rte_smp_wmb over __atomic_store_n as it reports
  * a better perf(~1.5%), which comes from the saved branch by the compiler.
- * The if and else branch are identical with the smp and cio barriers both
+ * The if and else branch are identical with the smp and io barriers both
  * defined as compiler barriers on x86.
  */
 #ifdef RTE_ARCH_X86_64
@@ -102,7 +102,7 @@ virtqueue_store_flags_packed(struct vring_packed_desc *dp,
                __atomic_store_n(&dp->flags, flags, __ATOMIC_RELEASE);
 #endif
        } else {
-               rte_cio_wmb();
+               rte_io_wmb();
                dp->flags = flags;
        }
 }
@@ -469,7 +469,7 @@ virtio_get_queue_type(struct virtio_hw *hw, uint16_t vtpci_queue_idx)
                return VTNET_TQ;
 }
 
-/* virtqueue_nused has load-acquire or rte_cio_rmb insed */
+/* virtqueue_nused has load-acquire or rte_io_rmb insed */
 static inline uint16_t
 virtqueue_nused(const struct virtqueue *vq)
 {
@@ -480,7 +480,7 @@ virtqueue_nused(const struct virtqueue *vq)
         * x86 prefers to using rte_smp_rmb over __atomic_load_n as it
         * reports a slightly better perf, which comes from the saved
         * branch by the compiler.
-        * The if and else branches are identical with the smp and cio
+        * The if and else branches are identical with the smp and io
         * barriers both defined as compiler barriers on x86.
         */
 #ifdef RTE_ARCH_X86_64
@@ -492,7 +492,7 @@ virtqueue_nused(const struct virtqueue *vq)
 #endif
        } else {
                idx = vq->vq_split.ring.used->idx;
-               rte_cio_rmb();
+               rte_io_rmb();
        }
        return idx - vq->vq_used_cons_idx;
 }
@@ -510,7 +510,7 @@ vq_update_avail_idx(struct virtqueue *vq)
         * it reports a slightly better perf, which comes from the
         * saved branch by the compiler.
         * The if and else branches are identical with the smp and
-        * cio barriers both defined as compiler barriers on x86.
+        * io barriers both defined as compiler barriers on x86.
         */
 #ifdef RTE_ARCH_X86_64
                rte_smp_wmb();
@@ -520,7 +520,7 @@ vq_update_avail_idx(struct virtqueue *vq)
                                 vq->vq_avail_idx, __ATOMIC_RELEASE);
 #endif
        } else {
-               rte_cio_wmb();
+               rte_io_wmb();
                vq->vq_split.ring.avail->idx = vq->vq_avail_idx;
        }
 }
@@ -793,7 +793,7 @@ virtio_xmit_cleanup_inorder_packed(struct virtqueue *vq, int num)
        struct vq_desc_extra *dxp;
 
        used_idx = vq->vq_used_cons_idx;
-       /* desc_is_used has a load-acquire or rte_cio_rmb inside
+       /* desc_is_used has a load-acquire or rte_io_rmb inside
         * and wait for used desc in virtqueue.
         */
        while (num > 0 && desc_is_used(&desc[used_idx], vq)) {
@@ -827,7 +827,7 @@ virtio_xmit_cleanup_normal_packed(struct virtqueue *vq, int num)
        struct vq_desc_extra *dxp;
 
        used_idx = vq->vq_used_cons_idx;
-       /* desc_is_used has a load-acquire or rte_cio_rmb inside
+       /* desc_is_used has a load-acquire or rte_io_rmb inside
         * and wait for used desc in virtqueue.
         */
        while (num-- && desc_is_used(&desc[used_idx], vq)) {
index 9f1e5eda694ca13252caff4a8ca87dcd4b818729..d04e957d82d010c8bbf93547db57954e1d337ce6 100644 (file)
@@ -475,7 +475,7 @@ sdp_ring_doorbell(struct sdp_device *sdpvf __rte_unused,
        otx2_write64(iq->fill_cnt, iq->doorbell_reg);
 
        /* Make sure doorbell writes observed by HW */
-       rte_cio_wmb();
+       rte_io_wmb();
        iq->fill_cnt = 0;
 
 }
@@ -812,7 +812,7 @@ sdp_rawdev_dequeue(struct rte_rawdev *rawdev,
 
        /* Ack the h/w with no# of pkts read by Host */
        rte_write32(pkts, droq->pkts_sent_reg);
-       rte_cio_wmb();
+       rte_io_wmb();
 
        droq->last_pkt_count -= pkts;
 
index 6fafcff36a09f020d3f9eb24339e398083d714ab..d9b2a1ad3ac683b9880782e52b820ce3a3e7c141 100644 (file)
@@ -135,7 +135,7 @@ send_doorbell(struct mlx5dv_devx_uar *uar, struct mlx5_regex_sq *sq)
        ((struct mlx5_wqe_ctrl_seg *)wqe)->fm_ce_se = MLX5_WQE_CTRL_CQ_UPDATE;
        uint64_t *doorbell_addr =
                (uint64_t *)((uint8_t *)uar->base_addr + 0x800);
-       rte_cio_wmb();
+       rte_io_wmb();
        sq->dbr[MLX5_SND_DBR] = rte_cpu_to_be_32((sq->db_pi + 1) &
                                                 MLX5_REGEX_MAX_WQE_INDEX);
        rte_wmb();
@@ -219,7 +219,7 @@ poll_one(struct mlx5_regex_cq *cq)
 
        next_cqe_offset =  (cq->ci & (cq_size_get(cq) - 1));
        cqe = (volatile struct mlx5_cqe *)(cq->cqe + next_cqe_offset);
-       rte_cio_wmb();
+       rte_io_wmb();
 
        int ret = check_cqe(cqe, cq_size_get(cq), cq->ci);
 
index 368f10ce4dd31d54e8fd3bfa7f0507b3744e608d..9d0568d497858af605a6948191344e8e8d7f59c4 100644 (file)
@@ -33,10 +33,6 @@ extern "C" {
 
 #define rte_io_rmb() rte_rmb()
 
-#define rte_cio_wmb() rte_wmb()
-
-#define rte_cio_rmb() rte_rmb()
-
 static __rte_always_inline void
 rte_atomic_thread_fence(int memory_order)
 {
index 5cae52dcfda638fb5b74a149c3bb86ef00bdc324..c518559bc96da36a1964b2bed35837d4328af047 100644 (file)
@@ -37,10 +37,6 @@ extern "C" {
 
 #define rte_io_rmb() rte_rmb()
 
-#define rte_cio_wmb() rte_wmb()
-
-#define rte_cio_rmb() rte_rmb()
-
 static __rte_always_inline void
 rte_atomic_thread_fence(int memory_order)
 {
index 95270f15b94a1012ef6341b3163cbdf9e58e55e6..d1255b2d8c64cfa20d0785641515db2a15f82ed3 100644 (file)
@@ -107,45 +107,6 @@ static inline void rte_io_wmb(void);
 static inline void rte_io_rmb(void);
 ///@}
 
-/** @name Coherent I/O Memory Barrier
- *
- * Coherent I/O memory barrier is a lightweight version of I/O memory
- * barriers which are system-wide data synchronization barriers. This
- * is for only coherent memory domain between lcore and I/O device but
- * it is same as the I/O memory barriers in most of architectures.
- * However, some architecture provides even lighter barriers which are
- * somewhere in between I/O memory barriers and SMP memory barriers.
- * For example, in case of ARMv8, DMB(data memory barrier) instruction
- * can have different shareability domains - inner-shareable and
- * outer-shareable. And inner-shareable DMB fits for SMP memory
- * barriers and outer-shareable DMB for coherent I/O memory barriers,
- * which acts on coherent memory.
- *
- * In most cases, I/O memory barriers are safer but if operations are
- * on coherent memory instead of incoherent MMIO region of a device,
- * then coherent I/O memory barriers can be used and this could bring
- * performance gain depending on architectures.
- */
-///@{
-/**
- * Write memory barrier for coherent memory between lcore and I/O device
- *
- * Guarantees that the STORE operations on coherent memory that
- * precede the rte_cio_wmb() call are visible to I/O device before the
- * STORE operations that follow it.
- */
-static inline void rte_cio_wmb(void);
-
-/**
- * Read memory barrier for coherent memory between lcore and I/O device
- *
- * Guarantees that the LOAD operations on coherent memory updated by
- * I/O device that precede the rte_cio_rmb() call are visible to CPU
- * before the LOAD operations that follow it.
- */
-static inline void rte_cio_rmb(void);
-///@}
-
 #endif /* __DOXYGEN__ */
 
 /**
index 527fcaf80d41f4142937740baa51818aeb536163..a91989930b3cfdafd6401e980e7b9a3bb647b499 100644 (file)
@@ -36,10 +36,6 @@ extern "C" {
 
 #define rte_io_rmb() rte_rmb()
 
-#define rte_cio_wmb() rte_wmb()
-
-#define rte_cio_rmb() rte_rmb()
-
 static __rte_always_inline void
 rte_atomic_thread_fence(int memory_order)
 {
index 62ea39318794d49fc29343a241cb1101b405f80c..b7d6b06ddf4628c6ce1d416d9be4ec899dbca505 100644 (file)
@@ -79,10 +79,6 @@ rte_smp_mb(void)
 
 #define rte_io_rmb() rte_compiler_barrier()
 
-#define rte_cio_wmb() rte_compiler_barrier()
-
-#define rte_cio_rmb() rte_compiler_barrier()
-
 /**
  * Synchronization fence between threads based on the specified memory order.
  *