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 7F368A04B5; Mon, 26 Oct 2020 11:41:38 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5F6AD2BD0; Mon, 26 Oct 2020 11:41:37 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by dpdk.org (Postfix) with ESMTP id 9223E2BA2 for ; Mon, 26 Oct 2020 11:41:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603708894; 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=9pjimyfrCAA2P5Z+i0D2dYKAHPvjPvWQf7dPzEUWLeQ=; b=Ki0m1ZwAv4SWJVSAbaMkf7X29d7pGltfIUFMny/6Vz8sUPjQnvKObXbPWU7KtPmQWOmcKw tLQCnVSDRjqFDEbcG92D/OIiaUVcvx81BGkoD4tegadXuIU707lP91JOuTxBMe1o2M2+cj EN3kfUAykW6bCTisW25AFGc9wDn5rfU= Received: from mail-vk1-f197.google.com (mail-vk1-f197.google.com [209.85.221.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-440-UtFAhmZQNGqg7f_z-t4K-g-1; Mon, 26 Oct 2020 06:41:32 -0400 X-MC-Unique: UtFAhmZQNGqg7f_z-t4K-g-1 Received: by mail-vk1-f197.google.com with SMTP id p199so3598671vkp.23 for ; Mon, 26 Oct 2020 03:41:32 -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=9pjimyfrCAA2P5Z+i0D2dYKAHPvjPvWQf7dPzEUWLeQ=; b=OkgwwIJ2n8cItZhINr6G04EntirKSYadIoogZ15CyWepEQC6U6wiNSXOoq64jn1Avk rhD3OjkxiiH59XaRJl2d/q9iOQUDyUzftdBIKIBWfyl5e/Lr70FD1Mn6v12UmElcqmIk NvdD87P8F/AtEx+QOBoS+Az2138dItc8N9f2Uxicq2+Oc8qYEEsSpQUehUGo5qIx3Tb4 HcAcsv1yRdqYPJLh2A/1wfBcZ+1JyvRA2OEdtxGNA12clOrDE8q2nLjVEdrk40Dfxw9t bRC9j34ZM2gdsmFGDS8JTA4pTSsP3qlMgJS7KpoOuv2btiFqyjIWtCGksFop/oK0+qsj 7lVw== X-Gm-Message-State: AOAM530hre196DZg296zBMg2vjACbd2728440iXy32VuBO7fQ1YM3s+H 1aWz/7gT+0w96G5ZxqQ7SdOuHBRTF79itBF58zry3DdWYGTjjG61Gom6/HRdKlirE75J9WYP0uT 7jeJKKsw9aYRB8FEy+fk= X-Received: by 2002:a67:f954:: with SMTP id u20mr19949854vsq.5.1603708892065; Mon, 26 Oct 2020 03:41:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxveSfA/jZaUhPCNgHiweAqft47M06dCvN3/K2ZpGkRbEId7u94CzrrRByBHI2MQR1Zi6P0igXEj3Y/er3/36M= X-Received: by 2002:a67:f954:: with SMTP id u20mr19949832vsq.5.1603708891893; Mon, 26 Oct 2020 03:41:31 -0700 (PDT) MIME-Version: 1.0 References: <20201026052105.1561859-1-thomas@monjalon.net> <20201026052105.1561859-6-thomas@monjalon.net> In-Reply-To: <20201026052105.1561859-6-thomas@monjalon.net> From: David Marchand Date: Mon, 26 Oct 2020 11:41:21 +0100 Message-ID: To: Thomas Monjalon 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 , 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 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 Mon, Oct 26, 2020 at 6:21 AM Thomas Monjalon wrote: > diff --git a/lib/librte_security/rte_security_driver.h b/lib/librte_security/rte_security_driver.h > index 1b561f8528..ba9691b4a0 100644 > --- a/lib/librte_security/rte_security_driver.h > +++ b/lib/librte_security/rte_security_driver.h > @@ -17,6 +17,8 @@ > extern "C" { > #endif > > +#include > + > #include "rte_security.h" > > /** > @@ -89,6 +91,24 @@ typedef int (*security_session_stats_get_t)(void *device, > struct rte_security_session *sess, > struct rte_security_stats *stats); > > +/* 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? > +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 *); > +} > + -- David Marchand