Due to external Tx queue will be supported, in order to reuse
the external queue struct, rename the current external Rx
queue to external queue.

Signed-off-by: Suanming Mou <suanmi...@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_os.c |  2 +-
 drivers/net/mlx5/mlx5.h          |  2 +-
 drivers/net/mlx5/mlx5_devx.c     |  2 +-
 drivers/net/mlx5/mlx5_rx.h       |  8 ++++----
 drivers/net/mlx5/mlx5_rxq.c      | 16 ++++++++--------
 5 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 6dd12f0f68..8cfbc25430 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -1216,7 +1216,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
         */
        if (mlx5_imported_pd_and_ctx(sh->cdev) && mlx5_devx_obj_ops_en(sh)) {
                priv->ext_rxqs = mlx5_malloc(MLX5_MEM_ZERO | MLX5_MEM_RTE,
-                                            sizeof(struct mlx5_external_rxq) *
+                                            sizeof(struct mlx5_external_q) *
                                             MLX5_MAX_EXT_RX_QUEUES, 0,
                                             SOCKET_ID_ANY);
                if (priv->ext_rxqs == NULL) {
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 9e4a5feb49..07d050b225 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -1882,7 +1882,7 @@ struct mlx5_priv {
        /* RX/TX queues. */
        unsigned int rxqs_n; /* RX queues array size. */
        unsigned int txqs_n; /* TX queues array size. */
-       struct mlx5_external_rxq *ext_rxqs; /* External RX queues array. */
+       struct mlx5_external_q *ext_rxqs; /* External RX queues array. */
        struct mlx5_rxq_priv *(*rxq_privs)[]; /* RX queue non-shared data. */
        struct mlx5_txq_data *(*txqs)[]; /* TX queues. */
        struct rte_mempool *mprq_mp; /* Mempool for Multi-Packet RQ. */
diff --git a/drivers/net/mlx5/mlx5_devx.c b/drivers/net/mlx5/mlx5_devx.c
index 9fa400fc48..cae9d578ab 100644
--- a/drivers/net/mlx5/mlx5_devx.c
+++ b/drivers/net/mlx5/mlx5_devx.c
@@ -673,7 +673,7 @@ mlx5_devx_ind_table_create_rqt_attr(struct rte_eth_dev *dev,
        }
        for (i = 0; i != queues_n; ++i) {
                if (mlx5_is_external_rxq(dev, queues[i])) {
-                       struct mlx5_external_rxq *ext_rxq =
+                       struct mlx5_external_q *ext_rxq =
                                        mlx5_ext_rxq_get(dev, queues[i]);
 
                        rqt_attr->rq_list[i] = ext_rxq->hw_id;
diff --git a/drivers/net/mlx5/mlx5_rx.h b/drivers/net/mlx5/mlx5_rx.h
index d008e4dd3a..decb14e708 100644
--- a/drivers/net/mlx5/mlx5_rx.h
+++ b/drivers/net/mlx5/mlx5_rx.h
@@ -186,7 +186,7 @@ struct mlx5_rxq_priv {
 };
 
 /* External RX queue descriptor. */
-struct mlx5_external_rxq {
+struct mlx5_external_q {
        uint32_t hw_id; /* Queue index in the Hardware. */
        RTE_ATOMIC(uint32_t) refcnt; /* Reference counter. */
 };
@@ -227,10 +227,10 @@ uint32_t mlx5_rxq_deref(struct rte_eth_dev *dev, uint16_t 
idx);
 struct mlx5_rxq_priv *mlx5_rxq_get(struct rte_eth_dev *dev, uint16_t idx);
 struct mlx5_rxq_ctrl *mlx5_rxq_ctrl_get(struct rte_eth_dev *dev, uint16_t idx);
 struct mlx5_rxq_data *mlx5_rxq_data_get(struct rte_eth_dev *dev, uint16_t idx);
-struct mlx5_external_rxq *mlx5_ext_rxq_ref(struct rte_eth_dev *dev,
+struct mlx5_external_q *mlx5_ext_rxq_ref(struct rte_eth_dev *dev,
                                           uint16_t idx);
 uint32_t mlx5_ext_rxq_deref(struct rte_eth_dev *dev, uint16_t idx);
-struct mlx5_external_rxq *mlx5_ext_rxq_get(struct rte_eth_dev *dev,
+struct mlx5_external_q *mlx5_ext_rxq_get(struct rte_eth_dev *dev,
                                           uint16_t idx);
 int mlx5_rxq_release(struct rte_eth_dev *dev, uint16_t idx);
 int mlx5_rxq_verify(struct rte_eth_dev *dev);
@@ -661,7 +661,7 @@ static __rte_always_inline bool
 mlx5_is_external_rxq(struct rte_eth_dev *dev, uint16_t queue_idx)
 {
        struct mlx5_priv *priv = dev->data->dev_private;
-       struct mlx5_external_rxq *rxq;
+       struct mlx5_external_q *rxq;
 
        if (!priv->ext_rxqs || queue_idx < 
RTE_PMD_MLX5_EXTERNAL_RX_QUEUE_ID_MIN)
                return false;
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index f67aaa6178..d6c84b84e4 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -2133,10 +2133,10 @@ mlx5_rxq_data_get(struct rte_eth_dev *dev, uint16_t idx)
  * @return
  *   A pointer to the queue if it exists, NULL otherwise.
  */
-struct mlx5_external_rxq *
+struct mlx5_external_q *
 mlx5_ext_rxq_ref(struct rte_eth_dev *dev, uint16_t idx)
 {
-       struct mlx5_external_rxq *rxq = mlx5_ext_rxq_get(dev, idx);
+       struct mlx5_external_q *rxq = mlx5_ext_rxq_get(dev, idx);
 
        rte_atomic_fetch_add_explicit(&rxq->refcnt, 1, 
rte_memory_order_relaxed);
        return rxq;
@@ -2156,7 +2156,7 @@ mlx5_ext_rxq_ref(struct rte_eth_dev *dev, uint16_t idx)
 uint32_t
 mlx5_ext_rxq_deref(struct rte_eth_dev *dev, uint16_t idx)
 {
-       struct mlx5_external_rxq *rxq = mlx5_ext_rxq_get(dev, idx);
+       struct mlx5_external_q *rxq = mlx5_ext_rxq_get(dev, idx);
 
        return rte_atomic_fetch_sub_explicit(&rxq->refcnt, 1, 
rte_memory_order_relaxed) - 1;
 }
@@ -2172,7 +2172,7 @@ mlx5_ext_rxq_deref(struct rte_eth_dev *dev, uint16_t idx)
  * @return
  *   A pointer to the queue if it exists, NULL otherwise.
  */
-struct mlx5_external_rxq *
+struct mlx5_external_q *
 mlx5_ext_rxq_get(struct rte_eth_dev *dev, uint16_t idx)
 {
        struct mlx5_priv *priv = dev->data->dev_private;
@@ -2336,7 +2336,7 @@ int
 mlx5_ext_rxq_verify(struct rte_eth_dev *dev)
 {
        struct mlx5_priv *priv = dev->data->dev_private;
-       struct mlx5_external_rxq *rxq;
+       struct mlx5_external_q *rxq;
        uint32_t i;
        int ret = 0;
 
@@ -3206,7 +3206,7 @@ mlx5_rxq_timestamp_set(struct rte_eth_dev *dev)
  *   Pointer to concurrent external RxQ on success,
  *   NULL otherwise and rte_errno is set.
  */
-static struct mlx5_external_rxq *
+static struct mlx5_external_q *
 mlx5_external_rx_queue_get_validate(uint16_t port_id, uint16_t dpdk_idx)
 {
        struct rte_eth_dev *dev;
@@ -3252,7 +3252,7 @@ int
 rte_pmd_mlx5_external_rx_queue_id_map(uint16_t port_id, uint16_t dpdk_idx,
                                      uint32_t hw_idx)
 {
-       struct mlx5_external_rxq *ext_rxq;
+       struct mlx5_external_q *ext_rxq;
        uint32_t unmapped = 0;
 
        ext_rxq = mlx5_external_rx_queue_get_validate(port_id, dpdk_idx);
@@ -3284,7 +3284,7 @@ rte_pmd_mlx5_external_rx_queue_id_map(uint16_t port_id, 
uint16_t dpdk_idx,
 int
 rte_pmd_mlx5_external_rx_queue_id_unmap(uint16_t port_id, uint16_t dpdk_idx)
 {
-       struct mlx5_external_rxq *ext_rxq;
+       struct mlx5_external_q *ext_rxq;
        uint32_t mapped = 1;
 
        ext_rxq = mlx5_external_rx_queue_get_validate(port_id, dpdk_idx);
-- 
2.34.1

Reply via email to