Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/309/?format=api
https://patches.dpdk.org/api/patches/309/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1409759378-10113-3-git-send-email-bruce.richardson@intel.com/", "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": "<1409759378-10113-3-git-send-email-bruce.richardson@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1409759378-10113-3-git-send-email-bruce.richardson@intel.com", "date": "2014-09-03T15:49:27", "name": "[dpdk-dev,02/13] mbuf: reorder fields by time of use", "commit_ref": "", "pull_url": "", "state": "superseded", "archived": true, "hash": "01386769afab767368f5bbbf172f838f64e7b017", "submitter": { "id": 20, "url": "https://patches.dpdk.org/api/people/20/?format=api", "name": "Bruce Richardson", "email": "bruce.richardson@intel.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1409759378-10113-3-git-send-email-bruce.richardson@intel.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/309/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/309/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<bricha3@ecsmtp.ir.intel.com>", "Received": [ "from mga11.intel.com (mga11.intel.com [192.55.52.93])\r\n\tby dpdk.org (Postfix) with ESMTP id 8799FB39C\r\n\tfor <dev@dpdk.org>; Wed, 3 Sep 2014 17:45:43 +0200 (CEST)", "from fmsmga001.fm.intel.com ([10.253.24.23])\r\n\tby fmsmga102.fm.intel.com with ESMTP; 03 Sep 2014 08:49:45 -0700", "from irvmail001.ir.intel.com ([163.33.26.43])\r\n\tby fmsmga001.fm.intel.com with ESMTP; 03 Sep 2014 08:49:40 -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\ts83Fndfq025417; Wed, 3 Sep 2014 16:49:39 +0100", "from sivswdev02.ir.intel.com (localhost [127.0.0.1])\r\n\tby sivswdev02.ir.intel.com with ESMTP id s83FndKF010426;\r\n\tWed, 3 Sep 2014 16:49:39 +0100", "(from bricha3@localhost)\r\n\tby sivswdev02.ir.intel.com with id s83FndLX010421;\r\n\tWed, 3 Sep 2014 16:49:39 +0100" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.04,458,1406617200\"; d=\"scan'208\";a=\"585697549\"", "From": "Bruce Richardson <bruce.richardson@intel.com>", "To": "dev@dpdk.org", "Date": "Wed, 3 Sep 2014 16:49:27 +0100", "Message-Id": "<1409759378-10113-3-git-send-email-bruce.richardson@intel.com>", "X-Mailer": "git-send-email 1.7.0.7", "In-Reply-To": "<1409759378-10113-1-git-send-email-bruce.richardson@intel.com>", "References": "<1409759378-10113-1-git-send-email-bruce.richardson@intel.com>", "Subject": "[dpdk-dev] [PATCH 02/13] mbuf: reorder fields by time of use", "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>,\r\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>,\r\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "X-List-Received-Date": "Wed, 03 Sep 2014 15:45:44 -0000" }, "content": "* Reorder the fields in the mbuf so that we have fields that are used$\ntogether side-by-side in the structure. This means that we have a$\ncontiguous block of 8-bytes in the mbuf which are used to reset an mbuf$\nof descriptor rearm, and a block of 16-bytes of data (excluding flags)\nwhich are set on RX from the received packet descriptor.\n* Use dummy fields as appropraite to ensure alignment or to reserve gaps\nfor later field additions.\n* Place most items which are not used by fast-path RX separately at the end\nof the structure so they can later be moved to a separate cache line.\n[The l2/l3 length fields are not moved at this stage as doing so will\ncause overflow to the next cache line].\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n lib/librte_mbuf/rte_mbuf.h | 25 ++++++++++++++-----------\n 1 file changed, 14 insertions(+), 11 deletions(-)", "diff": "diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h\r\nindex 669e7f5..f136d37 100644\r\n--- a/lib/librte_mbuf/rte_mbuf.h\r\n+++ b/lib/librte_mbuf/rte_mbuf.h\r\n@@ -115,16 +115,12 @@ extern \"C\" {\r\n * The generic rte_mbuf, containing a packet mbuf.\r\n */\r\n struct rte_mbuf {\r\n-\tstruct rte_mempool *pool; /**< Pool from which mbuf was allocated. */\r\n \tvoid *buf_addr; /**< Virtual address of segment buffer. */\r\n \tphys_addr_t buf_physaddr; /**< Physical address of segment buffer. */\r\n-\tuint16_t buf_len; /**< Length of segment buffer. */\r\n \r\n-\t/* valid for any segment */\r\n-\tstruct rte_mbuf *next; /**< Next segment of scattered packet. */\r\n+\t/* next 8 bytes are initialised on RX descriptor rearm */\r\n+\tuint16_t buf_len; /**< Length of segment buffer. */\r\n \tuint16_t data_off;\r\n-\tuint16_t data_len; /**< Amount of data in segment buffer. */\r\n-\tuint32_t pkt_len; /**< Total pkt len: sum of all segments. */\r\n \r\n #ifdef RTE_MBUF_REFCNT\r\n \t/**\r\n@@ -142,14 +138,17 @@ struct rte_mbuf {\r\n #else\r\n \tuint16_t refcnt_reserved; /**< Do not use this field */\r\n #endif\r\n-\tuint16_t reserved; /**< Unused field. Required for padding */\r\n-\tuint16_t ol_flags; /**< Offload features. */\r\n-\r\n-\t/* these fields are valid for first segment only */\r\n \tuint8_t nb_segs; /**< Number of segments. */\r\n \tuint8_t port; /**< Input port. */\r\n \r\n-\t/* offload features, valid for first segment only */\r\n+\tuint16_t ol_flags; /**< Offload features. */\r\n+\tuint16_t reserved0; /**< Unused field. Required for padding */\r\n+\tuint32_t reserved1; /**< Unused field. Required for padding */\r\n+\r\n+\t/* remaining bytes are set on RX when pulling packet from descriptor */\r\n+\tuint16_t reserved2; /**< Unused field. Required for padding */\r\n+\tuint16_t data_len; /**< Amount of data in segment buffer. */\r\n+\tuint32_t pkt_len; /**< Total pkt len: sum of all segments. */\r\n \tuint16_t l3_len:9; /**< L3 (IP) Header Length. */\r\n \tuint16_t l2_len:7; /**< L2 (MAC) Header Length. */\r\n \tuint16_t vlan_tci; /**< VLAN Tag Control Identifier (CPU order). */\r\n@@ -162,6 +161,10 @@ struct rte_mbuf {\r\n \t\tuint32_t sched; /**< Hierarchical scheduler */\r\n \t} hash; /**< hash information */\r\n \r\n+\t/* fields only used in slow path or on TX */\r\n+\tstruct rte_mempool *pool; /**< Pool from which mbuf was allocated. */\r\n+\tstruct rte_mbuf *next; /**< Next segment of scattered packet. */\r\n+\r\n \tunion {\r\n \t\tuint8_t metadata[0];\r\n \t\tuint16_t metadata16[0];\r\n", "prefixes": [ "dpdk-dev", "02/13" ] }{ "id": 309, "url": "