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 7542EA04E6; Sat, 31 Oct 2020 15:39:06 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 54559CAA7; Sat, 31 Oct 2020 15:39:05 +0100 (CET) Received: from new4-smtp.messagingengine.com (new4-smtp.messagingengine.com [66.111.4.230]) by dpdk.org (Postfix) with ESMTP id 80220CA97 for ; Sat, 31 Oct 2020 15:39:03 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailnew.nyi.internal (Postfix) with ESMTP id E5D0C580912; Sat, 31 Oct 2020 10:39:01 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sat, 31 Oct 2020 10:39:01 -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= YnA1ftZlR/M8cWw4elf7oyEPcyCjT0tHv2fY37RTWAc=; b=Hzxi63Mwlu76FGmG EmeLvTbvsrMX5YRp9e2HX9lc907V7TO1b4Y1IjG0Jb/FXXS8ZRbFdwbbju2XRiWC a8+SQywnV+uCJPdnwKjAQpOseB+TYZx76AmVIhTxFTAMy7exGsCXInGyk4k6KgEA 8dsV2cNVSOsyypSYTOtfoSYIxCdDdGKOroWpmpmvJhbLp+JiDPnD7qhMxKA2ZktG Qj71aTYLwm1S6nCq3yHAm98prGiVOHE29rJiLVb+SvExjLH1M/jXbpmkvWuK5dqd RB+qW9CBxFeltKoWwfax1xlovlhw+/BgXjo0BYg6Qd0ZFGb62bg/EO9HwuO6ZedN AM2y1Q== 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=YnA1ftZlR/M8cWw4elf7oyEPcyCjT0tHv2fY37RTW Ac=; b=YbZ0L+o+rs7pfjifZGJpE65UAvQBvEcSuShTwSo3W7RxmTfbhIx9JDtv0 LqjCmL5n56A0I1h1mUyI7R5FyHkS3tb+poHhNtoQiLLiCAY/cWzGI0octpEdO7bX mgnC8LjnjnuFc6yHSKsjHHxu1GEvaoSKoPGTYxUO3w0bOIaG7vIaXmb/VH99eyHi p91yEQqfflVcKCgpa0Ia4GLzxihhMPSQhdZ9qSzOwfdWMZqGzr4oR3wMuA48hWb7 EuSkzNDrzNxviQ2UpNDGMtEVHU1i4I2T4Lbqlnk3yz7s5506LdwouPKU36Ofm4FA uiFLIhYNlvfK6jOPGqA9utwKeto4Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrleejgdeijecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpeffvdffjeeuteelfeeileduudeugfetjeelveefkeejfeeigeehteff vdekfeegudenucffohhmrghinhepughpughkrdhorhhgnecukfhppeejjedrudefgedrvd dtfedrudekgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr ohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght 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 16106328005A; Sat, 31 Oct 2020 10:38:56 -0400 (EDT) From: Thomas Monjalon To: Olivier Matz , David Marchand Cc: dev , "Yigit, Ferruh" , Bruce Richardson , Andrew Rybchenko , Akhil Goyal , Jerin Jacob Kollanukkaran , Haiyue Wang , Declan Doherty , Ankur Dwivedi , Anoob Joseph , Jeff Guo , Nithin Dabilpuram , Kiran Kumar K , Radu Nicolau , Ray Kinsella , Neil Horman Date: Sat, 31 Oct 2020 15:38:54 +0100 Message-ID: <7676517.UdO2pTVxXS@thomas> In-Reply-To: References: <20201026052105.1561859-1-thomas@monjalon.net> <20201030174441.1076264-6-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v6 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" 31/10/2020 09:56, David Marchand: > On Fri, Oct 30, 2020 at 6:45 PM Thomas Monjalon wrote: > > > > The device-specific metadata was stored in the deprecated field udata64. > > It is moved to a dynamic mbuf field in order to allow removal of udata64. > > > > The name rte_security_dynfield is not very descriptive > > but it should be replaced later by separate fields for each type of data > > that drivers pass to the upper layer. > > > > Signed-off-by: Thomas Monjalon > > Acked-by: Haiyue Wang > > We have a regression in the mbuf unit test when running with probed > ixgbe devices (UNH lab). > > The problem is that the security dyn field is registered when probing > the ixgbe devices. > The unit test fails later while checking one of its own registered > dynfield offset. > > I can reproduce the issue by stopping at this patch in the series and > adding the below diff. > The problem can be seen with the whole series applied, there is only a > difference in reported dynfield offsets. > > diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c > index 80d1850da9..0e4f895187 100644 > --- a/app/test/test_mbuf.c > +++ b/app/test/test_mbuf.c > @@ -33,6 +33,7 @@ > #include > #include > #include > +#include > > #include "test.h" > > @@ -2589,6 +2590,7 @@ test_mbuf_dyn(struct rte_mempool *pktmbuf_pool) > int ret; > > printf("Test mbuf dynamic fields and flags\n"); > + rte_security_dynfield_register(); > rte_mbuf_dyn_dump(stdout); > > offset = rte_mbuf_dynfield_register(&dynfield); > > > Then: > > # DPDK_TEST=mbuf_autotest ./build/app/test/dpdk-test > EAL: Detected 8 lcore(s) > EAL: Detected 1 NUMA nodes > EAL: Multi-process socket /var/run/dpdk/rte/mp_socket > EAL: Selected IOVA mode 'PA' > EAL: No available hugepages reported in hugepages-1048576kB > EAL: Probing VFIO support... > APP: HPET is not enabled, using TSC as default timer > RTE>>mbuf_autotest > Test mbuf dynamic fields and flags > Reserved fields: > name=rte_security_dynfield_metadata offset=112 size=8 align=8 flags=0 > Reserved flags: > Free space in mbuf (0 = occupied, value = free zone alignment): > 0000: 00 00 00 00 00 00 00 00 > 0008: 00 00 00 00 00 00 00 00 > 0010: 00 00 00 00 00 00 00 00 > 0018: 00 00 00 00 00 00 00 00 > 0020: 00 00 00 00 00 00 00 00 > 0028: 00 00 00 00 00 00 00 00 > 0030: 00 00 00 00 00 00 00 00 > 0038: 00 00 00 00 00 00 00 00 > 0040: 00 00 00 00 00 00 00 00 > 0048: 00 00 00 00 00 00 00 00 > 0050: 00 00 00 00 00 00 00 00 > 0058: 00 00 00 00 00 00 00 00 > 0060: 00 00 00 00 00 00 00 00 > 0068: 00 00 00 00 00 00 00 00 > 0070: 00 00 00 00 00 00 00 00 > 0078: 08 08 08 08 08 08 08 08 > Free bit in mbuf->ol_flags (0 = occupied, 1 = free): > 0000: 0 0 0 0 0 0 0 0 > 0008: 0 0 0 0 0 0 0 0 > 0010: 0 0 0 0 0 0 0 1 > 0018: 1 1 1 1 1 1 1 1 > 0020: 1 1 1 1 1 1 1 1 > 0028: 1 0 0 0 0 0 0 0 > 0030: 0 0 0 0 0 0 0 0 > 0038: 0 0 0 0 0 0 0 0 > mbuf test FAILED (l.2615): offset=-1: No such file or directory> > mbuf dynflag test failed > Test Failed > > A lazy fix is to simply ask for registering a field at offset > sizeof(dynfield) - 1 .. what do you think? I think any offset could be registered, so it looks more correct to skip the failure if rte_errno is EBUSY. I did this fix: https://patches.dpdk.org/patch/83175/