get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 889422,
    "url": "http://patchwork.ozlabs.org/api/patches/889422/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20180322151434.24338-1-bjorn.topel@gmail.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": "<20180322151434.24338-1-bjorn.topel@gmail.com>",
    "list_archive_url": null,
    "date": "2018-03-22T15:14:33",
    "name": "[v3,1/2] i40e: tweak page counting for XDP_REDIRECT",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "1d8bd59432eaccf83b918eeff6b034183bee3eec",
    "submitter": {
        "id": 70569,
        "url": "http://patchwork.ozlabs.org/api/people/70569/?format=api",
        "name": "Björn Töpel",
        "email": "bjorn.topel@gmail.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/20180322151434.24338-1-bjorn.topel@gmail.com/mbox/",
    "series": [
        {
            "id": 35268,
            "url": "http://patchwork.ozlabs.org/api/series/35268/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=35268",
            "date": "2018-03-22T15:14:34",
            "name": "[v3,1/2] i40e: tweak page counting for XDP_REDIRECT",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/35268/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/889422/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/889422/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=gmail.com"
        ],
        "Received": [
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\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 406VZx5zbhz9s1B\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 23 Mar 2018 02:14:49 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id DEAB2894D8;\n\tThu, 22 Mar 2018 15:14:47 +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 dt02M4d1qf7f; Thu, 22 Mar 2018 15:14:43 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 8D2C489526;\n\tThu, 22 Mar 2018 15:14:43 +0000 (UTC)",
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 5188F1C0496\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 22 Mar 2018 15:14:42 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 4DE648A11E\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 22 Mar 2018 15:14:42 +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 vgFY-bX6kgCW for <intel-wired-lan@lists.osuosl.org>;\n\tThu, 22 Mar 2018 15:14:41 +0000 (UTC)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 6A81289F93\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 22 Mar 2018 15:14:41 +0000 (UTC)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t22 Mar 2018 08:14:40 -0700",
            "from alinassi-mobl1.ger.corp.intel.com (HELO\n\tbtopel-mobl1.isw.intel.com) ([10.252.51.52])\n\tby fmsmga001.fm.intel.com with ESMTP; 22 Mar 2018 08:14:39 -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.48,345,1517904000\"; d=\"scan'208\";a=\"40296599\"",
        "From": "=?utf-8?b?QmrDtnJuIFTDtnBlbA==?= <bjorn.topel@gmail.com>",
        "To": "jeffrey.t.kirsher@intel.com,\n\tintel-wired-lan@lists.osuosl.org",
        "Date": "Thu, 22 Mar 2018 16:14:33 +0100",
        "Message-Id": "<20180322151434.24338-1-bjorn.topel@gmail.com>",
        "X-Mailer": "git-send-email 2.14.1",
        "MIME-Version": "1.0",
        "Subject": "[Intel-wired-lan] [PATCH v3 1/2] i40e: tweak page counting for\n\tXDP_REDIRECT",
        "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>",
        "Cc": "netdev@vger.kernel.org, =?utf-8?b?QmrDtnJuIFTDtnBlbA==?=\n\t<bjorn.topel@intel.com>,  magnus.karlsson@intel.com",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "base64",
        "Errors-To": "intel-wired-lan-bounces@osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"
    },
    "content": "From: Björn Töpel <bjorn.topel@intel.com>\n\nThis commit tweaks the page counting for XDP_REDIRECT to function\nproperly. XDP_REDIRECT support will be added in a future commit.\n\nThe current page counting scheme assumes that the reference count\ncannot decrease until the received frame is sent to the upper layers\nof the networking stack. This assumption does not hold for the\nXDP_REDIRECT action, since a page (pointed out by xdp_buff) can have\nits reference count decreased via the xdp_do_redirect call.\n\nTo work around that, we now start off by a large page count and then\ndon't allow a refcount less than two.\n\nSigned-off-by: Björn Töpel <bjorn.topel@intel.com>\n---\n drivers/net/ethernet/intel/i40e/i40e_txrx.c | 9 ++++-----\n 1 file changed, 4 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c\nindex e8eef9a56b6b..2f817d1466eb 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c\n@@ -1588,9 +1588,8 @@ static bool i40e_alloc_mapped_page(struct i40e_ring *rx_ring,\n \tbi->dma = dma;\n \tbi->page = page;\n \tbi->page_offset = i40e_rx_offset(rx_ring);\n-\n-\t/* initialize pagecnt_bias to 1 representing we fully own page */\n-\tbi->pagecnt_bias = 1;\n+\tpage_ref_add(page, USHRT_MAX - 1);\n+\tbi->pagecnt_bias = USHRT_MAX;\n \n \treturn true;\n }\n@@ -1956,8 +1955,8 @@ static bool i40e_can_reuse_rx_page(struct i40e_rx_buffer *rx_buffer)\n \t * the pagecnt_bias and page count so that we fully restock the\n \t * number of references the driver holds.\n \t */\n-\tif (unlikely(!pagecnt_bias)) {\n-\t\tpage_ref_add(page, USHRT_MAX);\n+\tif (unlikely(pagecnt_bias == 1)) {\n+\t\tpage_ref_add(page, USHRT_MAX - 1);\n \t\trx_buffer->pagecnt_bias = USHRT_MAX;\n \t}\n \n",
    "prefixes": [
        "v3",
        "1/2"
    ]
}