get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 45208,
    "url": "https://patches.dpdk.org/api/patches/45208/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1537797030-26548-6-git-send-email-arybchenko@solarflare.com/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<1537797030-26548-6-git-send-email-arybchenko@solarflare.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1537797030-26548-6-git-send-email-arybchenko@solarflare.com",
    "date": "2018-09-24T13:50:24",
    "name": "[05/11] net/sfc/base: add X2 port modes to bandwidth calculator",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "822b611941d835ce4e6d9b3758d1618a0ca12d5d",
    "submitter": {
        "id": 607,
        "url": "https://patches.dpdk.org/api/people/607/?format=api",
        "name": "Andrew Rybchenko",
        "email": "arybchenko@solarflare.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1537797030-26548-6-git-send-email-arybchenko@solarflare.com/mbox/",
    "series": [
        {
            "id": 1467,
            "url": "https://patches.dpdk.org/api/series/1467/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=1467",
            "date": "2018-09-24T13:50:22",
            "name": "net/sfc: update base driver to support 50G and 100G",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/1467/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/45208/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/45208/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id A7366532C;\n\tMon, 24 Sep 2018 15:51:05 +0200 (CEST)",
            "from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com\n\t[148.163.129.52]) by dpdk.org (Postfix) with ESMTP id 69C8C2C15\n\tfor <dev@dpdk.org>; Mon, 24 Sep 2018 15:50:51 +0200 (CEST)",
            "from webmail.solarflare.com (webmail.solarflare.com\n\t[12.187.104.26])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby mx1-us3.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with\n\tESMTPS id\n\t4CCFBB4007C for <dev@dpdk.org>; Mon, 24 Sep 2018 13:50:50 +0000 (UTC)",
            "from ocex03.SolarFlarecom.com (10.20.40.36) by\n\tocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server\n\t(TLS) id 15.0.1395.4; Mon, 24 Sep 2018 06:50:47 -0700",
            "from opal.uk.solarflarecom.com (10.17.10.1) by\n\tocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server\n\t(TLS) id\n\t15.0.1395.4 via Frontend Transport; Mon, 24 Sep 2018 06:50:47 -0700",
            "from ukv-loginhost.uk.solarflarecom.com\n\t(ukv-loginhost.uk.solarflarecom.com [10.17.10.39])\n\tby opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id\n\tw8ODojRm014516; Mon, 24 Sep 2018 14:50:45 +0100",
            "from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1])\n\tby ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id\n\tA6B2B1626D2; Mon, 24 Sep 2018 14:50:45 +0100 (BST)"
        ],
        "X-Virus-Scanned": "Proofpoint Essentials engine",
        "From": "Andrew Rybchenko <arybchenko@solarflare.com>",
        "To": "<dev@dpdk.org>",
        "CC": "Richard Houldsworth <rhouldsworth@solarflare.com>",
        "Date": "Mon, 24 Sep 2018 14:50:24 +0100",
        "Message-ID": "<1537797030-26548-6-git-send-email-arybchenko@solarflare.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1537797030-26548-1-git-send-email-arybchenko@solarflare.com>",
        "References": "<1537797030-26548-1-git-send-email-arybchenko@solarflare.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-TM-AS-Product-Ver": "SMEX-12.5.0.1300-8.5.1010-24114.005",
        "X-TM-AS-Result": "No-1.819200-4.000000-10",
        "X-TMASE-MatchedRID": "6pbNFWS8cDsLazoQyrpm0gPZZctd3P4BWjWsWQUWzVpeARTvhomDCi9w\n\tiqtW2KFAOfAiJ/eonC2JFD9cJ7KNbLLDOFoORDA/syNb+yeIRAq8n1e+HkKZPpsoi2XrUn/Jn6K\n\tdMrRsL14qtq5d3cxkNdWEhzhkLapeDfcWB5bv93FIn9eawy/zxUgjfkTgOJKT1CMjl+BdWp/Vmy\n\ttinfe+kp+xIYSE5p+VZ4Q5iK67ow+/VBRnooWfncCGzXCiH+kqOKBkFAm8GOUPoO5ncI6OuehbQ\n\t2QpmASdyky8P5TYMPI=",
        "X-TM-AS-User-Approved-Sender": "No",
        "X-TM-AS-User-Blocked-Sender": "No",
        "X-TMASE-Result": "10--1.819200-4.000000",
        "X-TMASE-Version": "SMEX-12.5.0.1300-8.5.1010-24114.005",
        "X-MDID": "1537797050-TFeI_PTc2-zJ",
        "Subject": "[dpdk-dev] [PATCH 05/11] net/sfc/base: add X2 port modes to\n\tbandwidth calculator",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: Richard Houldsworth <rhouldsworth@solarflare.com>\n\nAdd cases for the new port modes supported by X2 NICs.\nLane bandwidth is calculated for pre-X2 cards so is an\nunderestimate for X2 in 25G/100G modes.\n\nSigned-off-by: Richard Houldsworth <rhouldsworth@solarflare.com>\nSigned-off-by: Andrew Rybchenko <arybchenko@solarflare.com>\n---\n drivers/net/sfc/base/ef10_nic.c | 43 ++++++++++++++++++++++++++-------\n 1 file changed, 34 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/drivers/net/sfc/base/ef10_nic.c b/drivers/net/sfc/base/ef10_nic.c\nindex c3634e351..1eea7c673 100644\n--- a/drivers/net/sfc/base/ef10_nic.c\n+++ b/drivers/net/sfc/base/ef10_nic.c\n@@ -131,34 +131,59 @@ ef10_nic_get_port_mode_bandwidth(\n \t__in\t\tuint32_t port_mode,\n \t__out\t\tuint32_t *bandwidth_mbpsp)\n {\n+\tuint32_t single_lane = 10000;\n+\tuint32_t dual_lane   = 50000;\n+\tuint32_t quad_lane   = 40000;\n \tuint32_t bandwidth;\n \tefx_rc_t rc;\n \n \tswitch (port_mode) {\n \tcase TLV_PORT_MODE_1x1_NA:\t\t\t/* mode 0 */\n-\t\tbandwidth = 10000;\n+\t\tbandwidth = single_lane;\n+\t\tbreak;\n+\tcase TLV_PORT_MODE_1x2_NA:\t\t\t/* mode 10 */\n+\tcase TLV_PORT_MODE_NA_1x2:\t\t\t/* mode 11 */\n+\t\tbandwidth = dual_lane;\n \t\tbreak;\n \tcase TLV_PORT_MODE_1x1_1x1:\t\t\t/* mode 2 */\n-\t\tbandwidth = 10000 * 2;\n+\t\tbandwidth = single_lane + single_lane;\n \t\tbreak;\n \tcase TLV_PORT_MODE_4x1_NA:\t\t\t/* mode 4 */\n-\tcase TLV_PORT_MODE_2x1_2x1:\t\t\t/* mode 5 */\n \tcase TLV_PORT_MODE_NA_4x1:\t\t\t/* mode 8 */\n-\t\tbandwidth = 10000 * 4;\n+\t\tbandwidth = 4 * single_lane;\n+\t\tbreak;\n+\tcase TLV_PORT_MODE_2x1_2x1:\t\t\t/* mode 5 */\n+\t\tbandwidth = (2 * single_lane) + (2 * single_lane);\n+\t\tbreak;\n+\tcase TLV_PORT_MODE_1x2_1x2:\t\t\t/* mode 12 */\n+\t\tbandwidth = dual_lane + dual_lane;\n+\t\tbreak;\n+\tcase TLV_PORT_MODE_1x2_2x1:\t\t\t/* mode 17 */\n+\tcase TLV_PORT_MODE_2x1_1x2:\t\t\t/* mode 18 */\n+\t\tbandwidth = dual_lane + (2 * single_lane);\n \t\tbreak;\n \t/* Legacy Medford-only mode. Do not use (see bug63270) */\n \tcase TLV_PORT_MODE_10G_10G_10G_10G_Q1_Q2:\t/* mode 9 */\n-\t\tbandwidth = 10000 * 4;\n+\t\tbandwidth = 4 * single_lane;\n \t\tbreak;\n \tcase TLV_PORT_MODE_1x4_NA:\t\t\t/* mode 1 */\n-\t\tbandwidth = 40000;\n+\tcase TLV_PORT_MODE_NA_1x4:\t\t\t/* mode 22 */\n+\t\tbandwidth = quad_lane;\n \t\tbreak;\n-\tcase TLV_PORT_MODE_1x4_1x4:\t\t\t/* mode 3 */\n-\t\tbandwidth = 40000 * 2;\n+\tcase TLV_PORT_MODE_2x2_NA:\t\t\t/* mode 13 */\n+\tcase TLV_PORT_MODE_NA_2x2:\t\t\t/* mode 14 */\n+\t\tbandwidth = 2 * dual_lane;\n \t\tbreak;\n \tcase TLV_PORT_MODE_1x4_2x1:\t\t\t/* mode 6 */\n \tcase TLV_PORT_MODE_2x1_1x4:\t\t\t/* mode 7 */\n-\t\tbandwidth = 40000 + (10000 * 2);\n+\t\tbandwidth = quad_lane + (2 * single_lane);\n+\t\tbreak;\n+\tcase TLV_PORT_MODE_1x4_1x2:\t\t\t/* mode 15 */\n+\tcase TLV_PORT_MODE_1x2_1x4:\t\t\t/* mode 16 */\n+\t\tbandwidth = quad_lane + dual_lane;\n+\t\tbreak;\n+\tcase TLV_PORT_MODE_1x4_1x4:\t\t\t/* mode 3 */\n+\t\tbandwidth = quad_lane + quad_lane;\n \t\tbreak;\n \tdefault:\n \t\trc = EINVAL;\n",
    "prefixes": [
        "05/11"
    ]
}