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 6413BA04DD; Mon, 26 Oct 2020 17:50:33 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 43A242B9D; Mon, 26 Oct 2020 17:50:32 +0100 (CET) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id F271229C6 for ; Mon, 26 Oct 2020 17:50:29 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 9FCD45C01BB; Mon, 26 Oct 2020 12:50:28 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 26 Oct 2020 12:50:28 -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= 6AEh8yyIIH2JFpEoI8mhNhXaomUfJEgOcBt7sgb77ls=; b=hDajrG+aR9wCnJ7L z4saUrVik/XubSJoMzRckh1I8d+lEeo0f274XcRpFQjOpSf7tH+hH6R/5JFNs3aJ BgIebnlivyu7wDRAD7Zbl+rNc1A7k3BxuBa6DiLIHjodW1rnB+vxFx6bZUGm3bCJ o8gKaZkDkI5o6OM0nsjUZX30ZR5IjupG8oZ5S10Ab4dzwkKjjsq0sB1dgaHMKW8h oK8rpY2M1WsM6VjpgLDyIyxRn9ieYP9IBPhR64iKarYJl36L29VYg7IXQqXF2dOm +Q11aI9Gka1yLlFJwcIUI2rRJYZD7gfXSUQCjbgPz5eTepo0usagy1D1tBd0CuUg IJztFQ== 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=6AEh8yyIIH2JFpEoI8mhNhXaomUfJEgOcBt7sgb77 ls=; b=bxRjuAuePAdAXLUVlX3JHNxCpltzSbwUWTS8KZusTLQaNpA4+FEUmJXba mek4ATiJpXsVKNUuK1MU3UL4SNC8G+GH4s1DcHXVBTtg1qwLeb4a13W0fu/6dpZO 0YBl0cVSCpDGKPrvFgLdRyYcOaPex1LEwhFz/KEWdRA0bUJox2Mn7V/ET7cHdh5f GxSN2NQf2p8b1NXM2JrHRa3oqR842fW7PddTSawKxsQAl7ftc5RN21DgZZwxPRtI kRGU2rxOKvhOlIS3ga/PHJfvC+U/xMvipbs9yXTx1fc2JRVQb3qwshrgSxfdcZRY GTc1HI6sjzNrCnuxV40oowb+3ctug== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrkeejgdehjecutefuodetggdotefrodftvf 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 E25433280059; Mon, 26 Oct 2020 12:50:26 -0400 (EDT) From: Thomas Monjalon To: Andrew Rybchenko Cc: dev@dpdk.org, ferruh.yigit@intel.com, david.marchand@redhat.com, bruce.richardson@intel.com, olivier.matz@6wind.com, akhil.goyal@nxp.com, Yong Wang Date: Mon, 26 Oct 2020 17:50:25 +0100 Message-ID: <6339991.yY2z8fZqqB@thomas> In-Reply-To: References: <20201026052105.1561859-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH 09/15] net/vmxnet3: switch MSS hint 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 16:21, Andrew Rybchenko: > On 10/26/20 6:14 PM, Andrew Rybchenko wrote: > > On 10/26/20 8:20 AM, Thomas Monjalon wrote: > >> - rxm->udata64 = rcde->segCnt; > >> + *RTE_MBUF_DYNFIELD(rxm, vmxnet3_segs_dynfield_offset, > >> + uint8_t *) = rcde->segCnt; > > > > I think it should be a rule of thumb to introduce helper > > macro to access a dynamic field (as you do in few of > > previous patches). > > > > It should be just nearby declaration of the the offset > > variable. > > May be inline function is even better since, IMHO, if you > both ways are possible, inline function is the right choice. > In this particular case inline function will not add value > from type safety point of view, but it is still better as > an example to follow. In some case inline function could be > used as a place to put build assertion to check size. OK I will review the patches to provide a static inline getter function for each dynamic field.