IB/iser: Have iSER data transaction object point to iSER conn
iSER uses a data transaction object (struct iser_dto) as part of its IB data descriptors (struct iser_desc) management. It also uses a hierarchy of connection structures pointing to each other. A DTO may exist even after the iscsi_iser connection pointed by it is destroyed (eg one that is bound to a post receive buffer which was flushed by the IB HW). Hence DTOs need point to the lowest connection, which is struct iser_conn. Signed-off-by: Erez Zilber <erezz@voltaire.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:
committed by
Roland Dreier
parent
ee30cb5b0b
commit
87e8df7a27
@ -571,6 +571,8 @@ void iser_conn_release(struct iser_conn *ib_conn)
|
||||
/* on EVENT_ADDR_ERROR there's no device yet for this conn */
|
||||
if (device != NULL)
|
||||
iser_device_try_release(device);
|
||||
if (ib_conn->iser_conn)
|
||||
ib_conn->iser_conn->ib_conn = NULL;
|
||||
kfree(ib_conn);
|
||||
}
|
||||
|
||||
@ -694,7 +696,7 @@ int iser_post_recv(struct iser_desc *rx_desc)
|
||||
struct iser_dto *recv_dto = &rx_desc->dto;
|
||||
|
||||
/* Retrieve conn */
|
||||
ib_conn = recv_dto->conn->ib_conn;
|
||||
ib_conn = recv_dto->ib_conn;
|
||||
|
||||
iser_dto_to_iov(recv_dto, iov, 2);
|
||||
|
||||
@ -727,7 +729,7 @@ int iser_post_send(struct iser_desc *tx_desc)
|
||||
struct iser_conn *ib_conn;
|
||||
struct iser_dto *dto = &tx_desc->dto;
|
||||
|
||||
ib_conn = dto->conn->ib_conn;
|
||||
ib_conn = dto->ib_conn;
|
||||
|
||||
iser_dto_to_iov(dto, iov, MAX_REGD_BUF_VECTOR_LEN);
|
||||
|
||||
@ -774,7 +776,7 @@ static void iser_comp_error_worker(void *data)
|
||||
static void iser_handle_comp_error(struct iser_desc *desc)
|
||||
{
|
||||
struct iser_dto *dto = &desc->dto;
|
||||
struct iser_conn *ib_conn = dto->conn->ib_conn;
|
||||
struct iser_conn *ib_conn = dto->ib_conn;
|
||||
|
||||
iser_dto_buffs_release(dto);
|
||||
|
||||
|
Reference in New Issue
Block a user