Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/114321/?format=api
https://patches.dpdk.org/api/patches/114321/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220727230132.601114-9-cristian.dumitrescu@intel.com/", "project": { "id": 1, "url": "https://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20220727230132.601114-9-cristian.dumitrescu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20220727230132.601114-9-cristian.dumitrescu@intel.com", "date": "2022-07-27T23:01:24", "name": "[V5,09/17] examples/pipeline: add CLI command for pipeline code generation", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "8ee45d9c7ec1bfa601489c877fd41ca7c6900373", "submitter": { "id": 19, "url": "https://patches.dpdk.org/api/people/19/?format=api", "name": "Cristian Dumitrescu", "email": "cristian.dumitrescu@intel.com" }, "delegate": { "id": 1, "url": "https://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20220727230132.601114-9-cristian.dumitrescu@intel.com/mbox/", "series": [ { "id": 24108, "url": "https://patches.dpdk.org/api/series/24108/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=24108", "date": "2022-07-27T23:01:16", "name": "[V5,01/17] pipeline: add pipeline name", "version": 5, "mbox": "https://patches.dpdk.org/series/24108/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/114321/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/114321/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id C8070A00C4;\n\tThu, 28 Jul 2022 01:02:30 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 43FE742BC2;\n\tThu, 28 Jul 2022 01:01:49 +0200 (CEST)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n by mails.dpdk.org (Postfix) with ESMTP id D9EF242B7A\n for <dev@dpdk.org>; Thu, 28 Jul 2022 01:01:44 +0200 (CEST)", "from fmsmga006.fm.intel.com ([10.253.24.20])\n by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 27 Jul 2022 16:01:43 -0700", "from silpixa00400573.ir.intel.com (HELO\n silpixa00400573.ger.corp.intel.com.) ([10.237.223.157])\n by fmsmga006.fm.intel.com with ESMTP; 27 Jul 2022 16:01:41 -0700" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1658962906; x=1690498906;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=JszzWG6YpTg73IuGcweOO4hXjXzQIxz92sm+yet532g=;\n b=UiP3S8o3vAPfCMfym8gw7Ls7WlQhV/VSLaqd/ugaVffUNsmnzwAdbeOT\n I8453tDqe6f8yzq8wF1KefvS/FyAv6ItoSuSBK0/pLh7mh5/aJxqXSTl2\n vUudFz2ei9uGq88FgEMCQmLeGsILmo2GWflZHrFyFYCK+6OcD0uBwJ90o\n 9Qw4Ov1RPUZ97bzaCaymEevCRCNbySIxTvjmn/uTcEqG4mDpF1w+PYsJk\n 3C9bPrqHq1o5rUEwxPeB/CtHDvbYGhPZpHSbnN5hx4AYpR+JKUvUnMc72\n om592+wbzoBgO7Twf7WrMhDrs9h9W/dBrDmd60FV3NOLvGR++mTXsTGOW A==;", "X-IronPort-AV": [ "E=McAfee;i=\"6400,9594,10421\"; a=\"314150920\"", "E=Sophos;i=\"5.93,196,1654585200\"; d=\"scan'208\";a=\"314150920\"", "E=Sophos;i=\"5.93,196,1654585200\"; d=\"scan'208\";a=\"846444343\"" ], "X-ExtLoop1": "1", "From": "Cristian Dumitrescu <cristian.dumitrescu@intel.com>", "To": "dev@dpdk.org", "Cc": "\"Kamalakannan R .\" <kamalakannan.r@intel.com>", "Subject": "[PATCH V5 09/17] examples/pipeline: add CLI command for pipeline code\n generation", "Date": "Wed, 27 Jul 2022 23:01:24 +0000", "Message-Id": "<20220727230132.601114-9-cristian.dumitrescu@intel.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20220727230132.601114-1-cristian.dumitrescu@intel.com>", "References": "<20220727225431.600913-1-cristian.dumitrescu@intel.com>\n <20220727230132.601114-1-cristian.dumitrescu@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org" }, "content": "Add CLI command for the pipeline code generation operation.\n\nSigned-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>\nSigned-off-by: Kamalakannan R. <kamalakannan.r@intel.com>\n---\n examples/pipeline/cli.c | 61 +++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 61 insertions(+)", "diff": "diff --git a/examples/pipeline/cli.c b/examples/pipeline/cli.c\nindex f0285675b3..2b38977be1 100644\n--- a/examples/pipeline/cli.c\n+++ b/examples/pipeline/cli.c\n@@ -983,6 +983,53 @@ cmd_pipeline_port_out(char **tokens,\n \t}\n }\n \n+static const char cmd_pipeline_codegen_help[] =\n+\"pipeline codegen <spec_file> <code_file>\\n\";\n+\n+static void\n+cmd_pipeline_codegen(char **tokens,\n+\tuint32_t n_tokens,\n+\tchar *out,\n+\tsize_t out_size,\n+\tvoid *obj __rte_unused)\n+{\n+\tFILE *spec_file = NULL;\n+\tFILE *code_file = NULL;\n+\tuint32_t err_line;\n+\tconst char *err_msg;\n+\tint status;\n+\n+\tif (n_tokens != 4) {\n+\t\tsnprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]);\n+\t\treturn;\n+\t}\n+\n+\tspec_file = fopen(tokens[2], \"r\");\n+\tif (!spec_file) {\n+\t\tsnprintf(out, out_size, \"Cannot open file %s.\\n\", tokens[2]);\n+\t\treturn;\n+\t}\n+\n+\tcode_file = fopen(tokens[3], \"w\");\n+\tif (!code_file) {\n+\t\tsnprintf(out, out_size, \"Cannot open file %s.\\n\", tokens[3]);\n+\t\treturn;\n+\t}\n+\n+\tstatus = rte_swx_pipeline_codegen(spec_file,\n+\t\t\t\t\t code_file,\n+\t\t\t\t\t &err_line,\n+\t\t\t\t\t &err_msg);\n+\n+\tfclose(spec_file);\n+\tfclose(code_file);\n+\n+\tif (status) {\n+\t\tsnprintf(out, out_size, \"Error %d at line %u: %s\\n.\",\n+\t\t\tstatus, err_line, err_msg);\n+\t\treturn;\n+\t}\n+}\n static const char cmd_pipeline_build_help[] =\n \"pipeline <pipeline_name> build lib <lib_file> io <iospec_file> numa <numa_node>\\n\";\n \n@@ -3009,6 +3056,7 @@ cmd_help(char **tokens,\n \t\t\t\"\\tpipeline create\\n\"\n \t\t\t\"\\tpipeline port in\\n\"\n \t\t\t\"\\tpipeline port out\\n\"\n+\t\t\t\"\\tpipeline codegen\\n\"\n \t\t\t\"\\tpipeline build\\n\"\n \t\t\t\"\\tpipeline table add\\n\"\n \t\t\t\"\\tpipeline table delete\\n\"\n@@ -3078,6 +3126,12 @@ cmd_help(char **tokens,\n \t\t}\n \t}\n \n+\tif ((strcmp(tokens[0], \"pipeline\") == 0) &&\n+\t\t(n_tokens == 2) && (strcmp(tokens[1], \"codegen\") == 0)) {\n+\t\tsnprintf(out, out_size, \"\\n%s\\n\", cmd_pipeline_codegen_help);\n+\t\treturn;\n+\t}\n+\n \tif ((strcmp(tokens[0], \"pipeline\") == 0) &&\n \t\t(n_tokens == 2) && (strcmp(tokens[1], \"build\") == 0)) {\n \t\tsnprintf(out, out_size, \"\\n%s\\n\", cmd_pipeline_build_help);\n@@ -3356,6 +3410,13 @@ cli_process(char *in, char *out, size_t out_size, void *obj)\n \t\t\treturn;\n \t\t}\n \n+\t\tif ((n_tokens >= 3) &&\n+\t\t\t(strcmp(tokens[1], \"codegen\") == 0)) {\n+\t\t\tcmd_pipeline_codegen(tokens, n_tokens, out, out_size,\n+\t\t\t\tobj);\n+\t\t\treturn;\n+\t\t}\n+\n \t\tif ((n_tokens >= 3) &&\n \t\t\t(strcmp(tokens[2], \"build\") == 0)) {\n \t\t\tcmd_pipeline_build(tokens, n_tokens, out, out_size,\n", "prefixes": [ "V5", "09/17" ] }{ "id": 114321, "url": "