From mboxrd@z Thu Jan 1 00:00:00 1970 From: "shesha Sreenivasamurthy (shesha)" Subject: Re: Reshuffling of rte_mbuf structure. Date: Wed, 4 Nov 2015 18:56:42 +0000 Message-ID: References: <2014794.RrzFoKiHXW@xps13> <20151103002117.GA3665@mhcomputing.net> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: "dev@dpdk.org" Return-path: Received: from rcdn-iport-9.cisco.com (rcdn-iport-9.cisco.com [173.37.86.80]) by dpdk.org (Postfix) with ESMTP id 3B2638E93 for ; Wed, 4 Nov 2015 19:56:44 +0100 (CET) In-Reply-To: <20151103002117.GA3665@mhcomputing.net> Content-Language: en-US List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Is there a way where we can just define the fields that ought to be there i= n the mbuf structure, but the position and size is implementation dependent= ? The application can provide "mbuf_impl.h" that contains mbuf_rte fields = in the order that seems appropriate to application. -- - Thanks char * (*shesha) (uint64_t cache, uint8_t F00D) { return 0x0000C0DE; } From: Matthew Hall > Date: Monday, November 2, 2015 at 4:21 PM To: Thomas Monjalon > Cc: Cisco Employee >, Arnon Warsh= avsky >, "dev@dpdk.org" > Subject: Re: [dpdk-dev] Reshuffling of rte_mbuf structure. On Mon, Nov 02, 2015 at 11:51:23PM +0100, Thomas Monjalon wrote: But it is simpler to say that having an API depending of some options is a "no-design" which could seriously slow down the DPDK adoption. What about something similar to how Java JNI works? It needed to support multiple Java JRE / JDK brands, implementations etc. Upon initialization, a function pointer array is created, and specific slots are filled with point= ers to the real implementation of some native API functions you can call from inside your library to perform operations. In the DPDK case, we need flexible data instead of flexible function implementations. To do this there would be some pointer slots in the mbuf that are are fille= d with pointers to metadata for required DPDK features. The data could be pla= ced in the following cachelines, using some reserved tailroom between the mbuf control block and the packet data block. Then the prefetch could be set up = to prefetch only the used parts of the tailroom at any given point, to prevent unwanted slowdowns. Matthew.