Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Apr 2014 13:53:44 -0700
From:      Adrian Chadd <adrian@freebsd.org>
To:        Kevin Lo <kevlo@freebsd.org>
Cc:        Joe Nosay <superbisquit@gmail.com>, Brooks Davis <brooks@freebsd.org>, freebsd-current <freebsd-current@freebsd.org>, Xin LI <d@delphij.net>
Subject:   Re: Re: UDP Lite support
Message-ID:  <CAJ-VmondoAHF2YJtS_Zt11aP00oc91=AO02qdOHDABoJM7PAEw@mail.gmail.com>
In-Reply-To: <533A2285.2030705@FreeBSD.org>
References:  <CA%2BWntOugdnjM1SvFcEtWb8=heQCOBs2-c97EUKsfEHSmi1HRSw@mail.gmail.com> <201403261122.43541.jhb@freebsd.org> <5333F020.8000200@FreeBSD.org> <201403271221.29864.jhb@freebsd.org> <533A2285.2030705@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi!

On 31 March 2014 19:20, Kevin Lo <kevlo@freebsd.org> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmondoAHF2YJtS_Zt11aP00oc91=AO02qdOHDABoJM7PAEw>