Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/5279/?format=api
http://patches.dpdk.org/api/patches/5279/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1433760090-17110-5-git-send-email-konstantin.ananyev@intel.com/", "project": { "id": 1, "url": "http://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": "<1433760090-17110-5-git-send-email-konstantin.ananyev@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1433760090-17110-5-git-send-email-konstantin.ananyev@intel.com", "date": "2015-06-08T10:41:26", "name": "[dpdk-dev,PATCHv2,4/8] acl: fix avoid unneeded trie splitting for subset of rules.", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "8b46092b8ee8aa6a1d7fccf926007e242171f407", "submitter": { "id": 33, "url": "http://patches.dpdk.org/api/people/33/?format=api", "name": "Ananyev, Konstantin", "email": "konstantin.ananyev@intel.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1433760090-17110-5-git-send-email-konstantin.ananyev@intel.com/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/5279/comments/", "check": "pending", "checks": "http://patches.dpdk.org/api/patches/5279/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 153555A87;\n\tMon, 8 Jun 2015 12:41:47 +0200 (CEST)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id 40E9458DD\n\tfor <dev@dpdk.org>; Mon, 8 Jun 2015 12:41:43 +0200 (CEST)", "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga101.fm.intel.com with ESMTP; 08 Jun 2015 03:41:38 -0700", "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby fmsmga001.fm.intel.com with ESMTP; 08 Jun 2015 03:41:37 -0700", "from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com\n\t[10.237.217.46])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\tt58AfbrE029636; Mon, 8 Jun 2015 11:41:37 +0100", "from sivswdev02.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev02.ir.intel.com with ESMTP id t58AfbEh017572;\n\tMon, 8 Jun 2015 11:41:37 +0100", "(from kananye1@localhost)\n\tby sivswdev02.ir.intel.com with id t58Afbla017568;\n\tMon, 8 Jun 2015 11:41:37 +0100" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.13,573,1427785200\"; d=\"scan'208\";a=\"723016121\"", "From": "Konstantin Ananyev <konstantin.ananyev@intel.com>", "To": "dev@dpdk.org", "Date": "Mon, 8 Jun 2015 11:41:26 +0100", "Message-Id": "<1433760090-17110-5-git-send-email-konstantin.ananyev@intel.com>", "X-Mailer": "git-send-email 1.7.4.1", "In-Reply-To": "<1433760090-17110-1-git-send-email-konstantin.ananyev@intel.com>", "References": "<1433373024-5558-2-git-send-email-konstantin.ananyev@intel.com>\n\t<1433760090-17110-1-git-send-email-konstantin.ananyev@intel.com>", "Subject": "[dpdk-dev] [PATCHv2 4/8] acl: fix avoid unneeded trie splitting for\n\tsubset of rules.", "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": "When rebuilding a trie for limited rule-set,\ndon't try to split the rule-set even further.\n\nSigned-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>\n---\n lib/librte_acl/acl_bld.c | 16 +++++++++++-----\n 1 file changed, 11 insertions(+), 5 deletions(-)", "diff": "diff --git a/lib/librte_acl/acl_bld.c b/lib/librte_acl/acl_bld.c\nindex 45ee065..d89c66a 100644\n--- a/lib/librte_acl/acl_bld.c\n+++ b/lib/librte_acl/acl_bld.c\n@@ -97,6 +97,7 @@ struct acl_build_context {\n \tstruct rte_acl_build_rule *build_rules;\n \tstruct rte_acl_config cfg;\n \tint32_t node_max;\n+\tint32_t cur_node_max;\n \tuint32_t node;\n \tuint32_t num_nodes;\n \tuint32_t category_mask;\n@@ -1337,7 +1338,7 @@ build_trie(struct acl_build_context *context, struct rte_acl_build_rule *head,\n \t\t\treturn NULL;\n \n \t\tnode_count = context->num_nodes - node_count;\n-\t\tif (node_count > context->node_max) {\n+\t\tif (node_count > context->cur_node_max) {\n \t\t\t*last = prev;\n \t\t\treturn trie;\n \t\t}\n@@ -1536,7 +1537,7 @@ acl_build_index(const struct rte_acl_config *config, uint32_t *data_index)\n static struct rte_acl_build_rule *\n build_one_trie(struct acl_build_context *context,\n \tstruct rte_acl_build_rule *rule_sets[RTE_ACL_MAX_TRIES],\n-\tuint32_t n)\n+\tuint32_t n, int32_t node_max)\n {\n \tstruct rte_acl_build_rule *last;\n \tstruct rte_acl_config *config;\n@@ -1553,6 +1554,8 @@ build_one_trie(struct acl_build_context *context,\n \t\tcontext->data_indexes[n]);\n \tcontext->tries[n].data_index = context->data_indexes[n];\n \n+\tcontext->cur_node_max = node_max;\n+\n \tcontext->bld_tries[n].trie = build_trie(context, rule_sets[n],\n \t\t&last, &context->tries[n].count);\n \n@@ -1587,7 +1590,7 @@ acl_build_tries(struct acl_build_context *context,\n \n \t\tnum_tries = n + 1;\n \n-\t\tlast = build_one_trie(context, rule_sets, n);\n+\t\tlast = build_one_trie(context, rule_sets, n, context->node_max);\n \t\tif (context->bld_tries[n].trie == NULL) {\n \t\t\tRTE_LOG(ERR, ACL, \"Build of %u-th trie failed\\n\", n);\n \t\t\treturn -ENOMEM;\n@@ -1618,8 +1621,11 @@ acl_build_tries(struct acl_build_context *context,\n \t\t\t\thead = head->next)\n \t\t\thead->config = config;\n \n-\t\t/* Rebuild the trie for the reduced rule-set. */\n-\t\tlast = build_one_trie(context, rule_sets, n);\n+\t\t/*\n+\t\t * Rebuild the trie for the reduced rule-set.\n+\t\t * Don't try to split it any further.\n+\t\t */\n+\t\tlast = build_one_trie(context, rule_sets, n, INT32_MAX);\n \t\tif (context->bld_tries[n].trie == NULL || last != NULL) {\n \t\t\tRTE_LOG(ERR, ACL, \"Build of %u-th trie failed\\n\", n);\n \t\t\treturn -ENOMEM;\n", "prefixes": [ "dpdk-dev", "PATCHv2", "4/8" ] }{ "id": 5279, "url": "