From aabe3ed301081aacce11408749c26b6baae3faaa Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 29 Dec 2024 16:30:31 -0800 Subject: udp: use a bounce buffer if we lack sendmsg or recvmsg This includes checks to determine if those functions are present, and a test case to verify that scatter gather with UDP works. --- src/core/aio.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/aio.h b/src/core/aio.h index 5c74691d..cbf2c919 100644 --- a/src/core/aio.h +++ b/src/core/aio.h @@ -194,6 +194,8 @@ extern void nni_aio_sys_fini(void); typedef struct nni_aio_expire_q nni_aio_expire_q; +#define NNI_AIO_MAX_IOV 8 + // nng_aio is an async I/O handle. The details of this aio structure // are private to the AIO framework. The structure has the public name // (nng_aio) so that we minimize the pollution in the public API namespace. @@ -216,7 +218,7 @@ struct nng_aio { nni_task a_task; // Read/write operations. - nni_iov a_iov[8]; + nni_iov a_iov[NNI_AIO_MAX_IOV]; unsigned a_nio; // Message operations. -- cgit v1.2.3-70-g09d2