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 F08ADA04DC; Mon, 26 Oct 2020 15:30:09 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CCC302B9D; Mon, 26 Oct 2020 15:30:08 +0100 (CET) Received: from new3-smtp.messagingengine.com (new3-smtp.messagingengine.com [66.111.4.229]) by dpdk.org (Postfix) with ESMTP id 9CBF31E2B for ; Mon, 26 Oct 2020 15:30:06 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailnew.nyi.internal (Postfix) with ESMTP id 1F8E15804AB; Mon, 26 Oct 2020 10:30:05 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 26 Oct 2020 10:30:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm2; bh= VMkfpDOwKWP+ayfzYtiXzSuUtlKGx15J6y0uEkET8Yc=; b=FvKQz8/89Nsr0y1L efdXpYqq4asTQGmQU/yCftBbNiDfYK/oz6xwopsB4bwSKzZmA++GBlkKv06xG2hF WhUOj2FCV5Ev0iMt/gVZISBDBPZcc8d0YkEO0V4d5G4uxPv5RnKknF+vYicB8WA6 ScOanIbb4YV7KXBTBlr+UZztO6+Q+Xfgf0vogl/YAJcWjyiBnaw0ChAH5yc8qw5a XNxYCg09duJ9p5en6BFmhOy157DKWMqAFDhqH3AsFbHALTeZD++oG54j7BWkJ/LB QKeHSyz72G9y4I26OQQLtPXDZmhRBDSMG/aPduMpeBrkFcEeBL8kEtlymWIKGP/C Anai9Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=VMkfpDOwKWP+ayfzYtiXzSuUtlKGx15J6y0uEkET8 Yc=; b=iIiO1TatZ+ynks9jOprdo271SPZjgpXW3459fwe4wGMxSlQ5tPsd4A57x MyNmnc4bQ+EPaqyqCQhmGgV9sCq7CgaDzjVLKzY6+yoUYQZSQ5uZf4t2VNUFRiA6 ReT/+dmo4b95MZMs+8AX82ZpdycsXCvMdSbsm+IKde77PW0LkAPvYbYoFMzrMQdA IVs9uduBUZINOZCZGemdTRKEFXWNLclmiLwKUNBE+WD+JAJym1Bs9lhFaTWL7wJM bCjOvc867IO1y/2XkgBH3Eb8UAkWtpffmVJXzzLmRWsktbl1Si5hlEwWZ46ZvU7m jrP68LP5tKdU4+oAnTFjl7sKxYSmA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrkeejgddvkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdejueei iedvffegheenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuih iivgepudenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhho nhdrnhgvth X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id A1C9B3064687; Mon, 26 Oct 2020 10:30:01 -0400 (EDT) From: Thomas Monjalon To: David Marchand Cc: dev , "Yigit, Ferruh" , Bruce Richardson , Olivier Matz , Andrew Rybchenko , Akhil Goyal , Declan Doherty , Ankur Dwivedi , Anoob Joseph , Jeff Guo , Haiyue Wang , Jerin Jacob , Nithin Dabilpuram , Kiran Kumar K , Radu Nicolau , Ray Kinsella Date: Mon, 26 Oct 2020 15:30:00 +0100 Message-ID: <2687436.iHeDq2mSAm@thomas> In-Reply-To: References: <20201026052105.1561859-1-thomas@monjalon.net> <20201026052105.1561859-6-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH 05/15] security: switch metadata to dynamic mbuf field 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" 26/10/2020 11:41, David Marchand: > On Mon, Oct 26, 2020 at 6:21 AM Thomas Monjalon wrote: > > +/* Dynamic mbuf field for device-specific metadata */ > > +static const struct rte_mbuf_dynfield rte_security_dynfield_desc = { > > + .name = RTE_SECURITY_DYNFIELD_NAME, > > + .size = sizeof(RTE_SECURITY_DYNFIELD_TYPE), > > + .align = __alignof__(RTE_SECURITY_DYNFIELD_TYPE), > > +}; > > Should be in rte_security.c? Yes, and the inline function below can be a simple macro. > > +extern int rte_security_dynfield_offset; > > + > > +__rte_experimental > > +int rte_security_dynfield_register(void); > > + > > +static inline RTE_SECURITY_DYNFIELD_TYPE * > > +rte_security_dynfield(struct rte_mbuf *mbuf) > > +{ > > + return RTE_MBUF_DYNFIELD(mbuf, > > + rte_security_dynfield_offset, RTE_SECURITY_DYNFIELD_TYPE *); > > +}