Commit af7be0ac authored by Ben Walker's avatar Ben Walker Committed by Tomasz Zawadzki
Browse files

iscsi: No longer set sndbuf size



Use whatever size the socket layer thinks is best. Before,
we limited the total amount of memory to just 32MB total. Now,
let the socket layer decide. It will likely use up to 2MB per
socket, which results in much better performance.

Change-Id: I9ef7680773b8c78a743fe74d8abb518258e19a0d
Signed-off-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470512


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
Reviewed-by: default avatarZiye Yang <ziye.yang@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent 4579a16f
Loading
Loading
Loading
Loading
+1 −10
Original line number Diff line number Diff line
@@ -205,7 +205,7 @@ spdk_iscsi_conn_construct(struct spdk_iscsi_portal *portal,
{
	struct spdk_iscsi_poll_group *pg;
	struct spdk_iscsi_conn *conn;
	int bufsize, i, rc;
	int i, rc;

	conn = allocate_conn();
	if (conn == NULL) {
@@ -267,15 +267,6 @@ spdk_iscsi_conn_construct(struct spdk_iscsi_portal *portal,
		goto error_return;
	}

	bufsize = 32 * 1024 * 1024 / g_spdk_iscsi.MaxConnections;
	if (bufsize > 2 * 1024 * 1024) {
		bufsize = 2 * 1024 * 1024;
	}
	rc = spdk_sock_set_sendbuf(conn->sock, bufsize);
	if (rc != 0) {
		SPDK_ERRLOG("spdk_sock_set_sendbuf failed\n");
	}

	/* set low water mark */
	rc = spdk_sock_set_recvlowat(conn->sock, 1);
	if (rc != 0) {