Date: Wed, 21 Aug 2013 11:51:17 -0700 (PDT) From: Barney Cordoba <barney_cordoba@yahoo.com> To: Andre Oppermann <andre@freebsd.org>, Adrian Chadd <adrian@freebsd.org> Cc: "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>, Luigi Rizzo <rizzo@iet.unipi.it> Subject: Re: it's the output, not ack coalescing (Re: TSO and FreeBSD vs Linux) Message-ID: <1377111077.43981.YahooMailNeo@web121606.mail.ne1.yahoo.com> In-Reply-To: <521504BC.6030205@freebsd.org> References: <520A6D07.5080106@freebsd.org> <520AFBE8.1090109@freebsd.org> <520B24A0.4000706@freebsd.org> <520B3056.1000804@freebsd.org> <20130814102109.GA63246@onelab2.iet.unipi.it> <1376745244.6575.YahooMailNeo@web121606.mail.ne1.yahoo.com> <1376748170.66110.YahooMailNeo@web121601.mail.ne1.yahoo.com> <CAJ-VmonGeqn5qqbfvF9xWaFPYNMNSVb6VwMx%2BoEVSGXVid98ag@mail.gmail.com> <1376833738.94737.YahooMailNeo@web121605.mail.ne1.yahoo.com> <71EA3DFB-B410-432D-98E0-B6341556BE6D@netgate.com> <CAJ-Vmo=0OX=_6cO_pZ45XrvfQzb%2BNVms00LUo5oRriZWUMBx%2Bg@mail.gmail.com> <1376851152.3322.YahooMailNeo@web121606.mail.ne1.yahoo.com> <CAJ-VmokPhxAe1CAVqfKDJhssqg0VaUZT4hRPNB9gigECebh7VA@mail.gmail.com> <1376859717.20232.YahooMailNeo@web121605.mail.ne1.yahoo.com> <CA%2BhQ2%2Bips=QUeyK3bwMQhc8yPavMzd3i-3YDjksy4hEVNBR%2BXA@mail.gmail.com> <CAJ-Vmokpvvis-vvtSiQXzk_UXwKwf9kEex_6J6Vb0Y8nSF0QGw@mail.gmail.com> <521504BC.6030205@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
=0A=0A=0A=0A________________________________=0A From: Andre Oppermann <andr= e@freebsd.org>=0ATo: Adrian Chadd <adrian@freebsd.org> =0ACc: Barney Cordob= a <barney_cordoba@yahoo.com>; Luigi Rizzo <rizzo@iet.unipi.it>; "freebsd-ne= t@freebsd.org" <freebsd-net@freebsd.org> =0ASent: Wednesday, August 21, 201= 3 2:19 PM=0ASubject: Re: it's the output, not ack coalescing (Re: TSO and F= reeBSD vs Linux)=0A =0A=0AOn 18.08.2013 23:54, Adrian Chadd wrote:=0A> Hi,= =0A>=0A> I think the "UNIX architecture" is a bit broken for anything other= than the=0A> occasional (for various traffic levels defining "occasional!"= ) traffic=0A> connection. It's serving us well purely through the sheer for= ce of will of=0A> modern CPU power but I think we can do a lot better.=0A= =0AI do not agree with you here.=A0 The UNIX architecture is fine but of co= urse=0Aas with anything you're not going to get the full raw and theoretica= lly=0Apossible performance for every special case out of it.=A0 It is extre= mely=0Aversatile and performs rather good over a broad set of applications.= =0A=0A> _I_ think the correct model is a netmap model - batched packet hand= ling,=0A> lightweight drivers pushing and pulling batches of things, with s= ome=0A> lightweight plugins to service that inside the kernel and/or push i= nto the=0A> netmap ring buffer in userland. Interfacing into the ethernet a= nd socket=0A> layer should be something that bolts on the side, kind of net= graph style.=0A> It would likely look a lot more like a switching backplane= with socket IO=0A> being one of many processing possibilities. If socket I= O stays packet at a=0A> time than great; but that's messing up the ability = to do a lot of other=0A> interesting things.=0A=0ASure, lets go back to MS-= DOS with interrupt wedges.=0A=0AFirst of all, the "Unix model" has long bee= n abandoned. System V Streams=0Aand all that classroom stuff (which is why = I dislike netgraph) proved useless=0Aonce we got beyond Token Ring. All you= heard about in the old days was=0Athe OSI model; thank god the OSIs and CC= ITTs have become little more=A0=0Athan noise as people started to really ne= ed to do things. How's that ISDN=0Athing working out?=0A=0AAs much as I com= plain, FreeBSD is far superior to other camps in their=0Adiscipline and con= formance to sanity. Play around with linux internals and=0Ayou see what hap= pens when you build an OS by an undisciplined committee.=0AThere's no bigge= r abortion in computing than the sk_buff.=0A=0ABC From owner-freebsd-net@FreeBSD.ORG Wed Aug 21 19:06:54 2013 Return-Path: <owner-freebsd-net@FreeBSD.ORG> Delivered-To: freebsd-net@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 ESMTP id 99E2F2AD; Wed, 21 Aug 2013 19:06:54 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-qa0-x22c.google.com (mail-qa0-x22c.google.com [IPv6:2607:f8b0:400d:c00::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2862A22EA; Wed, 21 Aug 2013 19:06:54 +0000 (UTC) Received: by mail-qa0-f44.google.com with SMTP id hu16so626459qab.3 for <multiple recipients>; Wed, 21 Aug 2013 12:06:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:cc:content-type; bh=qRu8/LdCo5hNOmy9oWDnBJdzX+NGfNQwrXRe6TQJEZk=; b=Yp4zWq/Fv1CWu9ZhrsOWxGWceZy8svBeHnuCma9IFJ4pjsNGZsK9ekS0lVSi/U+BaI sfzZURBqQ+aZXrCnBhzp8uhd269femN8YUwOjrEvP1UI+zYssmN9oexdtYe/kW3qNhwk 2+5+US5kVfKNZbuhNsDzyIqkDHnj8wg2id2fK+i21pgY8CgThoc4XFxxziatnsBxnkNN ef1CTh3/x6wcn1hyDaBDG7X1Ui5I11IFqETgchLZJiDm23HQgaxtVhocKWGXZBcjLk+G DBxRkigX8WK+iIsTJ9C1geWyNg+JwaxZEspklY0HpnGm4XCbOiDdMqHtk+IdXJwUPVZW Km4Q== MIME-Version: 1.0 X-Received: by 10.49.12.38 with SMTP id v6mr10930665qeb.62.1377112013326; Wed, 21 Aug 2013 12:06:53 -0700 (PDT) Sender: asomers@gmail.com Received: by 10.49.39.101 with HTTP; Wed, 21 Aug 2013 12:06:53 -0700 (PDT) Date: Wed, 21 Aug 2013 13:06:53 -0600 X-Google-Sender-Auth: d2zw1KXEh1FRt1fKZ2_t7Ofday8 Message-ID: <CAOtMX2jhj-GKxzzRmrWYrB-HNQS68i-JNEkzuvftXB0n8C-hvw@mail.gmail.com> Subject: Re: CFR: FIB handling improvements From: Alan Somers <asomers@freebsd.org> To: Hiroki Sato <hrs@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-net@freebsd.org, Will Andrews <will@firepipe.net>, "Justin T. Gibbs" <gibbs@freebsd.org>, Alan Somers <asomers@freebsd.org> X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD <freebsd-net.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-net>, <mailto:freebsd-net-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-net>; List-Post: <mailto:freebsd-net@freebsd.org> List-Help: <mailto:freebsd-net-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-net>, <mailto:freebsd-net-request@freebsd.org?subject=subscribe> X-List-Received-Date: Wed, 21 Aug 2013 19:06:54 -0000 On Wed, Aug 21, 2013 at 12:20 PM, Hiroki Sato <hrs@freebsd.org> wrote: > Will Andrews <will@firepipe.net> wrote > in <CADBaqmi6c7v8ojry8uViRi9tK18n8_RaDrP+UjvcmEN9guWm3w@mail.gmail.com>: > > wi> Please review: http://people.freebsd.org/~will/fix-fib-issues.1.diff > wi> > wi> This patch includes fixes for several issues relating to FIBs: > wi> > wi> * Use of dhclient with non-zero FIBs. With this patch, it is possible > wi> to use DHCP on a specific interface with a non-zero FIB and have it > wi> work correctly with this rc.conf snippet: > wi> > wi> ifconfig_em1="SYNCDHCP" > wi> dhclient_fib_em1=1 > > I think the target FIB should be handled by dhclient, not in the rc.d > scripts. More specifically, dhclient should call SIOCGIFFIB ioctl to > obtain ifp->if_fib and use it if defined. It allows the following > configuration which is much simpler and reliable: > > ifconfig_em1="fib 1 SYNCDHCP" > I think your proposal would be incompatible with assigning multiple addresses on different fibs to the same interface. An unusual configuration, but valid. With such a configuration, dhclient would need to get its fibnum from the rc scripts instead of using the interface fib as reported by the kernel. In general, I don't think that the interface fib should be used to setup host and subnet routes. > > wi> * Always add loopback routes for non-zero FIBs, for both IPv4 and > wi> IPv6. Arguably, this could be a policy issue, but it is currently > wi> less-than-trivial to specify (in rc.conf) that a route needs to be > wi> applied to every FIB. > > I am not sure why this is needed. Are the loopback host routes > installed into all of the FIBs automatically when lo0 is initialized? > > Even if it is required, get_fibmod() is not necessary. The following > should work: > > # route add -inet 127.0.0.1/8 -iface lo0 -fib all > > wi> * Having two or more FIBs whose interfaces share the same prefix and > wi> netmask. This involves adding fibnum arguments to ifa_ifwithnet() and > wi> ifa_ifwithdstaddr(), and checking it within. > wi> > wi> * Setting the FIB on a network interface. rtinit1() looks it up via > wi> the current process context, so we must be calling setfib(2) from > wi> within ifconfig. > wi> > wi> * Creating & deleting loopback routes now works correctly for > wi> non-default FIBs, by using the interface's FIB instead of always 0. > wi> > wi> Commits would be made on each of these issues separately, but since > wi> they are all related, I thought it would be easier for others to > wi> evaluate them with context. > > The other changes look reasonable to me (but not tested yet). > > -- Hiroki >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1377111077.43981.YahooMailNeo>