On Tue, Sep 19, 2023 at 9:35 PM <sk...@marvell.com> wrote: > > From: Sunil Kumar Kori <sk...@marvell.com> > > It adds base framework to read a given .cli file as a command line > parameter "-s". > > Example: > # ./dpdk-graph -c 0xff -- -s ./app/graph/examples/dummy.cli > > Each .cli file will contain commands to configure different module like > mempool, ethdev, lookup tables, graph etc. Command parsing is backed by > commandline library. > > Each module needs to expose its supported commands & corresponding > callback functions to commandline library to get them parsed. > > Signed-off-by: Sunil Kumar Kori <sk...@marvell.com> > Signed-off-by: Rakesh Kudurumalla <rkuduruma...@marvell.com> > --- > v3..v4: > - Addressed Nithin's review comments
List the review comments for next versions or minimum, share the patchwork URL for review comments. > + return -EINVAL; > + > + msg_in = malloc(msg_in_len_max + 1); > + msg_out = malloc(msg_out_len_max + 1); > + if ((msg_in == NULL) || (msg_out == NULL)) { > + free(msg_out); > + free(msg_in); > + return -ENOMEM; Please switch to goto exit; scheme. > + } > + > + /* Open input file */ > + f = fopen(file_name, "r"); > + if (f == NULL) { > + free(msg_out); > + free(msg_in); > + return -EIO; Same as here. > + }