net/mlx5: Remove unused mlx5dr_domain_sync
Subsystems (4)
PATCH 1/1 net/mlx5: Remove unused mlx5dr_domain_sync
From: "Dr. David Alan Gilbert" <[email protected]>
mlx5dr_domain_sync() was added in 2019 by
commit 70605ea545e8 ("net/mlx5: DR, Expose APIs for direct rule managing") but hasn't been used.
Remove it.
mlx5dr_domain_sync() was the only user ofmlx5dr_send_ring_force_drain().
Remove it.
--- .../mlx5/core/steering/sws/dr_domain.c | 24 -------------- .../mellanox/mlx5/core/steering/sws/dr_send.c | 33 ------------------- .../mlx5/core/steering/sws/dr_types.h | 1 - .../mellanox/mlx5/core/steering/sws/mlx5dr.h | 2 -- 4 files changed, 60 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/steering/sws/dr_domain.c +0 -24
@@ -516,30 +516,6 @@ mlx5dr_domain_create(struct mlx5_core_dev *mdev, enum mlx5dr_domain_type type)return NULL ; } -/* Assure synchronization of the device steering tables with updates made by SW -* insertion. -*/ -int mlx5dr_domain_sync (struct mlx5dr_domain *dmn,u32 flags) -{ -int ret =0 ; - -if (flags &MLX5DR_DOMAIN_SYNC_FLAGS_SW ) { -mlx5dr_domain_lock (dmn); - ret =mlx5dr_send_ring_force_drain (dmn); -mlx5dr_domain_unlock (dmn); -if (ret) { -mlx5dr_err (dmn,"Force drain failed flags: %d, ret: %d\n" , - flags, ret); -return ret; - } - } - -if (flags &MLX5DR_DOMAIN_SYNC_FLAGS_HW ) - ret =mlx5dr_cmd_sync_steering (dmn->mdev); - -return ret; -} -int mlx5dr_domain_destroy (struct mlx5dr_domain *dmn) {if (WARN_ON_ONCE (refcount_read (&dmn->refcount) >1 ))
drivers/net/ethernet/mellanox/mlx5/core/steering/sws/dr_send.c +0 -33
@@ -1331,36 +1331,3 @@ void mlx5dr_send_ring_free(struct mlx5dr_domain *dmn,kfree (send_ring->sync_buff);kfree (send_ring); } - -int mlx5dr_send_ring_force_drain (struct mlx5dr_domain *dmn) -{ -struct mlx5dr_send_ring *send_ring = dmn->send_ring; -struct postsend_info send_info = {}; -u8 data[DR_STE_SIZE ]; -int num_of_sends_req; -int ret; -int i; - -/* Sending this amount of requests makes sure we will get drain */ - num_of_sends_req = send_ring->signal_th *TH_NUMS_TO_DRAIN /2 ; - -/* Send fake requests forcing the last to be signaled */ - send_info.write.addr = (uintptr_t )data; - send_info.write.length =DR_STE_SIZE ; - send_info.write.lkey =0 ; -/* Using the sync_mr in order to write/read */ - send_info.remote_addr = (uintptr_t )send_ring->sync_mr->addr; - send_info.rkey = send_ring->sync_mr->mkey; - -for (i =0 ; i < num_of_sends_req; i++) { - ret =dr_postsend_icm_data (dmn, &send_info); -if (ret) -return ret; - } - -spin_lock (&send_ring->lock); - ret =dr_handle_pending_wc (dmn, send_ring); -spin_unlock (&send_ring->lock); - -return ret; -}
drivers/net/ethernet/mellanox/mlx5/core/steering/sws/dr_types.h +0 -1
@@ -1473,7 +1473,6 @@ struct mlx5dr_send_ring {int mlx5dr_send_ring_alloc (struct mlx5dr_domain *dmn);void mlx5dr_send_ring_free (struct mlx5dr_domain *dmn,struct mlx5dr_send_ring *send_ring); -int mlx5dr_send_ring_force_drain (struct mlx5dr_domain *dmn); int mlx5dr_send_postsend_ste(struct mlx5dr_domain *dmn, struct mlx5dr_ste *ste, u8 *data,
drivers/net/ethernet/mellanox/mlx5/core/steering/sws/mlx5dr.h +0 -2
@@ -45,8 +45,6 @@ mlx5dr_domain_create(struct mlx5_core_dev *mdev, enum mlx5dr_domain_type type);int mlx5dr_domain_destroy (struct mlx5dr_domain *domain); -int mlx5dr_domain_sync (struct mlx5dr_domain *domain,u32 flags); -void mlx5dr_domain_set_peer (struct mlx5dr_domain *dmn,struct mlx5dr_domain *peer_dmn,u16 peer_vhca_id);
Signature · 1 line
2.48.1
Quoted 12 lines · On 03/02/2025 20:59, [email protected] wrote:
From: "Dr. David Alan Gilbert" <[email protected]>
mlx5dr_domain_sync()was added in 2019 by
commit70605ea545e8("net/mlx5: DR, Expose APIs for direct rule managing") but hasn't been used.Remove it.
mlx5dr_domain_sync()was the only user ofmlx5dr_send_ring_force_drain().
Remove it.
Quoted 8 lines
Signed-off-by Dr. David Alan Gilbert <[email protected]>--- .../mlx5/core/steering/sws/dr_domain.c | 24 -------------- .../mellanox/mlx5/core/steering/sws/dr_send.c | 33 ------------------- .../mlx5/core/steering/sws/dr_types.h | 1 - .../mellanox/mlx5/core/steering/sws/mlx5dr.h | 2 -- 4 files changed, 60 deletions(-)
Thanks for your patch.
Tariq.
Quoted 7 lines · On Tue, Feb 4, 2025 at 12:30 AM <[email protected]> wrote:
From: "Dr. David Alan Gilbert" <[email protected]>
mlx5dr_domain_sync()was added in 2019 by
commit70605ea545e8("net/mlx5: DR, Expose APIs for direct rule managing") but hasn't been used.
Quoted 7 lines
Remove it.
mlx5dr_domain_sync()was the only user ofmlx5dr_send_ring_force_drain().
Remove it.Signed-off-by Dr. David Alan Gilbert <[email protected]>
LGTM,
Signature · 2 lines
Regards, Kalesh AP
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Mon, 3 Feb 2025 18:59:58 +0000 you wrote:
From: "Dr. David Alan Gilbert" <[email protected]>
mlx5dr_domain_sync()was added in 2019 by
commit70605ea545e8("net/mlx5: DR, Expose APIs for direct rule managing") but hasn't been used.Remove it.
[...]
Here is the summary with links:
- [net-next] net/mlx5: Remove unused mlx5dr_domain_sync
https://git.kernel.org/netdev/net-next/c/15c51f17bdc4
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html