The operation to read data segment of PDU will be enhanced to
support DIF insert operation ofr write I/O.
This patch factors out check data segment length operation into a
function to make the enhancement easier.
Change-Id: I4fbc3bd440192b3723435c9acf3b6b46d3ce4939
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446342
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>