get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 13277,
    "url": "http://patches.dpdk.org/api/patches/13277/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1465278318-4949-3-git-send-email-zhe.tao@intel.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": "<1465278318-4949-3-git-send-email-zhe.tao@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1465278318-4949-3-git-send-email-zhe.tao@intel.com",
    "date": "2016-06-07T05:45:12",
    "name": "[dpdk-dev,v2,2/8] lib/librte_ether: defind RX/TX lock mode",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "133bf61489c9f273205ca51832886c51e5eb2087",
    "submitter": {
        "id": 276,
        "url": "http://patches.dpdk.org/api/people/276/?format=api",
        "name": "Zhe Tao",
        "email": "zhe.tao@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1465278318-4949-3-git-send-email-zhe.tao@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/13277/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/13277/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 4BA3E6CD3;\n\tTue,  7 Jun 2016 07:47:08 +0200 (CEST)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby dpdk.org (Postfix) with ESMTP id AA8B06CC7\n\tfor <dev@dpdk.org>; Tue,  7 Jun 2016 07:47:06 +0200 (CEST)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga103.fm.intel.com with ESMTP; 06 Jun 2016 22:47:05 -0700",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby fmsmga001.fm.intel.com with ESMTP; 06 Jun 2016 22:47:05 -0700",
            "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id u575l2Ud007861;\n\tTue, 7 Jun 2016 13:47:02 +0800",
            "from shecgisg004.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid u575kx73005044; Tue, 7 Jun 2016 13:47:01 +0800",
            "(from zhetao@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id u575kxxE005040; \n\tTue, 7 Jun 2016 13:46:59 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.26,431,1459839600\"; d=\"scan'208\";a=\"982290442\"",
        "From": "Zhe Tao <zhe.tao@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "wenzhuo.lu@intel.com, zhe.tao@intel.com, konstantin.ananyev@intel.com,\n\tbruce.richardson@intel.com, jing.d.chen@intel.com,\n\tcunming.liang@intel.com, jingjing.wu@intel.com, helin.zhang@intel.com",
        "Date": "Tue,  7 Jun 2016 13:45:12 +0800",
        "Message-Id": "<1465278318-4949-3-git-send-email-zhe.tao@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1465278318-4949-1-git-send-email-zhe.tao@intel.com>",
        "References": "<1465278318-4949-1-git-send-email-zhe.tao@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 2/8] lib/librte_ether: defind RX/TX lock mode",
        "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": "From: Wenzhuo Lu <wenzhuo.lu@intel.com>\n\nDefine lock mode for RX/TX queue. Because when resetting\nthe device we want the resetting thread to get the lock\nof the RX/TX queue to make sure the RX/TX is stopped.\n\nUsing next ABI macro for this ABI change as it has too\nmuch impact. 7 APIs and 1 global variable are impacted.\n\nSigned-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>\nSigned-off-by: Zhe Tao <zhe.tao@intel.com>\nSigned-off-by: zhe.tao <zhe.tao@intel.com>\n---\n lib/librte_ether/rte_ethdev.h | 62 +++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 62 insertions(+)",
    "diff": "diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h\nindex 74e895f..4efb5e9 100644\n--- a/lib/librte_ether/rte_ethdev.h\n+++ b/lib/librte_ether/rte_ethdev.h\n@@ -354,7 +354,12 @@ struct rte_eth_rxmode {\n \t\tjumbo_frame      : 1, /**< Jumbo Frame Receipt enable. */\n \t\thw_strip_crc     : 1, /**< Enable CRC stripping by hardware. */\n \t\tenable_scatter   : 1, /**< Enable scatter packets rx handler */\n+#ifndef RTE_NEXT_ABI\n \t\tenable_lro       : 1; /**< Enable LRO */\n+#else\n+\t\tenable_lro       : 1, /**< Enable LRO */\n+\t\tlock_mode        : 1; /**< Using lock path */\n+#endif\n };\n \n /**\n@@ -634,11 +639,68 @@ struct rte_eth_txmode {\n \t\t/**< If set, reject sending out tagged pkts */\n \t\thw_vlan_reject_untagged : 1,\n \t\t/**< If set, reject sending out untagged pkts */\n+#ifndef RTE_NEXT_ABI\n \t\thw_vlan_insert_pvid : 1;\n \t\t/**< If set, enable port based VLAN insertion */\n+#else\n+\t\thw_vlan_insert_pvid : 1,\n+\t\t/**< If set, enable port based VLAN insertion */\n+\t\tlock_mode : 1;\n+\t\t/**< If set, using lock path */\n+#endif\n };\n \n /**\n+ * The macros for the RX/TX lock mode functions\n+ */\n+#ifdef RTE_NEXT_ABI\n+#define RX_LOCK_FUNCTION(dev, func) \\\n+\t(dev->data->dev_conf.rxmode.lock_mode ? \\\n+\tfunc ## _lock : func)\n+\n+#define TX_LOCK_FUNCTION(dev, func) \\\n+\t(dev->data->dev_conf.txmode.lock_mode ? \\\n+\tfunc ## _lock : func)\n+#else\n+#define RX_LOCK_FUNCTION(dev, func) func\n+\n+#define TX_LOCK_FUNCTION(dev, func) func\n+#endif\n+\n+/* Add the lock RX/TX function for VF reset */\n+#define GENERATE_RX_LOCK(func, nic) \\\n+uint16_t func ## _lock(void *rx_queue, \\\n+\t\t      struct rte_mbuf **rx_pkts, \\\n+\t\t      uint16_t nb_pkts) \\\n+{\t\t\t\t\t\\\n+\tstruct nic ## _rx_queue *rxq = rx_queue; \\\n+\tuint16_t nb_rx = 0; \\\n+\t\t\t\t\t\t\\\n+\tif (rte_spinlock_trylock(&rxq->rx_lock)) { \\\n+\t\tnb_rx = func(rx_queue, rx_pkts, nb_pkts); \\\n+\t\trte_spinlock_unlock(&rxq->rx_lock); \\\n+\t} \\\n+\t\\\n+\treturn nb_rx; \\\n+}\n+\n+#define GENERATE_TX_LOCK(func, nic) \\\n+uint16_t func ## _lock(void *tx_queue, \\\n+\t\t      struct rte_mbuf **tx_pkts, \\\n+\t\t      uint16_t nb_pkts) \\\n+{\t\t\t\t\t\\\n+\tstruct nic ## _tx_queue *txq = tx_queue; \\\n+\tuint16_t nb_tx = 0; \\\n+\t\t\t\t\t\t\\\n+\tif (rte_spinlock_trylock(&txq->tx_lock)) { \\\n+\t\tnb_tx = func(tx_queue, tx_pkts, nb_pkts); \\\n+\t\trte_spinlock_unlock(&txq->tx_lock); \\\n+\t} \\\n+\t\\\n+\treturn nb_tx; \\\n+}\n+\n+/**\n  * A structure used to configure an RX ring of an Ethernet port.\n  */\n struct rte_eth_rxconf {\n",
    "prefixes": [
        "dpdk-dev",
        "v2",
        "2/8"
    ]
}