Commit 57efada5 authored by Ziye Yang's avatar Ziye Yang Committed by Changpeng Liu
Browse files

nvmf/tcp: reorg the structure of struct spdk_nvmf_tcp_req



I used pahole to see whether the alignment of the structure
is reasonable. After reorgnization, we can saved 16 bytes and 1
cacheline according to the information by pahole.

Signed-off-by: default avatarZiye Yang <ziye.yang@intel.com>
Change-Id: I1347e7c582fe2b00707e2841690b87d53cc61e33
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460572


Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent b7a2058a
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -167,11 +167,15 @@ struct spdk_nvmf_tcp_req {
	uint8_t					*buf;

	bool					data_from_pool;
	void					*buffers[SPDK_NVMF_MAX_SGL_ENTRIES];
	bool					has_incapsule_data;

	/* transfer_tag */
	uint16_t				ttag;

	enum spdk_nvmf_tcp_req_state		state;

	void					*buffers[SPDK_NVMF_MAX_SGL_ENTRIES];

	/*
	 * next_expected_r2t_offset is used when we receive the h2c_data PDU.
	 */
@@ -184,9 +188,6 @@ struct spdk_nvmf_tcp_req {
	uint32_t				c2h_data_offset;
	uint32_t				c2h_data_pdu_num;

	enum spdk_nvmf_tcp_req_state		state;
	bool					has_incapsule_data;

	TAILQ_ENTRY(spdk_nvmf_tcp_req)		link;
	TAILQ_ENTRY(spdk_nvmf_tcp_req)		state_link;
};