From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ilya Matveychikov Subject: Re: [PATCH v3] mbuf: cleanup rte_pktmbuf_lastseg(), fix atomic usage Date: Thu, 16 Nov 2017 13:44:14 +0400 Message-ID: <6554ABA5-A390-434B-BB59-3A1AB1C33C01@gmail.com> References: <20171115091413.27119-1-hhaim@cisco.com> <1D98684F-B8A9-4037-8534-0D4E3A1FD34C@gmail.com> <20171115173058.mrkrv3usbl5sfw3h@platinum> <2fa9a7806c9e447995d6017c6def9894@XCH-RTP-017.cisco.com> <20171116084112.ockgmxnxews7coie@platinum> <5C1B1043-3444-4750-A7AB-D96403C61E42@gmail.com> <20171116093745.sbmfa24jtu4r2ms4@platinum> Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: "Hanoch Haim (hhaim)" , Konstantin Ananyev , "dev@dpdk.org" To: Olivier MATZ Return-path: Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by dpdk.org (Postfix) with ESMTP id 404251B2E5 for ; Thu, 16 Nov 2017 10:44:16 +0100 (CET) Received: by mail-wm0-f65.google.com with SMTP id y80so8106147wmd.0 for ; Thu, 16 Nov 2017 01:44:16 -0800 (PST) In-Reply-To: <20171116093745.sbmfa24jtu4r2ms4@platinum> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > On Nov 16, 2017, at 1:37 PM, Olivier MATZ = wrote: >=20 > On Thu, Nov 16, 2017 at 01:32:13PM +0400, Ilya Matveychikov wrote: >>=20 >>> On Nov 16, 2017, at 1:06 PM, Hanoch Haim (hhaim) = wrote: >>>=20 >>> Understood=20 >>>=20 >>> rte_mbuf_refcnt_update_blind()=20 >>>=20 >>> should be good., it will take care the RTE_MBUF_REFCNT_ATOMIC=20 >>>=20 >>=20 >>=20 >> Why guys not to add just __rte_mbuf_refcnt_update() as a wrapper over >> rte_atomic16_add_return() and use it in inside = rte_mbuf_refcnt_update() and >> rte_pktmbuf_prefree_seg() as well? >>=20 >=20 > Is there any other difference with rte_mbuf_refcnt_update_blind() = except > the function name? No really, but my suggestion was not only about the name but to use such = a function inside rte_mbuf_refcnt_update() too. Also, that is common = naming scheme in Linux kernel =E2=80=94 to add =E2=80=9C__=E2=80=9D prefix for = for =E2=80=9Clightweight=E2=80=9D functions. Anyway, IMO having a function will be better than having = ifdef/else/endif block.=20