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 AC445A04E6; Sat, 31 Oct 2020 09:57:14 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3981D29C6; Sat, 31 Oct 2020 09:57:12 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by dpdk.org (Postfix) with ESMTP id 2A5B3CA0E for ; Sat, 31 Oct 2020 09:57:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604134628; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Gw6tWxG6oaTgUUcw3cmH0mkUSw25nrS9ggp2X1oEef0=; b=akGGyhQ1TRjVm+f49r/rDKvc5XvWwyZ4L0zklGgfsJ7nNMQ+X1QmCNiy02Ai9c0JnbNeb6 9w36F/lIb1vnhlhMOIWBu8gl18fCa11kGTzeFDNVcTBmGnEHG2V55M4rNwrUDI7tMoC2vL +B5nau7FA+lBoW4fJbHCmfnMC1DZ7/U= Received: from mail-vs1-f69.google.com (mail-vs1-f69.google.com [209.85.217.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-199-MsDDFhhJPiqRc7TQeFVLPQ-1; Sat, 31 Oct 2020 04:57:06 -0400 X-MC-Unique: MsDDFhhJPiqRc7TQeFVLPQ-1 Received: by mail-vs1-f69.google.com with SMTP id q15so225188vsg.12 for ; Sat, 31 Oct 2020 01:57:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Gw6tWxG6oaTgUUcw3cmH0mkUSw25nrS9ggp2X1oEef0=; b=sbegzGQYPIXVL+UprAz+FNCxjpTx03eQyk5NoTWPQfisIWtXX58L1AhBYcPYWeylr8 Qf6oCXBJaePqSpFDbqbf7YaJF69IL7roAVCg3s3YwjkxIruwgX+rQvPFuogPbCPTRmLs vbibj9XWRBSiOeRbnX+g8bvW9Q1igRYL3U6pSuFn+1LCp5PodXTvK3UgQHEkF0Gi1+Ro E3jAEfQzghxYwjnjmwUe8kGLckE4b+wRoQVuzqBOeU5LbWMXHo/m/BdJEK/X1YMuG2i5 wiH/h6wFZbHweVgpPdKKQqOuDGVlSSgH0rAkBOvTHweaOH+Gu+gawDxW+EiDJ5NyOvaW aRpQ== X-Gm-Message-State: AOAM53023ITtiJqyhnjAoD7ZVKgm+S3gYoim2YzOV6SIXpGu0Bs41qAc Z1PIJRxXKlih/BKP/W9bqg5nkxO8DXGCP1DsZR4Fcuv8vs9yM/viwAE6lHuYSsVKJhkS5ckritM B9duSYz3n3zLlqgYflA8= X-Received: by 2002:a05:6102:4b6:: with SMTP id r22mr208200vsa.10.1604134626172; Sat, 31 Oct 2020 01:57:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzUXcjsx+Bi4YYIj0Jf/HpTC330AaqwQju9c6QLKJ/ZHvS406f0bCWjj3YfdI+wYivK6TUrks3PJdL630s1nHs= X-Received: by 2002:a05:6102:4b6:: with SMTP id r22mr208192vsa.10.1604134625889; Sat, 31 Oct 2020 01:57:05 -0700 (PDT) MIME-Version: 1.0 References: <20201026052105.1561859-1-thomas@monjalon.net> <20201030174441.1076264-1-thomas@monjalon.net> <20201030174441.1076264-6-thomas@monjalon.net> In-Reply-To: <20201030174441.1076264-6-thomas@monjalon.net> From: David Marchand Date: Sat, 31 Oct 2020 09:56:54 +0100 Message-ID: To: Thomas Monjalon , Olivier Matz 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 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" 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" 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): 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? -- David Marchand