get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/5104/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 5104,
    "url": "http://patches.dpdk.org/api/patches/5104/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1433353519-20589-2-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": "<1433353519-20589-2-git-send-email-konstantin.ananyev@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1433353519-20589-2-git-send-email-konstantin.ananyev@intel.com",
    "date": "2015-06-03T17:45:17",
    "name": "[dpdk-dev,PATCHv2,1/3] ACL: fix a problem in acl_merge_trie",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "3d2f6ab10481b169837796869748983af50150d9",
    "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/1433353519-20589-2-git-send-email-konstantin.ananyev@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/5104/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/5104/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 8333EBDC2;\n\tWed,  3 Jun 2015 19:45:26 +0200 (CEST)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id 2CAB25693\n\tfor <dev@dpdk.org>; Wed,  3 Jun 2015 19:45:25 +0200 (CEST)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby fmsmga101.fm.intel.com with ESMTP; 03 Jun 2015 10:45:24 -0700",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby fmsmga002.fm.intel.com with ESMTP; 03 Jun 2015 10:45:23 -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\tt53HjMvX021039; Wed, 3 Jun 2015 18:45:22 +0100",
            "from sivswdev02.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev02.ir.intel.com with ESMTP id t53HjMKu020779;\n\tWed, 3 Jun 2015 18:45:22 +0100",
            "(from kananye1@localhost)\n\tby sivswdev02.ir.intel.com with  id t53HjMA0020775;\n\tWed, 3 Jun 2015 18:45:22 +0100"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.13,548,1427785200\"; d=\"scan'208\";a=\"736495884\"",
        "From": "Konstantin Ananyev <konstantin.ananyev@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Wed,  3 Jun 2015 18:45:17 +0100",
        "Message-Id": "<1433353519-20589-2-git-send-email-konstantin.ananyev@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1433353519-20589-1-git-send-email-konstantin.ananyev@intel.com>",
        "References": "<1433353519-20589-1-git-send-email-konstantin.ananyev@intel.com>",
        "Subject": "[dpdk-dev] [PATCHv2 1/3] ACL: fix a problem in acl_merge_trie",
        "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": "Reported by Zi Hu <huzilucky@gmail.com>:\n\n\"...\ncat test_data/rule1\n@192.168.0.0/24 192.168.0.0/24 400 : 500 0 : 52 6/0xff\n@192.168.0.0/24 192.168.0.0/24 400 : 500 54 : 65280 6/0xff\n@192.168.0.0/24 192.168.0.0/24 400 : 500 0 : 65535 6/0xff\n\ncat test_data/trace1\n0xc0a80005 0xc0a80009 450 53 0x06\n\nI run the test by:\nsudo ./testacl -n 2 -c 4 -- --rulesf=./test_data/rule1\n --tracef=./test_data/trace1\n\nThe result shows that the packet matches the second rule,  which is wrong.\nThe dest port of the pkt is 53, so it should match the third rule.\"\n\nIndeed there is problem at ACL build stage.\nSometimes acl_merge_trie() is too aggressive in trying to conserve\nspace at build time.\nSo it takes a wrong assumptions and didn't duplicate a node,\neven when it should.\nThe easiest and safest fix seems to always duplicate a left non-root/non-leaf\nnode first, and let the further code to destroy the node, if it is not needed.\n\nSigned-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>\n---\n lib/librte_acl/acl_bld.c | 4 +---\n 1 file changed, 1 insertion(+), 3 deletions(-)",
    "diff": "diff --git a/lib/librte_acl/acl_bld.c b/lib/librte_acl/acl_bld.c\nindex a406737..92a85df 100644\n--- a/lib/librte_acl/acl_bld.c\n+++ b/lib/librte_acl/acl_bld.c\n@@ -1044,9 +1044,7 @@ acl_merge_trie(struct acl_build_context *context,\n \t * a subtree of the merging tree (node B side). Otherwise,\n \t * just use node A.\n \t */\n-\tif (level > 0 &&\n-\t\t\tnode_a->subtree_id !=\n-\t\t\t(subtree_id | RTE_ACL_SUBTREE_NODE)) {\n+\tif (level > 0) {\n \t\tnode_c = acl_dup_node(context, node_a);\n \t\tnode_c->subtree_id = subtree_id | RTE_ACL_SUBTREE_NODE;\n \t}\n",
    "prefixes": [
        "dpdk-dev",
        "PATCHv2",
        "1/3"
    ]
}