Hello
I have a requirement in my application to read multiple packets in single call
like recvmmsg supported by native linux stack.
In VPP, I see the following. Let me know what is the plan on supporting
vcom_socket_recvmmsg.
Regards
Shashi
/*
* Receive up to VLEN messages as described by VMESSAGES from socket FD.
* Returns the number of messages received or -1 for errors.
* This function is a cancellation point and therefore not marked
* with __THROW.
* */
int
vcom_recvmmsg (int __fd, struct mmsghdr *__vmessages,
unsigned int __vlen, int __flags, struct timespec *__tmo)
{
if (vcom_init () != 0)
{
return -1;
}
return vcom_socket_recvmmsg (__fd, __message, __vlen, __flags, __tmo);
}
int
recvmmsg (int __fd, struct mmsghdr *__vmessages,
unsigned int __vlen, int __flags, struct timespec *__tmo)
{
ssize_t size;
pid_t pid = getpid ();
if (is_vcom_socket_fd (__fd))
{
size = vcom_recvmmsg (__fd, __message, __vlen, __flags, __tmo);
if (VCOM_DEBUG > 0)
fprintf (stderr,
"[%d] recvmmsg: "
"'%04d'='%04d', '%p', "
"'%04d', '%04x', '%p'\n",
pid, (int) size, __fd, __vmessages, __vlen, __flags, __tmo);
if (size < 0)
{
errno = -size;
return -1;
}
return size;
}
return libc_recvmmsg (__fd, __message, __vlen, __flags, __tmo);
}
nt
vcom_socket_recvmmsg (int __fd, struct mmsghdr *__vmessages,
unsigned int __vlen, int __flags,
struct timespec *__tmo)
{
/* TBD: define a new vppcom api */
return 0;
}
#endif
_______________________________________________
vpp-dev mailing list
[email protected]
https://lists.fd.io/mailman/listinfo/vpp-dev