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
________________________________ From: Andre Oppermann <andre@freebsd.org> To: Adrian Chadd <adrian@freebsd.org> Cc: Barney Cordoba <barney_cordoba@yahoo.com>; Luigi Rizzo <rizzo@iet.unipi.it>; "freebsd-net@freebsd.org" <freebsd-net@freebsd.org> Sent: Wednesday, August 21, 2013 2:19 PM Subject: Re: it's the output, not ack coalescing (Re: TSO and FreeBSD vs Linux) On 18.08.2013 23:54, Adrian Chadd wrote: > Hi, > > I think the "UNIX architecture" is a bit broken for anything other than the > occasional (for various traffic levels defining "occasional!") traffic > connection. It's serving us well purely through the sheer force of will of > modern CPU power but I think we can do a lot better. I do not agree with you here. The UNIX architecture is fine but of course as with anything you're not going to get the full raw and theoretically possible performance for every special case out of it. It is extremely versatile and performs rather good over a broad set of applications. > _I_ think the correct model is a netmap model - batched packet handling, > lightweight drivers pushing and pulling batches of things, with some > lightweight plugins to service that inside the kernel and/or push into the > netmap ring buffer in userland. Interfacing into the ethernet and socket > layer should be something that bolts on the side, kind of netgraph style. > It would likely look a lot more like a switching backplane with socket IO > being one of many processing possibilities. If socket IO stays packet at a > time than great; but that's messing up the ability to do a lot of other > interesting things. Sure, lets go back to MS-DOS with interrupt wedges. First of all, the "Unix model" has long been abandoned. System V Streams and all that classroom stuff (which is why I dislike netgraph) proved useless once we got beyond Token Ring. All you heard about in the old days was the OSI model; thank god the OSIs and CCITTs have become little more than noise as people started to really need to do things. How's that ISDN thing working out? As much as I complain, FreeBSD is far superior to other camps in their discipline and conformance to sanity. Play around with linux internals and you see what happens when you build an OS by an undisciplined committee. There's no bigger abortion in computing than the sk_buff. BC 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 120113; 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>
