From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier MATZ Subject: Re: [PATCH v2] mbuf: optimize rte_mbuf_refcnt_update Date: Tue, 05 Jan 2016 13:12:35 +0100 Message-ID: <568BB333.9090707@6wind.com> References: <568A7959.7030506@6wind.com> <7f5255b98dcb4f2396ada16d5eb43e5a@XCH-RTP-017.cisco.com> <568BA1A1.2070300@6wind.com> <521c3b8c6a014c24824bb1c5f17dca03@XCH-RTP-017.cisco.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: "dev@dpdk.org" , "Ido Barnea \(ibarnea\)" , "Itay Marom \(imarom\)" To: "Hanoch Haim (hhaim)" , "bruce.richardson@intel.com" Return-path: Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by dpdk.org (Postfix) with ESMTP id 12477935C for ; Tue, 5 Jan 2016 13:12:54 +0100 (CET) Received: by mail-wm0-f43.google.com with SMTP id f206so20651520wmf.0 for ; Tue, 05 Jan 2016 04:12:54 -0800 (PST) In-Reply-To: <521c3b8c6a014c24824bb1c5f17dca03@XCH-RTP-017.cisco.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Hanoch, On 01/05/2016 12:11 PM, Hanoch Haim (hhaim) wrote: > Hi Oliver, > Thank you for the fast response and it would be great to open a discussion on that. > In general our project can leverage your optimization and I think it is great (we should have thought about it) . We can use it using the workaround I described. > However, for me it seems odd that rte_pktmbuf_attach () that does not *change* anything in m_const, except of the *atomic* ref counter does not work in parallel. > The example I gave is a classic use case of rte_pktmbuf_attach (multicast ) and I don't see why it wouldn't work after your optimization. > > Do you have a pointer to the documentation that state that that you can't call the atomic ref counter from more than one thread? Unfortunately it's not documented yet, but it's something we should better describe. Regards, Olivier