Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/4390/?format=api
http://patches.dpdk.org/api/patches/4390/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1429544496-22532-13-git-send-email-olivier.matz@6wind.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": "<1429544496-22532-13-git-send-email-olivier.matz@6wind.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1429544496-22532-13-git-send-email-olivier.matz@6wind.com", "date": "2015-04-20T15:41:36", "name": "[dpdk-dev,v4,12/12] test/mbuf: verify that cloning a clone works properly", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "c388d10591a1031ea76988a9c9a75e1bacc9de91", "submitter": { "id": 8, "url": "http://patches.dpdk.org/api/people/8/?format=api", "name": "Olivier Matz", "email": "olivier.matz@6wind.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1429544496-22532-13-git-send-email-olivier.matz@6wind.com/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/4390/comments/", "check": "pending", "checks": "http://patches.dpdk.org/api/patches/4390/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 B3B0AC3FA;\n\tMon, 20 Apr 2015 17:42:05 +0200 (CEST)", "from mail-wi0-f176.google.com (mail-wi0-f176.google.com\n\t[209.85.212.176]) by dpdk.org (Postfix) with ESMTP id B7563C3AC\n\tfor <dev@dpdk.org>; Mon, 20 Apr 2015 17:41:57 +0200 (CEST)", "by wicmx19 with SMTP id mx19so43094519wic.1\n\tfor <dev@dpdk.org>; Mon, 20 Apr 2015 08:41:57 -0700 (PDT)", "from glumotte.dev.6wind.com (6wind.net2.nerim.net.\n\t[213.41.180.237]) by mx.google.com with ESMTPSA id\n\tfm8sm11258951wib.9.2015.04.20.08.41.56\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tMon, 20 Apr 2015 08:41:56 -0700 (PDT)" ], "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=Ql8VTXTVQF2SLUX42wC//taYN9xF3JzRoJWp56EPlBE=;\n\tb=kXDM8c8FM0qGtCbikCVlgF8Hjkyr98z+9y6guu07bLpg94Wd3bGudP3yNI0TBR75nv\n\t2yA4q9X1q63sgJ9hgYqkAiAbd1LUpFJBhf5jDMx+G3H89FR2AiSIPLIc5h7l1M+3ZlSZ\n\tQRIktAsjFlBulSJNXVyfQkHXL/f82TYK5e/ZTgdY4KjCmFFfGhA25IWdBSgeXBuseWNN\n\tJKc+z4QR8Ms2oibgG5B1NjuBYBYEf5vomhQ2L3ROt6USJ9qdh+4aVQcglZk8Ne2JBk86\n\tnNv+o8YWZNhh6PtOZMrkx1SjWwRDhG3ITLlLGuYYYeUrr87RKoiUzQzV2XdVoxy646/w\n\tOhKw==", "X-Gm-Message-State": "ALoCoQmRy28G13n5LEGfU4WXTYSt7supUO8vN3/5HqCOlRWThP4b6WibtvgcFqbexAPwRbj0yzAb", "X-Received": "by 10.194.161.193 with SMTP id xu1mr19495055wjb.48.1429544517640;\n\tMon, 20 Apr 2015 08:41:57 -0700 (PDT)", "From": "Olivier Matz <olivier.matz@6wind.com>", "To": "dev@dpdk.org", "Date": "Mon, 20 Apr 2015 17:41:36 +0200", "Message-Id": "<1429544496-22532-13-git-send-email-olivier.matz@6wind.com>", "X-Mailer": "git-send-email 2.1.4", "In-Reply-To": "<1429544496-22532-1-git-send-email-olivier.matz@6wind.com>", "References": "<1427829784-12323-2-git-send-email-zer0@droids-corp.org>\n\t<1429544496-22532-1-git-send-email-olivier.matz@6wind.com>", "Subject": "[dpdk-dev] [PATCH v4 12/12] test/mbuf: verify that cloning a clone\n\tworks properly", "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": "Signed-off-by: Olivier Matz <olivier.matz@6wind.com>\n---\n app/test/test_mbuf.c | 26 ++++++++++++++++++++++++++\n 1 file changed, 26 insertions(+)", "diff": "diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c\nindex 01838c6..b5ae5b7 100644\n--- a/app/test/test_mbuf.c\n+++ b/app/test/test_mbuf.c\n@@ -324,6 +324,7 @@ testclone_testupdate_testdetach(void)\n {\n \tstruct rte_mbuf *m = NULL;\n \tstruct rte_mbuf *clone = NULL;\n+\tstruct rte_mbuf *clone2 = NULL;\n \tuint32_t *data;\n \n \t/* alloc a mbuf */\n@@ -381,11 +382,34 @@ testclone_testupdate_testdetach(void)\n \tif (rte_mbuf_refcnt_read(m->next) != 2)\n \t\tGOTO_FAIL(\"invalid refcnt in m->next\\n\");\n \n+\t/* try to clone the clone */\n+\n+\tclone2 = rte_pktmbuf_clone(clone, pktmbuf_pool);\n+\tif (clone2 == NULL)\n+\t\tGOTO_FAIL(\"cannot clone the clone\\n\");\n+\n+\tdata = rte_pktmbuf_mtod(clone2, uint32_t *);\n+\tif (*data != MAGIC_DATA)\n+\t\tGOTO_FAIL(\"invalid data in clone2\\n\");\n+\n+\tdata = rte_pktmbuf_mtod(clone2->next, uint32_t *);\n+\tif (*data != MAGIC_DATA)\n+\t\tGOTO_FAIL(\"invalid data in clone2->next\\n\");\n+\n+\tif (rte_mbuf_refcnt_read(m) != 3)\n+\t\tGOTO_FAIL(\"invalid refcnt in m\\n\");\n+\n+\tif (rte_mbuf_refcnt_read(m->next) != 3)\n+\t\tGOTO_FAIL(\"invalid refcnt in m->next\\n\");\n+\n \t/* free mbuf */\n \trte_pktmbuf_free(m);\n \trte_pktmbuf_free(clone);\n+\trte_pktmbuf_free(clone2);\n+\n \tm = NULL;\n \tclone = NULL;\n+\tclone2 = NULL;\n \treturn 0;\n \n fail:\n@@ -393,6 +417,8 @@ fail:\n \t\trte_pktmbuf_free(m);\n \tif (clone)\n \t\trte_pktmbuf_free(clone);\n+\tif (clone2)\n+\t\trte_pktmbuf_free(clone2);\n \treturn -1;\n }\n #undef GOTO_FAIL\n", "prefixes": [ "dpdk-dev", "v4", "12/12" ] }{ "id": 4390, "url": "