Show a patch.

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

{
    "id": 342,
    "url": "https://patches.dpdk.org/api/patches/342/",
    "web_url": "https://patches.dpdk.org/patch/342/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/",
        "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"
    },
    "msgid": "<1410441347-22840-8-git-send-email-bruce.richardson@intel.com>",
    "date": "2014-09-11T13:15:41",
    "name": "[dpdk-dev,v2,07/13] mbuf: move metadata macros to rte_port library",
    "commit_ref": "",
    "pull_url": "",
    "state": "accepted",
    "archived": true,
    "hash": "ccb3c869b393d8ea13813f6b2259d483a3902a32",
    "submitter": {
        "id": 20,
        "url": "https://patches.dpdk.org/api/people/20/",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/patch/342/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/342/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/342/checks/",
    "tags": {},
    "headers": {
        "Delivered-To": "patchwork@dpdk.org",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\r\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "X-Original-To": "patchwork@dpdk.org",
        "Date": "Thu, 11 Sep 2014 14:15:41 +0100",
        "In-Reply-To": "<1410441347-22840-1-git-send-email-bruce.richardson@intel.com>",
        "Precedence": "list",
        "X-BeenThere": "dev@dpdk.org",
        "References": "<1409759378-10113-1-git-send-email-bruce.richardson@intel.com>\r\n\t<1410441347-22840-1-git-send-email-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "To": "dev@dpdk.org",
        "Errors-To": "dev-bounces@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [IPv6:::1])\r\n\tby dpdk.org (Postfix) with ESMTP id 7A598B399;\r\n\tThu, 11 Sep 2014 15:10:45 +0200 (CEST)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\r\n\tby dpdk.org (Postfix) with ESMTP id 2080968A7\r\n\tfor <dev@dpdk.org>; Thu, 11 Sep 2014 15:10:38 +0200 (CEST)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\r\n\tby fmsmga103.fm.intel.com with ESMTP; 11 Sep 2014 06:07:14 -0700",
            "from irvmail001.ir.intel.com ([163.33.26.43])\r\n\tby FMSMGA003.fm.intel.com with ESMTP; 11 Sep 2014 06:10:43 -0700",
            "from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com\r\n\t[10.237.217.46])\r\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\r\n\ts8BDFnjg002152; Thu, 11 Sep 2014 14:15:49 +0100",
            "from sivswdev02.ir.intel.com (localhost [127.0.0.1])\r\n\tby sivswdev02.ir.intel.com with ESMTP id s8BDFnWA023652;\r\n\tThu, 11 Sep 2014 14:15:49 +0100",
            "(from bricha3@localhost)\r\n\tby sivswdev02.ir.intel.com with  id s8BDFnD6023647;\r\n\tThu, 11 Sep 2014 14:15:49 +0100"
        ],
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "X-ExtLoop1": "1",
        "Message-Id": "<1410441347-22840-8-git-send-email-bruce.richardson@intel.com>",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "Subject": "[dpdk-dev] [PATCH v2 07/13] mbuf: move metadata macros to rte_port\r\n\tlibrary",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\r\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-IronPort-AV": "E=Sophos;i=\"4.97,862,1389772800\"; d=\"scan'208\";a=\"384718631\"",
        "List-Post": "<mailto:dev@dpdk.org>",
        "X-Mailman-Version": "2.1.15"
    },
    "content": "The metadata macros are only used by libs and apps using the rte_port\npacket framework library, so move them to a header file there.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n lib/librte_mbuf/rte_mbuf.h | 18 ------------------\n lib/librte_port/rte_port.h | 22 ++++++++++++++++++++++\n 2 files changed, 22 insertions(+), 18 deletions(-)",
    "diff": "diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h\r\nindex f855e64..2f1bd4a 100644\r\n--- a/lib/librte_mbuf/rte_mbuf.h\r\n+++ b/lib/librte_mbuf/rte_mbuf.h\r\n@@ -173,24 +173,6 @@ struct rte_mbuf {\r\n \r\n } __rte_cache_aligned;\r\n \r\n-#define RTE_MBUF_METADATA_UINT8(mbuf, offset)              \\\r\n-\t(((uint8_t *)&(mbuf)[1])[offset])\r\n-#define RTE_MBUF_METADATA_UINT16(mbuf, offset)             \\\r\n-\t(((uint16_t *)&(mbuf)[1])[offset/sizeof(uint16_t)])\r\n-#define RTE_MBUF_METADATA_UINT32(mbuf, offset)             \\\r\n-\t(((uint32_t *)&(mbuf)[1])[offset/sizeof(uint32_t)])\r\n-#define RTE_MBUF_METADATA_UINT64(mbuf, offset)             \\\r\n-\t(((uint64_t *)&(mbuf)[1])[offset/sizeof(uint64_t)])\r\n-\r\n-#define RTE_MBUF_METADATA_UINT8_PTR(mbuf, offset)          \\\r\n-\t(&RTE_MBUF_METADATA_UINT8(mbuf, offset))\r\n-#define RTE_MBUF_METADATA_UINT16_PTR(mbuf, offset)         \\\r\n-\t(&RTE_MBUF_METADATA_UINT16(mbuf, offset))\r\n-#define RTE_MBUF_METADATA_UINT32_PTR(mbuf, offset)         \\\r\n-\t(&RTE_MBUF_METADATA_UINT32(mbuf, offset))\r\n-#define RTE_MBUF_METADATA_UINT64_PTR(mbuf, offset)         \\\r\n-\t(&RTE_MBUF_METADATA_UINT64(mbuf, offset))\r\n-\r\n /**\r\n  * Given the buf_addr returns the pointer to corresponding mbuf.\r\n  */\r\ndiff --git a/lib/librte_port/rte_port.h b/lib/librte_port/rte_port.h\r\nindex 1d763c2..6bd5039 100644\r\n--- a/lib/librte_port/rte_port.h\r\n+++ b/lib/librte_port/rte_port.h\r\n@@ -50,6 +50,28 @@ extern \"C\" {\r\n #include <stdint.h>\r\n #include <rte_mbuf.h>\r\n \r\n+/**\r\n+ * Macros to allow accessing metadata stored in the mbuf headroom\r\n+ * just beyond the end of the mbuf data structure returned by a port\r\n+ */\r\n+#define RTE_MBUF_METADATA_UINT8(mbuf, offset)              \\\r\n+\t(((uint8_t *)&(mbuf)[1])[offset])\r\n+#define RTE_MBUF_METADATA_UINT16(mbuf, offset)             \\\r\n+\t(((uint16_t *)&(mbuf)[1])[offset/sizeof(uint16_t)])\r\n+#define RTE_MBUF_METADATA_UINT32(mbuf, offset)             \\\r\n+\t(((uint32_t *)&(mbuf)[1])[offset/sizeof(uint32_t)])\r\n+#define RTE_MBUF_METADATA_UINT64(mbuf, offset)             \\\r\n+\t(((uint64_t *)&(mbuf)[1])[offset/sizeof(uint64_t)])\r\n+\r\n+#define RTE_MBUF_METADATA_UINT8_PTR(mbuf, offset)          \\\r\n+\t(&RTE_MBUF_METADATA_UINT8(mbuf, offset))\r\n+#define RTE_MBUF_METADATA_UINT16_PTR(mbuf, offset)         \\\r\n+\t(&RTE_MBUF_METADATA_UINT16(mbuf, offset))\r\n+#define RTE_MBUF_METADATA_UINT32_PTR(mbuf, offset)         \\\r\n+\t(&RTE_MBUF_METADATA_UINT32(mbuf, offset))\r\n+#define RTE_MBUF_METADATA_UINT64_PTR(mbuf, offset)         \\\r\n+\t(&RTE_MBUF_METADATA_UINT64(mbuf, offset))\r\n+\r\n /*\r\n  * Port IN\r\n  *\r\n",
    "prefixes": [
        "dpdk-dev",
        "v2",
        "07/13"
    ]
}