From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 17:46:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5103528; Sat, 28 Mar 2015 17:46:00 +0000 (UTC) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 64932F3A; Sat, 28 Mar 2015 17:46:00 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id B2F6D25D37D1; Sat, 28 Mar 2015 17:45:56 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id D5E49C77058; Sat, 28 Mar 2015 17:45:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id j_oOoFXc2a_T; Sat, 28 Mar 2015 17:45:54 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:b88f:8a06:70f:7ed3] (unknown [IPv6:fde9:577b:c1a9:4410:b88f:8a06:70f:7ed3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 0BBA7C7700C; Sat, 28 Mar 2015 17:45:52 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r280759 - head/sys/netinet From: "Bjoern A. Zeeb" In-Reply-To: <20150328172313.GC51048@funkthat.com> Date: Sat, 28 Mar 2015 17:45:20 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201503271326.t2RDQxd3056112@svn.freebsd.org> <20150328083443.GV64665@FreeBSD.org> <20150328172313.GC51048@funkthat.com> To: John-Mark Gurney X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , src-committers X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 17:46:00 -0000 > On 28 Mar 2015, at 17:23 , John-Mark Gurney 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."