Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/15160/?format=api
http://patchwork.dpdk.org/api/patches/15160/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/1470638557-126972-1-git-send-email-wei.dai@intel.com/", "project": { "id": 1, "url": "http://patchwork.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": "<1470638557-126972-1-git-send-email-wei.dai@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1470638557-126972-1-git-send-email-wei.dai@intel.com", "date": "2016-08-08T06:42:37", "name": "[dpdk-dev,v4,3/3] lpm: remove redundant check when adding lpm rule", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "af9934587f39dd4fe00ffa1cd8e9111ce1346cc5", "submitter": { "id": 490, "url": "http://patchwork.dpdk.org/api/people/490/?format=api", "name": "Wei Dai", "email": "wei.dai@intel.com" }, "delegate": { "id": 1, "url": "http://patchwork.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/1470638557-126972-1-git-send-email-wei.dai@intel.com/mbox/", "series": [], "comments": "http://patchwork.dpdk.org/api/patches/15160/comments/", "check": "pending", "checks": "http://patchwork.dpdk.org/api/patches/15160/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 7FAC72BD3;\n\tMon, 8 Aug 2016 08:44:09 +0200 (CEST)", "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby dpdk.org (Postfix) with ESMTP id 434DE2BAE\n\tfor <dev@dpdk.org>; Mon, 8 Aug 2016 08:44:08 +0200 (CEST)", "from fmsmga004.fm.intel.com ([10.253.24.48])\n\tby fmsmga104.fm.intel.com with ESMTP; 07 Aug 2016 23:44:07 -0700", "from dpdk2.bj.intel.com ([172.16.182.189])\n\tby fmsmga004.fm.intel.com with ESMTP; 07 Aug 2016 23:44:06 -0700" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.28,488,1464678000\"; d=\"scan'208\";a=\"152196086\"", "From": "Wei Dai <wei.dai@intel.com>", "To": "dev@dpdk.org", "Cc": "Wei Dai <wei.dai@intel.com>", "Date": "Mon, 8 Aug 2016 14:42:37 +0800", "Message-Id": "<1470638557-126972-1-git-send-email-wei.dai@intel.com>", "X-Mailer": "git-send-email 2.5.5", "In-Reply-To": "<1470207858-21149-1-git-send-email-wei.dai@intel.com>", "References": "<1470207858-21149-1-git-send-email-wei.dai@intel.com>", "Subject": "[dpdk-dev] [PATCH v4 3/3] lpm: remove redundant check when adding\n\tlpm rule", "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 a rule with depth > 24 is added into an existing\nrule with depth <=24, a new tbl8 is allocated, the existing\nrule first fulfill whole new tbl8, so the filed valid of\neach entry in this tbl8 is always true and depth of each\nentry is always <= 24 before adding the new rule with depth > 24.\n\nSigned-off-by: Wei Dai <wei.dai@intel.com>\nAcked-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n lib/librte_lpm/rte_lpm.c | 22 ++++++----------------\n 1 file changed, 6 insertions(+), 16 deletions(-)", "diff": "diff --git a/lib/librte_lpm/rte_lpm.c b/lib/librte_lpm/rte_lpm.c\nindex 24fec4b..ec67765 100644\n--- a/lib/librte_lpm/rte_lpm.c\n+++ b/lib/librte_lpm/rte_lpm.c\n@@ -940,14 +940,9 @@ add_depth_big_v20(struct rte_lpm_v20 *lpm, uint32_t ip_masked, uint8_t depth,\n \n \t\t/* Insert new rule into the tbl8 entry. */\n \t\tfor (i = tbl8_index; i < tbl8_index + tbl8_range; i++) {\n-\t\t\tif (!lpm->tbl8[i].valid ||\n-\t\t\t\t\tlpm->tbl8[i].depth <= depth) {\n-\t\t\t\tlpm->tbl8[i].valid = VALID;\n-\t\t\t\tlpm->tbl8[i].depth = depth;\n-\t\t\t\tlpm->tbl8[i].next_hop = next_hop;\n-\n-\t\t\t\tcontinue;\n-\t\t\t}\n+\t\t\tlpm->tbl8[i].valid = VALID;\n+\t\t\tlpm->tbl8[i].depth = depth;\n+\t\t\tlpm->tbl8[i].next_hop = next_hop;\n \t\t}\n \n \t\t/*\n@@ -1071,14 +1066,9 @@ add_depth_big_v1604(struct rte_lpm *lpm, uint32_t ip_masked, uint8_t depth,\n \n \t\t/* Insert new rule into the tbl8 entry. */\n \t\tfor (i = tbl8_index; i < tbl8_index + tbl8_range; i++) {\n-\t\t\tif (!lpm->tbl8[i].valid ||\n-\t\t\t\t\tlpm->tbl8[i].depth <= depth) {\n-\t\t\t\tlpm->tbl8[i].valid = VALID;\n-\t\t\t\tlpm->tbl8[i].depth = depth;\n-\t\t\t\tlpm->tbl8[i].next_hop = next_hop;\n-\n-\t\t\t\tcontinue;\n-\t\t\t}\n+\t\t\tlpm->tbl8[i].valid = VALID;\n+\t\t\tlpm->tbl8[i].depth = depth;\n+\t\t\tlpm->tbl8[i].next_hop = next_hop;\n \t\t}\n \n \t\t/*\n", "prefixes": [ "dpdk-dev", "v4", "3/3" ] }{ "id": 15160, "url": "