diff options
author | Christoph Hellwig <hch@lst.de> | 2016-02-24 20:24:08 +0300 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2016-03-11 08:48:51 +0300 |
commit | e3416ab2d156ac0f0a3d9e55bcdff69d109ba403 (patch) | |
tree | abc1e7af66e75c2b69f35d79756fa45dc5ec9ca7 /drivers/infiniband/ulp/isert/ib_isert.h | |
parent | d1ca2ed7dcf859dcb7fc642d4d3ed42c1693d20c (diff) | |
download | linux-e3416ab2d156ac0f0a3d9e55bcdff69d109ba403.tar.xz |
iser-target: Kill the ->isert_cmd back pointer in struct iser_tx_desc
We only use the pointer when processing regular iSER commands, and it then
always points to the struct iser_cmd that contains the TX descriptor.
Remove it and rely on container_of to save a little space and avoid a
pointer that is updated multiple times per processed command.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/infiniband/ulp/isert/ib_isert.h')
-rw-r--r-- | drivers/infiniband/ulp/isert/ib_isert.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/isert/ib_isert.h b/drivers/infiniband/ulp/isert/ib_isert.h index f552797dc863..192788a4820c 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.h +++ b/drivers/infiniband/ulp/isert/ib_isert.h @@ -110,7 +110,6 @@ struct iser_tx_desc { struct ib_sge tx_sg[2]; struct ib_cqe tx_cqe; int num_sge; - struct isert_cmd *isert_cmd; struct ib_send_wr send_wr; } __packed; @@ -181,6 +180,11 @@ struct isert_cmd { struct scatterlist sg; }; +static inline struct isert_cmd *tx_desc_to_cmd(struct iser_tx_desc *desc) +{ + return container_of(desc, struct isert_cmd, tx_desc); +} + struct isert_device; struct isert_conn { |