From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1A29E425E6; Wed, 20 Sep 2023 06:41:20 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C3CCF40697; Wed, 20 Sep 2023 06:41:19 +0200 (CEST) Received: from mail-vk1-f172.google.com (mail-vk1-f172.google.com [209.85.221.172]) by mails.dpdk.org (Postfix) with ESMTP id 9720E402DD for ; Wed, 20 Sep 2023 06:41:18 +0200 (CEST) Received: by mail-vk1-f172.google.com with SMTP id 71dfb90a1353d-493542a25dfso2519289e0c.0 for ; Tue, 19 Sep 2023 21:41:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695184878; x=1695789678; darn=dpdk.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=qwCzRq8CHvEPix+/Skym6Y4kqDhAWnJL2jZzgBl6jBA=; b=no/USsfXiR1owjNQAmJLqbRVWj6V+91UxtkcuLWPRwnXtklrFMcYVmdU/FS6vDTCoo 7iUGkKhWsldWgloMVw5/7b4tGYBZKC6LwAHXf8Zk1JdPlgYv8mXR1Y9YQCELFy7v9qzM EaR8tQYbAfZ9tmQbpqaahr6QrkyxB/XUxNFpLQZOlpkIR9mXHY9ujSOLlQI87X10oTFP wjqQ9ojZ4bA/C59+St1CbynB9NCz/kl5DB1Y3QjrfrkLQXg5eq1TnnBkwDAgYDaB6CwR r6aqh4a8rOyO1bdqZZugMgXnzlDEM4gK1qKKuYtUm3oHvXpfAJM5OFEpLgr7QrPaALBl VltA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695184878; x=1695789678; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qwCzRq8CHvEPix+/Skym6Y4kqDhAWnJL2jZzgBl6jBA=; b=P1qiy9NU990GXaX5uY17pBc2ZEyxHzEzqVMoIKTApYbOZlOfuIXH5pLBTQi5Dn7/9J fDBD+0XmByzCZOvXv3LVNSfESvmHZ1GkLAKyUzs6E8wBr7fR9vcBJgTMLjFkQFHbVG/y h96UmfwefShp/FDEjv8NiscTO/C5l/rGCDy7owpXd251UKcKKWYxv5aNKS/s3TKQ4oPU YY49J1QByLT/A1RghI5z9lMxGo840jVBG//Hissf1yfO2iSQiRm27wT11vZ6qFchHuk6 XPPQGhIa170LlhG0lp6PHcaXJCLsk1f6fojXisGghq/zSmgC/tcrMzYMdGLaCR/zzGt0 Oksg== X-Gm-Message-State: AOJu0YxECXZyILIYp89wE6V+Ghj1Gl32W3G0Ev7x/ZJRs4cwpOxllSNR xHSGR+QUv4BfYRWuwt4Yu60cECjRym2S+GLNDTU= X-Google-Smtp-Source: AGHT+IHtxYMFGQK/rSjkWJn/9iJFDU/3k/w3y5nfJdNXYboUx3P/K8OVeqMLH6ggkgYnpgTEgyS6+ijp7aFFxAPt7ho= X-Received: by 2002:a1f:4a41:0:b0:48d:5be:2899 with SMTP id x62-20020a1f4a41000000b0048d05be2899mr1661556vka.2.1695184877864; Tue, 19 Sep 2023 21:41:17 -0700 (PDT) MIME-Version: 1.0 References: <20230908104907.4060511-1-skori@marvell.com> <20230919160455.1678716-1-skori@marvell.com> In-Reply-To: <20230919160455.1678716-1-skori@marvell.com> From: Jerin Jacob Date: Wed, 20 Sep 2023 10:10:52 +0530 Message-ID: Subject: Re: [PATCH v4 01/14] app/graph: add application framework to read CLI To: skori@marvell.com Cc: Rakesh Kudurumalla , dev@dpdk.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Tue, Sep 19, 2023 at 9:35=E2=80=AFPM wrote: > > From: Sunil Kumar Kori > > 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 > Signed-off-by: Rakesh Kudurumalla > --- > 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 =3D malloc(msg_in_len_max + 1); > + msg_out =3D malloc(msg_out_len_max + 1); > + if ((msg_in =3D=3D NULL) || (msg_out =3D=3D NULL)) { > + free(msg_out); > + free(msg_in); > + return -ENOMEM; Please switch to goto exit; scheme. > + } > + > + /* Open input file */ > + f =3D fopen(file_name, "r"); > + if (f =3D=3D NULL) { > + free(msg_out); > + free(msg_in); > + return -EIO; Same as here. > + }