Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/7769/?format=api
https://patches.dpdk.org/api/patches/7769/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1445346087-2880-3-git-send-email-michalx.k.jastrzebski@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": "<1445346087-2880-3-git-send-email-michalx.k.jastrzebski@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1445346087-2880-3-git-send-email-michalx.k.jastrzebski@intel.com", "date": "2015-10-20T13:01:24", "name": "[dpdk-dev,v4,2/5] pipeline: added bulk add/delete functions for table", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "73b19cb059ad88f6f5802004788ef489a232e04d", "submitter": { "id": 74, "url": "https://patches.dpdk.org/api/people/74/?format=api", "name": "Michal Jastrzebski", "email": "michalx.k.jastrzebski@intel.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1445346087-2880-3-git-send-email-michalx.k.jastrzebski@intel.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/7769/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/7769/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 0EC1D8E8F;\n\tTue, 20 Oct 2015 15:04:28 +0200 (CEST)", "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id F16348E95\n\tfor <dev@dpdk.org>; Tue, 20 Oct 2015 15:04:25 +0200 (CEST)", "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby fmsmga102.fm.intel.com with ESMTP; 20 Oct 2015 06:01:57 -0700", "from unknown (HELO Sent) ([10.217.248.25])\n\tby orsmga002.jf.intel.com with SMTP; 20 Oct 2015 06:01:55 -0700", "by Sent (sSMTP sendmail emulation); Tue, 20 Oct 2015 15:01:54 +0116" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.17,707,1437462000\"; d=\"scan'208\";a=\"830846825\"", "From": "Michal Jastrzebski <michalx.k.jastrzebski@intel.com>", "To": "dev@dpdk.org", "Date": "Tue, 20 Oct 2015 15:01:24 +0200", "Message-Id": "<1445346087-2880-3-git-send-email-michalx.k.jastrzebski@intel.com>", "X-Mailer": "git-send-email 2.1.1", "In-Reply-To": "<1445346087-2880-1-git-send-email-michalx.k.jastrzebski@intel.com>", "References": "<1445346087-2880-1-git-send-email-michalx.k.jastrzebski@intel.com>", "Subject": "[dpdk-dev] [PATCH v4 2/5] pipeline: added bulk add/delete functions\n\tfor table", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "patches and discussions about DPDK <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "From: Marcin Kerlin <marcinx.kerlin@intel.com>\n\nAdded functions for adding/deleting multiple records to table owned by\npipeline. The LIBABIVER number is incremented for table and pipeline\nlibraries.\n\nSigned-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>\nSigned-off-by: Marcin Kerlin <marcinx.kerlin@intel.com>\nAcked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>\n---\n lib/librte_pipeline/Makefile | 2 +-\n lib/librte_pipeline/rte_pipeline.c | 106 +++++++++++++++++++++++++++\n lib/librte_pipeline/rte_pipeline.h | 64 ++++++++++++++++\n lib/librte_pipeline/rte_pipeline_version.map | 9 +++\n 4 files changed, 180 insertions(+), 1 deletion(-)\n\n\\ No newline at end of file", "diff": "diff --git a/lib/librte_pipeline/Makefile b/lib/librte_pipeline/Makefile\nindex 15e406b..1166d3c 100644\n--- a/lib/librte_pipeline/Makefile\n+++ b/lib/librte_pipeline/Makefile\n@@ -41,7 +41,7 @@ CFLAGS += $(WERROR_FLAGS)\n \n EXPORT_MAP := rte_pipeline_version.map\n \n-LIBABIVER := 1\n+LIBABIVER := 2\n \n #\n # all source are stored in SRCS-y\ndiff --git a/lib/librte_pipeline/rte_pipeline.c b/lib/librte_pipeline/rte_pipeline.c\nindex bd700d2..56022f4 100644\n--- a/lib/librte_pipeline/rte_pipeline.c\n+++ b/lib/librte_pipeline/rte_pipeline.c\n@@ -587,6 +587,112 @@ rte_pipeline_table_entry_delete(struct rte_pipeline *p,\n \treturn (table->ops.f_delete)(table->h_table, key, key_found, entry);\n }\n \n+int rte_pipeline_table_entry_add_bulk(struct rte_pipeline *p,\n+\tuint32_t table_id,\n+\tvoid **keys,\n+\tstruct rte_pipeline_table_entry **entries,\n+\tuint32_t n_keys,\n+\tint *key_found,\n+\tstruct rte_pipeline_table_entry **entries_ptr)\n+{\n+\tstruct rte_table *table;\n+\tuint32_t i;\n+\n+\t/* Check input arguments */\n+\tif (p == NULL) {\n+\t\tRTE_LOG(ERR, PIPELINE, \"%s: pipeline parameter is NULL\\n\",\n+\t\t\t__func__);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (keys == NULL) {\n+\t\tRTE_LOG(ERR, PIPELINE, \"%s: keys parameter is NULL\\n\", __func__);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (entries == NULL) {\n+\t\tRTE_LOG(ERR, PIPELINE, \"%s: entries parameter is NULL\\n\",\n+\t\t\t__func__);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (table_id >= p->num_tables) {\n+\t\tRTE_LOG(ERR, PIPELINE,\n+\t\t\t\"%s: table_id %d out of range\\n\", __func__, table_id);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\ttable = &p->tables[table_id];\n+\n+\tif (table->ops.f_add_bulk == NULL) {\n+\t\tRTE_LOG(ERR, PIPELINE, \"%s: f_add_bulk function pointer NULL\\n\",\n+\t\t\t__func__);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tfor (i = 0; i < n_keys; i++) {\n+\t\tif ((entries[i]->action == RTE_PIPELINE_ACTION_TABLE) &&\n+\t\t\ttable->table_next_id_valid &&\n+\t\t\t(entries[i]->table_id != table->table_next_id)) {\n+\t\t\tRTE_LOG(ERR, PIPELINE,\n+\t\t\t\t\"%s: Tree-like topologies not allowed\\n\", __func__);\n+\t\t\treturn -EINVAL;\n+\t\t}\n+\t}\n+\n+\t/* Add entry */\n+\tfor (i = 0; i < n_keys; i++) {\n+\t\tif ((entries[i]->action == RTE_PIPELINE_ACTION_TABLE) &&\n+\t\t\t(table->table_next_id_valid == 0)) {\n+\t\t\ttable->table_next_id = entries[i]->table_id;\n+\t\t\ttable->table_next_id_valid = 1;\n+\t\t}\n+\t}\n+\n+\treturn (table->ops.f_add_bulk)(table->h_table, keys, (void **) entries,\n+\t\tn_keys, key_found, (void **) entries_ptr);\n+}\n+\n+int rte_pipeline_table_entry_delete_bulk(struct rte_pipeline *p,\n+\tuint32_t table_id,\n+\tvoid **keys,\n+\tuint32_t n_keys,\n+\tint *key_found,\n+\tstruct rte_pipeline_table_entry **entries)\n+{\n+\tstruct rte_table *table;\n+\n+\t/* Check input arguments */\n+\tif (p == NULL) {\n+\t\tRTE_LOG(ERR, PIPELINE, \"%s: pipeline parameter NULL\\n\",\n+\t\t\t__func__);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (keys == NULL) {\n+\t\tRTE_LOG(ERR, PIPELINE, \"%s: key parameter is NULL\\n\",\n+\t\t\t__func__);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (table_id >= p->num_tables) {\n+\t\tRTE_LOG(ERR, PIPELINE,\n+\t\t\t\"%s: table_id %d out of range\\n\", __func__, table_id);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\ttable = &p->tables[table_id];\n+\n+\tif (table->ops.f_delete_bulk == NULL) {\n+\t\tRTE_LOG(ERR, PIPELINE,\n+\t\t\t\"%s: f_delete function pointer NULL\\n\", __func__);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\treturn (table->ops.f_delete_bulk)(table->h_table, keys, n_keys, key_found,\n+\t\t\t(void **) entries);\n+}\n+\n /*\n * Port\n *\ndiff --git a/lib/librte_pipeline/rte_pipeline.h b/lib/librte_pipeline/rte_pipeline.h\nindex 59e0710..5459324 100644\n--- a/lib/librte_pipeline/rte_pipeline.h\n+++ b/lib/librte_pipeline/rte_pipeline.h\n@@ -466,6 +466,70 @@ int rte_pipeline_table_entry_delete(struct rte_pipeline *p,\n \tstruct rte_pipeline_table_entry *entry);\n \n /**\n+ * Pipeline table entry add bulk\n+ *\n+ * @param p\n+ * Handle to pipeline instance\n+ * @param table_id\n+ * Table ID (returned by previous invocation of pipeline table create)\n+ * @param keys\n+ * Array containing table entry keys\n+ * @param entries\n+ * Array containung new contents for every table entry identified by key\n+ * @param n_keys\n+ * Number of keys to add\n+ * @param key_found\n+ * On successful invocation, key_found for every item in the array is set to\n+ * TRUE (value different than 0) if key was already present in the table\n+ * before the add operation and to FALSE (value 0) if not\n+ * @param entries_ptr\n+ * On successful invocation, array *entries_ptr stores pointer to every table\n+ * entry associated with key. This can be used for further read-write accesses\n+ * to this table entry and is valid until the key is deleted from the table or\n+ * re-added (usually for associating different actions and/or action meta-data\n+ * to the current key)\n+ * @return\n+ * 0 on success, error code otherwise\n+ */\n+int rte_pipeline_table_entry_add_bulk(struct rte_pipeline *p,\n+\tuint32_t table_id,\n+\tvoid **keys,\n+\tstruct rte_pipeline_table_entry **entries,\n+\tuint32_t n_keys,\n+\tint *key_found,\n+\tstruct rte_pipeline_table_entry **entries_ptr);\n+\n+/**\n+ * Pipeline table entry delete bulk\n+ *\n+ * @param p\n+ * Handle to pipeline instance\n+ * @param table_id\n+ * Table ID (returned by previous invocation of pipeline table create)\n+ * @param keys\n+ * Array containing table entry keys\n+ * @param n_keys\n+ * Number of keys to delete\n+ * @param key_found\n+ * On successful invocation, key_found for every item in the array is set to\n+ * TRUE (value different than 0) if key was found in the table before the\n+ * delete operation and to FALSE (value 0) if not\n+ * @param entries\n+ * If entries pointer is NULL, this pointer is ignored for every entry found.\n+ * Else, after successful invocation, if specific key is found in the table\n+ * and entry points to a valid buffer, the table entry contents (as it was\n+ * before the delete was performed) is copied to this buffer.\n+ * @return\n+ * 0 on success, error code otherwise\n+ */\n+int rte_pipeline_table_entry_delete_bulk(struct rte_pipeline *p,\n+\tuint32_t table_id,\n+\tvoid **keys,\n+\tuint32_t n_keys,\n+\tint *key_found,\n+\tstruct rte_pipeline_table_entry **entries);\n+\n+/**\n * Read pipeline table stats.\n *\n * This function reads table statistics identified by *table_id* of given\ndiff --git a/lib/librte_pipeline/rte_pipeline_version.map b/lib/librte_pipeline/rte_pipeline_version.map\nindex 8f25d0f..1ff953e 100644\n--- a/lib/librte_pipeline/rte_pipeline_version.map\n+++ b/lib/librte_pipeline/rte_pipeline_version.map\n@@ -29,3 +29,12 @@ DPDK_2.1 {\n \trte_pipeline_table_stats_read;\n \n } DPDK_2.0;\n+\n+\n+DPDK_2.2 {\n+\tglobal:\n+\n+\trte_pipeline_table_entry_add_bulk;\n+\trte_pipeline_table_entry_delete_bulk;\n+\n+} DPDK_2.1;\n", "prefixes": [ "dpdk-dev", "v4", "2/5" ] }{ "id": 7769, "url": "