get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1090461,
    "url": "http://patchwork.ozlabs.org/api/patches/1090461/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20190424122055.27896-5-alice.michael@intel.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": "<20190424122055.27896-5-alice.michael@intel.com>",
    "list_archive_url": null,
    "date": "2019-04-24T12:20:50",
    "name": "[next,S5,05/10] i40e: Improve AQ log granularity",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "980d70a7347e655325ecaea58f5cd7825d83e58b",
    "submitter": {
        "id": 71123,
        "url": "http://patchwork.ozlabs.org/api/people/71123/?format=api",
        "name": "Michael, Alice",
        "email": "alice.michael@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/20190424122055.27896-5-alice.michael@intel.com/mbox/",
    "series": [
        {
            "id": 104485,
            "url": "http://patchwork.ozlabs.org/api/series/104485/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=104485",
            "date": "2019-04-24T12:20:48",
            "name": "[next,S5,01/10] i40e: let untrusted VF to create up to 16 VLANs",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/104485/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1090461/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1090461/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.138; helo=whitealder.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org;\n\tdmarc=fail (p=none dis=none) header.from=intel.com"
        ],
        "Received": [
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 44qBv63l7Tz9s3l\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 25 Apr 2019 06:37:06 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id D1FF5872B4;\n\tWed, 24 Apr 2019 20:37:04 +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 Q8XVkrYB385e; Wed, 24 Apr 2019 20:37:00 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id E5AD2872B8;\n\tWed, 24 Apr 2019 20:36:59 +0000 (UTC)",
            "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 26C9A1BF3C0\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 24 Apr 2019 20:36:57 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 237F82277A\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 24 Apr 2019 20:36:57 +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 WotEHGH7RTxn for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 24 Apr 2019 20:36:55 +0000 (UTC)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby silver.osuosl.org (Postfix) with ESMTPS id 83E092DF55\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 24 Apr 2019 20:36:55 +0000 (UTC)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t24 Apr 2019 13:36:54 -0700",
            "from alicemic-2.jf.intel.com ([10.166.16.121])\n\tby fmsmga002.fm.intel.com with ESMTP; 24 Apr 2019 13:36:54 -0700"
        ],
        "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.60,390,1549958400\"; d=\"scan'208\";a=\"164544013\"",
        "From": "Alice Michael <alice.michael@intel.com>",
        "To": "alice.michael@intel.com,\n\tintel-wired-lan@lists.osuosl.org",
        "Date": "Wed, 24 Apr 2019 05:20:50 -0700",
        "Message-Id": "<20190424122055.27896-5-alice.michael@intel.com>",
        "X-Mailer": "git-send-email 2.19.2",
        "In-Reply-To": "<20190424122055.27896-1-alice.michael@intel.com>",
        "References": "<20190424122055.27896-1-alice.michael@intel.com>",
        "MIME-Version": "1.0",
        "Subject": "[Intel-wired-lan] [next PATCH S5 05/10] i40e: Improve AQ log\n\tgranularity",
        "X-BeenThere": "intel-wired-lan@osuosl.org",
        "X-Mailman-Version": "2.1.29",
        "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>",
        "Cc": "Doug Dziggel <douglas.a.dziggel@intel.com>",
        "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": "From: Doug Dziggel <douglas.a.dziggel@intel.com>\n\nThis patch makes it possible to log only AQ descriptors, without the\nentire AQ message buffers being dumped too. It should greatly reduce\nkernel log size in cases where a full AQ dump is not needed.\nSelection is made by setting flags in hw->debug_mask.\n\nAdditionally, some debug messages that preceded an AQ dump have been\nmoved to I40E_DEBUG_AQ_COMMAND class, which seems more appropriate.\n\nSigned-off-by: Doug Dziggel <douglas.a.dziggel@intel.com>\n---\n drivers/net/ethernet/intel/i40e/i40e_adminq.c |  8 ++--\n drivers/net/ethernet/intel/i40e/i40e_common.c | 40 ++++++++++---------\n 2 files changed, 25 insertions(+), 23 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq.c b/drivers/net/ethernet/intel/i40e/i40e_adminq.c\nindex 243dcd4bec19..814acbe79ffd 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_adminq.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_adminq.c\n@@ -675,7 +675,7 @@ static u16 i40e_clean_asq(struct i40e_hw *hw)\n \tdesc = I40E_ADMINQ_DESC(*asq, ntc);\n \tdetails = I40E_ADMINQ_DETAILS(*asq, ntc);\n \twhile (rd32(hw, hw->aq.asq.head) != ntc) {\n-\t\ti40e_debug(hw, I40E_DEBUG_AQ_MESSAGE,\n+\t\ti40e_debug(hw, I40E_DEBUG_AQ_COMMAND,\n \t\t\t   \"ntc %d head %d.\\n\", ntc, rd32(hw, hw->aq.asq.head));\n \n \t\tif (details->callback) {\n@@ -835,7 +835,7 @@ i40e_status i40e_asq_send_command(struct i40e_hw *hw,\n \t}\n \n \t/* bump the tail */\n-\ti40e_debug(hw, I40E_DEBUG_AQ_MESSAGE, \"AQTX: desc and buffer:\\n\");\n+\ti40e_debug(hw, I40E_DEBUG_AQ_COMMAND, \"AQTX: desc and buffer:\\n\");\n \ti40e_debug_aq(hw, I40E_DEBUG_AQ_COMMAND, (void *)desc_on_ring,\n \t\t      buff, buff_size);\n \t(hw->aq.asq.next_to_use)++;\n@@ -886,7 +886,7 @@ i40e_status i40e_asq_send_command(struct i40e_hw *hw,\n \t\thw->aq.asq_last_status = (enum i40e_admin_queue_err)retval;\n \t}\n \n-\ti40e_debug(hw, I40E_DEBUG_AQ_MESSAGE,\n+\ti40e_debug(hw, I40E_DEBUG_AQ_COMMAND,\n \t\t   \"AQTX: desc and buffer writeback:\\n\");\n \ti40e_debug_aq(hw, I40E_DEBUG_AQ_COMMAND, (void *)desc, buff, buff_size);\n \n@@ -995,7 +995,7 @@ i40e_status i40e_clean_arq_element(struct i40e_hw *hw,\n \t\tmemcpy(e->msg_buf, hw->aq.arq.r.arq_bi[desc_idx].va,\n \t\t       e->msg_len);\n \n-\ti40e_debug(hw, I40E_DEBUG_AQ_MESSAGE, \"AQRX: desc and buffer:\\n\");\n+\ti40e_debug(hw, I40E_DEBUG_AQ_COMMAND, \"AQRX: desc and buffer:\\n\");\n \ti40e_debug_aq(hw, I40E_DEBUG_AQ_COMMAND, (void *)desc, e->msg_buf,\n \t\t      hw->aq.arq_buf_size);\n \ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c\nindex ecb1adaa54ec..641b500ad919 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_common.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_common.c\n@@ -281,47 +281,49 @@ void i40e_debug_aq(struct i40e_hw *hw, enum i40e_debug_mask mask, void *desc,\n \t\t   void *buffer, u16 buf_len)\n {\n \tstruct i40e_aq_desc *aq_desc = (struct i40e_aq_desc *)desc;\n+\tu32 effective_mask = hw->debug_mask & mask;\n+\tchar prefix[27];\n \tu16 len;\n \tu8 *buf = (u8 *)buffer;\n \n-\tif ((!(mask & hw->debug_mask)) || (desc == NULL))\n+\tif (!effective_mask || !desc)\n \t\treturn;\n \n \tlen = le16_to_cpu(aq_desc->datalen);\n \n-\ti40e_debug(hw, mask,\n+\ti40e_debug(hw, mask & I40E_DEBUG_AQ_DESCRIPTOR,\n \t\t   \"AQ CMD: opcode 0x%04X, flags 0x%04X, datalen 0x%04X, retval 0x%04X\\n\",\n \t\t   le16_to_cpu(aq_desc->opcode),\n \t\t   le16_to_cpu(aq_desc->flags),\n \t\t   le16_to_cpu(aq_desc->datalen),\n \t\t   le16_to_cpu(aq_desc->retval));\n-\ti40e_debug(hw, mask, \"\\tcookie (h,l) 0x%08X 0x%08X\\n\",\n+\ti40e_debug(hw, mask & I40E_DEBUG_AQ_DESCRIPTOR,\n+\t\t   \"\\tcookie (h,l) 0x%08X 0x%08X\\n\",\n \t\t   le32_to_cpu(aq_desc->cookie_high),\n \t\t   le32_to_cpu(aq_desc->cookie_low));\n-\ti40e_debug(hw, mask, \"\\tparam (0,1)  0x%08X 0x%08X\\n\",\n+\ti40e_debug(hw, mask & I40E_DEBUG_AQ_DESCRIPTOR,\n+\t\t   \"\\tparam (0,1)  0x%08X 0x%08X\\n\",\n \t\t   le32_to_cpu(aq_desc->params.internal.param0),\n \t\t   le32_to_cpu(aq_desc->params.internal.param1));\n-\ti40e_debug(hw, mask, \"\\taddr (h,l)   0x%08X 0x%08X\\n\",\n+\ti40e_debug(hw, mask & I40E_DEBUG_AQ_DESCRIPTOR,\n+\t\t   \"\\taddr (h,l)   0x%08X 0x%08X\\n\",\n \t\t   le32_to_cpu(aq_desc->params.external.addr_high),\n \t\t   le32_to_cpu(aq_desc->params.external.addr_low));\n \n-\tif ((buffer != NULL) && (aq_desc->datalen != 0)) {\n+\tif (buffer && buf_len != 0 && len != 0 &&\n+\t    (effective_mask & I40E_DEBUG_AQ_DESC_BUFFER)) {\n \t\ti40e_debug(hw, mask, \"AQ CMD Buffer:\\n\");\n \t\tif (buf_len < len)\n \t\t\tlen = buf_len;\n-\t\t/* write the full 16-byte chunks */\n-\t\tif (hw->debug_mask & mask) {\n-\t\t\tchar prefix[27];\n-\n-\t\t\tsnprintf(prefix, sizeof(prefix),\n-\t\t\t\t \"i40e %02x:%02x.%x: \\t0x\",\n-\t\t\t\t hw->bus.bus_id,\n-\t\t\t\t hw->bus.device,\n-\t\t\t\t hw->bus.func);\n-\n-\t\t\tprint_hex_dump(KERN_INFO, prefix, DUMP_PREFIX_OFFSET,\n-\t\t\t\t       16, 1, buf, len, false);\n-\t\t}\n+\n+\t\tsnprintf(prefix, sizeof(prefix),\n+\t\t\t \"i40e %02x:%02x.%x: \\t0x\",\n+\t\t\t hw->bus.bus_id,\n+\t\t\t hw->bus.device,\n+\t\t\t hw->bus.func);\n+\n+\t\tprint_hex_dump(KERN_INFO, prefix, DUMP_PREFIX_OFFSET,\n+\t\t\t       16, 1, buf, len, false);\n \t}\n }\n \n",
    "prefixes": [
        "next",
        "S5",
        "05/10"
    ]
}