Show a patch.

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

{
    "id": 132,
    "url": "https://patches.dpdk.org/api/patches/132/",
    "web_url": "https://patches.dpdk.org/patch/132/",
    "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": "<1407789890-17355-11-git-send-email-bruce.richardson@intel.com>",
    "date": "2014-08-11T20:44:46",
    "name": "[dpdk-dev,RFC,10/14] mbuf: set next pointer to NULL on mbuf free.",
    "commit_ref": "",
    "pull_url": "",
    "state": "rfc",
    "archived": true,
    "hash": "d095b12e31fcf5bcc1453894ff16194254fdf8f7",
    "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/132/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/132/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/132/checks/",
    "tags": {},
    "headers": {
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\r\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Date": "Mon, 11 Aug 2014 21:44:46 +0100",
        "In-Reply-To": "<1407789890-17355-1-git-send-email-bruce.richardson@intel.com>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "X-BeenThere": "dev@dpdk.org",
        "References": "<1407789890-17355-1-git-send-email-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 1.7.0.7",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "To": "dev@dpdk.org",
        "Received": [
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\r\n\tby dpdk.org (Postfix) with ESMTP id E6D14B376\r\n\tfor <dev@dpdk.org>; Mon, 11 Aug 2014 22:42:07 +0200 (CEST)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\r\n\tby fmsmga103.fm.intel.com with ESMTP; 11 Aug 2014 13:37:31 -0700",
            "from irvmail001.ir.intel.com ([163.33.26.43])\r\n\tby FMSMGA003.fm.intel.com with ESMTP; 11 Aug 2014 13:41:39 -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\ts7BKiqUD020961; Mon, 11 Aug 2014 21:44:52 +0100",
            "from sivswdev02.ir.intel.com (localhost [127.0.0.1])\r\n\tby sivswdev02.ir.intel.com with ESMTP id s7BKiq40017709;\r\n\tMon, 11 Aug 2014 21:44:52 +0100",
            "(from bricha3@localhost)\r\n\tby sivswdev02.ir.intel.com with  id s7BKiqj2017705;\r\n\tMon, 11 Aug 2014 21:44:52 +0100"
        ],
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "Precedence": "list",
        "X-ExtLoop1": "1",
        "Message-Id": "<1407789890-17355-11-git-send-email-bruce.richardson@intel.com>",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "Subject": "[dpdk-dev] [RFC PATCH 10/14] mbuf: set next pointer to NULL on mbuf\r\n\tfree.",
        "X-List-Received-Date": "Mon, 11 Aug 2014 20:42:08 -0000",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\r\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "Return-Path": "<bricha3@ecsmtp.ir.intel.com>",
        "X-IronPort-AV": "E=Sophos;i=\"4.97,862,1389772800\"; d=\"scan'208\";a=\"371049205\"",
        "List-Post": "<mailto:dev@dpdk.org>",
        "X-Mailman-Version": "2.1.15"
    },
    "content": "Previously we set the next pointer to NULL on allocation, we now set it\nto NULL on free, as the next pointer is on a second cache line.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n lib/librte_mbuf/rte_mbuf.h        |  4 +++-\n lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 18 +++++++++---------\n 2 files changed, 12 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h\r\nindex a3e3e4f..01d4f6e 100644\r\n--- a/lib/librte_mbuf/rte_mbuf.h\r\n+++ b/lib/librte_mbuf/rte_mbuf.h\r\n@@ -629,8 +629,10 @@ __rte_pktmbuf_prefree_seg(struct rte_mbuf *m)\r\n static inline void __attribute__((always_inline))\r\n rte_pktmbuf_free_seg(struct rte_mbuf *m)\r\n {\r\n-\tif (likely(NULL != (m = __rte_pktmbuf_prefree_seg(m))))\r\n+\tif (likely(NULL != (m = __rte_pktmbuf_prefree_seg(m)))) {\r\n+\t\tm->next = NULL;\r\n \t\t__rte_mbuf_raw_free(m);\r\n+\t}\r\n }\r\n \r\n /**\r\ndiff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c\r\nindex fa3b357..f9cc352 100644\r\n--- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c\r\n+++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c\r\n@@ -145,6 +145,7 @@ ixgbe_tx_free_bufs(struct igb_tx_queue *txq)\r\n \t/* free buffers one at a time */\r\n \tif ((txq->txq_flags & (uint32_t)ETH_TXQ_FLAGS_NOREFCOUNT) != 0) {\r\n \t\tfor (i = 0; i < txq->tx_rs_thresh; ++i, ++txep) {\r\n+\t\t\ttxep->mbuf->next = NULL;\r\n \t\t\trte_mempool_put(txep->mbuf->pool, txep->mbuf);\r\n \t\t\ttxep->mbuf = NULL;\r\n \t\t}\r\n@@ -250,6 +251,14 @@ tx_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,\r\n \tvolatile union ixgbe_adv_tx_desc *tx_r = txq->tx_ring;\r\n \tuint16_t n = 0;\r\n \r\n+\t/*\r\n+\t * Begin scanning the H/W ring for done descriptors when the\r\n+\t * number of available descriptors drops below tx_free_thresh.  For\r\n+\t * each done descriptor, free the associated buffer.\r\n+\t */\r\n+\tif (txq->nb_tx_free < txq->tx_free_thresh)\r\n+\t\tixgbe_tx_free_bufs(txq);\r\n+\r\n \t/* Only use descriptors that are available */\r\n \tnb_pkts = (uint16_t)RTE_MIN(txq->nb_tx_free, nb_pkts);\r\n \tif (unlikely(nb_pkts == 0))\r\n@@ -313,15 +322,6 @@ tx_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,\r\n \tif (txq->tx_tail >= txq->nb_tx_desc)\r\n \t\ttxq->tx_tail = 0;\r\n \r\n-\t/*\r\n-\t * Begin scanning the H/W ring for done descriptors when the\r\n-\t * number of available descriptors drops below tx_free_thresh.  For\r\n-\t * each done descriptor, free the associated buffer.\r\n-\t */\r\n-\tif (txq->nb_tx_free < txq->tx_free_thresh)\r\n-\t\tixgbe_tx_free_bufs(txq);\r\n-\r\n-\r\n \t/* update tail pointer */\r\n \trte_wmb();\r\n \tIXGBE_PCI_REG_WRITE(txq->tdt_reg_addr, txq->tx_tail);\r\n",
    "prefixes": [
        "dpdk-dev",
        "RFC",
        "10/14"
    ]
}