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 17C79A0562; Fri, 3 Apr 2020 12:44:31 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AC1DD1C12A; Fri, 3 Apr 2020 12:44:30 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 3DD6A1C0B8 for ; Fri, 3 Apr 2020 12:44:28 +0200 (CEST) IronPort-SDR: bPNPVoWSqajz5KUDmtCK42nVT+3dhCT+ohYF+fdmTLTBMVux2v5HJFK6hE7U9XXk1nOPDDRr4b wwTimiZeFEqA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Apr 2020 03:44:27 -0700 IronPort-SDR: FNjYN2QQymp1GrZwAjGjJLvUE0ZS9X31BuxnxJf7llaOgemE/HZ6bUJkc/yxRmVaTZsOcg3rc/ oZjfULEPXF9g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,339,1580803200"; d="scan'208";a="242781766" Received: from orsmsx104.amr.corp.intel.com ([10.22.225.131]) by fmsmga008.fm.intel.com with ESMTP; 03 Apr 2020 03:44:26 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX104.amr.corp.intel.com (10.22.225.131) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 3 Apr 2020 03:44:26 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 3 Apr 2020 03:44:26 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Fri, 3 Apr 2020 03:44:26 -0700 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (104.47.38.57) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 3 Apr 2020 03:44:25 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VUlb0yQhi0N2/B2gPD6QiOQGWPeCDgeAj+aGEQDIZ7ZPcwx+RfZAxLfv7cfFKkEr0wzftyEWpRZnvqtlKmjbCFg9/z1cno9SPfMNQyY76sU3vo0t0kKim6Kf1ciumqCyFe4adV0TpkYhyf1Ub9rjILeHBjThcr23Rav/hgpOVQ/NIRVHt+dB6pa/d/CPGjW7APgPAjtQY+O49hL0MyjQZaguL/mWc3eZGph+WMDDb3qM1Zv/tRQ21XTkQrrfiXAbTtnCnrfgbW1NUJesU2FF+5yiAb4oghdZerH03M4QbDXRw1Yi9nbl6PhJWLmadwKUoFeqpoGR67/AUPOREWZnQw== 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=1Y13wXAssLDHjn4zVoJEh26sCqxFQG9G4W12duHRII8=; b=H4gFn74kfgK3MCob+xAo272JP6Eh/+8o8V5tQZshd3O9q5aBUzALByU0VOfTCS8TjW6fCYJqedanUV6D+0kDr0TaTMZp3KCPJagkgGpHxJVNeCKnvmud4RLHn+eOuMTTlkhF9fXeJOgIDwuSAsp7pNXvqHPIfE7mvwGRrHoV+5MqjilBahs+N1COezA4LZCCvhBlWszKKd4FM7DEqC7/ERT8ULL2M2nkN8qDC6ELoIMb/w/eC79ZI+8w3megFovEVqNTHJTccekISJTEBe89GEog0oeV29halZTiB26Zq3J5vPSa7irWUSu3pekcfrWVIiaX06Z6Bow9HRel2Ge0AQ== 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=1Y13wXAssLDHjn4zVoJEh26sCqxFQG9G4W12duHRII8=; b=jneIgYcWzyT+6vFwPM1j1xQ7KmA8MNvkB/XVWtDVGbati8jsvXRPeNtnum36H7g1uHSFEko82LC5OUJj4ZqiQ51pkUrbeCJq2hKjQu4aCL6dKM2H1/4dgo7/ngTCtuI6e5TME+ohzkrw3MSVcgezhj4+wkGGTz2kAL1XqWHnMFc= Received: from BN6PR11MB1473.namprd11.prod.outlook.com (2603:10b6:405:a::16) by BN6PR11MB2034.namprd11.prod.outlook.com (2603:10b6:404:43::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.19; Fri, 3 Apr 2020 10:44:23 +0000 Received: from BN6PR11MB1473.namprd11.prod.outlook.com ([fe80::d013:5d99:e57e:570e]) by BN6PR11MB1473.namprd11.prod.outlook.com ([fe80::d013:5d99:e57e:570e%7]) with mapi id 15.20.2856.019; Fri, 3 Apr 2020 10:44:23 +0000 From: "Wang, Xiao W" To: "jerinj@marvell.com" , Kiran Kumar K CC: "dev@dpdk.org" , "thomas@monjalon.net" , "david.marchand@redhat.com" , "mdr@ashroe.eu" , "mattias.ronnblom@ericsson.com" , "pbhagavatula@marvell.com" , "ndabilpuram@marvell.com" Thread-Topic: [dpdk-dev] [PATCH v3 02/29] graph: implement node registration Thread-Index: AQHWB5LX6c4kBBHceEeohv8KbgXBkahnOblg Date: Fri, 3 Apr 2020 10:44:23 +0000 Message-ID: References: <20200326165644.866053-1-jerinj@marvell.com> <20200331192945.2466880-1-jerinj@marvell.com> <20200331192945.2466880-3-jerinj@marvell.com> In-Reply-To: <20200331192945.2466880-3-jerinj@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=xiao.w.wang@intel.com; x-originating-ip: [192.55.52.223] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a158372c-fcbf-4ab0-b989-08d7d7bbf90a x-ms-traffictypediagnostic: BN6PR11MB2034: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2449; x-forefront-prvs: 0362BF9FDB x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN6PR11MB1473.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10019020)(376002)(366004)(346002)(136003)(396003)(39860400002)(86362001)(478600001)(33656002)(71200400001)(66946007)(76116006)(52536014)(8676002)(81166006)(66446008)(64756008)(66556008)(110136005)(66476007)(316002)(8936002)(54906003)(81156014)(2906002)(6506007)(4326008)(5660300002)(55016002)(7696005)(53546011)(26005)(186003)(9686003); DIR:OUT; SFP:1102; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: nduwugkpr50j6vl7RbNhtJDgaXFXDpwYcMkI69Hwx83ISvj9QX0Ro8q5M/6F9Z7M/s1Thy45kndkBxtgctrrWi0cC0W4RTEUjwLQUUBjugKNNVtaaj9z8GuK6OAGuGqo5VVCSdov2Ie0Wrp62lAmP136/F4VFoYae97sqfylYioNoa/fpV+IdBbtcd8Xwjzgz6aUhdJUSd9BKuCUK93BSHWg3tB17SFRmnQmv8iWSXrQYM6tDHMj3FOpuhm7jYpyCR42PTN7EoKVVBpsCpEuYUr3RKj6uItiLDh1ZLmBt2J61PhcrNh1/fr70RUgw1wBgtyAe1y9oM8gx79+DbsgAmv4oCZ3SuaUOxoDc7f7K8jk97V0qurDHLxCHJNqfpJpoPd+LifY8T+ZdBJTLQc1zhZ6jvTzIOFu5E8yO5jA7vpEhIY9Ys19eC0jXsEKWnqR x-ms-exchange-antispam-messagedata: karHs03jBl2d8oo9QueslmoVb2c3CdUktMg7Q1ULHL9kmoJym1H8fag0omG63+rHy0NW4Hh6tnZ27t6SqAuhLnk2kU3bGjeCu/p8lbIs+FT1lJmePq0IdGDRRk65jQMVCWPZOTB2UxNvV0Ab+hlXBA== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: a158372c-fcbf-4ab0-b989-08d7d7bbf90a X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Apr 2020 10:44:23.1881 (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: BXcIWq9hoIXSUvXehuwLe3pS3BM31OV162bk1inhCl3WddyGDcby8zQLJhJK1eY1QBxHTGcOcNvEL4kOF9StxA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB2034 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 02/29] graph: implement node registration 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, Comments inline. Best Regards, Xiao > -----Original Message----- > From: dev On Behalf Of jerinj@marvell.com > Sent: Wednesday, April 1, 2020 3:29 AM > To: Jerin Jacob ; Kiran Kumar K > > Cc: dev@dpdk.org; thomas@monjalon.net; david.marchand@redhat.com; > mdr@ashroe.eu; mattias.ronnblom@ericsson.com; > pbhagavatula@marvell.com; ndabilpuram@marvell.com > Subject: [dpdk-dev] [PATCH v3 02/29] graph: implement node registration >=20 > From: Jerin Jacob >=20 > Adding rte_node_register() API implementation includes allocating > memory for node object, check for duplicate node name and > add the allocated node to STAILQ node_list for future use. >=20 > Signed-off-by: Jerin Jacob > Signed-off-by: Kiran Kumar K > Signed-off-by: Pavan Nikhilesh > Signed-off-by: Nithin Dabilpuram > --- > lib/librte_graph/Makefile | 1 + > lib/librte_graph/graph.c | 18 +++- > lib/librte_graph/graph_private.h | 75 ++++++++++++++++ > lib/librte_graph/meson.build | 2 +- > lib/librte_graph/node.c | 115 +++++++++++++++++++++++++ > lib/librte_graph/rte_graph_version.map | 4 + > 6 files changed, 213 insertions(+), 2 deletions(-) > create mode 100644 lib/librte_graph/graph_private.h > create mode 100644 lib/librte_graph/node.c >=20 > diff --git a/lib/librte_graph/Makefile b/lib/librte_graph/Makefile > index 26fe514f3..933d0ee49 100644 > --- a/lib/librte_graph/Makefile > +++ b/lib/librte_graph/Makefile > @@ -14,6 +14,7 @@ LDLIBS +=3D -lrte_eal > EXPORT_MAP :=3D rte_graph_version.map >=20 [...] > index 000000000..7999ca6ed > --- /dev/null > +++ b/lib/librte_graph/node.c > @@ -0,0 +1,115 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright(C) 2020 Marvell International Ltd. > + */ > + > +#include > +#include > +#include > + > +#include > +#include > +#include > +#include > +#include > + > +#include "graph_private.h" > + > +static struct node_head node_list =3D STAILQ_HEAD_INITIALIZER(node_list)= ; > +static rte_node_t node_id; > + > +#define NODE_ID_CHECK(id) ID_CHECK(id, node_id) It's better to move this MACRO into the next patch since it's first used th= ere, and ID_CHECK is defined there. > + > +/* Private functions */