From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9D3BEA057B; Thu, 2 Apr 2020 13:30:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CAF1F375B; Thu, 2 Apr 2020 13:30:53 +0200 (CEST) Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58]) by dpdk.org (Postfix) with ESMTP id E61022B8B for ; Thu, 2 Apr 2020 13:30:52 +0200 (CEST) Received: from 2606-a000-111b-43ee-0000-0000-0000-1bf2.inf6.spectrum.com ([2606:a000:111b:43ee::1bf2] helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1jJy3Q-0001cV-BO; Thu, 02 Apr 2020 07:30:44 -0400 Date: Thu, 2 Apr 2020 07:30:35 -0400 From: Neil Horman To: Hemant Agrawal Cc: "david.marchand@redhat.com" , "dev@dpdk.org" , Jerin Jacob Kollanukkaran , Bruce Richardson , Thomas Monjalon , Akhil Goyal Message-ID: <20200402113035.GA4063060@hmswarspite.think-freely.org> References: <20190525184346.27932-1-nhorman@tuxdriver.com> <20190613142344.9188-1-nhorman@tuxdriver.com> <20190613142344.9188-6-nhorman@tuxdriver.com> <20190619104543.GB19712@hmswarspite.think-freely.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Score: -2.9 (--) X-Spam-Status: No Subject: Re: [dpdk-dev] [PATCH v2 05/10] fslmc: identify internal only functions and tag them as __rte_internal 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, Apr 02, 2020 at 09:49:20AM +0000, Hemant Agrawal wrote: > HI Neil, > > On Mon, Jun 17, 2019 at 07:30:34AM +0000, Hemant Agrawal wrote: > > > HI Neil, > > > The same code of low-level HW driver is shared with different OSs > > (kernel, uboot etc) and different framework. If we introduce rte_internal in > > these low-level hw files, it will be a big maintenance issue for NXP. Everytime > > there is a change or upgrade, it will be a pain. > > > > > Why? If you don't want to support the use of a project specific tag in other > > projects, you can add a global cflag to those like this: > > -D__rte_experimental > > > > and the code will be eliminated > > > > I'm not sure what you see as difficult here > [Hemant] > Do, we have an alternate for this approach? > No, what issue do you see with the approach suggested above? > Also, w.r.t to changes, at present you are adding the "__rte_internal" after the function return type. Is it possible to add it before the function return type and limiting the changes to header file only i.e. something similar to the current approach of "__rte_experimental" The __rte_internal macro expands to a function attribute, and the gcc manual mandates that it be inserted between the return type and function name. As for its application in both the prototypes and declarations, I'd need to go back and look again, I can't recall if that can be done. > => current approach > > * Return: '0' on Success; Error code otherwise. > > */ > > -int dpbp_open(struct fsl_mc_io *mc_io, > > +int __rte_internal dpbp_open(struct fsl_mc_io *mc_io, > > uint32_t cmd_flags, > > int dpbp_id, > > uint16_t *token) > > => approach used in rte_experimental > >__rte_experimental > >uint16_t > >rte_bbdev_count(void); > > This will help in minimizing the changes. > > Regards, > Hemant > > > > > Neil > > > > > Regards, > > > Hemant > > > > > > > -----Original Message----- > > > > From: Neil Horman > > > > Sent: Thursday, June 13, 2019 7:54 PM > > > > To: dev@dpdk.org > > > > Cc: Neil Horman ; Jerin Jacob Kollanukkaran > > > > ; Bruce Richardson ; > > > > Thomas Monjalon ; Hemant Agrawal > > > > ; Shreyansh Jain > > > > Subject: [PATCH v2 05/10] fslmc: identify internal only functions > > > > and tag them as __rte_internal > > > > Importance: High > > > > > > > > Identify functions in fslmc bus driver which are internal (based on > > > > their not having an rte_ prefix) and tag them with __rte_internal > > > > > > > >