From owner-freebsd-net@FreeBSD.ORG  Tue Apr 24 15:05:31 2012
Return-Path: <owner-freebsd-net@FreeBSD.ORG>
Delivered-To: net@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id DBD671065672;
	Tue, 24 Apr 2012 15:05:31 +0000 (UTC)
	(envelope-from kmacybsd@gmail.com)
Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com
	[209.85.160.182])
	by mx1.freebsd.org (Postfix) with ESMTP id 7CFDF8FC0C;
	Tue, 24 Apr 2012 15:05:31 +0000 (UTC)
Received: by ghrr20 with SMTP id r20so518562ghr.13
	for <multiple recipients>; Tue, 24 Apr 2012 08:05:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type;
	bh=XOki2Ujcm/Ff3bqRnDOH7b1BK0QB/Q4ls2I2bjLtX+E=;
	b=EbBWj9+6qAcCq6eFocS+kYmPOylK3W6dtHEX1bN3M8T6m03g+bzMXUfPOCUJP6RIES
	qIoOLdQrjI+OQ/c4HKBJzqQYjQGZ+57m+Oa1yqGriz9Z+8ylvnJ9KteVG2iq1elT6xHL
	bqYBq9Uj8lzoILsVFNGwnXWrwAhmctS26Sw7CVgXsemIYimRcEvS2NmPlHdE3wajuaZ6
	iZ0Yo7+Mezj4CPqzJU2XnVrAHfNh4FqAoydfJC7FROpLZ5Va8eI9BhMw2RA9mYh6uj1U
	tXA4x3N6QVbYU/oD1x1G63V+1XNuYxRQPxuuzPO5mUbKsL+GjKK8i2b/ek7omeK7B0Eq
	ru6A==
MIME-Version: 1.0
Received: by 10.50.156.229 with SMTP id wh5mr10655767igb.28.1335279925083;
	Tue, 24 Apr 2012 08:05:25 -0700 (PDT)
Sender: kmacybsd@gmail.com
Received: by 10.50.129.39 with HTTP; Tue, 24 Apr 2012 08:05:24 -0700 (PDT)
In-Reply-To: <CAHM0Q_OQUJ0E6kPXkPTh0LEYP8yCJjfW8Z_NZ5d-cKyaHW-8AQ@mail.gmail.com>
References: <20120419133018.GA91364@onelab2.iet.unipi.it>
	<4F907011.9080602@freebsd.org>
	<20120419204622.GA94904@onelab2.iet.unipi.it>
	<4F96A7C0.3010909@freebsd.org>
	<20120424140228.GA58809@onelab2.iet.unipi.it>
	<B143A8975061C446AD5E29742C531723C7C16A@pwsvl-excmbx-05.internal.cacheflow.com>
	<CAHM0Q_OQUJ0E6kPXkPTh0LEYP8yCJjfW8Z_NZ5d-cKyaHW-8AQ@mail.gmail.com>
Date: Tue, 24 Apr 2012 17:05:24 +0200
X-Google-Sender-Auth: vJl9uA75cPyj3V4GFsCJthWxp6k
Message-ID: <CAHM0Q_NWbDMHycyX7-Upv4zQ+7W2Qe1fMd+nReoEENJ0KgwmsQ@mail.gmail.com>
From: "K. Macy" <kmacy@freebsd.org>
To: "Li, Qing" <qing.li@bluecoat.com>
Content-Type: text/plain; charset=ISO-8859-1
Cc: Luigi Rizzo <rizzo@iet.unipi.it>,
	"current@freebsd.org" <current@freebsd.org>,
	"net@freebsd.org" <net@freebsd.org>
Subject: Re: Some performance measurements on the FreeBSD network stack
X-BeenThere: freebsd-net@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Networking and TCP/IP with FreeBSD <freebsd-net.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/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: Tue, 24 Apr 2012 15:05:31 -0000

On Tue, Apr 24, 2012 at 5:03 PM, K. Macy <kmacy@freebsd.org> wrote:
> On Tue, Apr 24, 2012 at 4:16 PM, Li, Qing <qing.li@bluecoat.com> wrote:
>>>
>> >From previous tests, the difference between flowtable and
>>>routing table was small with a single process (about 5% or 50ns
>>>in the total packet processing time, if i remember well),
>>>but there was a large gain with multiple concurrent processes.
>>>
>>
>> Yes, that sounds about right when we did the tests a long while ago.
>>
>>>
>>> Removing flowtable increases the cost in ip_output()
>>> (obviously) but also in ether_output() (because the
>>> route does not have a lle entry so you need to call
>>> arpresolve on each packet).
>>>
>>
>> Yup.
>>
>>>
>>> So in revising the route lookup i believe it would be good
>>> if we could also get at once most of the info that
>>> ether_output() is computing again and again.
>>>
>>
>> Well, the routing table no longer maintains any lle info, so there
>> isn't much to copy out the rtentry at the completion of route
>> lookup.
>>
>> If I understood you correctly, you do believe there is a lot of value
>> in Flowtable caching concept, but you are not suggesting we reverting
>> back to having the routing table maintain L2 entries, are you ?
>>
>
>
> One could try a similar conversion of the L2 table to an rmlock
> without copy while lock is held.

Odd .. *with* copy while lock is held.

-Kip