From owner-freebsd-net@FreeBSD.ORG Fri Mar 20 18:55:53 2015 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB4673E2; Fri, 20 Mar 2015 18:55:53 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A9992905; Fri, 20 Mar 2015 18:55:53 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 439851FE022; Fri, 20 Mar 2015 19:55:51 +0100 (CET) Message-ID: <550C6D65.6070409@selasky.org> Date: Fri, 20 Mar 2015 19:56:37 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: Fragment questions References: <522774578.25519037.1426765109046.JavaMail.zimbra@stormshield.eu> <550AC709.1050404@selasky.org> <2047974073.25663527.1426858267777.JavaMail.zimbra@stormshield.eu> <550C5FC6.6020401@selasky.org> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: Emeric POUPON , freebsd-net X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Mar 2015 18:55:54 -0000 On 03/20/15 19:02, Adrian Chadd wrote: > On 20 March 2015 at 10:58, Hans Petter Selasky wrote: >> On 03/20/15 14:31, Emeric POUPON wrote: >>> >>> - in the ip_newid macro, we do "htons(V_ip_id++))" if we do not use >>> randomized id. >> >>> In multi core systems, we may emit successive packets with the same id. >> >> Will using a mutex or an atomic macro fix this issue when incrementing the >> V_ip_id ? > > It will, but it'll ping-pong between multiple cores and slow things > down at high pps. > Hi, Maybe we can have the V_ip_id per CPU and use the lower 8-bits as random CPU core number? OK? --HPS