get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 710627,
    "url": "http://patchwork.ozlabs.org/api/patches/710627/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/7be510fd79f67969fc03be24dea68b9f198e486b.1483457249.git.joe@perches.com/",
    "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": "<7be510fd79f67969fc03be24dea68b9f198e486b.1483457249.git.joe@perches.com>",
    "list_archive_url": null,
    "date": "2017-01-03T15:28:11",
    "name": "ixgbe: Remove pr_cont uses",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "4d1da58ec00aefe873414a4111800f9921480ca0",
    "submitter": {
        "id": 771,
        "url": "http://patchwork.ozlabs.org/api/people/771/?format=api",
        "name": "Joe Perches",
        "email": "joe@perches.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/7be510fd79f67969fc03be24dea68b9f198e486b.1483457249.git.joe@perches.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/710627/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/710627/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@lists.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"
        ],
        "Received": [
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\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 3ttQCM2Gpdz9s9Y\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed,  4 Jan 2017 07:14:39 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id E2A6F88409;\n\tTue,  3 Jan 2017 20:14:37 +0000 (UTC)",
            "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id EFpVE+VTQycP; Tue,  3 Jan 2017 20:14:36 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id B36DA883F0;\n\tTue,  3 Jan 2017 20:14:36 +0000 (UTC)",
            "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id C50C01BFEC7\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue,  3 Jan 2017 20:14:35 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id BFA928690C\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue,  3 Jan 2017 20:14:35 +0000 (UTC)",
            "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id b5EnuiaJsBRY for <intel-wired-lan@lists.osuosl.org>;\n\tTue,  3 Jan 2017 20:14:34 +0000 (UTC)",
            "from smtprelay.hostedemail.com (smtprelay0172.hostedemail.com\n\t[216.40.44.172])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id 6FE5B867B9\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue,  3 Jan 2017 20:14:34 +0000 (UTC)",
            "from smtprelay.hostedemail.com (10.5.19.251.rfc1918.com\n\t[10.5.19.251])\n\tby smtpgrave02.hostedemail.com (Postfix) with ESMTP id DF25C30B9\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue,  3 Jan 2017 15:28:16 +0000 (UTC)",
            "from filter.hostedemail.com (clb03-v110.bra.tucows.net\n\t[216.40.38.60])\n\tby smtprelay07.hostedemail.com (Postfix) with ESMTP id 07429C211F;\n\tTue,  3 Jan 2017 15:28:14 +0000 (UTC)",
            "from joe-laptop.perches.com (unknown [47.151.132.55])\n\t(Authenticated sender: joe@perches.com)\n\tby omf07.hostedemail.com (Postfix) with ESMTPA;\n\tTue,  3 Jan 2017 15:28:12 +0000 (UTC)"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "from auto-whitelisted by SQLgrey-1.7.6",
        "X-Session-Marker": "6A6F6540706572636865732E636F6D",
        "X-Spam-Summary": "2, 0, 0, , d41d8cd98f00b204, joe@perches.com, :::::::,\n\tRULES_HIT:2:41:69:355:379:541:800:960:973:982:988:989:1260:1345:1437:1535:1605:1606:1730:1747:1777:1792:2194:2199:2393:2553:2559:2562:2729:2914:3138:3139:3140:3141:3142:3865:3867:3868:3870:4117:4225:4321:4605:5007:6119:6261:7807:7809:7903:7904:8603:8957:9038:9592:10004:10848:11026:11232:11473:11657:11658:11914:12043:12296:12555:12679:12683:12895:12986:13972:14394:21080:21433:30029:30054:30055:30090,\n\t0, RBL:none, CacheIP:none, Bayesian:0.5, 0.5, 0.5, Netcheck:none,\n\tDomainCache:0, MSF:not bulk, SPF:fn, MSBL:0, DNSBL:none,\n\tCustom_rules:0:0:0, LFtime:2, LUA_SUMMARY:none",
        "X-HE-Tag": "house60_2aa2904de2162",
        "X-Filterd-Recvd-Size": "6448",
        "From": "Joe Perches <joe@perches.com>",
        "To": "Jeff Kirsher <jeffrey.t.kirsher@intel.com>",
        "Date": "Tue,  3 Jan 2017 07:28:11 -0800",
        "Message-Id": "<7be510fd79f67969fc03be24dea68b9f198e486b.1483457249.git.joe@perches.com>",
        "X-Mailer": "git-send-email 2.10.0.rc2.1.g053435c",
        "Cc": "netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org,\n\tlinux-kernel@vger.kernel.org",
        "Subject": "[Intel-wired-lan] [PATCH] ixgbe: Remove pr_cont uses",
        "X-BeenThere": "intel-wired-lan@lists.osuosl.org",
        "X-Mailman-Version": "2.1.18-1",
        "Precedence": "list",
        "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.lists.osuosl.org>",
        "List-Unsubscribe": "<http://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@lists.osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@lists.osuosl.org?subject=help>",
        "List-Subscribe": "<http://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=subscribe>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "intel-wired-lan-bounces@lists.osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@lists.osuosl.org>"
    },
    "content": "As pr_cont output can be interleaved by other processes,\nusing pr_cont should be avoided where possible.\n\nMiscellanea:\n\no Use a temporary pointer to hold the next descriptions and\n  consolidate the pr_cont uses\no Use the temporary buffer to hold the 8 u32 register values and\n  emit those in a single go\no Coalesce formats and logging neatening around those changes\no Fix a defective output for the rx ring entry description when\n  also emitting rx_buffer_info data\n\nThis reduces overall object size a tiny bit too.\n\n$ size drivers/net/ethernet/intel/ixgbe/*.o*\n   text\t   data\t    bss\t    dec\t    hex\tfilename\n  62167\t    728\t     12\t  62907\t   f5bb\tdrivers/net/ethernet/intel/ixgbe/ixgbe_main.o.new\n  62273\t    728\t     12\t  63013\t   f625\tdrivers/net/ethernet/intel/ixgbe/ixgbe_main.o.old\n\nSigned-off-by: Joe Perches <joe@perches.com>\n---\n drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 84 +++++++++++++++------------\n 1 file changed, 47 insertions(+), 37 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\nindex 1e2f39ebd824..bc1c3819f520 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n@@ -504,7 +504,7 @@ static const struct ixgbe_reg_info ixgbe_reg_info_tbl[] = {\n  */\n static void ixgbe_regdump(struct ixgbe_hw *hw, struct ixgbe_reg_info *reginfo)\n {\n-\tint i = 0, j = 0;\n+\tint i;\n \tchar rname[16];\n \tu32 regs[64];\n \n@@ -566,17 +566,21 @@ static void ixgbe_regdump(struct ixgbe_hw *hw, struct ixgbe_reg_info *reginfo)\n \t\t\tregs[i] = IXGBE_READ_REG(hw, IXGBE_TXDCTL(i));\n \t\tbreak;\n \tdefault:\n-\t\tpr_info(\"%-15s %08x\\n\", reginfo->name,\n-\t\t\tIXGBE_READ_REG(hw, reginfo->ofs));\n+\t\tpr_info(\"%-15s %08x\\n\",\n+\t\t\treginfo->name, IXGBE_READ_REG(hw, reginfo->ofs));\n \t\treturn;\n \t}\n \n-\tfor (i = 0; i < 8; i++) {\n-\t\tsnprintf(rname, 16, \"%s[%d-%d]\", reginfo->name, i*8, i*8+7);\n-\t\tpr_err(\"%-15s\", rname);\n+\ti = 0;\n+\twhile (i < 64) {\n+\t\tint j;\n+\t\tchar buf[9 * 8 + 1];\n+\t\tchar *p = buf;\n+\n+\t\tsnprintf(rname, 16, \"%s[%d-%d]\", reginfo->name, i, i + 7);\n \t\tfor (j = 0; j < 8; j++)\n-\t\t\tpr_cont(\" %08x\", regs[i*8+j]);\n-\t\tpr_cont(\"\\n\");\n+\t\t\tp += sprintf(p, \" %08x\", regs[i++]);\n+\t\tpr_err(\"%-15s%s\\n\", rname, buf);\n \t}\n \n }\n@@ -698,7 +702,18 @@ static void ixgbe_dump(struct ixgbe_adapter *adapter)\n \t\t\ttx_buffer = &tx_ring->tx_buffer_info[i];\n \t\t\tu0 = (struct my_u0 *)tx_desc;\n \t\t\tif (dma_unmap_len(tx_buffer, len) > 0) {\n-\t\t\t\tpr_info(\"T [0x%03X]    %016llX %016llX %016llX %08X %p %016llX %p\",\n+\t\t\t\tconst char *ring_desc;\n+\n+\t\t\t\tif (i == tx_ring->next_to_use &&\n+\t\t\t\t    i == tx_ring->next_to_clean)\n+\t\t\t\t\tring_desc = \" NTC/U\";\n+\t\t\t\telse if (i == tx_ring->next_to_use)\n+\t\t\t\t\tring_desc = \" NTU\";\n+\t\t\t\telse if (i == tx_ring->next_to_clean)\n+\t\t\t\t\tring_desc = \" NTC\";\n+\t\t\t\telse\n+\t\t\t\t\tring_desc = \"\";\n+\t\t\t\tpr_info(\"T [0x%03X]    %016llX %016llX %016llX %08X %p %016llX %p%s\",\n \t\t\t\t\ti,\n \t\t\t\t\tle64_to_cpu(u0->a),\n \t\t\t\t\tle64_to_cpu(u0->b),\n@@ -706,16 +721,8 @@ static void ixgbe_dump(struct ixgbe_adapter *adapter)\n \t\t\t\t\tdma_unmap_len(tx_buffer, len),\n \t\t\t\t\ttx_buffer->next_to_watch,\n \t\t\t\t\t(u64)tx_buffer->time_stamp,\n-\t\t\t\t\ttx_buffer->skb);\n-\t\t\t\tif (i == tx_ring->next_to_use &&\n-\t\t\t\t\ti == tx_ring->next_to_clean)\n-\t\t\t\t\tpr_cont(\" NTC/U\\n\");\n-\t\t\t\telse if (i == tx_ring->next_to_use)\n-\t\t\t\t\tpr_cont(\" NTU\\n\");\n-\t\t\t\telse if (i == tx_ring->next_to_clean)\n-\t\t\t\t\tpr_cont(\" NTC\\n\");\n-\t\t\t\telse\n-\t\t\t\t\tpr_cont(\"\\n\");\n+\t\t\t\t\ttx_buffer->skb,\n+\t\t\t\t\tring_desc);\n \n \t\t\t\tif (netif_msg_pktdata(adapter) &&\n \t\t\t\t    tx_buffer->skb)\n@@ -794,34 +801,45 @@ static void ixgbe_dump(struct ixgbe_adapter *adapter)\n \t\tpr_info(\"------------------------------------\\n\");\n \t\tpr_info(\"RX QUEUE INDEX = %d\\n\", rx_ring->queue_index);\n \t\tpr_info(\"------------------------------------\\n\");\n-\t\tpr_info(\"%s%s%s\",\n+\t\tpr_info(\"%s%s%s\\n\",\n \t\t\t\"R  [desc]      [ PktBuf     A0] \",\n \t\t\t\"[  HeadBuf   DD] [bi->dma       ] [bi->skb       ] \",\n-\t\t\t\"<-- Adv Rx Read format\\n\");\n-\t\tpr_info(\"%s%s%s\",\n+\t\t\t\"<-- Adv Rx Read format\");\n+\t\tpr_info(\"%s%s%s\\n\",\n \t\t\t\"RWB[desc]      [PcsmIpSHl PtRs] \",\n \t\t\t\"[vl er S cks ln] ---------------- [bi->skb       ] \",\n-\t\t\t\"<-- Adv Rx Write-Back format\\n\");\n+\t\t\t\"<-- Adv Rx Write-Back format\");\n \n \t\tfor (i = 0; i < rx_ring->count; i++) {\n+\t\t\tconst char *ring_desc;\n+\n+\t\t\tif (i == rx_ring->next_to_use)\n+\t\t\t\tring_desc = \" NTU\";\n+\t\t\telse if (i == rx_ring->next_to_clean)\n+\t\t\t\tring_desc = \" NTC\";\n+\t\t\telse\n+\t\t\t\tring_desc = \"\";\n+\n \t\t\trx_buffer_info = &rx_ring->rx_buffer_info[i];\n \t\t\trx_desc = IXGBE_RX_DESC(rx_ring, i);\n \t\t\tu0 = (struct my_u0 *)rx_desc;\n \t\t\tstaterr = le32_to_cpu(rx_desc->wb.upper.status_error);\n \t\t\tif (staterr & IXGBE_RXD_STAT_DD) {\n \t\t\t\t/* Descriptor Done */\n-\t\t\t\tpr_info(\"RWB[0x%03X]     %016llX \"\n-\t\t\t\t\t\"%016llX ---------------- %p\", i,\n+\t\t\t\tpr_info(\"RWB[0x%03X]     %016llX %016llX ---------------- %p%s\\n\",\n+\t\t\t\t\ti,\n \t\t\t\t\tle64_to_cpu(u0->a),\n \t\t\t\t\tle64_to_cpu(u0->b),\n-\t\t\t\t\trx_buffer_info->skb);\n+\t\t\t\t\trx_buffer_info->skb,\n+\t\t\t\t\tring_desc);\n \t\t\t} else {\n-\t\t\t\tpr_info(\"R  [0x%03X]     %016llX \"\n-\t\t\t\t\t\"%016llX %016llX %p\", i,\n+\t\t\t\tpr_info(\"R  [0x%03X]     %016llX %016llX %016llX %p%s\\n\",\n+\t\t\t\t\ti,\n \t\t\t\t\tle64_to_cpu(u0->a),\n \t\t\t\t\tle64_to_cpu(u0->b),\n \t\t\t\t\t(u64)rx_buffer_info->dma,\n-\t\t\t\t\trx_buffer_info->skb);\n+\t\t\t\t\trx_buffer_info->skb,\n+\t\t\t\t\tring_desc);\n \n \t\t\t\tif (netif_msg_pktdata(adapter) &&\n \t\t\t\t    rx_buffer_info->dma) {\n@@ -832,14 +850,6 @@ static void ixgbe_dump(struct ixgbe_adapter *adapter)\n \t\t\t\t\t   ixgbe_rx_bufsz(rx_ring), true);\n \t\t\t\t}\n \t\t\t}\n-\n-\t\t\tif (i == rx_ring->next_to_use)\n-\t\t\t\tpr_cont(\" NTU\\n\");\n-\t\t\telse if (i == rx_ring->next_to_clean)\n-\t\t\t\tpr_cont(\" NTC\\n\");\n-\t\t\telse\n-\t\t\t\tpr_cont(\"\\n\");\n-\n \t\t}\n \t}\n }\n",
    "prefixes": []
}