From owner-freebsd-net@FreeBSD.ORG Fri Mar 20 18:02:03 2015 Return-Path: <owner-freebsd-net@FreeBSD.ORG> Delivered-To: freebsd-net@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 469942ED for <freebsd-net@freebsd.org>; Fri, 20 Mar 2015 18:02:03 +0000 (UTC) Received: from mail-ie0-x234.google.com (mail-ie0-x234.google.com [IPv6:2607:f8b0:4001:c03::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0AABBB for <freebsd-net@freebsd.org>; Fri, 20 Mar 2015 18:02:03 +0000 (UTC) Received: by ieclw3 with SMTP id lw3so98613065iec.2 for <freebsd-net@freebsd.org>; Fri, 20 Mar 2015 11:02:02 -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:message-id:subject :from:to:cc:content-type; bh=a7wpNn3FWAzTW/SjH5DiXHWCpu8sDlBOx/41ag+6XpY=; b=VJ06D1ujraNidug+kdmktpivmRiis90B7LoR45JsRPHVZPmWB33c7YIxu0XBWaXC29 CN9/q+OXyiSafdDrRQ9iKOomxzt5ToZOgsSei1lYUYQgUDBBUVBOkv8sOrMS7RCj7JiI ZedsOSwtOvqDqsctgHcKU3srzsYgUy/e6xURJgbc7HGqUjx4tIbkmJ/QNMA0RyHfC4Tk E6ica24zYjCQ22fqDxw6BO7DOmDrdB1NataK5jbirrG6hmabq5bdoTavSMbX0sGB/pAN 6PlwTQ0JQGmm0esN8dMzNt8pmofWrx6zcnJn1ZdPG/oV2QNJeDpIxjRBgEw0Fq8B966r lUpA== MIME-Version: 1.0 X-Received: by 10.50.67.100 with SMTP id m4mr7230763igt.32.1426874522333; Fri, 20 Mar 2015 11:02:02 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.17.194 with HTTP; Fri, 20 Mar 2015 11:02:02 -0700 (PDT) In-Reply-To: <550C5FC6.6020401@selasky.org> References: <522774578.25519037.1426765109046.JavaMail.zimbra@stormshield.eu> <550AC709.1050404@selasky.org> <2047974073.25663527.1426858267777.JavaMail.zimbra@stormshield.eu> <550C5FC6.6020401@selasky.org> Date: Fri, 20 Mar 2015 11:02:02 -0700 X-Google-Sender-Auth: eFK37e_GJZCtC4cM70pUHUtxJLo Message-ID: <CAJ-Vmo=LkFc4sqbBSVeLE=7adV1nCuRDUO4ECUv8r6EYp=Oezw@mail.gmail.com> Subject: Re: Fragment questions From: Adrian Chadd <adrian@freebsd.org> To: Hans Petter Selasky <hps@selasky.org> Content-Type: text/plain; charset=UTF-8 Cc: Emeric POUPON <emeric.poupon@stormshield.eu>, freebsd-net <freebsd-net@freebsd.org> X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD <freebsd-net.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/options/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: Fri, 20 Mar 2015 18:02:03 -0000 On 20 March 2015 at 10:58, Hans Petter Selasky <hps@selasky.org> 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. -a