From owner-freebsd-current@FreeBSD.ORG Tue Apr 1 02:21:03 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6CD7E7C4; Tue, 1 Apr 2014 02:21:03 +0000 (UTC) Received: from ns.kevlo.org (220-135-115-6.HINET-IP.hinet.net [220.135.115.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ns.kevlo.org", Issuer "ns.kevlo.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id EA33E5E3; Tue, 1 Apr 2014 02:21:02 +0000 (UTC) Received: from srg.kevlo.org (220-135-115-6.HINET-IP.hinet.net [220.135.115.6]) by ns.kevlo.org (8.14.8/8.14.8) with ESMTP id s312Kkpx031730 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Tue, 1 Apr 2014 10:20:47 +0800 (CST) (envelope-from kevlo@FreeBSD.org) Message-ID: <533A2285.2030705@FreeBSD.org> Date: Tue, 01 Apr 2014 10:20:53 +0800 From: Kevin Lo User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: John Baldwin Subject: Re: Re: UDP Lite support References: <201403261122.43541.jhb@freebsd.org> <5333F020.8000200@FreeBSD.org> <201403271221.29864.jhb@freebsd.org> In-Reply-To: <201403271221.29864.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: Tue, 01 Apr 2014 02:21:03 -0000 On 2014/03/28 00:21, John Baldwin wrote: > 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. Thank you John. glebius@ suggests we don't need to have two absolutely equal uma zones since most systems don't run UDP-Lite. If practice shows that a differentiation at zone level between UDP and UDP-Lite PCBs is important, then it could be done later. Following up with a fourth version of the udp-lite patch. http://people.freebsd.org/~kevlo/udplite.diff On top of the previous versions, this: - removes a uma zone for udp-lite - udp_common_ctlinput() belongs under #ifdef INET - removes sysctl nodes for udp-lite. - bumps version and adds my copyright. Kevin