Re: [PATCH 2/2] librdmacm/rstream: Use MSG_WAITALL for blocking test

Started by Sridhar Samudrala on Aug 17, 2012

open the first message on its own page

Message details and related content
On Thu, 2012-08-16 at 22:53 +0000, Hefty, Sean wrote:
Signed-off-by: Sean Hefty <redacted>
Acked-by: Sridhar Samudrala <redacted>
quoted hunk
---
 examples/rstream.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/examples/rstream.c b/examples/rstream.c
index befb7c6..1d221d0 100644
--- a/examples/rstream.c
+++ b/examples/rstream.c
@@ -607,7 +607,7 @@ static int set_test_opt(char *optarg)
 			use_async = 1;
 			break;
 		case 'b':
-			flags &= ~MSG_DONTWAIT;
+			flags = (flags & ~MSG_DONTWAIT) | MSG_WAITALL;
 			break;
 		case 'f':
 			use_fork = 1;
@@ -628,7 +628,7 @@ static int set_test_opt(char *optarg)
 		} else if (!strncasecmp("async", optarg, 5)) {
 			use_async = 1;
 		} else if (!strncasecmp("block", optarg, 5)) {
-			flags &= ~MSG_DONTWAIT;
+			flags = (flags & ~MSG_DONTWAIT) | MSG_WAITALL;
 		} else if (!strncasecmp("nonblock", optarg, 8)) {
 			flags |= MSG_DONTWAIT;
 		} else if (!strncasecmp("verify", optarg, 6)) {


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help