From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=wb6C4lYFeBoAAHtqeNMlNLYVMjHAlxO70LR3JcFJqhw=; b=tcx2WbkGlb79K7JsbVuOm0RkTkEU6Nw3Uj+42rhv3d3vz33NlKP2k5GepUUV6Ypj70 bKHQ/L8E+jH/kVP7s2BNW+9MVhUcfF2CCHkdW5ZUcXRDnpTj5mrjPsZleGB2sTqICsr6 g2mqUoENOuoktd1Ipmsr+rM5YmNqszzlTOHfiq15P8AeQ/Sgs+ym6B4J+92YQo02rNlq GZC2erNDkJCSrFN6iHZG6KopP5zSDkLpGxEKSnOmNxgoVAE31CDGYLinLjdUfz0QCB+g PsdtF1l7qxIM5M7RQCLnde7ka6G1vafmekrJYhmqHvBNhOidQ5dwcO0WKnygD8udn7/A XUCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=wb6C4lYFeBoAAHtqeNMlNLYVMjHAlxO70LR3JcFJqhw=; b=HM54iZsczsKNysqBI0ge8gIUKzN3906XqcaSAmBfAdEC4Fu/4GV9PX9NqthyA97NWk IzhZZ++bh86ZM6lXXMK1O+7N8095AtAQkgPyPgue65yM32q5gV817DiM1nb8zi6qyOdo 4XbKmpJgR2i0RNigYfo1RzJlIIAMCvA/2gfrVOo5t/vYIOrZu5Dk+WXMg7aPwEZ9Xp4P odfTm895CUqYkrnA1D8BHieyKoSa8ct6CHNrGfnzgJy8hwSXcKFbbhzOOGd3/3AyqCPf VY/EFmIeVZ1wqqqLxkULUhfsLe9+LI/jGPkFtwRnhq+pYmbseklD0zdFb0V6vz/2rEzY kqpw== X-Gm-Message-State: AJaThX6RXug+62ptUZZZkaYzw4gjm4Z2tAtIUFsyNlGzKcxiEYLpl4NR X4zOF+r7cSeA6B9Q2pbLSzY= X-Google-Smtp-Source: AGs4zMbhKMdhp+0fhJfaQVspScSrwH09BQlqXIblNvdXxzKVrPKQYaIYKCTIhpmQDHGn7tdkU4LGyA== X-Received: by 10.80.152.66 with SMTP id h2mr1889573edb.192.1510825455985; Thu, 16 Nov 2017 01:44:15 -0800 (PST) Received: from [10.61.0.167] (bba193485.alshamil.net.ae. [217.165.96.191]) by smtp.gmail.com with ESMTPSA id x38sm702816edd.94.2017.11.16.01.44.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Nov 2017 01:44:15 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) From: Ilya Matveychikov In-Reply-To: <20171116093745.sbmfa24jtu4r2ms4@platinum> Date: Thu, 16 Nov 2017 13:44:14 +0400 Cc: "Hanoch Haim (hhaim)" , Konstantin Ananyev , "dev@dpdk.org" Content-Transfer-Encoding: quoted-printable 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> To: Olivier MATZ X-Mailer: Apple Mail (2.3273) Subject: Re: [dpdk-dev] [PATCH v3] mbuf: cleanup rte_pktmbuf_lastseg(), fix atomic usage X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 09:44:16 -0000 > 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