+17
−31
+2
−2
Loading
We can move data segment length check from iscsi_check_data_segment_length() to iscsi_op_text() and iscsi_op_scsi(). Task Management Function request, SNACK request, and Logout request don't have data segment, and so any related check is not added. Of course we can add check if data segment length is zero though. This patch also changes the return type of spdk_get_max_immediate_data_size() and a related variable spdk_iscsi_pdu::data_segment_len to uint32_t to remove unnecessary casts. They are little to stand as an independent patch. The next patch will remove iscsi_check_data_segment_length(). Signed-off-by:Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I736ec234d2726de0c70bbae7e748a5b1b5134a32 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470725 Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Jim Harris <james.r.harris@intel.com> Reviewed-by:
Changpeng Liu <changpeng.liu@intel.com>