Hi, Comments inline.
Best Regards, Xiao > -----Original Message----- > From: dev <[email protected]> On Behalf Of [email protected] > Sent: Wednesday, April 1, 2020 3:29 AM > To: Jerin Jacob <[email protected]>; Kiran Kumar K > <[email protected]> > Cc: [email protected]; [email protected]; [email protected]; > [email protected]; [email protected]; > [email protected]; [email protected] > Subject: [dpdk-dev] [PATCH v3 02/29] graph: implement node registration > > From: Jerin Jacob <[email protected]> > > 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. > > Signed-off-by: Jerin Jacob <[email protected]> > Signed-off-by: Kiran Kumar K <[email protected]> > Signed-off-by: Pavan Nikhilesh <[email protected]> > Signed-off-by: Nithin Dabilpuram <[email protected]> > --- > 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 > > 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 += -lrte_eal > EXPORT_MAP := rte_graph_version.map > [...] > 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 <stdbool.h> > +#include <stdio.h> > +#include <string.h> > + > +#include <rte_common.h> > +#include <rte_debug.h> > +#include <rte_eal.h> > +#include <rte_errno.h> > +#include <rte_string_fns.h> > + > +#include "graph_private.h" > + > +static struct node_head node_list = 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 there, and ID_CHECK is defined there. > + > +/* Private functions */

