Show a patch.

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

{
    "id": 37,
    "url": "https://patches.dpdk.org/api/patches/37/",
    "web_url": "https://patches.dpdk.org/patch/37/",
    "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": "<1404818184-29388-1-git-send-email-danielx.t.mrzyglod@intel.com>",
    "date": "2014-07-08T11:16:24",
    "name": "[dpdk-dev] Added Spinlock to l3fwd-vf example to prevent race conditioning",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "f134663b9f9adb65d7b88016ed2ab40ebdd47790",
    "submitter": {
        "id": 23,
        "url": "https://patches.dpdk.org/api/people/23/",
        "name": "Daniel Mrzyglod",
        "email": "danielx.t.mrzyglod@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/patch/37/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/37/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/37/checks/",
    "tags": {},
    "headers": {
        "X-Mailman-Version": "2.1.15",
        "Received": [
            "from mga03.intel.com (mga03.intel.com [143.182.124.21])\n\tby dpdk.org (Postfix) with ESMTP id 980465960\n\tfor <dev@dpdk.org>; Tue,  8 Jul 2014 13:16:10 +0200 (CEST)",
            "from azsmga001.ch.intel.com ([10.2.17.19])\n\tby azsmga101.ch.intel.com with ESMTP; 08 Jul 2014 04:16:31 -0700",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby azsmga001.ch.intel.com with ESMTP; 08 Jul 2014 04:16:29 -0700",
            "from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com\n\t[10.237.217.45])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\ts68BGTEJ018706; Tue, 8 Jul 2014 12:16:29 +0100",
            "from sivswdev01.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev01.ir.intel.com with ESMTP id s68BGTAc031304;\n\tTue, 8 Jul 2014 12:16:29 +0100",
            "(from dtmrzglx@localhost)\n\tby sivswdev01.ir.intel.com with  id s68BGTQK031236;\n\tTue, 8 Jul 2014 12:16:29 +0100"
        ],
        "From": "Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "Message-Id": "<1404818184-29388-1-git-send-email-danielx.t.mrzyglod@intel.com>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "Date": "Tue,  8 Jul 2014 12:16:24 +0100",
        "Subject": "[dpdk-dev] [PATCH] Added Spinlock to l3fwd-vf example to prevent\n\trace conditioning",
        "Precedence": "list",
        "X-List-Received-Date": "Tue, 08 Jul 2014 11:16:11 -0000",
        "X-BeenThere": "dev@dpdk.org",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "Return-Path": "<dtmrzglx@ecsmtp.ir.intel.com>",
        "X-Mailer": "git-send-email 1.7.0.7",
        "X-ExtLoop1": "1",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "To": "dev@dpdk.org",
        "X-IronPort-AV": "E=Sophos;i=\"5.01,625,1400050800\"; d=\"scan'208\";a=\"454423196\""
    },
    "content": "Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>\n---\n examples/l3fwd-vf/main.c |    6 +++++-\n 1 file changed, 5 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/examples/l3fwd-vf/main.c b/examples/l3fwd-vf/main.c\nindex 2ca5c21..57852d0 100644\n--- a/examples/l3fwd-vf/main.c\n+++ b/examples/l3fwd-vf/main.c\n@@ -54,6 +54,7 @@\n #include <rte_per_lcore.h>\n #include <rte_launch.h>\n #include <rte_atomic.h>\n+#include <rte_spinlock.h>\n #include <rte_cycles.h>\n #include <rte_prefetch.h>\n #include <rte_lcore.h>\n@@ -328,7 +329,7 @@ struct lcore_conf {\n } __rte_cache_aligned;\n \n static struct lcore_conf lcore_conf[RTE_MAX_LCORE];\n-\n+static rte_spinlock_t spinlock_conf[RTE_MAX_ETHPORTS]={RTE_SPINLOCK_INITIALIZER};\n /* Send burst of packets on an output interface */\n static inline int\n send_burst(struct lcore_conf *qconf, uint16_t n, uint8_t port)\n@@ -340,7 +341,10 @@ send_burst(struct lcore_conf *qconf, uint16_t n, uint8_t port)\n \tqueueid = qconf->tx_queue_id;\n \tm_table = (struct rte_mbuf **)qconf->tx_mbufs[port].m_table;\n \n+\trte_spinlock_lock(&spinlock_conf[port]) ;\n \tret = rte_eth_tx_burst(port, queueid, m_table, n);\n+\trte_spinlock_unlock(&spinlock_conf[port]);\n+\t\n \tif (unlikely(ret < n)) {\n \t\tdo {\n \t\t\trte_pktmbuf_free(m_table[ret]);\n",
    "prefixes": [
        "dpdk-dev"
    ]
}