Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/17162/?format=api
https://patches.dpdk.org/api/patches/17162/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1479747322-5774-1-git-send-email-jblunck@infradead.org/", "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": "<1479747322-5774-1-git-send-email-jblunck@infradead.org>", "list_archive_url": "https://inbox.dpdk.org/dev/1479747322-5774-1-git-send-email-jblunck@infradead.org", "date": "2016-11-21T16:55:15", "name": "[dpdk-dev,v2,1/8] eal: define container_of macro", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "3986e383e037019e8f660ac16f1307f27eceb4a7", "submitter": { "id": 249, "url": "https://patches.dpdk.org/api/people/249/?format=api", "name": "Jan Blunck", "email": "jblunck@infradead.org" }, "delegate": { "id": 1, "url": "https://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1479747322-5774-1-git-send-email-jblunck@infradead.org/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/17162/comments/", "check": "warning", "checks": "https://patches.dpdk.org/api/patches/17162/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 D36303977;\n\tMon, 21 Nov 2016 17:57:08 +0100 (CET)", "from mail-wm0-f68.google.com (mail-wm0-f68.google.com\n\t[74.125.82.68]) by dpdk.org (Postfix) with ESMTP id A17EA20F\n\tfor <dev@dpdk.org>; Mon, 21 Nov 2016 17:57:05 +0100 (CET)", "by mail-wm0-f68.google.com with SMTP id u144so543999wmu.0\n\tfor <dev@dpdk.org>; Mon, 21 Nov 2016 08:57:05 -0800 (PST)", "from weierstrass.local.net ([91.200.110.70])\n\tby smtp.gmail.com with ESMTPSA id\n\tv202sm20536051wmv.8.2016.11.21.08.57.03\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 21 Nov 2016 08:57:04 -0800 (PST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\n\th=sender:from:to:cc:subject:date:message-id;\n\tbh=T+rKJB7dzdFzk0/b3hpq3AO6pmHz3NP5abxSAH4N4w0=;\n\tb=PzsGFMHVD9yTnQoknJtQ1WmdvNfdASiULEVPLjTgb5ziPeampxrqzcn0XXelGuAiGI\n\twk68/TOJOCNxL20HlrmecVsL3H4WYsCHmRSW7s9pXgIo/rYUrEk3HCd/KEB1MeWQ/7Zz\n\t3aFFFSk5fP1YGMajDsTCBWhcDT7SOgxhnX4jrLOSKWGD7wrozovSXizSvuvXGI78WIHE\n\tVJF+80rV9ojE0ORNpedXxVkyarOnshhd5y6fR4Ndrp7VBf/pAfRe/GTXGgibwHBuq6PK\n\t2MvDHqmneSWWyxyha/zJzH/ttsUJIKu0Qnj489Gyb0HbjlZB+PnOHnuhCJg8NLS6loVK\n\tB3+w==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:sender:from:to:cc:subject:date:message-id;\n\tbh=T+rKJB7dzdFzk0/b3hpq3AO6pmHz3NP5abxSAH4N4w0=;\n\tb=T9iOMT6O+YtHkMLiYCA+b3/cizrCVAlP1lRH5jo7NVPksIhDgmvtiN+ajLhU338lx5\n\tqvIXPSU6xKQCh4E8nxZLqhszn59Ml3g4cbcGu2zX6zn0nnz/CkpJzwrsB7DcCd2rcAGm\n\tWERzb6vL5TMTkMUzSefIUnBlGwkDqSjaZM17o7LWJV31YeRDPD7dTiyXISUu4NqyLZLz\n\tKh5Iln5y+fVtmxeUwGjbEJ9z0qm0yh588ptz0pqs9pbs1ar+KOS64PytfoajgGhUMVDd\n\toHZKQQ2o6/Zf/VY3ymDswx4O5wyOpk+BXKlUeMZxzJUynyJXq6iP+MrK/Gz9LGFS7sZd\n\tz0/Q==", "X-Gm-Message-State": "AKaTC00GVtIS3vJy8GDXh+/HC3ubpXxiobVLIUxiNl/i0nTmZzbhIw12pNHh50FwjH4BxA==", "X-Received": "by 10.28.126.146 with SMTP id z140mr18035634wmc.84.1479747425249;\n\tMon, 21 Nov 2016 08:57:05 -0800 (PST)", "From": "Jan Blunck <jblunck@infradead.org>", "To": "dev@dpdk.org", "Cc": "shreyansh.jain@nxp.com, david.marchand@6wind.com,\n\tJan Viktorin <viktorin@rehivetech.com>", "Date": "Mon, 21 Nov 2016 17:55:15 +0100", "Message-Id": "<1479747322-5774-1-git-send-email-jblunck@infradead.org>", "X-Mailer": "git-send-email 2.7.4", "Subject": "[dpdk-dev] [PATCH v2 1/8] eal: define container_of macro", "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": "This macro is based on Jan Viktorin's original patch but also checks the\ntype of the passed pointer against the type of the member.\n\nSigned-off-by: Jan Viktorin <viktorin@rehivetech.com>\nSigned-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>\n[jblunck@infradead.org: add type checking and __extension__]\nSigned-off-by: Jan Blunck <jblunck@infradead.org>\n---\n lib/librte_eal/common/include/rte_common.h | 20 ++++++++++++++++++++\n 1 file changed, 20 insertions(+)", "diff": "diff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_eal/common/include/rte_common.h\nindex db5ac91..8dda3e2 100644\n--- a/lib/librte_eal/common/include/rte_common.h\n+++ b/lib/librte_eal/common/include/rte_common.h\n@@ -331,6 +331,26 @@ rte_bsf32(uint32_t v)\n #define offsetof(TYPE, MEMBER) __builtin_offsetof (TYPE, MEMBER)\n #endif\n \n+/**\n+ * Return pointer to the wrapping struct instance.\n+ *\n+ * Example:\n+ *\n+ * struct wrapper {\n+ * ...\n+ * struct child c;\n+ * ...\n+ * };\n+ *\n+ * struct child *x = obtain(...);\n+ * struct wrapper *w = container_of(x, struct wrapper, c);\n+ */\n+#ifndef container_of\n+#define container_of(ptr, type, member)\t__extension__ ({\t\t\\\n+\t\t\ttypeof(((type *)0)->member) *_ptr = (ptr);\t\\\n+\t\t\t(type *)(((char *)_ptr) - offsetof(type, member)); })\n+#endif\n+\n #define _RTE_STR(x) #x\n /** Take a macro value and get a string version of it */\n #define RTE_STR(x) _RTE_STR(x)\n", "prefixes": [ "dpdk-dev", "v2", "1/8" ] }{ "id": 17162, "url": "