get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 78704,
    "url": "https://patches.dpdk.org/api/patches/78704/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1600949555-28043-21-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": "<1600949555-28043-21-git-send-email-arybchenko@solarflare.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1600949555-28043-21-git-send-email-arybchenko@solarflare.com",
    "date": "2020-09-24T12:11:55",
    "name": "[v3,20/60] common/sfc_efx/base: move EvQ create generic checks",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "f22af1270ae0b9529ec40f16bb3e98a70d97744e",
    "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/1600949555-28043-21-git-send-email-arybchenko@solarflare.com/mbox/",
    "series": [
        {
            "id": 12473,
            "url": "https://patches.dpdk.org/api/series/12473/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=12473",
            "date": "2020-09-24T12:11:40",
            "name": "common/sfc_efx: support Riverhead NIC family",
            "version": 3,
            "mbox": "https://patches.dpdk.org/series/12473/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/78704/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/78704/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 7505FA04B1;\n\tThu, 24 Sep 2020 14:17:44 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 8DD541DEAE;\n\tThu, 24 Sep 2020 14:13:45 +0200 (CEST)",
            "from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com\n [148.163.129.52]) by dpdk.org (Postfix) with ESMTP id 963051DE1C\n for <dev@dpdk.org>; Thu, 24 Sep 2020 14:12:59 +0200 (CEST)",
            "from mx1-us1.ppe-hosted.com (unknown [10.7.65.60])\n by dispatch1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id\n 2338E60055 for <dev@dpdk.org>; Thu, 24 Sep 2020 12:12:59 +0000 (UTC)",
            "from us4-mdac16-66.ut7.mdlocal (unknown [10.7.64.78])\n by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id 2210C2009A\n for <dev@dpdk.org>; Thu, 24 Sep 2020 12:12:59 +0000 (UTC)",
            "from mx1-us1.ppe-hosted.com (unknown [10.7.65.174])\n by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id\n 9BB4B1C0051\n for <dev@dpdk.org>; Thu, 24 Sep 2020 12:12:58 +0000 (UTC)",
            "from webmail.solarflare.com (uk.solarflare.com [193.34.186.16])\n (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits))\n (No client certificate requested)\n by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id\n 51BE51C0064\n for <dev@dpdk.org>; Thu, 24 Sep 2020 12:12:58 +0000 (UTC)",
            "from ukex01.SolarFlarecom.com (10.17.10.4) by\n ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id\n 15.0.1497.2; Thu, 24 Sep 2020 13:12:46 +0100",
            "from opal.uk.solarflarecom.com (10.17.10.1) by\n ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server id\n 15.0.1497.2 via Frontend Transport; Thu, 24 Sep 2020 13:12:46 +0100",
            "from ukv-loginhost.uk.solarflarecom.com\n (ukv-loginhost.uk.solarflarecom.com [10.17.10.39])\n by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id 08OCCkaq025941\n for <dev@dpdk.org>; Thu, 24 Sep 2020 13:12:46 +0100",
            "from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1])\n by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id B71ED1613AB\n for <dev@dpdk.org>; Thu, 24 Sep 2020 13:12:46 +0100 (BST)"
        ],
        "X-Virus-Scanned": "Proofpoint Essentials engine",
        "From": "Andrew Rybchenko <arybchenko@solarflare.com>",
        "To": "<dev@dpdk.org>",
        "Date": "Thu, 24 Sep 2020 13:11:55 +0100",
        "Message-ID": "<1600949555-28043-21-git-send-email-arybchenko@solarflare.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1600949555-28043-1-git-send-email-arybchenko@solarflare.com>",
        "References": "<1600764594-14752-1-git-send-email-arybchenko@solarflare.com>\n <1600949555-28043-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.6.1012-25674.003",
        "X-TM-AS-Result": "No-8.075200-8.000000-10",
        "X-TMASE-MatchedRID": "S+rRSYBLXJsfLZjRGBdfQbzgL/eLACDEAZn/4A9db2RKddiF2Wo8eZv8\n OBKGKGJrLWabnXd3sbEUUZUcIrQXSSaHInC0kEnSLbjXqdzdtCV6i696PjRPiI5JUK9UdYkncij\n MZrr2iZ2t2gtuWr1LmoUeih7oVVPgBynbVEv5faHbbgI4AuYpVwZyESFXAljfc3igmsO92YHGmG\n lCTaxrRF890HgjV6tnQL+jDTIbnJ/jadsomdxplO9YaEWtcpo2XGjQf7uckKvbspKx4YOD3ZcFn\n +/+Esg7FOGBZ0GoT8/QSeCRl5BMID4Mxg/VjhfPQ24lJ40XApi6hgVvSdGKo12sM+iSqvF9qKnX\n y/QNZhWv46y+TjZtax8Pxha3QGpW63uSu/qSbCaeAiCmPx4NwBnUJ0Ek6yhjxEHRux+uk8irEHf\n aj14ZyV697GpNV0wtJ0LJUKeBWRDaw+JinpVUaoNymLjGRnc4MA+10QetsLZWXGvUUmKP2w==",
        "X-TM-AS-User-Approved-Sender": "Yes",
        "X-TM-AS-User-Blocked-Sender": "No",
        "X-TMASE-Result": "10--8.075200-8.000000",
        "X-TMASE-Version": "SMEX-12.5.0.1300-8.6.1012-25674.003",
        "X-MDID": "1600949579-IY5cAmemUTvL",
        "Subject": "[dpdk-dev] [PATCH v3 20/60] common/sfc_efx/base: move EvQ create\n\tgeneric checks",
        "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 <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 <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "There is no point to duplicate these generic checks in NIC family\nspecific handlers.\n\nAs the side effect it fixes bug with incorrect interrupt moderation\nsettings silently ignored on event queue create on Siena.\n\nSigned-off-by: Andrew Rybchenko <arybchenko@solarflare.com>\nReviewed-by: Andy Moreton <amoreton@xilinx.com>\nReviewed-by: Vijay Kumar Srivastava <vsrivast@xilinx.com>\n---\n drivers/common/sfc_efx/base/ef10_ev.c | 20 ++-----------\n drivers/common/sfc_efx/base/efx_ev.c  | 42 ++++++++++++++++-----------\n 2 files changed, 28 insertions(+), 34 deletions(-)",
    "diff": "diff --git a/drivers/common/sfc_efx/base/ef10_ev.c b/drivers/common/sfc_efx/base/ef10_ev.c\nindex 08729cf71e..18f19e816d 100644\n--- a/drivers/common/sfc_efx/base/ef10_ev.c\n+++ b/drivers/common/sfc_efx/base/ef10_ev.c\n@@ -133,16 +133,6 @@ ef10_ev_qcreate(\n \n \t_NOTE(ARGUNUSED(id))\t/* buftbl id managed by MC */\n \n-\tif (index >= encp->enc_evq_limit) {\n-\t\trc = EINVAL;\n-\t\tgoto fail1;\n-\t}\n-\n-\tif (us > encp->enc_evq_timer_max_us) {\n-\t\trc = EINVAL;\n-\t\tgoto fail2;\n-\t}\n-\n \t/*\n \t * NO_CONT_EV mode is only requested from the firmware when creating\n \t * receive queues, but here it needs to be specified at event queue\n@@ -156,7 +146,7 @@ ef10_ev_qcreate(\n \tif (flags & EFX_EVQ_FLAGS_NO_CONT_EV) {\n \t\tif (enp->en_nic_cfg.enc_no_cont_ev_mode_supported == B_FALSE) {\n \t\t\trc = EINVAL;\n-\t\t\tgoto fail3;\n+\t\t\tgoto fail1;\n \t\t}\n \t}\n \n@@ -197,7 +187,7 @@ ef10_ev_qcreate(\n \t\trc = efx_mcdi_init_evq_v2(enp, index, esmp, ndescs, irq, us,\n \t\t    flags);\n \t\tif (rc != 0)\n-\t\t\tgoto fail4;\n+\t\t\tgoto fail2;\n \t} else {\n \t\t/*\n \t\t * On Huntington we need to specify the settings to use.\n@@ -214,15 +204,11 @@ ef10_ev_qcreate(\n \t\trc = efx_mcdi_init_evq(enp, index, esmp, ndescs, irq, us, flags,\n \t\t    low_latency);\n \t\tif (rc != 0)\n-\t\t\tgoto fail5;\n+\t\t\tgoto fail3;\n \t}\n \n \treturn (0);\n \n-fail5:\n-\tEFSYS_PROBE(fail5);\n-fail4:\n-\tEFSYS_PROBE(fail4);\n fail3:\n \tEFSYS_PROBE(fail3);\n fail2:\ndiff --git a/drivers/common/sfc_efx/base/efx_ev.c b/drivers/common/sfc_efx/base/efx_ev.c\nindex 21fddfb64d..4d11c531ce 100644\n--- a/drivers/common/sfc_efx/base/efx_ev.c\n+++ b/drivers/common/sfc_efx/base/efx_ev.c\n@@ -236,18 +236,28 @@ efx_ev_qcreate(\n \tEFSYS_ASSERT3U(enp->en_ev_qcount + 1, <,\n \t    enp->en_nic_cfg.enc_evq_limit);\n \n+\tif (index >= encp->enc_evq_limit) {\n+\t\trc = EINVAL;\n+\t\tgoto fail1;\n+\t}\n+\n+\tif (us > encp->enc_evq_timer_max_us) {\n+\t\trc = EINVAL;\n+\t\tgoto fail2;\n+\t}\n+\n \tswitch (flags & EFX_EVQ_FLAGS_NOTIFY_MASK) {\n \tcase EFX_EVQ_FLAGS_NOTIFY_INTERRUPT:\n \t\tbreak;\n \tcase EFX_EVQ_FLAGS_NOTIFY_DISABLED:\n \t\tif (us != 0) {\n \t\t\trc = EINVAL;\n-\t\t\tgoto fail1;\n+\t\t\tgoto fail3;\n \t\t}\n \t\tbreak;\n \tdefault:\n \t\trc = EINVAL;\n-\t\tgoto fail2;\n+\t\tgoto fail4;\n \t}\n \n \tEFSYS_ASSERT(ISP2(encp->enc_evq_max_nevs));\n@@ -257,14 +267,14 @@ efx_ev_qcreate(\n \t    ndescs < encp->enc_evq_min_nevs ||\n \t    ndescs > encp->enc_evq_max_nevs) {\n \t\trc = EINVAL;\n-\t\tgoto fail3;\n+\t\tgoto fail5;\n \t}\n \n \t/* Allocate an EVQ object */\n \tEFSYS_KMEM_ALLOC(enp->en_esip, sizeof (efx_evq_t), eep);\n \tif (eep == NULL) {\n \t\trc = ENOMEM;\n-\t\tgoto fail4;\n+\t\tgoto fail6;\n \t}\n \n \teep->ee_magic = EFX_EVQ_MAGIC;\n@@ -287,16 +297,20 @@ efx_ev_qcreate(\n \n \tif ((rc = eevop->eevo_qcreate(enp, index, esmp, ndescs, id, us, flags,\n \t    eep)) != 0)\n-\t\tgoto fail5;\n+\t\tgoto fail7;\n \n \treturn (0);\n \n-fail5:\n-\tEFSYS_PROBE(fail5);\n+fail7:\n+\tEFSYS_PROBE(fail7);\n \n \t*eepp = NULL;\n \tenp->en_ev_qcount--;\n \tEFSYS_KMEM_FREE(enp->en_esip, sizeof (efx_evq_t), eep);\n+fail6:\n+\tEFSYS_PROBE(fail6);\n+fail5:\n+\tEFSYS_PROBE(fail5);\n fail4:\n \tEFSYS_PROBE(fail4);\n fail3:\n@@ -1189,15 +1203,11 @@ siena_ev_qcreate(\n \n \t_NOTE(ARGUNUSED(esmp))\n \n-\tif (index >= encp->enc_evq_limit) {\n-\t\trc = EINVAL;\n-\t\tgoto fail1;\n-\t}\n #if EFSYS_OPT_RX_SCALE\n \tif (enp->en_intr.ei_type == EFX_INTR_LINE &&\n \t    index >= EFX_MAXRSS_LEGACY) {\n \t\trc = EINVAL;\n-\t\tgoto fail2;\n+\t\tgoto fail1;\n \t}\n #endif\n \tfor (size = 0;\n@@ -1207,7 +1217,7 @@ siena_ev_qcreate(\n \t\t\tbreak;\n \tif (id + (1 << size) >= encp->enc_buftbl_limit) {\n \t\trc = EINVAL;\n-\t\tgoto fail3;\n+\t\tgoto fail2;\n \t}\n \n \t/* Set up the handler table */\n@@ -1239,13 +1249,11 @@ siena_ev_qcreate(\n \n \treturn (0);\n \n-fail3:\n-\tEFSYS_PROBE(fail3);\n-#if EFSYS_OPT_RX_SCALE\n fail2:\n \tEFSYS_PROBE(fail2);\n-#endif\n+#if EFSYS_OPT_RX_SCALE\n fail1:\n+#endif\n \tEFSYS_PROBE1(fail1, efx_rc_t, rc);\n \n \treturn (rc);\n",
    "prefixes": [
        "v3",
        "20/60"
    ]
}