From owner-freebsd-net@FreeBSD.ORG Wed Aug 21 18:54:08 2013 Return-Path: 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 ABCA1AB7 for ; Wed, 21 Aug 2013 18:54:08 +0000 (UTC) (envelope-from barney_cordoba@yahoo.com) Received: from nm16-vm6.bullet.mail.ne1.yahoo.com (nm16-vm6.bullet.mail.ne1.yahoo.com [98.138.91.109]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5B35921EF for ; Wed, 21 Aug 2013 18:54:08 +0000 (UTC) Received: from [98.138.101.132] by nm16.bullet.mail.ne1.yahoo.com with NNFMP; 21 Aug 2013 18:51:18 -0000 Received: from [98.138.89.195] by tm20.bullet.mail.ne1.yahoo.com with NNFMP; 21 Aug 2013 18:51:17 -0000 Received: from [127.0.0.1] by omp1053.mail.ne1.yahoo.com with NNFMP; 21 Aug 2013 18:51:17 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 956128.50519.bm@omp1053.mail.ne1.yahoo.com Received: (qmail 44086 invoked by uid 60001); 21 Aug 2013 18:51:17 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1377111077; bh=G3cMZR91hNMleO96dwjKIKJP2wCxxaoZ9OjEdl4RHY8=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=GiT7YBQ5v0HApvh7QmH0NKgEUyHjMcvZ2TJYAmGkR46YynZDw3SmUro2O6IRh2nzs3mRijh6B3MDj6+D6fPWNMU+Rh0EzkKNf3oZ0GZWtXR/Xu/feAe70v/sj6o0DvaYXKbHNi7edFp9iGYRhv3AblFrBRnRGqs/oIYFIL92spA= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=FFaeVgAf7rcvDp5HemtJEH5aKmQhGo4OTXGTyk7iXG3fE6d5xBNXRZTIEoikMSfCNt7L64OioeWr41BGHEyTo/9qUs96AoUhfdMSIqx1FHDaGmAiHlIqGYAjinDFLyYbndtZllkm3C8iYEBmSqVU4T39xf8zae3fE66SpV+2df8=; X-YMail-OSG: F7FUIW0VM1ni4VWVlz8BjEQQanLcEi4UHakH._ayn6kE3b8 cbUg_j7dOO8Dw3yAaUJ_hnJ6f_Uqg3a4n0R9hqxOj5MXL7pOr7OwhZWwTF_2 v_QepRjmcAdCOckNlg20_gbPOn2G.szpz3YforqjS2rwB7K.6FtiwKnhAa5C 3w0fTZjAWO.A6tCZ6f018va4t_VaWnunkWCxF0xZh4MwGXsvcmP2h9y2Yw5N qDT1FQxl9G0hDHg7.LFsJfb_b3bEkm1xpW8PIicHt2ODDJfekpGk5GquMJMR LuAXtqBFicOGdbA7Qno9r3O8XZngDHl20L9vYu4wlk0pUAuFeQSjowtusNnr BUQ8W9uwUVmyHBhEHS9JB8_2udpyNTMz_n5zKvSvmCisiAG6uDL5Fk9b6uKq eJNrKy1D8dsXTqycZSIwoJmKLnj2bZu9lrIl22SlAlvLlhcjcsOotLk_6Gjn pBI0LhsyB7yTAABjm8tEuR3nXeJ3_zawT.JMwJk_E.9VIGwj6XmbfySCT6I3 upuGrdKTXMbbKvuM..EqmNFkvcrnGhrtCSoYCzX4KE12SZfjm8XVyMaZ3LEQ NyJ1wTthR4uJpEXkzaEHT1uotiEht3gg.2FOmvlKrTw-- Received: from [98.203.118.124] by web121606.mail.ne1.yahoo.com via HTTP; Wed, 21 Aug 2013 11:51:17 PDT X-Rocket-MIMEInfo: 002.001, CgoKCl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCiBGcm9tOiBBbmRyZSBPcHBlcm1hbm4gPGFuZHJlQGZyZWVic2Qub3JnPgpUbzogQWRyaWFuIENoYWRkIDxhZHJpYW5AZnJlZWJzZC5vcmc.IApDYzogQmFybmV5IENvcmRvYmEgPGJhcm5leV9jb3Jkb2JhQHlhaG9vLmNvbT47IEx1aWdpIFJpenpvIDxyaXp6b0BpZXQudW5pcGkuaXQ.OyAiZnJlZWJzZC1uZXRAZnJlZWJzZC5vcmciIDxmcmVlYnNkLW5ldEBmcmVlYnNkLm9yZz4gClNlbnQ6IFdlZG5lc2RheSwgQXVndXN0IDIxLCAyMDEzIDI6MTkBMAEBAQE- X-Mailer: YahooMailWebService/0.8.155.576 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> <1376833738.94737.YahooMailNeo@web121605.mail.ne1.yahoo.com> <71EA3DFB-B410-432D-98E0-B6341556BE6D@netgate.com> <1376851152.3322.YahooMailNeo@web121606.mail.ne1.yahoo.com> <1376859717.20232.YahooMailNeo@web121605.mail.ne1.yahoo.com> <521504BC.6030205@freebsd.org> Message-ID: <1377111077.43981.YahooMailNeo@web121606.mail.ne1.yahoo.com> Date: Wed, 21 Aug 2013 11:51:17 -0700 (PDT) From: Barney Cordoba Subject: Re: it's the output, not ack coalescing (Re: TSO and FreeBSD vs Linux) To: Andre Oppermann , Adrian Chadd In-Reply-To: <521504BC.6030205@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "freebsd-net@freebsd.org" , Luigi Rizzo X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Barney Cordoba List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Aug 2013 18:54:08 -0000 =0A=0A=0A=0A________________________________=0A From: Andre Oppermann =0ATo: Adrian Chadd =0ACc: Barney Cordob= a ; Luigi Rizzo ; "freebsd-ne= t@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: 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 ; 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: Subject: Re: CFR: FIB handling improvements From: Alan Somers To: Hiroki Sato Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-net@freebsd.org, Will Andrews , "Justin T. Gibbs" , Alan Somers X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Aug 2013 19:06:54 -0000 On Wed, Aug 21, 2013 at 12:20 PM, Hiroki Sato wrote: > Will Andrews wrote > in : > > 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 >