kern/181741: [kernel] [patch] Packet loss when ' control' messages are present with large data (sendmsg(2))
Alan Somers
asomers at freebsd.org
Thu Feb 20 17:30:01 UTC 2014
The following reply was made to PR kern/181741; it has been noted by GNATS.
From: Alan Somers <asomers at freebsd.org>
To: bug-followup at FreeBSD.org, yuri at rawbw.com
Cc:
Subject: Re: kern/181741: [kernel] [patch] Packet loss when 'control'
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
More information about the freebsd-net
mailing list