Commit de21bcd2 authored by Konrad Sztyber's avatar Konrad Sztyber Committed by Tomasz Zawadzki
Browse files

iobuf: point users to calc-iobuf.py when pools are exhausted



Signed-off-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I3d99b16f9f0535b7865d0f1a07260543394b822f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/18365


Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 38e833b3
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -279,7 +279,9 @@ spdk_iobuf_channel_init(struct spdk_iobuf_channel *ch, const char *name,
	for (i = 0; i < small_cache_size; ++i) {
		if (spdk_ring_dequeue(g_iobuf.small_pool, (void **)&buf, 1) == 0) {
			SPDK_ERRLOG("Failed to populate iobuf small buffer cache. "
				    "You may need to increase spdk_iobuf_opts.small_pool_count\n");
				    "You may need to increase spdk_iobuf_opts.small_pool_count.\n");
			SPDK_ERRLOG("See scripts/calc-iobuf.py for guidance on how to calculate "
				    "this value.\n");
			goto error;
		}
		STAILQ_INSERT_TAIL(&ch->small.cache, buf, stailq);
@@ -288,7 +290,9 @@ spdk_iobuf_channel_init(struct spdk_iobuf_channel *ch, const char *name,
	for (i = 0; i < large_cache_size; ++i) {
		if (spdk_ring_dequeue(g_iobuf.large_pool, (void **)&buf, 1) == 0) {
			SPDK_ERRLOG("Failed to populate iobuf large buffer cache. "
				    "You may need to increase spdk_iobuf_opts.large_pool_count\n");
				    "You may need to increase spdk_iobuf_opts.large_pool_count.\n");
			SPDK_ERRLOG("See scripts/calc-iobuf.py for guidance on how to calculate "
				    "this value.\n");
			goto error;
		}
		STAILQ_INSERT_TAIL(&ch->large.cache, buf, stailq);