get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 889261,
    "url": "http://patchwork.ozlabs.org/api/patches/889261/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20180322090236.14357-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": "<20180322090236.14357-1-bjorn.topel@gmail.com>",
    "list_archive_url": null,
    "date": "2018-03-22T09:02:36",
    "name": "ixgbe: tweak page counting for XDP_REDIRECT",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "afa7c9aa1f5a35cb9b36811ad517b3341e9c3ae4",
    "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/20180322090236.14357-1-bjorn.topel@gmail.com/mbox/",
    "series": [
        {
            "id": 35204,
            "url": "http://patchwork.ozlabs.org/api/series/35204/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=35204",
            "date": "2018-03-22T09:02:36",
            "name": "ixgbe: tweak page counting for XDP_REDIRECT",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/35204/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/889261/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/889261/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>)",
            "ozlabs.org;\n\tdmarc=fail (p=none dis=none) header.from=gmail.com"
        ],
        "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 406LXh1VNYz9s1R\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 22 Mar 2018 20:12:18 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 717712EB58;\n\tThu, 22 Mar 2018 09:12:16 +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 2MckbTj7uO5h; Thu, 22 Mar 2018 09:12:15 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id AAA4E226D9;\n\tThu, 22 Mar 2018 09:12:15 +0000 (UTC)",
            "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id 555981C253A\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 22 Mar 2018 09:12:14 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 5206087760\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 22 Mar 2018 09:12:14 +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 HicaIckLZh35 for <intel-wired-lan@lists.osuosl.org>;\n\tThu, 22 Mar 2018 09:12:13 +0000 (UTC)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id 3E96A8775C\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 22 Mar 2018 09:12:13 +0000 (UTC)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t22 Mar 2018 02:02:43 -0700",
            "from btopel-mobl1.isw.intel.com ([10.103.211.155])\n\tby orsmga002.jf.intel.com with ESMTP; 22 Mar 2018 02:02:41 -0700"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "delayed 00:09:29 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,343,1517904000\"; d=\"scan'208\";a=\"44326664\"",
        "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 10:02:36 +0100",
        "Message-Id": "<20180322090236.14357-1-bjorn.topel@gmail.com>",
        "X-Mailer": "git-send-email 2.14.1",
        "MIME-Version": "1.0",
        "Subject": "[Intel-wired-lan] [PATCH] ixgbe: 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\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/ixgbe/ixgbe_main.c | 7 ++++---\n 1 file changed, 4 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\nindex fb80edbd2739..8dbb2ce06287 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n@@ -1629,7 +1629,8 @@ static bool ixgbe_alloc_mapped_page(struct ixgbe_ring *rx_ring,\n \tbi->dma = dma;\n \tbi->page = page;\n \tbi->page_offset = ixgbe_rx_offset(rx_ring);\n-\tbi->pagecnt_bias = 1;\n+\tpage_ref_add(page, USHRT_MAX - 1);\n+\tbi->pagecnt_bias = USHRT_MAX;\n \trx_ring->rx_stats.alloc_rx_page++;\n \n \treturn true;\n@@ -2039,8 +2040,8 @@ static bool ixgbe_can_reuse_rx_page(struct ixgbe_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": []
}