Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Feb 2014 17:30:01 GMT
From:      Alan Somers <asomers@freebsd.org>
To:        freebsd-net@FreeBSD.org
Subject:   Re: kern/181741: [kernel] [patch] Packet loss when &#39; control&#39;  messages are present with large data (sendmsg(2))
Message-ID:  <201402201730.s1KHU11L018919@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/181741; it has been noted by GNATS.

From: Alan Somers <asomers@freebsd.org>
To: bug-followup@FreeBSD.org, yuri@rawbw.com
Cc:  
Subject: Re: kern/181741: [kernel] [patch] Packet loss when &#39;control&#39;
 messages are present with large data (sendmsg(2))
Date: Thu, 20 Feb 2014 10:29:27 -0700

 I've been working on kern/185813, which is closely related.  My
 comments on your patch:
 
 1) In uipc_socket.c, you twice do "if (clen > space) error =
 EMSGSIZE".  Should the comparison be with sp->so_snd->sb_hiwat instead
 of space?  Space shrinks when the sockbuf is partially full, but
 sb_hiwat is constant.  (Actually, sb_hiwat also shrinks for Unix
 domain sockets, but I am going to fix that as part of kern/185812).
 
 2) In uipc_finalizecontrol(), I think that you need to grab
 UNP_LINK_RLOCK to protect the linkage between unp and unp2.
 
 3) It would be fantastic if you could convert the testcase to ATF
 format.  ATF is the new format that all testcases should use going
 forward.  It's easily automatable, unlike the stuff in
 tools/regression, and it's very flexible too.
 https://wiki.freebsd.org/TestingFreeBSD
 
 4) I think there are some tab/space issues with the patch, but I'm not
 positive because I'm reading it in Firefox.
 
 -Alan



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