From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <thomas.monjalon@6wind.com>
Received: from mail-wg0-f48.google.com (mail-wg0-f48.google.com [74.125.82.48])
 by dpdk.org (Postfix) with ESMTP id 790F9556D
 for <dev@dpdk.org>; Mon,  3 Nov 2014 13:50:21 +0100 (CET)
Received: by mail-wg0-f48.google.com with SMTP id m15so5607237wgh.35
 for <dev@dpdk.org>; Mon, 03 Nov 2014 04:59:35 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:organization
 :user-agent:in-reply-to:references:mime-version
 :content-transfer-encoding:content-type;
 bh=CGo5u6Pe5wUBURzfdn6bTTrCm7eWFXPxJzcPTdHzews=;
 b=YY2kxBSn364AkBr/Vg6YmE+9zrkryvyYWLM/dTxIUecoJ6rVjdjTN7Ryc6g8F7V/2c
 XBSIy+jOtZEB1aHCTRkVi/7YZFWxpEyELAdHD8AVKuMpsTGiGIcHxT9amP4vJbP0HYs4
 BxvOyGif3bFRbg56d46cGuKiSJQ5k6Yh6/I8Ceim6GRlkqLEO9KNpOukaxt8sKB8+pIp
 HHvBBINNd1wdCPdZETyAN617cLfRGRBJk5IA1RlRs0fhjF2T1y4x67k3XFKVxLM17nhZ
 zRIrQKDf4eIiopuPI6CZCIwOY5gNII3NVbGqd+APjQtWW1o00jvc1Za8pV728th8FHec
 INYg==
X-Gm-Message-State: ALoCoQl9IYFBxEeKPp9nJDgxBE/SkpeHUZXTpMKcxrrdiamcclc/iqiVcugRoLg8QNRAT+qo+dzF
X-Received: by 10.194.192.161 with SMTP id hh1mr49238703wjc.72.1415019575115; 
 Mon, 03 Nov 2014 04:59:35 -0800 (PST)
Received: from xps13.localnet (guy78-3-82-239-227-177.fbx.proxad.net.
 [82.239.227.177])
 by mx.google.com with ESMTPSA id n4sm21767599wjb.40.2014.11.03.04.59.33
 for <multiple recipients>
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Mon, 03 Nov 2014 04:59:34 -0800 (PST)
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 03 Nov 2014 13:59:16 +0100
Message-ID: <2987294.1LlcqdoeYZ@xps13>
Organization: 6WIND
User-Agent: KMail/4.14.2 (Linux/3.17.1-1-ARCH; KDE/4.14.2; x86_64; ; )
In-Reply-To: <20141103124732.GB4840@bricha3-MOBL3>
References: <1415013076-30314-1-git-send-email-bruce.richardson@intel.com>
 <CALwxeUvZvztFv915kZkAFZP1F4535m6SLmXTyfN+M-wTKGJ4PQ@mail.gmail.com>
 <20141103124732.GB4840@bricha3-MOBL3>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] ixgbe: fix icc issue with mbuf initializer
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Mon, 03 Nov 2014 12:50:21 -0000

2014-11-03 12:47, Bruce Richardson:
> On Mon, Nov 03, 2014 at 01:31:10PM +0100, David Marchand wrote:
> > On Mon, Nov 3, 2014 at 12:11 PM, Bruce Richardson <
> > > +#ifdef RTE_MBUF_REFCNT
> > > +       mb_def.refcnt = 1;
> > > +#endif
> > 
> > I would expect we use rte_mbuf_refcnt_set / rte_mbuf_refcnt_read to access
> > this "refcnt" field.
> > This api handles both RTE_MBUF_REFCNT_ATOMIC and ! RTE_MBUF_REFCNT_ATOMIC
> > configs.
> > But I suppose this is fine at init time (since the union will initialize
> > properly the field).
> 
> It's a good point, I'll update patch to use the appropriate macro which will clean up the code a bit.

> > By the way, why do we have this RTE_MBUF_REFCNT_ATOMIC option ?
> > From my point of view, there is not much use of a refcnt that is not atomic
> > :-).

Bruce, I think it's a good question but you didn't answer.
Maybe we should remove this option to keep only atomic mode.

-- 
Thomas