Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/44570/?format=api
https://patches.dpdk.org/api/patches/44570/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1536675645-10105-3-git-send-email-reshma.pattan@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": "<1536675645-10105-3-git-send-email-reshma.pattan@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1536675645-10105-3-git-send-email-reshma.pattan@intel.com", "date": "2018-09-11T14:20:32", "name": "[v2,02/15] net/softnic: map flow attributes to pipeline table", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "e0da33279c9f6fe560a63c54a5ce87bac0151c2d", "submitter": { "id": 70, "url": "https://patches.dpdk.org/api/people/70/?format=api", "name": "Pattan, Reshma", "email": "reshma.pattan@intel.com" }, "delegate": { "id": 10018, "url": "https://patches.dpdk.org/api/users/10018/?format=api", "username": "cristian_dumitrescu", "first_name": "Cristian", "last_name": "Dumitrescu", "email": "cristian.dumitrescu@intel.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1536675645-10105-3-git-send-email-reshma.pattan@intel.com/mbox/", "series": [ { "id": 1268, "url": "https://patches.dpdk.org/api/series/1268/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=1268", "date": "2018-09-11T14:20:32", "name": null, "version": 2, "mbox": "https://patches.dpdk.org/series/1268/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/44570/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/44570/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 4E7824F9C;\n\tTue, 11 Sep 2018 16:20:53 +0200 (CEST)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id 7F5954CA2\n\tfor <dev@dpdk.org>; Tue, 11 Sep 2018 16:20:50 +0200 (CEST)", "from fmsmga007.fm.intel.com ([10.253.24.52])\n\tby fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t11 Sep 2018 07:20:50 -0700", "from sivswdev02.ir.intel.com (HELO localhost.localdomain)\n\t([10.237.217.46])\n\tby fmsmga007.fm.intel.com with ESMTP; 11 Sep 2018 07:20:49 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.53,360,1531810800\"; d=\"scan'208\";a=\"69156850\"", "From": "Reshma Pattan <reshma.pattan@intel.com>", "To": "dev@dpdk.org", "Cc": "Cristian Dumitrescu <cristian.dumitrescu@intel.com>,\n\tReshma Pattan <reshma.pattan@intel.com>", "Date": "Tue, 11 Sep 2018 15:20:32 +0100", "Message-Id": "<1536675645-10105-3-git-send-email-reshma.pattan@intel.com>", "X-Mailer": "git-send-email 1.7.0.7", "In-Reply-To": "<1536251222-17275-1-git-send-email-reshma.pattan@intel.com>", "References": "<1536251222-17275-1-git-send-email-reshma.pattan@intel.com>", "Subject": "[dpdk-dev] [PATCH v2 02/15] net/softnic: map flow attributes to\n\tpipeline table", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Added mapping support from rte flow attributes\nto softnic pipeline and table.\n\nSo added flow attribute map set and get functions\ndefinition to new file rte_eth_sofnic_flow.c.\n\nAdded pmd flow internals with ingress and egress\nflow attribute maps.\n\nSigned-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>\nSigned-off-by: Reshma Pattan <reshma.pattan@intel.com>\n---\n drivers/net/softnic/Makefile | 1 +\n drivers/net/softnic/meson.build | 1 +\n drivers/net/softnic/rte_eth_softnic_flow.c | 46 +++++++++++++++++++++++++\n drivers/net/softnic/rte_eth_softnic_internals.h | 31 +++++++++++++++++\n 4 files changed, 79 insertions(+)\n create mode 100644 drivers/net/softnic/rte_eth_softnic_flow.c", "diff": "diff --git a/drivers/net/softnic/Makefile b/drivers/net/softnic/Makefile\nindex ea9b65f4e..12515b10d 100644\n--- a/drivers/net/softnic/Makefile\n+++ b/drivers/net/softnic/Makefile\n@@ -33,6 +33,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_PMD_SOFTNIC) += rte_eth_softnic_action.c\n SRCS-$(CONFIG_RTE_LIBRTE_PMD_SOFTNIC) += rte_eth_softnic_pipeline.c\n SRCS-$(CONFIG_RTE_LIBRTE_PMD_SOFTNIC) += rte_eth_softnic_thread.c\n SRCS-$(CONFIG_RTE_LIBRTE_PMD_SOFTNIC) += rte_eth_softnic_cli.c\n+SRCS-$(CONFIG_RTE_LIBRTE_PMD_SOFTNIC) += rte_eth_softnic_flow.c\n SRCS-$(CONFIG_RTE_LIBRTE_PMD_SOFTNIC) += parser.c\n SRCS-$(CONFIG_RTE_LIBRTE_PMD_SOFTNIC) += conn.c\n \ndiff --git a/drivers/net/softnic/meson.build b/drivers/net/softnic/meson.build\nindex ff9822747..56e5e2b21 100644\n--- a/drivers/net/softnic/meson.build\n+++ b/drivers/net/softnic/meson.build\n@@ -13,6 +13,7 @@ sources = files('rte_eth_softnic_tm.c',\n \t'rte_eth_softnic_pipeline.c',\n \t'rte_eth_softnic_thread.c',\n \t'rte_eth_softnic_cli.c',\n+\t'rte_eth_softnic_flow.c',\n \t'parser.c',\n \t'conn.c')\n deps += ['pipeline', 'port', 'table', 'sched']\ndiff --git a/drivers/net/softnic/rte_eth_softnic_flow.c b/drivers/net/softnic/rte_eth_softnic_flow.c\nnew file mode 100644\nindex 000000000..843db7590\n--- /dev/null\n+++ b/drivers/net/softnic/rte_eth_softnic_flow.c\n@@ -0,0 +1,46 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2017 Intel Corporation\n+ */\n+\n+#include \"rte_eth_softnic_internals.h\"\n+#include \"rte_eth_softnic.h\"\n+\n+int\n+flow_attr_map_set(struct pmd_internals *softnic,\n+\t\tuint32_t group_id,\n+\t\tint ingress,\n+\t\tconst char *pipeline_name,\n+\t\tuint32_t table_id)\n+{\n+\tstruct pipeline *pipeline;\n+\tstruct flow_attr_map *map;\n+\n+\tif (group_id >= SOFTNIC_FLOW_MAX_GROUPS ||\n+\t\t\tpipeline_name == NULL)\n+\t\treturn -1;\n+\n+\tpipeline = softnic_pipeline_find(softnic, pipeline_name);\n+\tif (pipeline == NULL ||\n+\t\t\ttable_id >= pipeline->n_tables)\n+\t\treturn -1;\n+\n+\tmap = (ingress) ? &softnic->flow.ingress_map[group_id] :\n+\t\t&softnic->flow.egress_map[group_id];\n+\tstrcpy(map->pipeline_name, pipeline_name);\n+\tmap->table_id = table_id;\n+\tmap->valid = 1;\n+\n+\treturn 0;\n+}\n+\n+struct flow_attr_map *\n+flow_attr_map_get(struct pmd_internals *softnic,\n+\t\tuint32_t group_id,\n+\t\tint ingress)\n+{\n+\tif (group_id >= SOFTNIC_FLOW_MAX_GROUPS)\n+\t\treturn NULL;\n+\n+\treturn (ingress) ? &softnic->flow.ingress_map[group_id] :\n+\t\t&softnic->flow.egress_map[group_id];\n+}\ndiff --git a/drivers/net/softnic/rte_eth_softnic_internals.h b/drivers/net/softnic/rte_eth_softnic_internals.h\nindex 882cfd191..d1996c469 100644\n--- a/drivers/net/softnic/rte_eth_softnic_internals.h\n+++ b/drivers/net/softnic/rte_eth_softnic_internals.h\n@@ -51,6 +51,21 @@ struct rte_flow;\n \n TAILQ_HEAD(flow_list, rte_flow);\n \n+struct flow_attr_map {\n+\tchar pipeline_name[NAME_SIZE];\n+\tuint32_t table_id;\n+\tint valid;\n+};\n+\n+#ifndef SOFTNIC_FLOW_MAX_GROUPS\n+#define SOFTNIC_FLOW_MAX_GROUPS 64\n+#endif\n+\n+struct flow_internals {\n+\tstruct flow_attr_map ingress_map[SOFTNIC_FLOW_MAX_GROUPS];\n+\tstruct flow_attr_map egress_map[SOFTNIC_FLOW_MAX_GROUPS];\n+};\n+\n /**\n * MEMPOOL\n */\n@@ -497,6 +512,7 @@ struct pmd_internals {\n \t\tstruct tm_internals tm; /**< Traffic Management */\n \t} soft;\n \n+\tstruct flow_internals flow;\n \tstruct softnic_conn *conn;\n \tstruct softnic_mempool_list mempool_list;\n \tstruct softnic_swq_list swq_list;\n@@ -510,6 +526,21 @@ struct pmd_internals {\n \tstruct softnic_thread_data thread_data[RTE_MAX_LCORE];\n };\n \n+/**\n+ * Ethdev Flow API\n+ */\n+int\n+flow_attr_map_set(struct pmd_internals *softnic,\n+\t\tuint32_t group_id,\n+\t\tint ingress,\n+\t\tconst char *pipeline_name,\n+\t\tuint32_t table_id);\n+\n+struct flow_attr_map *\n+flow_attr_map_get(struct pmd_internals *softnic,\n+\t\tuint32_t group_id,\n+\t\tint ingress);\n+\n /**\n * MEMPOOL\n */\n", "prefixes": [ "v2", "02/15" ] }{ "id": 44570, "url": "