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>
This commit is contained in:

committed by
Nicholas Bellinger

parent
d1ca2ed7dc
commit
e3416ab2d1
@@ -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 {
|
||||
|
Reference in New Issue
Block a user