Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Apr 2013 11:33:18 -0700
From:      Vijay Singh <vijju.singh@gmail.com>
To:        freebsd-net@freebsd.org
Subject:   Small patch in OFED/sdp
Message-ID:  <CALCNsJTi697OJmXGstaYGSuJWUg1cU7v_SaGxPfx4KXzOXS53A@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi, this is based on the the understanding that the SS_NBIO is a
socket state, and not a state of the socket buffer.

F9@[/u/vijay/bsd/CODE/cur/sys/ofed/drivers/infiniband/ulp/sdp]# svn diff
Index: sdp_main.c
===================================================================
--- sdp_main.c  (revision 249029)
+++ sdp_main.c  (working copy)
@@ -1267,7 +1267,7 @@

        /* Socket buffer is empty and we shall not block. */
        if (sb->sb_cc == 0 &&
-           ((sb->sb_flags & SS_NBIO) || (flags & (MSG_DONTWAIT|MSG_NBIO)))) {
+           ((so->so_state & SS_NBIO) || (flags & (MSG_DONTWAIT|MSG_NBIO)))) {
                error = EAGAIN;
                goto out;
        }
@@ -1297,7 +1297,7 @@

        /* Socket buffer got some data that we shall deliver now. */
        if (sb->sb_cc > 0 && !(flags & MSG_WAITALL) &&
-           ((sb->sb_flags & SS_NBIO) ||
+           ((so->so_state & SS_NBIO) ||
             (flags & (MSG_DONTWAIT|MSG_NBIO)) ||
             sb->sb_cc >= sb->sb_lowat ||
             sb->sb_cc >= uio->uio_resid ||



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALCNsJTi697OJmXGstaYGSuJWUg1cU7v_SaGxPfx4KXzOXS53A>