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 7917CA0577; Mon, 6 Apr 2020 18:09:12 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D19CC2B86; Mon, 6 Apr 2020 18:09:11 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id BF402F12 for ; Mon, 6 Apr 2020 18:09:09 +0200 (CEST) IronPort-SDR: 6rnJIujeGKdOX6N7OUOmwT0ihAtAaIW/02vAGwW2jh0PAUufcGphNtfahZ5ESYcNUjHZbf0Lcs VRU7OMj8vLdg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2020 09:09:08 -0700 IronPort-SDR: IddGMvlaUzJar6UDritggk/wJvcFRC3lTAi6auseIcZviJHSidyFLgCKgL1JM3+MTwBZgs+de9 f2GoEgM6eHRQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,351,1580803200"; d="scan'208";a="329911861" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga001.jf.intel.com with ESMTP; 06 Apr 2020 09:09:08 -0700 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 6 Apr 2020 09:09:07 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 6 Apr 2020 09:09:07 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.176) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 6 Apr 2020 09:09:07 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=E5H3I+w9PUqTx3xN1beY1o2U0vKkGW8HFn7hl/a+AKNYhY9cMzVmezZv3exFlWJf0WbdGvcVqCHYSepm59uQ0ShwWgn33YqqRHcQaLThIIOS6T3RSIALMF1fekjz8Jt4pjoO4hmd25YrekFsq9YLjsx94fQZoghpJPruo6s3v/sfHctnPDzVX8iMud64MW51rva9MNwponrVixV7PylfKuKuw5zvaYPeeettMsdj7xXA1D0mACYwrW0eXtElulZp237VIJh+EpY2lBnEA9TEEgxwo692Uim5DLGAbYkIFQhgv00HsUBWl0e4e9LE/2lQymgiTrjHdX8VTSJLGJDyVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nMT53WjqqwFQMvbahtTdA1l7Tge4sHVzizRAxDnDemI=; b=f4zy0DAO3glykwBdUWOIwOzmOfyaGGez+y+uuCraSAN1PT5azrFS7XNEpf2mo04yQaBzkJSws9bcIO4ez1AICZ5w0XrgmK96qVKlrxsxVYghQNS8b6tbWtwLVIFWlhFR9UU4gbcta1UH9fvw2d0YYesgoOT2J5MClWJe9hQbag/dJ+QPC4lA/SiCVAMlMSlZ+66cLo0i5qQh0FkVblU3stWa1T2j3tItbqNtXQW2IJ/C6pJ5/v+p+zd5QEN+MNaiec9RwBVxZimGEsO9J8qy95GtCJNDNZvm9gTAEaiNjzWsqqJf1rsAeg7pZhpUKfqpeDZunNpb6vtVEGogtxFSew== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nMT53WjqqwFQMvbahtTdA1l7Tge4sHVzizRAxDnDemI=; b=dsI5aHK6al31oJaHGk7z3jRdNjzNBHzgeiOOjliijQxvmsQExbM3ty/NEeB7zZ9GM7l8Fe0QXOiXGZ4KJGHz+jj5q++Np6MKOWB8xlxgr9ZRDbGTefoyWR2q8T8uyfNvm67WPeTx9ZjyG3zxssuqLxbmOv92aTAoolA4w54Nw8M= Received: from SN6PR11MB3101.namprd11.prod.outlook.com (2603:10b6:805:d8::23) by SN6PR11MB3344.namprd11.prod.outlook.com (2603:10b6:805:c2::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.15; Mon, 6 Apr 2020 16:09:05 +0000 Received: from SN6PR11MB3101.namprd11.prod.outlook.com ([fe80::f9a3:b1f8:9a17:911a]) by SN6PR11MB3101.namprd11.prod.outlook.com ([fe80::f9a3:b1f8:9a17:911a%7]) with mapi id 15.20.2878.018; Mon, 6 Apr 2020 16:09:05 +0000 From: "De Lara Guarch, Pablo" To: "Coyle, David" , "dev@dpdk.org" CC: "Doherty, Declan" , "Trahe, Fiona" , "Ryan, Brendan" , "shreyansh.jain@nxp.com" , "hemant.agrawal@nxp.com" , "O'loingsigh, Mairtin" Thread-Topic: [PATCH v2 1/4] raw/common: add multi-function interface Thread-Index: AQHWCdfVX5YP336kJ0CVpZjssiAQtKhsO7ZQ Date: Mon, 6 Apr 2020 16:09:05 +0000 Message-ID: References: <20200403163656.60545-1-david.coyle@intel.com> <20200403163656.60545-2-david.coyle@intel.com> In-Reply-To: <20200403163656.60545-2-david.coyle@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.2.0.6 authentication-results: spf=none (sender IP is ) smtp.mailfrom=pablo.de.lara.guarch@intel.com; x-originating-ip: [192.198.151.186] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6ea8bfc6-5a1e-4b8d-cf08-08d7da44d482 x-ms-traffictypediagnostic: SN6PR11MB3344: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4303; x-forefront-prvs: 0365C0E14B x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB3101.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10019020)(136003)(366004)(39850400004)(376002)(346002)(396003)(55016002)(478600001)(7696005)(186003)(6506007)(66946007)(86362001)(66556008)(66476007)(64756008)(66446008)(53546011)(107886003)(9686003)(33656002)(26005)(2906002)(4326008)(8936002)(54906003)(71200400001)(5660300002)(81166006)(316002)(8676002)(52536014)(81156014)(110136005)(76116006); DIR:OUT; SFP:1102; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: +lgcUNwWoyel0OmsLkD2SD0kGD220oKpx5Si5aL6+vaVprM5ZEn/Lj2TD2nP3WTD1Z9nTwEwC/Hu7BYiLvkgwfo2AbPrAVSFA8xmLE70DXc1vlbKW2dCbloWpkhaLgNstJwuwTw0ikizmgIaNIUblXGrPFcQoCDOdpB+xE0Vj6lRgiNLPakhpCkzXwl08DT8OT7kciFzusa8wZOJCoKwKGOlyMuARlO4XigqMtA0xhEt89RxLqryqMxvop4KDUMrvUkNIEigKNm5drLmpEIn7i+uvXUpc6n/ZgxQUIAnzKosz1TUeWusPooDa0rubdkOv89YIxoR5Hl5gHbQGq5obVK3TBktGOxJxZUJrHSS4lOLdusUXaw6LK7mUKG4lMsKquckRvgolfj3xisyfb+WN/zvQMWyX8m3uGpvc0qy476QEg8xu2WoK46c+pGi9+Ej x-ms-exchange-antispam-messagedata: bFH+eGRe6L2inaIW87jsLSRtveK9+Y+BI4j48ox1Spzemd1c/UCisgCATDrrnCQo6eqSZRMnj+C43ozaCzCPk/60iLZiDP1xp+bN6NHQyREZxygR1sSJ3iuw7lElfKgpMZfbe5qbtruNQUC26Y9Qfg== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 6ea8bfc6-5a1e-4b8d-cf08-08d7da44d482 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Apr 2020 16:09:05.3058 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 6Fh/qJ30LTHYjQ870gXd1AUQQdcmktmR9lRwV9vp+/rK8DiRg+VXnSD3SNbCNH5JvkplpGlRjXecp3zA0jSH9W44xvTP8yBuvBJXlD3mZXo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3344 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2 1/4] raw/common: add multi-function interface 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" Hi David, > -----Original Message----- > From: Coyle, David > Sent: Friday, April 3, 2020 5:37 PM > To: dev@dpdk.org > Cc: Doherty, Declan ; Trahe, Fiona > ; De Lara Guarch, Pablo > ; Ryan, Brendan ; > shreyansh.jain@nxp.com; hemant.agrawal@nxp.com; Coyle, David > ; O'loingsigh, Mairtin > Subject: [PATCH v2 1/4] raw/common: add multi-function interface >=20 > The multi-function interface provides a flexible and extensible way of co= mbining > one or more packet processing functions into a single operation. The inte= rface > can be used by applications to send the combined operations to a optimize= d > software or hardware accelerator via a raw device. >=20 > Signed-off-by: David Coyle > Signed-off-by: Mairtin o Loingsigh > --- >=20 > In particular, looking for feedback on the meson script changes that were > required to build the drivers/raw/common/multi_fn directory. Thank you. >=20 > config/common_base | 5 + > drivers/meson.build | 5 + > drivers/raw/Makefile | 1 + > drivers/raw/common/Makefile | 8 + > drivers/raw/common/meson.build | 7 + > drivers/raw/common/multi_fn/Makefile | 27 ++ > drivers/raw/common/multi_fn/meson.build | 9 + > .../multi_fn/rte_common_multi_fn_version.map | 11 + > drivers/raw/common/multi_fn/rte_multi_fn.c | 166 +++++++++ > drivers/raw/common/multi_fn/rte_multi_fn.h | 350 ++++++++++++++++++ > .../raw/common/multi_fn/rte_multi_fn_driver.h | 55 +++ > meson.build | 4 + > mk/rte.app.mk | 1 + > 13 files changed, 649 insertions(+) > create mode 100644 drivers/raw/common/Makefile create mode 100644 > drivers/raw/common/meson.build create mode 100644 > drivers/raw/common/multi_fn/Makefile > create mode 100644 drivers/raw/common/multi_fn/meson.build > create mode 100644 > drivers/raw/common/multi_fn/rte_common_multi_fn_version.map > create mode 100644 drivers/raw/common/multi_fn/rte_multi_fn.c > create mode 100644 drivers/raw/common/multi_fn/rte_multi_fn.h > create mode 100644 drivers/raw/common/multi_fn/rte_multi_fn_driver.h >=20 > diff --git a/config/common_base b/config/common_base index > c31175f9d..4f004968b 100644 > --- a/config/common_base > +++ b/config/common_base > @@ -818,6 +818,11 @@ > CONFIG_RTE_LIBRTE_PMD_OCTEONTX2_EP_RAWDEV=3Dy > # > CONFIG_RTE_LIBRTE_PMD_NTB_RAWDEV=3Dy >=20 > +# > +# Compile multi-fn raw device interface # > +CONFIG_RTE_LIBRTE_MULTI_FN_COMMON=3Dn This can be enabled by default, right? It doesn't have any external depende= ncy. ... > +++ b/drivers/raw/common/multi_fn/rte_common_multi_fn_version.map > @@ -0,0 +1,11 @@ > +EXPERIMENTAL { > + global: > + > + rte_multi_fn_session_create; > + rte_multi_fn_session_destroy; > + rte_multi_fn_op_pool_create; > + rte_multi_fn_op_bulk_alloc; > + rte_multi_fn_op_free; This list should be sorted alphabetically. > + > + local: *; > +}; > diff --git a/drivers/raw/common/multi_fn/rte_multi_fn.c > b/drivers/raw/common/multi_fn/rte_multi_fn.c > new file mode 100644 > index 000000000..4f8e7fd94 > --- /dev/null > +++ b/drivers/raw/common/multi_fn/rte_multi_fn.c > @@ -0,0 +1,166 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright(c) 2020 Intel Corporation. > + */ > + > +#include > +#include ... > +#include A bunch of these includes are not needed. >From what I could see, only , , , and are needed, apart from the two below. > + > +#include "rte_multi_fn_driver.h" > +#include "rte_multi_fn.h" ... > +++ b/drivers/raw/common/multi_fn/rte_multi_fn.h > @@ -0,0 +1,350 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright(c) 2020 Intel Corporation. > + */ > + > +#ifndef _RTE_MULTI_FN_H_ > +#define _RTE_MULTI_FN_H_ > + > +#ifdef __cplusplus > +extern "C" { > +#endif > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include Only and are needed. > + ... > +__rte_experimental > +static inline void This is a public API, so I'd say this shouldn't be inline, right? > +rte_multi_fn_op_free(struct rte_multi_fn_op *op) { > + if (op !=3D NULL && op->mempool !=3D NULL) > + rte_mempool_put(op->mempool, op); > +} > + > +#ifdef __cplusplus > +} > +#endif > + > +#endif /* _RTE_MULTI_FN_H_ */ > diff --git a/drivers/raw/common/multi_fn/rte_multi_fn_driver.h > b/drivers/raw/common/multi_fn/rte_multi_fn_driver.h > new file mode 100644 > index 000000000..7e1e57fa3 > --- /dev/null > +++ b/drivers/raw/common/multi_fn/rte_multi_fn_driver.h > @@ -0,0 +1,55 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright(c) 2020 Intel Corporation. > + */ > + > +#ifndef _RTE_MULTI_FN_DRIVER_H_ > +#define _RTE_MULTI_FN_DRIVER_H_ > + > +#ifdef __cplusplus > +extern "C" { > +#endif > + > +#include > +#include > +#include > +#include > + Only and are needed. Actually, since rte_multi_fn.h is in the same folder, you can use double qu= otes.