Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1217/?format=api
http://patches.dpdk.org/api/patches/1217/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1415382555-43748-1-git-send-email-jyu@vmware.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": "<1415382555-43748-1-git-send-email-jyu@vmware.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1415382555-43748-1-git-send-email-jyu@vmware.com", "date": "2014-11-07T17:49:15", "name": "[dpdk-dev] librte_kni: Add buildtime checks for rte_kni_mbuf and rte_mbuf", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "a0110544f748c033f75cc61b25d78fb0d00bdc7e", "submitter": { "id": 111, "url": "http://patches.dpdk.org/api/people/111/?format=api", "name": "Jia Yu", "email": "jyu@vmware.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1415382555-43748-1-git-send-email-jyu@vmware.com/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/1217/comments/", "check": "pending", "checks": "http://patches.dpdk.org/api/patches/1217/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 0E2F67E9E;\n\tSat, 8 Nov 2014 02:48:25 +0100 (CET)", "from smtp-outbound-2.vmware.com (smtp-outbound-2.vmware.com\n\t[208.91.2.13]) by dpdk.org (Postfix) with ESMTP id D8553591A\n\tfor <dev@dpdk.org>; Sat, 8 Nov 2014 02:48:18 +0100 (CET)", "from sc9-mailhost1.vmware.com (sc9-mailhost1.vmware.com\n\t[10.113.161.71])\n\tby smtp-outbound-2.vmware.com (Postfix) with ESMTP id 7A0002866A\n\tfor <dev@dpdk.org>; Fri, 7 Nov 2014 17:57:40 -0800 (PST)", "from prmh-edge-ivybridge-13.eng.vmware.com\n\t(prmh-edge-ivybridge-13.eng.vmware.com [10.24.235.96])\n\tby sc9-mailhost1.vmware.com (Postfix) with ESMTP id 7513719BBA;\n\tFri, 7 Nov 2014 17:57:40 -0800 (PST)" ], "From": "Jia Yu <jyu@vmware.com>", "To": "dev@dpdk.org", "Date": "Fri, 7 Nov 2014 09:49:15 -0800", "Message-Id": "<1415382555-43748-1-git-send-email-jyu@vmware.com>", "X-Mailer": "git-send-email 1.9.1", "Subject": "[dpdk-dev] [PATCH] librte_kni: Add buildtime checks for\n\trte_kni_mbuf and rte_mbuf", "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": "Adding this check is to avoid breakage from future data structure changes.\n\nSigned-off-by: Jia Yu <jyu@vmware.com>\n---\n lib/librte_kni/rte_kni.c | 15 +++++++++++++++\n 1 file changed, 15 insertions(+)", "diff": "diff --git a/lib/librte_kni/rte_kni.c b/lib/librte_kni/rte_kni.c\nindex 31ecb33..f5c449c 100644\n--- a/lib/librte_kni/rte_kni.c\n+++ b/lib/librte_kni/rte_kni.c\n@@ -595,6 +595,21 @@ kni_allocate_mbufs(struct rte_kni *kni)\n \tint i, ret;\n \tstruct rte_mbuf *pkts[MAX_MBUF_BURST_NUM];\n \n+\tRTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, pool) !=\n+\t\t\t offsetof(struct rte_kni_mbuf, pool));\n+\tRTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_addr) !=\n+\t\t\t offsetof(struct rte_kni_mbuf, buf_addr));\n+\tRTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, next) !=\n+\t\t\t offsetof(struct rte_kni_mbuf, next));\n+\tRTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, data_off) !=\n+\t\t\t offsetof(struct rte_kni_mbuf, data_off));\n+\tRTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, data_len) !=\n+\t\t\t offsetof(struct rte_kni_mbuf, data_len));\n+\tRTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, pkt_len) !=\n+\t\t\t offsetof(struct rte_kni_mbuf, pkt_len));\n+\tRTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, ol_flags) !=\n+\t\t\t offsetof(struct rte_kni_mbuf, ol_flags));\n+\n \t/* Check if pktmbuf pool has been configured */\n \tif (kni->pktmbuf_pool == NULL) {\n \t\tRTE_LOG(ERR, KNI, \"No valid mempool for allocating mbufs\\n\");\n", "prefixes": [ "dpdk-dev" ] }{ "id": 1217, "url": "