From: Brandon L Black <hidden> Date: 2010-03-26 22:35:40
From: Brandon L Black <redacted>
Add new flag MSG_WAITFORONE for the recvmmsg() syscall.
When this flag is specified for a blocking socket, recvmmsg()
will only block until at least 1 packet is available. The
default behavior is to block until all vlen packets are
available. This flag has no effect on non-blocking sockets
or when used in combination with MSG_DONTWAIT.
Signed-off-by: Brandon L Black <redacted>
---
@@ -2133,7 +2133,10 @@ int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen,if(err)break;-++datagrams;++/* MSG_WAITFORONE turns on MSG_DONTWAIT after one packet */+if(!datagrams++&&(flags&MSG_WAITFORONE))+flags|=MSG_DONTWAIT;if(timeout){ktime_get_ts(timeout);
From: Eric Dumazet <hidden> Date: 2010-03-26 22:44:38
Le vendredi 26 mars 2010 à 17:35 -0500, Brandon L Black a écrit :
From: Brandon L Black <redacted>
Add new flag MSG_WAITFORONE for the recvmmsg() syscall.
When this flag is specified for a blocking socket, recvmmsg()
will only block until at least 1 packet is available. The
default behavior is to block until all vlen packets are
available. This flag has no effect on non-blocking sockets
or when used in combination with MSG_DONTWAIT.
Signed-off-by: Brandon L Black <redacted>
@@ -2133,7 +2133,10 @@ int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen,if(err)break;-++datagrams;++/* MSG_WAITFORONE turns on MSG_DONTWAIT after one packet */+if(!datagrams++&&(flags&MSG_WAITFORONE))+flags|=MSG_DONTWAIT;
Hmmm, no need to test !datagram, just do :
++datagrams;
if (flags & MSG_WAITFORONE)
flags |= MSG_DONTWAIT;
From: Brandon Black <hidden> Date: 2010-03-26 22:55:21
On Fri, Mar 26, 2010 at 5:44 PM, Eric Dumazet [off-list ref] wrote:
Hmmm, no need to test !datagram, just do :
++datagrams;
if (flags & MSG_WAITFORONE)
flags |= MSG_DONTWAIT;
Ok. I've never been through this process before. Do I resubmit a new
subject/thread with the changed patch and [PATCH v2] at this point?
Any other nits about how the patch was sent before I do?
Thanks,
-- Brandon
From: Brandon L Black <hidden> Date: 2010-03-27 02:18:07
From: Brandon L Black <redacted>
Add new flag MSG_WAITFORONE for the recvmmsg() syscall.
When this flag is specified for a blocking socket, recvmmsg()
will only block until at least 1 packet is available. The
default behavior is to block until all vlen packets are
available. This flag has no effect on non-blocking sockets
or when used in combination with MSG_DONTWAIT.
Signed-off-by: Brandon L Black <redacted>
---
@@ -2135,6 +2135,10 @@ int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen,break;++datagrams;+/* MSG_WAITFORONE turns on MSG_DONTWAIT after one packet */+if(flags&MSG_WAITFORONE)+flags|=MSG_DONTWAIT;+if(timeout){ktime_get_ts(timeout);*timeout=timespec_sub(end_time,*timeout);
From: David Miller <davem@davemloft.net> Date: 2010-03-27 03:54:09
From: Brandon L Black <redacted>
Date: Fri, 26 Mar 2010 21:18:03 -0500
From: Brandon L Black <redacted>
Add new flag MSG_WAITFORONE for the recvmmsg() syscall.
When this flag is specified for a blocking socket, recvmmsg()
will only block until at least 1 packet is available. The
default behavior is to block until all vlen packets are
available. This flag has no effect on non-blocking sockets
or when used in combination with MSG_DONTWAIT.
Signed-off-by: Brandon L Black <redacted>
On Fri, Mar 26, 2010 at 19:18, Brandon L Black [off-list ref] wrote:
Add new flag MSG_WAITFORONE for the recvmmsg() syscall.
When this flag is specified for a blocking socket, recvmmsg()
will only block until at least 1 packet is available. The
default behavior is to block until all vlen packets are
available. This flag has no effect on non-blocking sockets
or when used in combination with MSG_DONTWAIT.
Signed-off-by: Brandon L Black <redacted>
This is useful and looks OK to me.
Acked-by: Ulrich Drepper <redacted>
From: Eric Dumazet <hidden> Date: 2010-03-27 06:00:12
Le vendredi 26 mars 2010 à 21:18 -0500, Brandon L Black a écrit :
From: Brandon L Black <redacted>
Add new flag MSG_WAITFORONE for the recvmmsg() syscall.
When this flag is specified for a blocking socket, recvmmsg()
will only block until at least 1 packet is available. The
default behavior is to block until all vlen packets are
available. This flag has no effect on non-blocking sockets
or when used in combination with MSG_DONTWAIT.
Signed-off-by: Brandon L Black <redacted>
@@ -2135,6 +2135,10 @@ int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen,break;++datagrams;+/* MSG_WAITFORONE turns on MSG_DONTWAIT after one packet */+if(flags&MSG_WAITFORONE)+flags|=MSG_DONTWAIT;+if(timeout){ktime_get_ts(timeout);*timeout=timespec_sub(end_time,*timeout);--
From: Arnaldo Carvalho de Melo <hidden> Date: 2010-03-27 14:07:25
Em Fri, Mar 26, 2010 at 08:54:28PM -0700, David Miller escreveu:
From: Brandon L Black <redacted>
Date: Fri, 26 Mar 2010 21:18:03 -0500
quoted
From: Brandon L Black <redacted>
Add new flag MSG_WAITFORONE for the recvmmsg() syscall.
When this flag is specified for a blocking socket, recvmmsg()
will only block until at least 1 packet is available. The
default behavior is to block until all vlen packets are
available. This flag has no effect on non-blocking sockets
or when used in combination with MSG_DONTWAIT.
Signed-off-by: Brandon L Black <redacted>
Arnaldo, please review this, thanks.
I'm ok with it.
Acked-by: Arnaldo Carvalho de Melo <redacted>
- Arnaldo
From: David Miller <davem@davemloft.net> Date: 2010-03-27 15:28:48
From: Arnaldo Carvalho de Melo <redacted>
Date: Sat, 27 Mar 2010 11:07:17 -0300
Em Fri, Mar 26, 2010 at 08:54:28PM -0700, David Miller escreveu:
quoted
From: Brandon L Black <redacted>
Date: Fri, 26 Mar 2010 21:18:03 -0500
quoted
From: Brandon L Black <redacted>
Add new flag MSG_WAITFORONE for the recvmmsg() syscall.
When this flag is specified for a blocking socket, recvmmsg()
will only block until at least 1 packet is available. The
default behavior is to block until all vlen packets are
available. This flag has no effect on non-blocking sockets
or when used in combination with MSG_DONTWAIT.
Signed-off-by: Brandon L Black <redacted>
Arnaldo, please review this, thanks.
I'm ok with it.
Acked-by: Arnaldo Carvalho de Melo <redacted>