From owner-freebsd-net@FreeBSD.ORG Thu Mar 26 08:30:41 2015 Return-Path: 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 183254DE; Thu, 26 Mar 2015 08:30:41 +0000 (UTC) Received: from work.netasq.com (gwlille.netasq.com [91.212.116.1]) by mx1.freebsd.org (Postfix) with ESMTP id C90ECE4; Thu, 26 Mar 2015 08:30:39 +0000 (UTC) Received: from work.netasq.com (localhost.localdomain [127.0.0.1]) by work.netasq.com (Postfix) with ESMTP id 7B8432700AAA; Thu, 26 Mar 2015 09:30:31 +0100 (CET) Received: from localhost (localhost.localdomain [127.0.0.1]) by work.netasq.com (Postfix) with ESMTP id 54FCF2705193; Thu, 26 Mar 2015 09:30:31 +0100 (CET) Received: from work.netasq.com ([127.0.0.1]) by localhost (work.netasq.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id gsAZhVaEHpoq; Thu, 26 Mar 2015 09:30:31 +0100 (CET) Received: from work.netasq.com (localhost.localdomain [127.0.0.1]) by work.netasq.com (Postfix) with ESMTP id 1C2D62700AAA; Thu, 26 Mar 2015 09:30:31 +0100 (CET) Date: Thu, 26 Mar 2015 09:30:30 +0100 (CET) From: Emeric POUPON To: Hans Petter Selasky Message-ID: <84441657.26248421.1427358630097.JavaMail.zimbra@stormshield.eu> In-Reply-To: <5512BB1A.9070900@selasky.org> References: <522774578.25519037.1426765109046.JavaMail.zimbra@stormshield.eu> <2047974073.25663527.1426858267777.JavaMail.zimbra@stormshield.eu> <550C5FC6.6020401@selasky.org> <550C6D65.6070409@selasky.org> <1776547746.25937476.1427189208729.JavaMail.zimbra@stormshield.eu> <5512BB1A.9070900@selasky.org> Subject: Re: Fragment questions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Thread-Topic: Fragment questions Thread-Index: 1t/wdfcGuh+8K0O/kv+7KqSnuyr/bA== Cc: freebsd-net , Adrian Chadd 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: Thu, 26 Mar 2015 08:30:41 -0000 Ok for the function. Please find the review here: https://reviews.freebsd.org/D2141 Regards, Emeric ----- Mail original ----- De: "Hans Petter Selasky" =C3=80: "Emeric POUPON" , "Adrian Chadd" Cc: "freebsd-net" Envoy=C3=A9: Mercredi 25 Mars 2015 14:41:46 Objet: Re: Fragment questions On 03/24/15 10:26, Emeric POUPON wrote: > Hello, > > Please find attached a proposal using atomic_fetchadd. > > Best Regards, > > Emeric Hi, Your proposal using atomic_fetchadd() looks fine to me. I think however we should define the code like a function, because the=20 htons() might be a macro, referring the input argument multiple times ... What do you think? --HPS