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 74188A0562; Sat, 4 Apr 2020 09:57:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id ABE6B5F13; Sat, 4 Apr 2020 09:57:36 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 4B2EEFFA for ; Sat, 4 Apr 2020 09:57:32 +0200 (CEST) IronPort-SDR: tJVjENT2Q67yEDmwufMvDJ3GPcH0peNBm6LOi/ZULEiajyEnhuTPSIsyDa8v0oqB+qLntvYVDG ISuZQMj6Js3w== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Apr 2020 00:57:32 -0700 IronPort-SDR: e3+13SYMaTN3zMK5EP5LMnk6FwviiUyZpdpQLpgjpv+VRPJlAlF0HDqhhVIGwmg5e8XJsm6FBk BTVHKKNy5dUg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,343,1580803200"; d="scan'208";a="296191512" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by FMSMGA003.fm.intel.com with ESMTP; 04 Apr 2020 00:57:32 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 4 Apr 2020 00:57:31 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Sat, 4 Apr 2020 00:57:31 -0700 Received: from FMSEDG001.ED.cps.intel.com (10.1.192.133) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Sat, 4 Apr 2020 00:57:31 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.102) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 4 Apr 2020 00:57:24 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XTaMSjVaOcq05eThFTDiT7aJ8pVW6XaTFZwkg3o/voXljnj9WsZ+qgDh1EVxfXvq+swdMA+V0GFZtlo9S+KqJpBBzKsw4titi6TgRO3yKF6gjSGMbvTRtCQZg8DMa6aZdHawUWLAJAuUOunfuMPpFk65Gb57Bekqxk272ezE7QVMy7WThE/neGUEcgCw6ANoF4APni/+XMVhCzNEWmFJRAzGHz4ssXQPF1+9+Wsqo6oe/+BUdKoVh8Z6MRpJJcoA9ytZSm93W0efMYL0dsq1yHmJf2zx/jYO5O0bR5zvQdp8lGrSBVSiKVKUXudqWh1F82mnTh8N0uv4t7E4eM2A3g== 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=17ct0ZHsTT2cU0iMnDwCwf2l/H0YZRFoVEoSDdYKgdU=; b=nk8I0esh5c2SZpdxBt4SEzKS+tZtQ6r6XGfW+O7YeXgbUTPOAGzR65kTMKv0v99lemrC0iRfsLP9H/v+1ZbazIcfKum/YOLCNNWGEUs2FgnLVkjRy1NXHHyRt2SnF5+kYEBaSKzLw3aGA8R1MNbk28pgVLxdvyNtBI8a5UxqU/JeSsldl306mlHuamqk/vf5NMiDbspy5EKuEVBBqN/AHmbQX7YurytYVQgfDStMrPqm78QyI+a3jniAt95iBVbdqh8pc5YTDszehZlAEyi5xsOD6eO1TX54t8bxupjfrhwcZtMBzZZl8mDoC65CsQGLAKlD+Dw7jRwQLmEAdvSMfQ== 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=17ct0ZHsTT2cU0iMnDwCwf2l/H0YZRFoVEoSDdYKgdU=; b=QRs7ZZNLw7UzQdwHCgaq60iiBH9iHiAZEf4sw5+++k13fU7Llcjq9kx/RnmhOhkEfpCFymYH0Xh+NiS2PaoFEGSyWZvaXb6Vp+ztv18tVzkNPzbnkY78XVYBc4rHPdjLm9DD2X77N12omzX0gPUDvH+gH3J/pxHOYYUGI6FJE10= Received: from DM5PR11MB1484.namprd11.prod.outlook.com (2603:10b6:4:8::14) by DM5PR11MB1497.namprd11.prod.outlook.com (2603:10b6:4:c::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.19; Sat, 4 Apr 2020 07:57:22 +0000 Received: from DM5PR11MB1484.namprd11.prod.outlook.com ([fe80::8c2f:6f2a:f782:61c3]) by DM5PR11MB1484.namprd11.prod.outlook.com ([fe80::8c2f:6f2a:f782:61c3%10]) with mapi id 15.20.2878.018; Sat, 4 Apr 2020 07:57:22 +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 04/29] graph: implement node debug routines Thread-Index: AQHWB5LxWiHNSV9d+0CeKqzS7GMls6honV/Q Date: Sat, 4 Apr 2020 07:57:21 +0000 Message-ID: References: <20200326165644.866053-1-jerinj@marvell.com> <20200331192945.2466880-1-jerinj@marvell.com> <20200331192945.2466880-5-jerinj@marvell.com> In-Reply-To: <20200331192945.2466880-5-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.102.204.36] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 08e7b371-bce1-4483-c4a8-08d7d86dce50 x-ms-traffictypediagnostic: DM5PR11MB1497: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4125; x-forefront-prvs: 03630A6A4A x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR11MB1484.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10019020)(39860400002)(136003)(366004)(396003)(346002)(376002)(4326008)(55016002)(66556008)(66446008)(66476007)(66946007)(76116006)(54906003)(316002)(478600001)(2906002)(64756008)(33656002)(7696005)(86362001)(53546011)(52536014)(81166006)(81156014)(5660300002)(6506007)(110136005)(8676002)(26005)(186003)(9686003)(71200400001)(8936002); DIR:OUT; SFP:1102; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 0GbZsLoRrZEZJDG3Qm89VeLXvLHj0sW3xD58v5IakzhbDkv+SDn8jhKmqSd4rSe/orISQf/MfUMG/FhtnUgO4hbTUHw7ngaoa5aejguZ4gdbO/p2EqjkpACTHj4N72yCd2m43am+e+N3VXZl2VuHVCkzLZ0ZB2oUV+9k8NeSa+Dyh980Q+cy1PvAEDBqfVMQoLng95qhOstI4cumD1IFHUqKFZDjFPSgrboELVhIeeawXI7lN+BuT6r4HhbOscGyDPVKNKXNo9QWUA/VT9jycv+3yazEEOgaCRvls31LCyFDG8rbBs52ubO2cOKyhE7wSoh7yzO065KlA0XBGZvXZ5SjGmVvfqlsY8NN7YFYyJ4ERN/09D/RIgv9sOwX42/kPrsRhLiM7gh1Oy9wnpCwAdXoz4wddsonOMPQxGJa1gRKJbjrriwO6wfv2sZXYIPj x-ms-exchange-antispam-messagedata: lK9liwL9ur+9fUvPMC5gaijdyoR4l/ixbTDsfwn7qI87aNpPARZz7npqJGltE6mSqqYzUq2ZOMFcCoJTtOuc8ae+c4RZbj5pA/Gl+LulDnnSKWr0JqDJgUZ5aLRulm5ZdPDzBkX1cM4WSHc9R0hVuw== 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: 08e7b371-bce1-4483-c4a8-08d7d86dce50 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Apr 2020 07:57:21.8550 (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: jhmB4BeW0+qO13FVBpSFFM4hPOqv3svBTwtGfY1fjxlha74mvmhn5zf+h6ZQs5/qaOuJwEU1l1/gYgaWJJDmaQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB1497 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 04/29] graph: implement node debug routines 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, Comment 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 04/29] graph: implement node debug routines >=20 > From: Jerin Jacob >=20 > Adding node debug API implementation support to dump > single or all the node objects to the given file. >=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_debug.c | 25 ++++++++++++++++++++ > lib/librte_graph/graph_private.h | 12 ++++++++++ > lib/librte_graph/meson.build | 2 +- > lib/librte_graph/node.c | 32 ++++++++++++++++++++++++++ > lib/librte_graph/rte_graph_version.map | 1 + > 6 files changed, 72 insertions(+), 1 deletion(-) > create mode 100644 lib/librte_graph/graph_debug.c >=20 > diff --git a/lib/librte_graph/Makefile b/lib/librte_graph/Makefile > index 933d0ee49..2a6d86933 100644 > --- a/lib/librte_graph/Makefile > +++ b/lib/librte_graph/Makefile > @@ -16,6 +16,7 @@ EXPORT_MAP :=3D rte_graph_version.map > # all source are stored in SRCS-y > SRCS-$(CONFIG_RTE_LIBRTE_GRAPH) +=3D node.c > SRCS-$(CONFIG_RTE_LIBRTE_GRAPH) +=3D graph.c > +SRCS-$(CONFIG_RTE_LIBRTE_GRAPH) +=3D graph_debug.c >=20 [...] > diff --git a/lib/librte_graph/meson.build b/lib/librte_graph/meson.build > index 5754ac23b..01512182f 100644 > --- a/lib/librte_graph/meson.build > +++ b/lib/librte_graph/meson.build > @@ -4,7 +4,7 @@ >=20 > name =3D 'graph' >=20 > -sources =3D files('node.c', 'graph.c') > +sources =3D files('node.c', 'graph.c', 'graph_debug.c') > headers =3D files('rte_graph.h') > allow_experimental_apis =3D true >=20 > diff --git a/lib/librte_graph/node.c b/lib/librte_graph/node.c > index 8de857889..2f9c2ea4c 100644 > --- a/lib/librte_graph/node.c > +++ b/lib/librte_graph/node.c > @@ -377,6 +377,38 @@ rte_node_edge_get(rte_node_t id, char > *next_nodes[]) > return rc; > } >=20 > +static void > +node_scan_dump(FILE *f, rte_node_t id, bool all) > +{ > + struct node *node; > + > + RTE_ASSERT(f !=3D NULL); > + NODE_ID_CHECK(id); > + > + STAILQ_FOREACH(node, &node_list, next) { > + if (all =3D=3D true) { > + node_dump(f, node); > + } else if (node->id =3D=3D id) { > + node_dump(f, node); > + return; > + } > + } > +fail: we can remove this "fail" mark since it's not used as jmp target. > + return; > +}