Skip to content

Commit 3652315

Browse files
Dasaratharaman Chandramoulidledford
authored andcommitted
IB/core: Rename ib_destroy_ah to rdma_destroy_ah
Rename ib_destroy_ah to rdma_destroy_ah so its in sync with the rename of the ib address handle attribute Reviewed-by: Ira Weiny <[email protected]> Reviewed-by: Don Hiatt <[email protected]> Reviewed-by: Sean Hefty <[email protected]> Reviewed-by: Niranjana Vishwanathapura <[email protected]> Signed-off-by: Dasaratharaman Chandramouli <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
1 parent bfbfd66 commit 3652315

File tree

16 files changed

+41
-41
lines changed

16 files changed

+41
-41
lines changed

drivers/infiniband/core/agent.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,13 @@ void agent_send_response(const struct ib_mad_hdr *mad_hdr, const struct ib_grh *
137137
err2:
138138
ib_free_send_mad(send_buf);
139139
err1:
140-
ib_destroy_ah(ah);
140+
rdma_destroy_ah(ah);
141141
}
142142

143143
static void agent_send_handler(struct ib_mad_agent *mad_agent,
144144
struct ib_mad_send_wc *mad_send_wc)
145145
{
146-
ib_destroy_ah(mad_send_wc->send_buf->ah);
146+
rdma_destroy_ah(mad_send_wc->send_buf->ah);
147147
ib_free_send_mad(mad_send_wc->send_buf);
148148
}
149149

