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 28166A0547; Fri, 5 Mar 2021 16:31:41 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9FD2522A33F; Fri, 5 Mar 2021 16:31:40 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 9F5B522A33E for ; Fri, 5 Mar 2021 16:31:39 +0100 (CET) IronPort-SDR: jTnWJQsBa4+ebiZOHlyYK9OI/OzXet22Eq3DF0kHGS/TNv5jsi1lql7G+MY+ssM5cQuEPWJGhm P3/nHNsPST4Q== X-IronPort-AV: E=McAfee;i="6000,8403,9914"; a="251702277" X-IronPort-AV: E=Sophos;i="5.81,225,1610438400"; d="scan'208";a="251702277" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Mar 2021 07:31:38 -0800 IronPort-SDR: k1nL6B3ZbnygSrUrcWIBu1qnFZyers8SkJjMIVd+z6tGYT7Fn5PKELLcVSRlrziVPtRuxOYF3f AQsg3cgMZ9qg== X-IronPort-AV: E=Sophos;i="5.81,225,1610438400"; d="scan'208";a="446241167" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.208.100]) ([10.213.208.100]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Mar 2021 07:31:36 -0800 To: Ed Czeck , dev@dpdk.org Cc: shepard.siegel@atomicrules.com, john.miller@atomicrules.com References: <20210304165637.24658-1-ed.czeck@atomicrules.com> <20210304203321.6154-1-ed.czeck@atomicrules.com> <20210304203321.6154-4-ed.czeck@atomicrules.com> From: Ferruh Yigit X-User: ferruhy Message-ID: Date: Fri, 5 Mar 2021 15:31:33 +0000 MIME-Version: 1.0 In-Reply-To: <20210304203321.6154-4-ed.czeck@atomicrules.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v2 4/5] net/ark: generalize meta data between FPGA and PMD 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 3/4/2021 8:33 PM, Ed Czeck wrote: > In this commit we generalize the movement of user-specified > meta data between mbufs and FPGA AXIS tuser fields using > user-defined hook functions. > > - Previous use of PMD dynfields are removed > - Hook function added to ark_user_ext > - Add hook function calls in rx and tx paths > - Rename all extension function with rte_pmd_ark prefix Can you please move this rename on its own patch, it is causing too much noise for this patch. > - Move extension prototype to rte_pmd_ark.h > - Update documentation with an extension example > +1 > Signed-off-by: Ed Czeck <...> > +/** > + * Extension prototype, optional implementation. > + * Called during rte_eth_rx_burst() for each packet. This extension > + * function allows the transfer of meta data from the user's FPGA to > + * mbuf fields. > + * > + * @param mbuf > + * The newly received mbuf > + * @param meta > + * The meta data from the user, up to 20 bytes. > + * @param user_data > + * user argument from dev_init() call. > + */ > +void rte_pmd_ark_rx_user_meta_hook(struct rte_mbuf *mbuf, > + const uint32_t *meta, > + void *user_data); > <...> > +/** > + * Extension prototype, optional implementation. > + * Called during rte_eth_tx_burst() for each packet. This extension > + * function allows the transfer of data from the mbuf to the user's > + * FPGA. Up to 20 bytes (5 32-bit words) are transferable > + * > + * @param mbuf > + * The mbuf about to be transmitted. > + * @param meta > + * The meta data to be populate by this call. > + * @param meta_cnt > + * The count in 32-bit words of the meta data populated, 0 to 5. > + * @param user_data > + * user argument from dev_init() call. > + */ > +void rte_pmd_ark_tx_user_meta_hook(const struct rte_mbuf *mbuf, > + uint32_t *meta, > + uint8_t *meta_cnt, > + void *user_data); > Why not define 'meta' as "void *" eventually it won't be used as "uint32_t *" and will be caseted, isn't it? Same for both APIs.