]> git.droids-corp.org - dpdk.git/commitdiff
net/mlx5: remove unused function
authorSuanming Mou <suanmingm@nvidia.com>
Tue, 15 Feb 2022 09:46:23 +0000 (11:46 +0200)
committerRaslan Darawsheh <rasland@nvidia.com>
Wed, 23 Feb 2022 14:57:33 +0000 (15:57 +0100)
The mlx5_l3t_prepare_entry() function is not used anymore.
This commit removes the unused mlx5_l3t_prepare_entry() function.

Fixes: 92ef4b8f1688 ("ethdev: remove deprecated shared counter attribute")
Cc: stable@dpdk.org
Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx5/mlx5_utils.c
drivers/net/mlx5/mlx5_utils.h

index e4e66ae4c55e95cdc35243fd0c3eb6327207251e..be33af96fe42979e2bc8e69d317109d392e13245 100644 (file)
@@ -1184,44 +1184,3 @@ mlx5_l3t_set_entry(struct mlx5_l3t_tbl *tbl, uint32_t idx,
        rte_spinlock_unlock(&tbl->sl);
        return ret;
 }
-
-int32_t
-mlx5_l3t_prepare_entry(struct mlx5_l3t_tbl *tbl, uint32_t idx,
-                      union mlx5_l3t_data *data,
-                      mlx5_l3t_alloc_callback_fn cb, void *ctx)
-{
-       int32_t ret;
-
-       rte_spinlock_lock(&tbl->sl);
-       /* Check if entry data is ready. */
-       ret = __l3t_get_entry(tbl, idx, data);
-       if (!ret) {
-               switch (tbl->type) {
-               case MLX5_L3T_TYPE_WORD:
-                       if (data->word)
-                               goto out;
-                       break;
-               case MLX5_L3T_TYPE_DWORD:
-                       if (data->dword)
-                               goto out;
-                       break;
-               case MLX5_L3T_TYPE_QWORD:
-                       if (data->qword)
-                               goto out;
-                       break;
-               default:
-                       if (data->ptr)
-                               goto out;
-                       break;
-               }
-       }
-       /* Entry data is not ready, use user callback to create it. */
-       ret = cb(ctx, data);
-       if (ret)
-               goto out;
-       /* Save the new allocated data to entry. */
-       ret = __l3t_set_entry(tbl, idx, data);
-out:
-       rte_spinlock_unlock(&tbl->sl);
-       return ret;
-}
index e2dcbafc0a8bfb5379c791f85f765ca77419fb4c..254c879d1a0e99cd1c7ccc35abfcda91e6381523 100644 (file)
@@ -459,34 +459,6 @@ void mlx5_l3t_destroy(struct mlx5_l3t_tbl *tbl);
 int32_t mlx5_l3t_get_entry(struct mlx5_l3t_tbl *tbl, uint32_t idx,
                            union mlx5_l3t_data *data);
 
-/**
- * This function gets the index entry from Three-level table.
- *
- * If the index entry is not available, allocate new one by callback
- * function and fill in the entry.
- *
- * @param tbl
- *   Pointer to the l3t.
- * @param idx
- *   Index to the entry.
- * @param data
- *   Pointer to the memory which saves the entry data.
- *   When function call returns 0, data contains the entry data get from
- *   l3t.
- *   When function call returns -1, data is not modified.
- * @param cb
- *   Callback function to allocate new data.
- * @param ctx
- *   Context for callback function.
- *
- * @return
- *   0 if success, -1 on error.
- */
-
-int32_t mlx5_l3t_prepare_entry(struct mlx5_l3t_tbl *tbl, uint32_t idx,
-                              union mlx5_l3t_data *data,
-                              mlx5_l3t_alloc_callback_fn cb, void *ctx);
-
 /**
  * This function decreases and clear index entry if reference
  * counter is 0 from Three-level table.