drivers/infiniband/core/cm.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ static int cm_alloc_msg(struct cm_id_private *cm_id_priv,
355355
GFP_ATOMIC,
356356
IB_MGMT_BASE_VERSION);
357357
if (IS_ERR(m)) {
358-
ib_destroy_ah(ah);
358+
rdma_destroy_ah(ah);
359359
ret = PTR_ERR(m);
360360
goto out;
361361
}
@@ -390,7 +390,7 @@ static int cm_alloc_response_msg(struct cm_port *port,
390390
GFP_ATOMIC,
391391
IB_MGMT_BASE_VERSION);
392392
if (IS_ERR(m)) {
393-
ib_destroy_ah(ah);
393+
rdma_destroy_ah(ah);
394394
return PTR_ERR(m);
395395
}
396396
m->ah = ah;
@@ -400,7 +400,7 @@ static int cm_alloc_response_msg(struct cm_port *port,
400400

401401
static void cm_free_msg(struct ib_mad_send_buf *msg)
402402
{
403-
ib_destroy_ah(msg->ah);
403+
rdma_destroy_ah(msg->ah);
404404
if (msg->context[0])
405405
cm_deref_id(msg->context[0]);
406406
ib_free_send_mad(msg);

drivers/infiniband/core/mad_rmpp.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ static void destroy_rmpp_recv(struct mad_rmpp_recv *rmpp_recv)
8181
{
8282
deref_rmpp_recv(rmpp_recv);
8383
wait_for_completion(&rmpp_recv->comp);
84-
ib_destroy_ah(rmpp_recv->ah);
84+
rdma_destroy_ah(rmpp_recv->ah);
8585
kfree(rmpp_recv);
8686
}
8787

@@ -171,7 +171,7 @@ static struct ib_mad_send_buf *alloc_response_msg(struct ib_mad_agent *agent,
171171
hdr_len, 0, GFP_KERNEL,
172172
IB_MGMT_BASE_VERSION);
173173
if (IS_ERR(msg))
174-
ib_destroy_ah(ah);
174+
rdma_destroy_ah(ah);
175175
else {
176176
msg->ah = ah;
177177
msg->context[0] = ah;
@@ -201,15 +201,15 @@ static void ack_ds_ack(struct ib_mad_agent_private *agent,
201201

202202
ret = ib_post_send_mad(msg, NULL);
203203
if (ret) {
204-
ib_destroy_ah(msg->ah);
204+
rdma_destroy_ah(msg->ah);
205205
ib_free_send_mad(msg);
206206
}
207207
}
208208

209209
void ib_rmpp_send_handler(struct ib_mad_send_wc *mad_send_wc)
210210
{
211211
if (mad_send_wc->send_buf->context[0] == mad_send_wc->send_buf->ah)
212-
ib_destroy_ah(mad_send_wc->send_buf->ah);
212+
rdma_destroy_ah(mad_send_wc->send_buf->ah);
213213
ib_free_send_mad(mad_send_wc->send_buf);
214214
}
215215

@@ -237,7 +237,7 @@ static void nack_recv(struct ib_mad_agent_private *agent,
237237

238238
ret = ib_post_send_mad(msg, NULL);
239239
if (ret) {
240-
ib_destroy_ah(msg->ah);
240+
rdma_destroy_ah(msg->ah);
241241
ib_free_send_mad(msg);
242242
}
243243
}

drivers/infiniband/core/sa_query.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1027,7 +1027,7 @@ static void free_sm_ah(struct kref *kref)
10271027
{
10281028
struct ib_sa_sm_ah *sm_ah = container_of(kref, struct ib_sa_sm_ah, ref);
10291029

1030-
ib_destroy_ah(sm_ah->ah);
1030+
rdma_destroy_ah(sm_ah->ah);
10311031
kfree(sm_ah);
10321032
}
10331033

drivers/infiniband/core/user_mad.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ static void send_handler(struct ib_mad_agent *agent,
197197
struct ib_umad_packet *packet = send_wc->send_buf->context[0];
198198

199199
dequeue_send(file, packet);
200-
ib_destroy_ah(packet->msg->ah);
200+
rdma_destroy_ah(packet->msg->ah);
201201
ib_free_send_mad(packet->msg);
202202

203203
if (send_wc->status == IB_WC_RESP_TIMEOUT_ERR) {
@@ -596,7 +596,7 @@ static ssize_t ib_umad_write(struct file *filp, const char __user *buf,
596596
err_msg:
597597
ib_free_send_mad(packet->msg);
598598
err_ah:
599-
ib_destroy_ah(ah);
599+
rdma_destroy_ah(ah);
600600
err_up:
601601
mutex_unlock(&file->mutex);
602602
err:

drivers/infiniband/core/uverbs_cmd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2588,7 +2588,7 @@ ssize_t ib_uverbs_create_ah(struct ib_uverbs_file *file,
25882588
return in_len;
25892589

25902590
err_copy:
2591-
ib_destroy_ah(ah);
2591+
rdma_destroy_ah(ah);
25922592

25932593
err_put:
25942594
uobj_put_obj_read(pd);

drivers/infiniband/core/uverbs_std_types.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
static int uverbs_free_ah(struct ib_uobject *uobject,
4242
enum rdma_remove_reason why)
4343
{
44-
return ib_destroy_ah((struct ib_ah *)uobject->object);
44+
return rdma_destroy_ah((struct ib_ah *)uobject->object);
4545
}
4646

4747
static int uverbs_free_flow(struct ib_uobject *uobject,

drivers/infiniband/core/verbs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ int rdma_query_ah(struct ib_ah *ah, struct rdma_ah_attr *ah_attr)
587587
}
588588
EXPORT_SYMBOL(rdma_query_ah);
589589

590-
int ib_destroy_ah(struct ib_ah *ah)
590+
int rdma_destroy_ah(struct ib_ah *ah)
591591
{
592592
struct ib_pd *pd;
593593
int ret;
@@ -599,7 +599,7 @@ int ib_destroy_ah(struct ib_ah *ah)
599599

600600
return ret;
601601
}
602-
EXPORT_SYMBOL(ib_destroy_ah);
602+
EXPORT_SYMBOL(rdma_destroy_ah);
603603

604604
/* Shared receive queues */
605605

drivers/infiniband/hw/mlx4/mad.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ static void update_sm_ah(struct mlx4_ib_dev *dev, u8 port_num, u16 lid, u8 sl)
207207

208208
spin_lock_irqsave(&dev->sm_lock, flags);
209209
if (dev->sm_ah[port_num - 1])
210-
ib_destroy_ah(dev->sm_ah[port_num - 1]);
210+
rdma_destroy_ah(dev->sm_ah[port_num - 1]);
211211
dev->sm_ah[port_num - 1] = new_ah;
212212
spin_unlock_irqrestore(&dev->sm_lock, flags);
213213
}
@@ -580,7 +580,7 @@ int mlx4_ib_send_to_slave(struct mlx4_ib_dev *dev, int slave, u8 port,
580580

581581
tun_mad = (struct mlx4_rcv_tunnel_mad *) (tun_qp->tx_ring[tun_tx_ix].buf.addr);
582582
if (tun_qp->tx_ring[tun_tx_ix].ah)
583-
ib_destroy_ah(tun_qp->tx_ring[tun_tx_ix].ah);
583+
rdma_destroy_ah(tun_qp->tx_ring[tun_tx_ix].ah);
584584
tun_qp->tx_ring[tun_tx_ix].ah = ah;
585585
ib_dma_sync_single_for_cpu(&dev->ib_dev,
586586
tun_qp->tx_ring[tun_tx_ix].buf.map,
@@ -653,7 +653,7 @@ int mlx4_ib_send_to_slave(struct mlx4_ib_dev *dev, int slave, u8 port,
653653
spin_unlock(&tun_qp->tx_lock);
654654
tun_qp->tx_ring[tun_tx_ix].ah = NULL;
655655
end:
656-
ib_destroy_ah(ah);
656+
rdma_destroy_ah(ah);
657657
return ret;
658658
}
659659

@@ -1018,7 +1018,7 @@ static void send_handler(struct ib_mad_agent *agent,
10181018
struct ib_mad_send_wc *mad_send_wc)
10191019
{
10201020
if (mad_send_wc->send_buf->context[0])
1021-
ib_destroy_ah(mad_send_wc->send_buf->context[0]);
1021+
rdma_destroy_ah(mad_send_wc->send_buf->context[0]);
10221022
ib_free_send_mad(mad_send_wc->send_buf);
10231023
}
10241024

@@ -1073,7 +1073,7 @@ void mlx4_ib_mad_cleanup(struct mlx4_ib_dev *dev)
10731073
}
10741074

10751075
if (dev->sm_ah[p])
1076-
ib_destroy_ah(dev->sm_ah[p]);
1076+
rdma_destroy_ah(dev->sm_ah[p]);
10771077
}
10781078
}
10791079

@@ -1410,7 +1410,7 @@ int mlx4_ib_send_to_wire(struct mlx4_ib_dev *dev, int slave, u8 port,
14101410

14111411
sqp_mad = (struct mlx4_mad_snd_buf *) (sqp->tx_ring[wire_tx_ix].buf.addr);
14121412
if (sqp->tx_ring[wire_tx_ix].ah)
1413-
ib_destroy_ah(sqp->tx_ring[wire_tx_ix].ah);
1413+
rdma_destroy_ah(sqp->tx_ring[wire_tx_ix].ah);
14141414
sqp->tx_ring[wire_tx_ix].ah = ah;
14151415
ib_dma_sync_single_for_cpu(&dev->ib_dev,
14161416
sqp->tx_ring[wire_tx_ix].buf.map,
@@ -1455,7 +1455,7 @@ int mlx4_ib_send_to_wire(struct mlx4_ib_dev *dev, int slave, u8 port,
14551455
spin_unlock(&sqp->tx_lock);
14561456
sqp->tx_ring[wire_tx_ix].ah = NULL;
14571457
out:
1458-
ib_destroy_ah(ah);
1458+
rdma_destroy_ah(ah);
14591459
return ret;
14601460
}
14611461

@@ -1714,7 +1714,7 @@ static void mlx4_ib_free_pv_qp_bufs(struct mlx4_ib_demux_pv_ctx *ctx,
17141714
tx_buf_size, DMA_TO_DEVICE);
17151715
kfree(tun_qp->tx_ring[i].buf.addr);
17161716
if (tun_qp->tx_ring[i].ah)
1717-
ib_destroy_ah(tun_qp->tx_ring[i].ah);
1717+
rdma_destroy_ah(tun_qp->tx_ring[i].ah);
17181718
}
17191719
kfree(tun_qp->tx_ring);
17201720
kfree(tun_qp->ring);
@@ -1746,7 +1746,7 @@ static void mlx4_ib_tunnel_comp_worker(struct work_struct *work)
17461746
pr_debug("received tunnel send completion:"
17471747
"wrid=0x%llx, status=0x%x\n",
17481748
wc.wr_id, wc.status);
1749-
ib_destroy_ah(tun_qp->tx_ring[wc.wr_id &
1749+
rdma_destroy_ah(tun_qp->tx_ring[wc.wr_id &
17501750
(MLX4_NUM_TUNNEL_BUFS - 1)].ah);
17511751
tun_qp->tx_ring[wc.wr_id & (MLX4_NUM_TUNNEL_BUFS - 1)].ah
17521752
= NULL;
@@ -1763,7 +1763,7 @@ static void mlx4_ib_tunnel_comp_worker(struct work_struct *work)
17631763
" status = %d, wrid = 0x%llx\n",
17641764
ctx->slave, wc.status, wc.wr_id);
17651765
if (!MLX4_TUN_IS_RECV(wc.wr_id)) {
1766-
ib_destroy_ah(tun_qp->tx_ring[wc.wr_id &
1766+
rdma_destroy_ah(tun_qp->tx_ring[wc.wr_id &
17671767
(MLX4_NUM_TUNNEL_BUFS - 1)].ah);
17681768
tun_qp->tx_ring[wc.wr_id & (MLX4_NUM_TUNNEL_BUFS - 1)].ah
17691769
= NULL;
@@ -1900,7 +1900,7 @@ static void mlx4_ib_sqp_comp_worker(struct work_struct *work)
19001900
if (wc.status == IB_WC_SUCCESS) {
19011901
switch (wc.opcode) {
19021902
case IB_WC_SEND:
1903-
ib_destroy_ah(sqp->tx_ring[wc.wr_id &
1903+
rdma_destroy_ah(sqp->tx_ring[wc.wr_id &
19041904
(MLX4_NUM_TUNNEL_BUFS - 1)].ah);
19051905
sqp->tx_ring[wc.wr_id & (MLX4_NUM_TUNNEL_BUFS - 1)].ah
19061906
= NULL;
@@ -1930,7 +1930,7 @@ static void mlx4_ib_sqp_comp_worker(struct work_struct *work)
19301930
" status = %d, wrid = 0x%llx\n",
19311931
ctx->slave, wc.status, wc.wr_id);
19321932
if (!MLX4_TUN_IS_RECV(wc.wr_id)) {
1933-
ib_destroy_ah(sqp->tx_ring[wc.wr_id &
1933+
rdma_destroy_ah(sqp->tx_ring[wc.wr_id &
19341934
(MLX4_NUM_TUNNEL_BUFS - 1)].ah);
19351935
sqp->tx_ring[wc.wr_id & (MLX4_NUM_TUNNEL_BUFS - 1)].ah
19361936
= NULL;

drivers/infiniband/hw/mthca/mthca_mad.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ static void update_sm_ah(struct mthca_dev *dev,
9393

9494
spin_lock_irqsave(&dev->sm_lock, flags);
9595
if (dev->sm_ah[port_num - 1])
96-
ib_destroy_ah(dev->sm_ah[port_num - 1]);
96+
rdma_destroy_ah(dev->sm_ah[port_num - 1]);
9797
dev->sm_ah[port_num - 1] = new_ah;
9898
spin_unlock_irqrestore(&dev->sm_lock, flags);
9999
}
@@ -345,6 +345,6 @@ void mthca_free_agents(struct mthca_dev *dev)
345345
}
346346

347347
if (dev->sm_ah[p])
348-
ib_destroy_ah(dev->sm_ah[p]);
348+
rdma_destroy_ah(dev->sm_ah[p]);
349349
}
350350
}

drivers/infiniband/hw/qib/qib_mad.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2500,5 +2500,5 @@ void qib_notify_free_mad_agent(struct rvt_dev_info *rdi, int port_idx)
25002500
del_timer_sync(&dd->pport[port_idx].cong_stats.timer);
25012501

25022502
if (dd->pport[port_idx].ibport_data.smi_ah)
2503-
ib_destroy_ah(&dd->pport[port_idx].ibport_data.smi_ah->ibah);
2503+
rdma_destroy_ah(&dd->pport[port_idx].ibport_data.smi_ah->ibah);
25042504
}

drivers/infiniband/sw/rdmavt/mad.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ void rvt_free_mad_agents(struct rvt_dev_info *rdi)
160160
ib_unregister_mad_agent(agent);
161161
}
162162
if (rvp->sm_ah) {
163-
ib_destroy_ah(&rvp->sm_ah->ibah);
163+
rdma_destroy_ah(&rvp->sm_ah->ibah);
164164
rvp->sm_ah = NULL;
165165
}
166166

drivers/infiniband/ulp/ipoib/ipoib_ib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ static void __ipoib_reap_ah(struct net_device *dev)
658658
list_for_each_entry_safe(ah, tah, &priv->dead_ahs, list)
659659
if ((int) priv->tx_tail - (int) ah->last_send >= 0) {
660660
list_del(&ah->list);
661-
ib_destroy_ah(ah->ah);
661+
rdma_destroy_ah(ah->ah);
662662
kfree(ah);
663663
}
664664

drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ static void vema_set(struct opa_vnic_vema_port *port,
603603
static void vema_send(struct ib_mad_agent *mad_agent,
604604
struct ib_mad_send_wc *mad_wc)
605605
{
606-
ib_destroy_ah(mad_wc->send_buf->ah);
606+
rdma_destroy_ah(mad_wc->send_buf->ah);
607607
ib_free_send_mad(mad_wc->send_buf);
608608
}
609609

@@ -677,7 +677,7 @@ static void vema_recv(struct ib_mad_agent *mad_agent,
677677
ib_free_send_mad(rsp);
678678

679679
err_rsp:
680-
ib_destroy_ah(ah);
680+
rdma_destroy_ah(ah);
681681
free_recv_mad:
682682
ib_free_recv_mad(mad_wc);
683683
}
@@ -842,7 +842,7 @@ void opa_vnic_vema_send_trap(struct opa_vnic_adapter *adapter,
842842
}
843843

844844
err_sndbuf:
845-
ib_destroy_ah(ah);
845+
rdma_destroy_ah(ah);
846846
err_exit:
847847
v_err("Aborting trap\n");
848848
}

drivers/infiniband/ulp/srpt/ib_srpt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ static void srpt_mgmt_method_get(struct srpt_port *sp, struct ib_mad *rq_mad,
417417
static void srpt_mad_send_handler(struct ib_mad_agent *mad_agent,
418418
struct ib_mad_send_wc *mad_wc)
419419
{
420-
ib_destroy_ah(mad_wc->send_buf->ah);
420+
rdma_destroy_ah(mad_wc->send_buf->ah);
421421
ib_free_send_mad(mad_wc->send_buf);
422422
}
423423

@@ -481,7 +481,7 @@ static void srpt_mad_recv_handler(struct ib_mad_agent *mad_agent,
481481
ib_free_send_mad(rsp);
482482

483483
err_rsp:
484-
ib_destroy_ah(ah);
484+
rdma_destroy_ah(ah);
485485
err:
486486
ib_free_recv_mad(mad_wc);
487487
}

include/rdma/ib_verbs.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2796,10 +2796,10 @@ int rdma_modify_ah(struct ib_ah *ah, struct rdma_ah_attr *ah_attr);
27962796
int rdma_query_ah(struct ib_ah *ah, struct rdma_ah_attr *ah_attr);
27972797

27982798
/**
2799-
* ib_destroy_ah - Destroys an address handle.
2799+
* rdma_destroy_ah - Destroys an address handle.
28002800
* @ah: The address handle to destroy.
28012801
*/
2802-
int ib_destroy_ah(struct ib_ah *ah);
2802+
int rdma_destroy_ah(struct ib_ah *ah);
28032803

28042804
/**
28052805
* ib_create_srq - Creates a SRQ associated with the specified protection

0 commit comments

Comments
 (0)