Commit 900f0c97 authored by wuzhouhui's avatar wuzhouhui Committed by Jim Harris
Browse files

sock/vpp: do not continue if buf writed is less than provided



According to the implementation of VPP, the vppcom_session_write() may
cannot write all provided buffer, and we shouldn't continue in this
case, just like usage of vppcom_session_read().

Change-Id: I419efc2812e3aa261a75ddbd3f7cfec60a5376d3
Signed-off-by: default avatarwuzhouhui <wuzhouhui@kingsoft.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447540


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 1c96c421
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -436,6 +436,9 @@ spdk_vpp_sock_writev(struct spdk_sock *_sock, struct iovec *iov, int iovcnt)
			}
		} else {
			total += rc;
			if (rc < iov[i].iov_len) {
				break;
			}
		}
	}
	return total;