Commit 84c04174 authored by Ben Walker's avatar Ben Walker Committed by Konrad Sztyber
Browse files

sock: Remove spdk_sock_readv_async



Prefer to use spdk_sock_recv_zcopy instead.

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


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent ece3730c
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -414,16 +414,6 @@ ssize_t spdk_sock_readv(struct spdk_sock *sock, struct iovec *iov, int iovcnt);
 */
int spdk_sock_recv_next(struct spdk_sock *sock, void **buf, void **ctx);

/**
 * Read message from the given socket asynchronously, calling the provided callback when the whole
 * buffer is filled or an error is encountered.  Only a single read request can be active at a time
 * (including synchronous reads).
 *
 * \param sock Socket to receive message.
 * \param req The read request to submit.
 */
void spdk_sock_readv_async(struct spdk_sock *sock, struct spdk_sock_request *req);

/**
 * Set the value used to specify the low water mark (in bytes) for this socket.
 *
+0 −19
Original line number Diff line number Diff line
@@ -469,25 +469,6 @@ spdk_sock_readv(struct spdk_sock *sock, struct iovec *iov, int iovcnt)
	return sock->net_impl->readv(sock, iov, iovcnt);
}

void
spdk_sock_readv_async(struct spdk_sock *sock, struct spdk_sock_request *req)
{
	assert(req->cb_fn != NULL);

	if (spdk_unlikely(sock == NULL || sock->flags.closed)) {
		req->cb_fn(req->cb_arg, -EBADF);
		return;
	}

	/* The socket needs to be part of a poll group */
	if (spdk_unlikely(sock->group_impl == NULL)) {
		req->cb_fn(req->cb_arg, -EPERM);
		return;
	}

	sock->net_impl->readv_async(sock, req);
}

ssize_t
spdk_sock_writev(struct spdk_sock *sock, struct iovec *iov, int iovcnt)
{
+0 −1
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@
	spdk_sock_writev;
	spdk_sock_writev_async;
	spdk_sock_readv;
	spdk_sock_readv_async;
	spdk_sock_set_recvlowat;
	spdk_sock_set_recvbuf;
	spdk_sock_set_sendbuf;
+0 −7
Original line number Diff line number Diff line
@@ -1501,12 +1501,6 @@ posix_sock_recv(struct spdk_sock *sock, void *buf, size_t len)
	return posix_sock_readv(sock, iov, 1);
}

static void
posix_sock_readv_async(struct spdk_sock *sock, struct spdk_sock_request *req)
{
	req->cb_fn(req->cb_arg, -ENOTSUP);
}

static ssize_t
posix_sock_writev(struct spdk_sock *_sock, struct iovec *iov, int iovcnt)
{
@@ -2058,7 +2052,6 @@ static struct spdk_net_impl g_posix_net_impl = {
	.close		= posix_sock_close,
	.recv		= posix_sock_recv,
	.readv		= posix_sock_readv,
	.readv_async	= posix_sock_readv_async,
	.writev		= posix_sock_writev,
	.recv_next	= posix_sock_recv_next,
	.writev_async	= posix_sock_writev_async,
+0 −7
Original line number Diff line number Diff line
@@ -1526,12 +1526,6 @@ uring_sock_writev_async(struct spdk_sock *_sock, struct spdk_sock_request *req)
	}
}

static void
uring_sock_readv_async(struct spdk_sock *sock, struct spdk_sock_request *req)
{
	req->cb_fn(req->cb_arg, -ENOTSUP);
}

static int
uring_sock_set_recvlowat(struct spdk_sock *_sock, int nbytes)
{
@@ -2025,7 +2019,6 @@ static struct spdk_net_impl g_uring_net_impl = {
	.close		= uring_sock_close,
	.recv		= uring_sock_recv,
	.readv		= uring_sock_readv,
	.readv_async	= uring_sock_readv_async,
	.writev		= uring_sock_writev,
	.recv_next	= uring_sock_recv_next,
	.writev_async	= uring_sock_writev_async,