mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
nvmet: reorder fields in 'struct nvmefc_fcp_req'
Group some variables based on their sizes to reduce holes. On x86_64, this shrinks the size of 'struct nvmefc_fcp_req' from 112 to 104 bytes. This structure is embedded in some other structures (nvme_fc_fcp_op which itself is embedded in nvme_fcp_op_w_sgl), so it helps reducing the size of these structures too. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org>
This commit is contained in:
committed by
Keith Busch
parent
0f5335e158
commit
92bbe55182
@@ -185,7 +185,6 @@ enum nvmefc_fcp_datadir {
|
|||||||
* @first_sgl: memory for 1st scatter/gather list segment for payload data
|
* @first_sgl: memory for 1st scatter/gather list segment for payload data
|
||||||
* @sg_cnt: number of elements in the scatter/gather list
|
* @sg_cnt: number of elements in the scatter/gather list
|
||||||
* @io_dir: direction of the FCP request (see NVMEFC_FCP_xxx)
|
* @io_dir: direction of the FCP request (see NVMEFC_FCP_xxx)
|
||||||
* @sqid: The nvme SQID the command is being issued on
|
|
||||||
* @done: The callback routine the LLDD is to invoke upon completion of
|
* @done: The callback routine the LLDD is to invoke upon completion of
|
||||||
* the FCP operation. req argument is the pointer to the original
|
* the FCP operation. req argument is the pointer to the original
|
||||||
* FCP IO operation.
|
* FCP IO operation.
|
||||||
@@ -194,12 +193,13 @@ enum nvmefc_fcp_datadir {
|
|||||||
* while processing the operation. The length of the buffer
|
* while processing the operation. The length of the buffer
|
||||||
* corresponds to the fcprqst_priv_sz value specified in the
|
* corresponds to the fcprqst_priv_sz value specified in the
|
||||||
* nvme_fc_port_template supplied by the LLDD.
|
* nvme_fc_port_template supplied by the LLDD.
|
||||||
|
* @sqid: The nvme SQID the command is being issued on
|
||||||
*
|
*
|
||||||
* Values set by the LLDD indicating completion status of the FCP operation.
|
* Values set by the LLDD indicating completion status of the FCP operation.
|
||||||
* Must be set prior to calling the done() callback.
|
* Must be set prior to calling the done() callback.
|
||||||
|
* @rcv_rsplen: length, in bytes, of the FCP RSP IU received.
|
||||||
* @transferred_length: amount of payload data, in bytes, that were
|
* @transferred_length: amount of payload data, in bytes, that were
|
||||||
* transferred. Should equal payload_length on success.
|
* transferred. Should equal payload_length on success.
|
||||||
* @rcv_rsplen: length, in bytes, of the FCP RSP IU received.
|
|
||||||
* @status: Completion status of the FCP operation. must be 0 upon success,
|
* @status: Completion status of the FCP operation. must be 0 upon success,
|
||||||
* negative errno value upon failure (ex: -EIO). Note: this is
|
* negative errno value upon failure (ex: -EIO). Note: this is
|
||||||
* NOT a reflection of the NVME CQE completion status. Only the
|
* NOT a reflection of the NVME CQE completion status. Only the
|
||||||
@@ -219,14 +219,14 @@ struct nvmefc_fcp_req {
|
|||||||
int sg_cnt;
|
int sg_cnt;
|
||||||
enum nvmefc_fcp_datadir io_dir;
|
enum nvmefc_fcp_datadir io_dir;
|
||||||
|
|
||||||
__le16 sqid;
|
|
||||||
|
|
||||||
void (*done)(struct nvmefc_fcp_req *req);
|
void (*done)(struct nvmefc_fcp_req *req);
|
||||||
|
|
||||||
void *private;
|
void *private;
|
||||||
|
|
||||||
u32 transferred_length;
|
__le16 sqid;
|
||||||
|
|
||||||
u16 rcv_rsplen;
|
u16 rcv_rsplen;
|
||||||
|
u32 transferred_length;
|
||||||
u32 status;
|
u32 status;
|
||||||
} __aligned(sizeof(u64)); /* alignment for other things alloc'd with */
|
} __aligned(sizeof(u64)); /* alignment for other things alloc'd with */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user