From owner-freebsd-current@FreeBSD.ORG Tue Apr 1 20:53:45 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 76CEE356; Tue, 1 Apr 2014 20:53:45 +0000 (UTC) Received: from mail-qc0-x22e.google.com (mail-qc0-x22e.google.com [IPv6:2607:f8b0:400d:c01::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 02DA7AD4; Tue, 1 Apr 2014 20:53:44 +0000 (UTC) Received: by mail-qc0-f174.google.com with SMTP id c9so11189650qcz.19 for ; Tue, 01 Apr 2014 13:53:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=4EznuPD+keaoYLKzL5XF/hkD8b0XInEFdYYA3khSQ9Y=; b=DTX/qn8aVtm9W5qNiIkqhaVlwvBmNu7ghxL+o7nnsyIaPUEBQDg+pf7Lg7mAPmLf9u IzU+eyJzO0/oQXnHN3q+fdn1K+yUM73U++fUJtjoLF2Iueef+KiK7faBV3qxmr+mjOEc fV3qjMyEL+dF5kAKjTcY2HK52Zw8RfFnv7ZXwbru/WFmhKYlyiMucSYQzUfslx2H5Ehi IEdTlpDiZsn3bKhoQSONS9FBDfldmEwrokktsyVTRuusljlbvXezW8ypRR6fnjKTx9K2 d1sliWjYdvDjn6KAtQ+rQrHoXWruvQUFtW02OY8yrEU/mE1G5tuS1uoUptZY3q3KNLUw cuUg== MIME-Version: 1.0 X-Received: by 10.140.109.100 with SMTP id k91mr3928406qgf.12.1396385624139; Tue, 01 Apr 2014 13:53:44 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.50.143 with HTTP; Tue, 1 Apr 2014 13:53:44 -0700 (PDT) In-Reply-To: <533A2285.2030705@FreeBSD.org> References: <201403261122.43541.jhb@freebsd.org> <5333F020.8000200@FreeBSD.org> <201403271221.29864.jhb@freebsd.org> <533A2285.2030705@FreeBSD.org> Date: Tue, 1 Apr 2014 13:53:44 -0700 X-Google-Sender-Auth: FwPoWENgEpQ-YFcqQH2Pky5YhDo Message-ID: Subject: Re: Re: UDP Lite support From: Adrian Chadd To: Kevin Lo Content-Type: text/plain; charset=ISO-8859-1 Cc: Joe Nosay , Brooks Davis , freebsd-current , Xin LI 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 20:53:45 -0000 Hi! On 31 March 2014 19:20, Kevin Lo wrote: > > 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. I've just briefly review this. I recommend turning the places where you do this: + pcbinfo = (pr == IPPROTO_UDP) ? &V_udbinfo : &V_ulitecbinfo; .. into some inline function which returns the correct pcbinfo based on what 'pr' is. That way if someone wants to add another derivative UDP handler they won't have to go and change those conditionals to yet another set of nested conditionals. Same for: + pcblist = (pr == IPPROTO_UDP) ? &V_udb : &V_ulitecb; Other than that, it looks good. -a