[dpdk-dev] [PATCH v3] mbuf: cleanup rte_pktmbuf_lastseg(), fix atomic usage
Ilya Matveychikov
matvejchikov at gmail.com
Thu Nov 16 10:44:14 CET 2017
> On Nov 16, 2017, at 1:37 PM, Olivier MATZ <olivier.matz at 6wind.com> wrote:
>
> On Thu, Nov 16, 2017 at 01:32:13PM +0400, Ilya Matveychikov wrote:
>>
>>> On Nov 16, 2017, at 1:06 PM, Hanoch Haim (hhaim) <hhaim at cisco.com> wrote:
>>>
>>> Understood
>>>
>>> rte_mbuf_refcnt_update_blind()
>>>
>>> should be good., it will take care the RTE_MBUF_REFCNT_ATOMIC
>>>
>>
>>
>> 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?
>>
>
> 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 — to add “__” prefix for for “lightweight” functions.
Anyway, IMO having a function will be better than having ifdef/else/endif
block.
More information about the dev
mailing list