RDMA: Mark if destroy address handle is in a sleepable context
Introduce a 'flags' field to destroy address handle callback and add a flag that marks whether the callback is executed in an atomic context or not. This will allow drivers to wait for completion instead of polling for it when it is allowed. Signed-off-by: Gal Pressman <galpress@amazon.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Šī revīzija ir iekļauta:

revīziju iesūtīja
Jason Gunthorpe

vecāks
b090c4e3a0
revīzija
2553ba217e
@@ -678,7 +678,7 @@ static void __ipoib_reap_ah(struct net_device *dev)
|
||||
list_for_each_entry_safe(ah, tah, &priv->dead_ahs, list)
|
||||
if ((int) priv->tx_tail - (int) ah->last_send >= 0) {
|
||||
list_del(&ah->list);
|
||||
rdma_destroy_ah(ah->ah);
|
||||
rdma_destroy_ah(ah->ah, 0);
|
||||
kfree(ah);
|
||||
}
|
||||
|
||||
|
@@ -606,7 +606,7 @@ static void vema_set(struct opa_vnic_vema_port *port,
|
||||
static void vema_send(struct ib_mad_agent *mad_agent,
|
||||
struct ib_mad_send_wc *mad_wc)
|
||||
{
|
||||
rdma_destroy_ah(mad_wc->send_buf->ah);
|
||||
rdma_destroy_ah(mad_wc->send_buf->ah, RDMA_DESTROY_AH_SLEEPABLE);
|
||||
ib_free_send_mad(mad_wc->send_buf);
|
||||
}
|
||||
|
||||
@@ -680,7 +680,7 @@ static void vema_recv(struct ib_mad_agent *mad_agent,
|
||||
ib_free_send_mad(rsp);
|
||||
|
||||
err_rsp:
|
||||
rdma_destroy_ah(ah);
|
||||
rdma_destroy_ah(ah, RDMA_DESTROY_AH_SLEEPABLE);
|
||||
free_recv_mad:
|
||||
ib_free_recv_mad(mad_wc);
|
||||
}
|
||||
@@ -848,7 +848,7 @@ void opa_vnic_vema_send_trap(struct opa_vnic_adapter *adapter,
|
||||
}
|
||||
|
||||
err_sndbuf:
|
||||
rdma_destroy_ah(ah);
|
||||
rdma_destroy_ah(ah, 0);
|
||||
err_exit:
|
||||
v_err("Aborting trap\n");
|
||||
}
|
||||
|
@@ -458,7 +458,7 @@ static void srpt_mgmt_method_get(struct srpt_port *sp, struct ib_mad *rq_mad,
|
||||
static void srpt_mad_send_handler(struct ib_mad_agent *mad_agent,
|
||||
struct ib_mad_send_wc *mad_wc)
|
||||
{
|
||||
rdma_destroy_ah(mad_wc->send_buf->ah);
|
||||
rdma_destroy_ah(mad_wc->send_buf->ah, RDMA_DESTROY_AH_SLEEPABLE);
|
||||
ib_free_send_mad(mad_wc->send_buf);
|
||||
}
|
||||
|
||||
@@ -525,7 +525,7 @@ static void srpt_mad_recv_handler(struct ib_mad_agent *mad_agent,
|
||||
ib_free_send_mad(rsp);
|
||||
|
||||
err_rsp:
|
||||
rdma_destroy_ah(ah);
|
||||
rdma_destroy_ah(ah, RDMA_DESTROY_AH_SLEEPABLE);
|
||||
err:
|
||||
ib_free_recv_mad(mad_wc);
|
||||
}
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user