Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Mar 2015 17:45:20 +0000
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        John-Mark Gurney <jmg@funkthat.com>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff <glebius@freebsd.org>, src-committers <src-committers@freebsd.org>
Subject:   Re: svn commit: r280759 - head/sys/netinet
Message-ID:  <CCF2D383-E17B-4A3A-BFB8-F39FA9DAFDBC@FreeBSD.org>
In-Reply-To: <20150328172313.GC51048@funkthat.com>
References:  <201503271326.t2RDQxd3056112@svn.freebsd.org> <20150328083443.GV64665@FreeBSD.org> <20150328172313.GC51048@funkthat.com>

next in thread | previous in thread | raw e-mail | index | archive | help

> On 28 Mar 2015, at 17:23 , John-Mark Gurney <jmg@funkthat.com> wrote:
>=20
> Gleb Smirnoff wrote this message on Sat, Mar 28, 2015 at 11:34 +0300:
>> On Fri, Mar 27, 2015 at 01:26:59PM +0000, Fabien Thomas wrote:
>> F> Author: fabient
>> F> Date: Fri Mar 27 13:26:59 2015
>> F> New Revision: 280759
>> F> URL: https://svnweb.freebsd.org/changeset/base/280759
>> F>=20
>> F> Log:
>> F>   On multi CPU systems, we may emit successive packets with the =
same id.
>> F>   Fix the race by using an atomic operation.
>> F>  =20
>> F>   Differential Revision:	https://reviews.freebsd.org/D2141
>> F>   Obtained from:	emeric.poupon@stormshield.eu
>> F>   MFC after:	1 week
>> F>   Sponsored by:	Stormshield
>>=20
>> The D2141 says that benchmarking were done in presence of IPSEC, =
which
>> of course is the bottleneck and performance of this instruction can't
>> be benchmarked in its presence. Anyway, I believe that results of
>> right benchmark would still show little difference between atomic and
>> non-atomic increment of a shared value.
>>=20
>> I think we can use per-cpu ID counters, each CPU incrementing its
>> own. If we start with random values, then probability of two packets =
with
>> the same ID emitting at the allowed timeframe will be acceptably =
small.
>=20
> Please do not use per-cpu id counters.. That will just push the
> duplicate ids to being more rare, but just as much of a problem...
>=20
> Please read:
> https://tools.ietf.org/html/rfc6864
>=20
> And then implement one hased upon source/dest/protocol=E2=80=A6


and if someone is interested in reviving this as well (read the old =
thread from then on net@)

https://people.freebsd.org/~bz/20110313-01-rfc6056.diff


=E2=80=94=20
Bjoern A. Zeeb                                  Charles Haddon Spurgeon:
"Friendship is one of the sweetest joys of life.  Many might have failed
 beneath the bitterness of their trial  had they not found a friend."




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CCF2D383-E17B-4A3A-BFB8-F39FA9DAFDBC>