get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 847163,
    "url": "http://patchwork.ozlabs.org/api/patches/847163/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20171211183725.21524.40905.stgit@localhost6.localdomain6/",
    "project": {
        "id": 46,
        "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api",
        "name": "Intel Wired Ethernet development",
        "link_name": "intel-wired-lan",
        "list_id": "intel-wired-lan.osuosl.org",
        "list_email": "intel-wired-lan@osuosl.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20171211183725.21524.40905.stgit@localhost6.localdomain6>",
    "list_archive_url": null,
    "date": "2017-12-11T18:37:25",
    "name": "[8/9] ixgbevf: improve performance and reduce size of ixgbevf_tx_map()",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "876733ae551ac96f3f1c7d971897082429026459",
    "submitter": {
        "id": 1670,
        "url": "http://patchwork.ozlabs.org/api/people/1670/?format=api",
        "name": "Tantilov, Emil S",
        "email": "emil.s.tantilov@intel.com"
    },
    "delegate": {
        "id": 68,
        "url": "http://patchwork.ozlabs.org/api/users/68/?format=api",
        "username": "jtkirshe",
        "first_name": "Jeff",
        "last_name": "Kirsher",
        "email": "jeffrey.t.kirsher@intel.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20171211183725.21524.40905.stgit@localhost6.localdomain6/mbox/",
    "series": [
        {
            "id": 17925,
            "url": "http://patchwork.ozlabs.org/api/series/17925/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=17925",
            "date": "2017-12-11T18:36:44",
            "name": "ixgbevf: update Rx/Tx code path for build_skb",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/17925/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/847163/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/847163/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@osuosl.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Authentication-Results": "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.136; helo=silver.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)",
        "Received": [
            "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3ywWmd5tYNz9s03\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 12 Dec 2017 05:33:21 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 1B70F2654F;\n\tMon, 11 Dec 2017 18:33:20 +0000 (UTC)",
            "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 61wC+J0m41cY; Mon, 11 Dec 2017 18:33:18 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id 3C57525D87;\n\tMon, 11 Dec 2017 18:33:18 +0000 (UTC)",
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id F23351BFA4B\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 11 Dec 2017 18:33:16 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id ED78B86E6B\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 11 Dec 2017 18:33:16 +0000 (UTC)",
            "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id ikjQz3nNOrF0 for <intel-wired-lan@lists.osuosl.org>;\n\tMon, 11 Dec 2017 18:33:16 +0000 (UTC)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id 372B586E3E\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 11 Dec 2017 18:33:16 +0000 (UTC)",
            "from fmsmga007.fm.intel.com ([10.253.24.52])\n\tby orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t11 Dec 2017 10:33:15 -0800",
            "from estantil-desk3.jf.intel.com (HELO localhost6.localdomain6)\n\t([134.134.177.96])\n\tby fmsmga007.fm.intel.com with ESMTP; 11 Dec 2017 10:33:14 -0800"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.45,392,1508828400\"; d=\"scan'208\";a=\"1599866\"",
        "From": "Emil Tantilov <emil.s.tantilov@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Mon, 11 Dec 2017 10:37:25 -0800",
        "Message-ID": "<20171211183725.21524.40905.stgit@localhost6.localdomain6>",
        "In-Reply-To": "<20171211183537.21524.10133.stgit@localhost6.localdomain6>",
        "References": "<20171211183537.21524.10133.stgit@localhost6.localdomain6>",
        "User-Agent": "StGit/0.17.1-17-ge4e0",
        "MIME-Version": "1.0",
        "Subject": "[Intel-wired-lan] [PATCH 8/9] ixgbevf: improve performance and\n\treduce size of ixgbevf_tx_map()",
        "X-BeenThere": "intel-wired-lan@osuosl.org",
        "X-Mailman-Version": "2.1.24",
        "Precedence": "list",
        "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>",
        "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>",
        "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "intel-wired-lan-bounces@osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"
    },
    "content": "Based on commit ec718254cbfe\n(\"ixgbe: Improve performance and reduce size of ixgbe_tx_map\")\n\nThis change is meant to both improve the performance and reduce the size of\nixgbevf_tx_map().\n\nExpand the work done in the main loop by pushing first into tx_buffer.\nThis allows us to pull in the dma_mapping_error check, the tx_buffer value\nassignment, and the initial DMA value assignment to the Tx descriptor.\n\nSigned-off-by: Emil Tantilov <emil.s.tantilov@intel.com>\n---\n drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c |   45 +++++++++------------\n 1 file changed, 20 insertions(+), 25 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c\nindex a793f9e..d3415ee 100644\n--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c\n+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c\n@@ -3532,34 +3532,37 @@ static void ixgbevf_tx_map(struct ixgbevf_ring *tx_ring,\n \t\t\t   struct ixgbevf_tx_buffer *first,\n \t\t\t   const u8 hdr_len)\n {\n-\tdma_addr_t dma;\n \tstruct sk_buff *skb = first->skb;\n \tstruct ixgbevf_tx_buffer *tx_buffer;\n \tunion ixgbe_adv_tx_desc *tx_desc;\n-\tstruct skb_frag_struct *frag = &skb_shinfo(skb)->frags[0];\n-\tunsigned int data_len = skb->data_len;\n-\tunsigned int size = skb_headlen(skb);\n-\tunsigned int paylen = skb->len - hdr_len;\n+\tstruct skb_frag_struct *frag;\n+\tdma_addr_t dma;\n+\tunsigned int data_len, size;\n \tu32 tx_flags = first->tx_flags;\n-\t__le32 cmd_type;\n+\t__le32 cmd_type = ixgbevf_tx_cmd_type(tx_flags);\n \tu16 i = tx_ring->next_to_use;\n \n \ttx_desc = IXGBEVF_TX_DESC(tx_ring, i);\n \n-\tixgbevf_tx_olinfo_status(tx_desc, tx_flags, paylen);\n-\tcmd_type = ixgbevf_tx_cmd_type(tx_flags);\n+\tixgbevf_tx_olinfo_status(tx_desc, tx_flags, skb->len - hdr_len);\n+\n+\tsize = skb_headlen(skb);\n+\tdata_len = skb->data_len;\n \n \tdma = dma_map_single(tx_ring->dev, skb->data, size, DMA_TO_DEVICE);\n-\tif (dma_mapping_error(tx_ring->dev, dma))\n-\t\tgoto dma_error;\n \n-\t/* record length, and DMA address */\n-\tdma_unmap_len_set(first, len, size);\n-\tdma_unmap_addr_set(first, dma, dma);\n+\ttx_buffer = first;\n \n-\ttx_desc->read.buffer_addr = cpu_to_le64(dma);\n+\tfor (frag = &skb_shinfo(skb)->frags[0];; frag++) {\n+\t\tif (dma_mapping_error(tx_ring->dev, dma))\n+\t\t\tgoto dma_error;\n+\n+\t\t/* record length, and DMA address */\n+\t\tdma_unmap_len_set(tx_buffer, len, size);\n+\t\tdma_unmap_addr_set(tx_buffer, dma, dma);\n+\n+\t\ttx_desc->read.buffer_addr = cpu_to_le64(dma);\n \n-\tfor (;;) {\n \t\twhile (unlikely(size > IXGBE_MAX_DATA_PER_TXD)) {\n \t\t\ttx_desc->read.cmd_type_len =\n \t\t\t\tcmd_type | cpu_to_le32(IXGBE_MAX_DATA_PER_TXD);\n@@ -3570,12 +3573,12 @@ static void ixgbevf_tx_map(struct ixgbevf_ring *tx_ring,\n \t\t\t\ttx_desc = IXGBEVF_TX_DESC(tx_ring, 0);\n \t\t\t\ti = 0;\n \t\t\t}\n+\t\t\ttx_desc->read.olinfo_status = 0;\n \n \t\t\tdma += IXGBE_MAX_DATA_PER_TXD;\n \t\t\tsize -= IXGBE_MAX_DATA_PER_TXD;\n \n \t\t\ttx_desc->read.buffer_addr = cpu_to_le64(dma);\n-\t\t\ttx_desc->read.olinfo_status = 0;\n \t\t}\n \n \t\tif (likely(!data_len))\n@@ -3589,23 +3592,15 @@ static void ixgbevf_tx_map(struct ixgbevf_ring *tx_ring,\n \t\t\ttx_desc = IXGBEVF_TX_DESC(tx_ring, 0);\n \t\t\ti = 0;\n \t\t}\n+\t\ttx_desc->read.olinfo_status = 0;\n \n \t\tsize = skb_frag_size(frag);\n \t\tdata_len -= size;\n \n \t\tdma = skb_frag_dma_map(tx_ring->dev, frag, 0, size,\n \t\t\t\t       DMA_TO_DEVICE);\n-\t\tif (dma_mapping_error(tx_ring->dev, dma))\n-\t\t\tgoto dma_error;\n \n \t\ttx_buffer = &tx_ring->tx_buffer_info[i];\n-\t\tdma_unmap_len_set(tx_buffer, len, size);\n-\t\tdma_unmap_addr_set(tx_buffer, dma, dma);\n-\n-\t\ttx_desc->read.buffer_addr = cpu_to_le64(dma);\n-\t\ttx_desc->read.olinfo_status = 0;\n-\n-\t\tfrag++;\n \t}\n \n \t/* write last descriptor with RS and EOP bits */\n",
    "prefixes": [
        "8/9"
    ]
}