From owner-freebsd-current@FreeBSD.ORG Thu Mar 27 18:00:19 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 98E3EF55; Thu, 27 Mar 2014 18:00:19 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 723C0F93; Thu, 27 Mar 2014 18:00:19 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 64B8EB990; Thu, 27 Mar 2014 14:00:18 -0400 (EDT) From: John Baldwin To: Kevin Lo Subject: Re: UDP Lite support Date: Thu, 27 Mar 2014 12:21:29 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <201403261122.43541.jhb@freebsd.org> <5333F020.8000200@FreeBSD.org> In-Reply-To: <5333F020.8000200@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201403271221.29864.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 27 Mar 2014 14:00:18 -0400 (EDT) Cc: Joe Nosay , freebsd-current@freebsd.org, d@delphij.net, Brooks Davis X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2014 18:00:19 -0000 On Thursday, March 27, 2014 5:32:16 am Kevin Lo wrote: > >>> Are you interested in working on these and report back? > >> The revised patch is available at: > >> http://people.freebsd.org/~kevlo/udplite.diff > > Thank you for your suggestions. > > > A few suggestions: > > > > - I would just drop the INP lock and return EOPNOTSUPP directly rather > > than using goto's to 'bad_setoptname' and 'bad_getoptname' so the > > UDP-lite options are self-contained. > > Fixed. Thanks. > > - I'm not a super big fan of all the udp_common_* macros only because > > I think it obfuscates things. At the very least, please move these > > things out of the header and into udp_usrreq.c so they are closer > > to the implementation. I would even suggest making them inline > > functions instead of macros. > > Okay, I removed two udp_common_* macros. I also renamed udp_common_init() > to udp_udplite_init() and moved it into udp_usrreq.c. Using a macro here > to follow the style used in SCTP (sctp_os_bsd.h). > > Here's a third version of the udp-lite patch: > http://people.freebsd.org/~kevlo/udplite.diff Ok, I would say that udp_common_init() is actually a better name if you keep the macro (which I think is fine) rather than udp_udplite_init() as the macro is not specific to UDP Lite. However, thanks for moving the macros out of the header. -- John Baldwin