Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Christophe JAILLET and committed by
Keith Busch
92bbe551 0f5335e1

+5 -5
+5 -5
include/linux/nvme-fc-driver.h
··· 185 185 * @first_sgl: memory for 1st scatter/gather list segment for payload data 186 186 * @sg_cnt: number of elements in the scatter/gather list 187 187 * @io_dir: direction of the FCP request (see NVMEFC_FCP_xxx) 188 - * @sqid: The nvme SQID the command is being issued on 189 188 * @done: The callback routine the LLDD is to invoke upon completion of 190 189 * the FCP operation. req argument is the pointer to the original 191 190 * FCP IO operation. ··· 193 194 * while processing the operation. The length of the buffer 194 195 * corresponds to the fcprqst_priv_sz value specified in the 195 196 * nvme_fc_port_template supplied by the LLDD. 197 + * @sqid: The nvme SQID the command is being issued on 196 198 * 197 199 * Values set by the LLDD indicating completion status of the FCP operation. 198 200 * Must be set prior to calling the done() callback. 201 + * @rcv_rsplen: length, in bytes, of the FCP RSP IU received. 199 202 * @transferred_length: amount of payload data, in bytes, that were 200 203 * transferred. Should equal payload_length on success. 201 - * @rcv_rsplen: length, in bytes, of the FCP RSP IU received. 202 204 * @status: Completion status of the FCP operation. must be 0 upon success, 203 205 * negative errno value upon failure (ex: -EIO). Note: this is 204 206 * NOT a reflection of the NVME CQE completion status. Only the ··· 219 219 int sg_cnt; 220 220 enum nvmefc_fcp_datadir io_dir; 221 221 222 - __le16 sqid; 223 - 224 222 void (*done)(struct nvmefc_fcp_req *req); 225 223 226 224 void *private; 227 225 228 - u32 transferred_length; 226 + __le16 sqid; 227 + 229 228 u16 rcv_rsplen; 229 + u32 transferred_length; 230 230 u32 status; 231 231 } __aligned(sizeof(u64)); /* alignment for other things alloc'd with */ 232 232