From owner-freebsd-net@FreeBSD.ORG Tue Apr 2 09:20:26 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C120FF87 for ; Tue, 2 Apr 2013 09:20:26 +0000 (UTC) (envelope-from Jean@femrice.com) Received: from mail.mail72.cn4e.com (mail.mail72.cn4e.com [218.107.207.72]) by mx1.freebsd.org (Postfix) with ESMTP id 6E390282 for ; Tue, 2 Apr 2013 09:20:25 +0000 (UTC) Received: from WK (localhost.localdomain [127.0.0.1]) by mail.mail72.cn4e.com (Postfix) with SMTP id 65D8160021D for ; Tue, 2 Apr 2013 17:20:23 +0800 (CST) Received: from WK (unknown [218.11.179.167]) by mail.mail72.cn4e.com (Postfix) with ESMTPA for ; Tue, 2 Apr 2013 17:20:23 +0800 (CST) Date: Tue, 2 Apr 2013 17:20:26 +0800 From: Jean To: freebsd-net Subject: SFP/SFP+ , PCI Express Gigabit Ethernet NIC Card supplier, 10G NIC, Server Adapter Intel chipsets X-Priority: 3 X-Message-Flag: =?gb2312?B?x+u72Li0?= X-GUID: 588EE3E1-1BFE-4329-A850-80000EA919D0 X-Has-Attach: no X-Mailer: Foxmail 7.0.1.91[cn] Mime-Version: 1.0 Message-ID: <2013040217202471867312@femrice.com> Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Jean List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Apr 2013 09:20:26 -0000 SGVsbG8sDQoNCg0KSSBhbSBqZWFuIGFuZCB2ZXJ5IGdsYWQgdG8ga25vdyB5b3UgZnJvbSBHb29n bGUgd2Vic2l0ZSAuQ2hlY2tlZCB5b3VyIHdlYnNpdGUgYW5kIG1heW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BSD.ORG Tue Apr 2 13:01: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]) by hub.freebsd.org (Postfix) with ESMTP id 758405CE; Tue, 2 Apr 2013 13:01:54 +0000 (UTC) (envelope-from sodynet1@gmail.com) Received: from mail-pb0-f53.google.com (mail-pb0-f53.google.com [209.85.160.53]) by mx1.freebsd.org (Postfix) with ESMTP id 4576613F; Tue, 2 Apr 2013 13:01:54 +0000 (UTC) Received: by mail-pb0-f53.google.com with SMTP id un15so227143pbc.40 for ; Tue, 02 Apr 2013 06:01:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=zZEydzkkzeTMv1LAKcwI8cxUO69QGnm9d0gcm2iQgvI=; b=GBEEs9p1we6ux8ojpxDb8CL4lMYfEcTE5jnKNJivdynOrfh4wIL5bFWjOYE9Dv/UzX c3MvJEc4kNSkbuiLQHrijVIdapQ7ktUYWhtaKiymw9EkMpTezkqHds1mICBsvHGwoZuN +CHJPoY2CCinUqAvKkh2MbrDfzvLak4N/HTiL9a/5+mK1R9jon7aPcjwi5inUJ8BCFqt S5p8r6fSaDuGW7pnmvsuf5I0Sng6HGZTz/yM8yGxD7gJemJV8uqoN4MCZ1cZdWhVau1+ 8Q69hpoKXXWBvqG4f8aLPfwo9KJUi+yvjmi1C5buGY54kZNHxdsurhjJHvwJnfXwTk3I vJ7w== MIME-Version: 1.0 X-Received: by 10.68.243.98 with SMTP id wx2mr24531069pbc.68.1364907707855; Tue, 02 Apr 2013 06:01:47 -0700 (PDT) Received: by 10.70.34.103 with HTTP; Tue, 2 Apr 2013 06:01:47 -0700 (PDT) In-Reply-To: References: <5146121B.5080608@FreeBSD.org> <514649A5.4090200@freebsd.org> <3659B942-7C37-431F-8945-C8A5BCD8DC67@ipfw.ru> <51471974.3090300@freebsd.org> Date: Tue, 2 Apr 2013 16:01:47 +0300 Message-ID: Subject: Re: MPLS From: Sami Halabi To: Sepherosa Ziehau Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "Alexander V. Chernikov" , Andre Oppermann , "Alexander V. Chernikov" , "freebsd-net@freebsd.org" 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: Tue, 02 Apr 2013 13:01:54 -0000 >At least, the per-CPU netisr and other related per-CPU network stuffs >(e.g. routing table) work quite well as we have _expected_ (the >measured bi-directional IPv4 forwarding performance w/ fastforwarding >is 5.6Mpps+, w/o fastforwarding 4.6Mpps+ are you talking about the work Luigi did with Netmap? or performance out of the box in GENERIC? Sami On Tue, Apr 2, 2013 at 9:16 AM, Sepherosa Ziehau wrote: > On Mon, Mar 18, 2013 at 9:41 PM, Andre Oppermann > wrote: > > On 18.03.2013 13:20, Alexander V. Chernikov wrote: > >> > >> On 17.03.2013, at 23:54, Andre Oppermann wrote: > >> > >>> On 17.03.2013 19:57, Alexander V. Chernikov wrote: > >>>> > >>>> On 17.03.2013 13:20, Sami Halabi wrote: > >>>>>> > >>>>>> ITOH OpenBSD has a complete implementation of MPLS out of the box, > >>>>>> maybe > >>>> > >>>> Their control plane code is mostly useless due to design approach > >>>> (routing daemons talk via kernel). > >>> > >>> > >>> What's your approach? > >> > >> It is actually not mine. We have discussed this a bit in radix-related > >> thread. Generally quagga/bird (and other hiperf hardware-accelerated and > >> software routers) have feature-rich RIb from which best routes (possibly > >> multipath) are installed to kernel/fib. Kernel main task should be to do > >> efficient lookups while every other advanced feature should be > implemented > >> in userland. > > > > > > Yes, we have started discussing it but haven't reached a conclusion among > > the > > two philosophies. We have also agreed that the current radix code is > > horrible > > in terms of cache misses per lookup. That however doesn't preclude an > > agnostic > > FIB+RIB approach. It's mostly a matter of structure layout to keep it > > efficient. > > > > > >>>> Their data plane code, well.. Yes, we can use some defines from their > >>>> headers, but that's all :) > >>>>>> > >>>>>> porting it would be short and more straight forward than porting > linux > >>>>>> LDP > >>>>>> implementation of BIRD. > >>>> > >>>> > >>>> It is not 'linux' implementation. LDP itself is cross-platform. > >>>> The most tricky place here is control plane. > >>>> However, making _fast_ MPLS switching is tricky too, since it requires > >>>> chages in our netisr/ethernet > >>>> handling code. > >>> > >>> > >>> Can you explain what changes you think are necessary and why? > > > >> > >> > >> We definitely need ability to dispatch chain of mbufs - this was already > >> discussed in intel rx ring lock thread in -net. > > > > > > Actually I'm not so convinced of that. Packet handling is a tradeoff > > between > > doing process-to-completion on each packet and doing context switches on > > batches > > of packets. > > > > Every few years the balance tilts forth and back between > > process-to-completion > > and batch processing. DragonFly went with a batch-lite token-passing > > approach > > throughout their kernel. It seems it didn't work out to the extent they > > expected. > > Now many parts are moving back to the more traditional locking approach. > > At least, the per-CPU netisr and other related per-CPU network stuffs > (e.g. routing table) work quite well as we have _expected_ (the > measured bi-directional IPv4 forwarding performance w/ fastforwarding > is 5.6Mpps+, w/o fastforwarding 4.6Mpps+, w/ 4 igb(4) on i7-2600, > using 90% cpu time on each HT in Dfly's polling(4) mode); it is _not_ > using traditional locking approach on major network paths at all and > for IPv4 forwarding Dfly is _not_ doing "process-to-completion". > > And as a side note: There was a paper compared the message-based > parallelism TCP implementation, connection-based thread serialization > TCP implementaion (Dfly is using) and connection-based lock > serialization TCP implementation. The conclusion was connection-based > thread serialization TCP implementation (Dfly is using) had too many > scheduling cost. The paper's conclusion _no longer_ holds for Dfly > nowadays; we have wiped out major scheduling cost on the hot TCP > paths. So as far as I could see, its _not_ the problem of the model > itself sometimes, but how the model should be implemented. > > Best Regards, > sephe > > -- > Tomorrow Will Never Die > -- Sami Halabi Information Systems Engineer NMS Projects Expert FreeBSD SysAdmin Expert