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 97B9143BC0; Sat, 24 Feb 2024 12:01:57 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3E451402C8; Sat, 24 Feb 2024 12:01:57 +0100 (CET) Received: from fout5-smtp.messagingengine.com (fout5-smtp.messagingengine.com [103.168.172.148]) by mails.dpdk.org (Postfix) with ESMTP id B47CC402A8 for ; Sat, 24 Feb 2024 12:01:55 +0100 (CET) Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailfout.nyi.internal (Postfix) with ESMTP id 0934713800D3; Sat, 24 Feb 2024 06:01:55 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Sat, 24 Feb 2024 06:01:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1708772515; x=1708858915; bh=HKhS3qAzzT/6ICE5oMDBbzHW8saEk6em6Q8gKU2o/Uk=; b= VGSmhvX4ZDdR8v1pCuXa23y33dEYj9CibrxnMI4tZtgPJ18nklE5rIo51hhhjIov HmWQRSaiMerTDN84oPH+m3m7OpumkWCmCJCgshP2TjFKWZnEfJnVU5f0LKB8PLQT cX3J0cLd57XV+3ZpFQI5Elk+0RoA4DEvSyH1JDEgkbbx8zDBLA0/60J9E4eDcUyC W7pAog3kVD6ZworRbjB5bf+zXRL3Jrt9zGl98PO7IbdZ/PE8FEGivTng8yCNwoSB bWPkS0fx+2LAyZsM2s6zSUE8CNGUGiVBI+vRYRjN1bdUqoZUQDThaLRXYvFpobpr As46V+P+RHJw05GTjUY9uw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1708772515; x= 1708858915; bh=HKhS3qAzzT/6ICE5oMDBbzHW8saEk6em6Q8gKU2o/Uk=; b=L yj8PNZsO8VoAne/fq4vLlxkvfy6TiZcoVa0tKWah+QDz7v/mW8YoWEzPNA8z3Jzk IPueaxd4Xx+00+n7dLh0uAU8okSzM3F3OiS4n2Y7kVJUNLH3S/p4bJljpaSCUDFo eBTl6lfLwTlXQSSGCnNEd/NFPKCtsQf9x6wGhHhhrAy/dsmHzReNvoypjTOS88yA xFBulBxh+hVf9Ywk2kcFZPHWgQc7fBaMPHRHhx5kXau9g4jMYTHqg/JhGdV+T58E GF9sg0T2GHXvIn/V+t2qrONSDkWWX9Sm9ioGef6dZD/YgiFsg0h1yTJLubCwWj5c sSHWZdx9zaegpbweNwSyQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfeekgddvfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnheptdejieeifeehtdffgfdvleetueeffeehueejgfeuteeftddtieek gfekudehtdfgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 24 Feb 2024 06:01:48 -0500 (EST) From: Thomas Monjalon To: Tyler Retzlaff Cc: dev@dpdk.org, Ajit Khaparde , Andrew Boyer , Andrew Rybchenko , Bruce Richardson , Chenbo Xia , Chengwen Feng , Dariusz Sosnowski , David Christensen , Hyong Youb Kim , Jerin Jacob , Jie Hai , Jingjing Wu , John Daley , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Maciej Czekaj , Matan Azrad , Maxime Coquelin , Nithin Dabilpuram , Ori Kam , Ruifeng Wang , Satha Rao , Somnath Kotur , Suanming Mou , Sunil Kumar Kori , Viacheslav Ovsiienko , Yisen Zhuang , Yuying Zhang , mb@smartsharesystems.com Subject: Re: [PATCH v5 06/22] mbuf: add mbuf descriptor accessors Date: Sat, 24 Feb 2024 12:01:46 +0100 Message-ID: <13458227.dW097sEU6C@thomas> In-Reply-To: <1708762927-14126-7-git-send-email-roretzla@linux.microsoft.com> References: <1706657173-26166-1-git-send-email-roretzla@linux.microsoft.com> <1708762927-14126-1-git-send-email-roretzla@linux.microsoft.com> <1708762927-14126-7-git-send-email-roretzla@linux.microsoft.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 24/02/2024 09:21, Tyler Retzlaff: > Provide inline functions to access rearm data and rx descriptor fields > in rte_mbuf struct. [...] > +static inline > +uint64_t * > +rte_mbuf_rearm_data(struct rte_mbuf *m) > +{ > + RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, ol_flags) != > + offsetof(struct rte_mbuf, data_off) + 8); > + RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, rearm_data) != > + RTE_ALIGN(offsetof(struct rte_mbuf, > + data_off), > + 16)); > + > + return (uint64_t *)&m->data_off; > +} > + > +static inline > +void * > +rte_mbuf_rx_descriptor_fields1(struct rte_mbuf *m) > +{ > + return &m->packet_type; > +} We need to enforce usage of these accessors. Please add these 2 things: 1/ comments in the mbuf structure to encourage using these functions 2/ checkpatch warning if using the markers directly in new code