From af7be0acecf6f22a9c5b9c31fdfba1944cebac8d Mon Sep 17 00:00:00 2001 From: Ben Walker Date: Mon, 30 Sep 2019 12:14:55 -0700 Subject: [PATCH] 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: Ben Walker Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470512 Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Paul Luse Reviewed-by: Ziye Yang Reviewed-by: Shuhei Matsumoto --- lib/iscsi/conn.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/lib/iscsi/conn.c b/lib/iscsi/conn.c index 5474f0d69..b90da6ce3 100644 --- a/lib/iscsi/conn.c +++ b/lib/iscsi/conn.c @@ -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) {