From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9006EA0C43; Mon, 18 Oct 2021 16:51:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 776C7410FA; Mon, 18 Oct 2021 16:51:50 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id E8667410DA for ; Mon, 18 Oct 2021 16:51:48 +0200 (CEST) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 82B967F508; Mon, 18 Oct 2021 17:51:48 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 82B967F508 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1634568708; bh=E2waBGLh84N5e3qbp/1jTIxQJbSCiRE6D6qXQv6X6Ls=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=iPwJ6saHbnaauWlS5s6iOUOmwHEzn5nHVudNH0cya/5FGcbN2lUOxWvhhZq1eBd7F PbtjammeAPEE/gKznwXTfaOUA/btm50/T9OR7zZ+zdx9RU8j0sLNCaJ2VWAZlHURtV hV+Ll9702NKJRxI53Md6/0Og3LdmN3BaMJJ3saOU= To: David Marchand , Thomas Monjalon Cc: Olivier Matz , Dmitry Kozlyuk , Ray Kinsella , Stephen Hemminger , dev References: <20211018082635.2054-1-david.marchand@redhat.com> <79f4f029-ca13-6048-396c-232fe5ef5fb7@oktetlabs.ru> <8d96bea0-abeb-090a-6589-62bd082bb7ca@oktetlabs.ru> From: Andrew Rybchenko Organization: OKTET Labs Message-ID: Date: Mon, 18 Oct 2021 17:51:48 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] mempool: accept user flags only X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list 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 10/18/21 3:06 PM, David Marchand wrote: > On Mon, Oct 18, 2021 at 11:05 AM Andrew Rybchenko > wrote: >>>>> +/** >>>>> + * This macro lists all the mempool flags an application may request. >>>>> + */ >>>>> +#define MEMPOOL_VALID_USER_FLAGS (MEMPOOL_F_NO_SPREAD \ >>>> >>>> I think RTE_ prefix is missing here since it is in a public >>>> header now. >>> >>> I discussed about this offline with David. I was ok to omit the >>> RTE_ prefix for consistency. >>> >>>>> + | MEMPOOL_F_NO_CACHE_ALIGN \ >>>>> + | MEMPOOL_F_SP_PUT \ >>>>> + | MEMPOOL_F_SC_GET \ >>>>> + | MEMPOOL_F_NO_IOVA_CONTIG \ >>>>> + ) >>>>> /** >>>>> * @internal When debug is enabled, store some statistics. >>>>> * >>>>> >>>> >>>> Should we make a patch to add defines with RTE_ prefix and >>>> add a deprecation for old flags without RTE_ prefix? >>>> >>>> Olivier, what do you think? If you have time to care about it, >>>> it would be great. (I'm unfamiliar with coccinelle yet). >>> >>> I was joking with David about keeping some work for 2022 :) >>> >>> I will try to have a look. As a side note, I was not that convinced by >>> coccinelle for simple replacements like this, because it does not >>> update the comments or documentation, it can (rarely) break the >>> indentation, it is slow, and the syntax is quite complex. >>> >> >> I dreamed to finish with renanamings in core libraries in 2021. > > Sadly, you are not the only one. > > >> May be it is to naive :( >> >> I see that rc1 is already delayed and adding a couple of >> more patches could delay it even more. I'm ready to do it >> without coccinelle today, so, it is a question to @Thomas and >> @David if that late patch will be considered at all. > > Thomas? > > As usual, we must avoid unannounced API changes unless waived by Techboard. > I am not against it if we keep compatilibity (marking RTE_DEPRECATED > can wait next releases), and seeing how it only impacts a relatively > low number of places in DPDK. > > Risks are mainly on compilation side, and conflicts with other patches > in mempool for rc1, but I can only think of Dmitry series and the > conflict is easy to solve. > > It should be quick to do: when could you send such a patch? Done. > > > What I have seen: > > $ git grep -iE "(define|inline).*\<(|__)mempool" -- lib/mempool/*.h > lib/mempool/rte_mempool.h:#define MEMPOOL_PG_SHIFT_MAX > (sizeof(uintptr_t) * CHAR_BIT - 1) > lib/mempool/rte_mempool.h:#define MEMPOOL_PG_NUM_DEFAULT 1 > ^^^ > bit-rot, both can be dropped. > > lib/mempool/rte_mempool.h:#define MEMPOOL_F_NO_SPREAD 0x0001 > lib/mempool/rte_mempool.h:#define MEMPOOL_F_NO_CACHE_ALIGN 0x0002 /**< > Do not align objs on cache lines.*/ > lib/mempool/rte_mempool.h:#define MEMPOOL_F_SP_PUT 0x0004 /**< > Default put is "single-producer".*/ > lib/mempool/rte_mempool.h:#define MEMPOOL_F_SC_GET 0x0008 /**< > Default get is "single-consumer".*/ > lib/mempool/rte_mempool.h:#define MEMPOOL_F_POOL_CREATED 0x0010 /**< > Internal: pool is created. */ > lib/mempool/rte_mempool.h:#define MEMPOOL_F_NO_IOVA_CONTIG 0x0020 /**< > Don't need IOVA contiguous objs. */ > lib/mempool/rte_mempool.h:#define MEMPOOL_VALID_USER_FLAGS > (MEMPOOL_F_NO_SPREAD \ > > lib/mempool/rte_mempool.h:#define __MEMPOOL_STAT_ADD(mp, name, n) do { > \ > lib/mempool/rte_mempool.h:#define __MEMPOOL_STAT_ADD(mp, name, n) do {} while(0) > lib/mempool/rte_mempool.h:#define MEMPOOL_HEADER_SIZE(mp, cs) \ > lib/mempool/rte_mempool.h:static inline struct rte_mempool_objhdr > *__mempool_get_header(void *obj) > lib/mempool/rte_mempool.h:static inline struct rte_mempool_objtlr > *__mempool_get_trailer(void *obj) > lib/mempool/rte_mempool.h:#define __mempool_check_cookies(mp, > obj_table_const, n, free) \ > lib/mempool/rte_mempool.h:#define __mempool_check_cookies(mp, > obj_table_const, n, free) do {} while(0) > lib/mempool/rte_mempool.h:#define > __mempool_contig_blocks_check_cookies(mp, first_obj_table_const, n, \ > lib/mempool/rte_mempool.h:#define > __mempool_contig_blocks_check_cookies(mp, first_obj_table_const, n, \ > ^^ > Internal stuff, but I would prefix in any case. > > lib/mempool/rte_mempool.h:#define MEMPOOL_REGISTER_OPS(ops) > \ Many thanks for the grep. I'd lost something without it.