get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 94485,
    "url": "https://patches.dpdk.org/api/patches/94485/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210618134032.1922012-5-andrew.rybchenko@oktetlabs.ru/",
    "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": "<20210618134032.1922012-5-andrew.rybchenko@oktetlabs.ru>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210618134032.1922012-5-andrew.rybchenko@oktetlabs.ru",
    "date": "2021-06-18T13:40:16",
    "name": "[v3,04/20] common/sfc_efx/base: support custom EvQ to IRQ mapping",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "b895d59b1d0a3108eff25a8154cac9bac740d2b6",
    "submitter": {
        "id": 2013,
        "url": "https://patches.dpdk.org/api/people/2013/?format=api",
        "name": "Andrew Rybchenko",
        "email": "Andrew.Rybchenko@oktetlabs.ru"
    },
    "delegate": {
        "id": 24651,
        "url": "https://patches.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210618134032.1922012-5-andrew.rybchenko@oktetlabs.ru/mbox/",
    "series": [
        {
            "id": 17397,
            "url": "https://patches.dpdk.org/api/series/17397/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=17397",
            "date": "2021-06-18T13:40:12",
            "name": "net/sfc: support flow API COUNT action",
            "version": 3,
            "mbox": "https://patches.dpdk.org/series/17397/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/94485/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/94485/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 70E28A0C46;\n\tFri, 18 Jun 2021 15:41:18 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 2AE7F410FE;\n\tFri, 18 Jun 2021 15:40:51 +0200 (CEST)",
            "from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113])\n by mails.dpdk.org (Postfix) with ESMTP id DFAAC410FD\n for <dev@dpdk.org>; Fri, 18 Jun 2021 15:40:47 +0200 (CEST)",
            "by shelob.oktetlabs.ru (Postfix, from userid 122)\n id A7C887F691; Fri, 18 Jun 2021 16:40:47 +0300 (MSK)",
            "from aros.oktetlabs.ru (aros.oktetlabs.ru [192.168.38.17])\n by shelob.oktetlabs.ru (Postfix) with ESMTP id 7B6477F692;\n Fri, 18 Jun 2021 16:40:34 +0300 (MSK)"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on shelob.oktetlabs.ru",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=0.8 required=5.0 tests=ALL_TRUSTED,\n DKIM_ADSP_DISCARD,\n URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2",
        "DKIM-Filter": "OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 7B6477F692",
        "Authentication-Results": "shelob.oktetlabs.ru/7B6477F692; dkim=none;\n dkim-atps=neutral",
        "From": "Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>",
        "To": "dev@dpdk.org",
        "Cc": "David Marchand <david.marchand@redhat.com>,\n Andy Moreton <amoreton@xilinx.com>",
        "Date": "Fri, 18 Jun 2021 16:40:16 +0300",
        "Message-Id": "<20210618134032.1922012-5-andrew.rybchenko@oktetlabs.ru>",
        "X-Mailer": "git-send-email 2.30.2",
        "In-Reply-To": "<20210618134032.1922012-1-andrew.rybchenko@oktetlabs.ru>",
        "References": "<20210527152510.1551026-1-andrew.rybchenko@oktetlabs.ru>\n <20210618134032.1922012-1-andrew.rybchenko@oktetlabs.ru>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v3 04/20] common/sfc_efx/base: support custom EvQ\n to IRQ mapping",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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": "Custom mapping is actually supported for EF10 and EF100 families only.\n\nA driver (e.g. DPDK PMD) may require to customize mapping of EvQ\nto interrupts if, for example, extra EvQ are used for house-keeping\nin polling or wake up (via another EvQ) mode.\n\nSigned-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>\nReviewed-by: Andy Moreton <amoreton@xilinx.com>\n---\n drivers/common/sfc_efx/base/ef10_ev.c    |  4 +--\n drivers/common/sfc_efx/base/ef10_impl.h  |  1 +\n drivers/common/sfc_efx/base/efx.h        | 13 ++++++++\n drivers/common/sfc_efx/base/efx_ev.c     | 39 ++++++++++++++++++++----\n drivers/common/sfc_efx/base/efx_impl.h   |  3 +-\n drivers/common/sfc_efx/base/rhead_ev.c   |  4 +--\n drivers/common/sfc_efx/base/rhead_impl.h |  1 +\n drivers/common/sfc_efx/version.map       |  1 +\n 8 files changed, 55 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/drivers/common/sfc_efx/base/ef10_ev.c b/drivers/common/sfc_efx/base/ef10_ev.c\nindex c0cbc427b9..ba078940b6 100644\n--- a/drivers/common/sfc_efx/base/ef10_ev.c\n+++ b/drivers/common/sfc_efx/base/ef10_ev.c\n@@ -118,10 +118,10 @@ ef10_ev_qcreate(\n \t__in\t\tuint32_t id,\n \t__in\t\tuint32_t us,\n \t__in\t\tuint32_t flags,\n+\t__in\t\tuint32_t irq,\n \t__in\t\tefx_evq_t *eep)\n {\n \tefx_nic_cfg_t *encp = &(enp->en_nic_cfg);\n-\tuint32_t irq = 0;\n \tuint32_t target_evq = 0;\n \tefx_rc_t rc;\n \tboolean_t low_latency;\n@@ -158,7 +158,7 @@ ef10_ev_qcreate(\n \t/* INIT_EVQ expects function-relative vector number */\n \tif ((flags & EFX_EVQ_FLAGS_NOTIFY_MASK) ==\n \t    EFX_EVQ_FLAGS_NOTIFY_INTERRUPT) {\n-\t\tirq = index;\n+\t\t/* IRQ number is specified by caller */\n \t} else if (index == EFX_EF10_ALWAYS_INTERRUPTING_EVQ_INDEX) {\n \t\t/* Use the first interrupt for always interrupting EvQ */\n \t\tirq = 0;\ndiff --git a/drivers/common/sfc_efx/base/ef10_impl.h b/drivers/common/sfc_efx/base/ef10_impl.h\nindex 40210fbd91..7c8d51b7a5 100644\n--- a/drivers/common/sfc_efx/base/ef10_impl.h\n+++ b/drivers/common/sfc_efx/base/ef10_impl.h\n@@ -111,6 +111,7 @@ ef10_ev_qcreate(\n \t__in\t\tuint32_t id,\n \t__in\t\tuint32_t us,\n \t__in\t\tuint32_t flags,\n+\t__in\t\tuint32_t irq,\n \t__in\t\tefx_evq_t *eep);\n \n LIBEFX_INTERNAL\ndiff --git a/drivers/common/sfc_efx/base/efx.h b/drivers/common/sfc_efx/base/efx.h\nindex 771fe5a170..e43efbda1f 100644\n--- a/drivers/common/sfc_efx/base/efx.h\n+++ b/drivers/common/sfc_efx/base/efx.h\n@@ -2333,6 +2333,19 @@ efx_ev_qcreate(\n \t__in\t\tuint32_t flags,\n \t__deref_out\tefx_evq_t **eepp);\n \n+LIBEFX_API\n+extern\t__checkReturn\tefx_rc_t\n+efx_ev_qcreate_irq(\n+\t__in\t\tefx_nic_t *enp,\n+\t__in\t\tunsigned int index,\n+\t__in\t\tefsys_mem_t *esmp,\n+\t__in\t\tsize_t ndescs,\n+\t__in\t\tuint32_t id,\n+\t__in\t\tuint32_t us,\n+\t__in\t\tuint32_t flags,\n+\t__in\t\tuint32_t irq,\n+\t__deref_out\tefx_evq_t **eepp);\n+\n LIBEFX_API\n extern\t\tvoid\n efx_ev_qpost(\ndiff --git a/drivers/common/sfc_efx/base/efx_ev.c b/drivers/common/sfc_efx/base/efx_ev.c\nindex 19bdea03fd..4808f8ddfc 100644\n--- a/drivers/common/sfc_efx/base/efx_ev.c\n+++ b/drivers/common/sfc_efx/base/efx_ev.c\n@@ -35,6 +35,7 @@ siena_ev_qcreate(\n \t__in\t\tuint32_t id,\n \t__in\t\tuint32_t us,\n \t__in\t\tuint32_t flags,\n+\t__in\t\tuint32_t irq,\n \t__in\t\tefx_evq_t *eep);\n \n static\t\t\tvoid\n@@ -253,7 +254,7 @@ efx_ev_fini(\n \n \n \t__checkReturn\tefx_rc_t\n-efx_ev_qcreate(\n+efx_ev_qcreate_irq(\n \t__in\t\tefx_nic_t *enp,\n \t__in\t\tunsigned int index,\n \t__in\t\tefsys_mem_t *esmp,\n@@ -261,6 +262,7 @@ efx_ev_qcreate(\n \t__in\t\tuint32_t id,\n \t__in\t\tuint32_t us,\n \t__in\t\tuint32_t flags,\n+\t__in\t\tuint32_t irq,\n \t__deref_out\tefx_evq_t **eepp)\n {\n \tconst efx_ev_ops_t *eevop = enp->en_eevop;\n@@ -347,7 +349,7 @@ efx_ev_qcreate(\n \t*eepp = eep;\n \n \tif ((rc = eevop->eevo_qcreate(enp, index, esmp, ndescs, id, us, flags,\n-\t    eep)) != 0)\n+\t    irq, eep)) != 0)\n \t\tgoto fail9;\n \n \treturn (0);\n@@ -377,6 +379,23 @@ efx_ev_qcreate(\n \treturn (rc);\n }\n \n+\t__checkReturn\tefx_rc_t\n+efx_ev_qcreate(\n+\t__in\t\tefx_nic_t *enp,\n+\t__in\t\tunsigned int index,\n+\t__in\t\tefsys_mem_t *esmp,\n+\t__in\t\tsize_t ndescs,\n+\t__in\t\tuint32_t id,\n+\t__in\t\tuint32_t us,\n+\t__in\t\tuint32_t flags,\n+\t__deref_out\tefx_evq_t **eepp)\n+{\n+\tuint32_t irq = index;\n+\n+\treturn (efx_ev_qcreate_irq(enp, index, esmp, ndescs, id, us, flags,\n+\t    irq, eepp));\n+}\n+\n \t\tvoid\n efx_ev_qdestroy(\n \t__in\tefx_evq_t *eep)\n@@ -1278,6 +1297,7 @@ siena_ev_qcreate(\n \t__in\t\tuint32_t id,\n \t__in\t\tuint32_t us,\n \t__in\t\tuint32_t flags,\n+\t__in\t\tuint32_t irq,\n \t__in\t\tefx_evq_t *eep)\n {\n \tefx_nic_cfg_t *encp = &(enp->en_nic_cfg);\n@@ -1290,11 +1310,16 @@ siena_ev_qcreate(\n \n \tEFSYS_ASSERT((flags & EFX_EVQ_FLAGS_EXTENDED_WIDTH) == 0);\n \n+\tif (irq != index) {\n+\t\trc = EINVAL;\n+\t\tgoto fail1;\n+\t}\n+\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 fail1;\n+\t\tgoto fail2;\n \t}\n #endif\n \tfor (size = 0;\n@@ -1304,7 +1329,7 @@ siena_ev_qcreate(\n \t\t\tbreak;\n \tif (id + (1 << size) >= encp->enc_buftbl_limit) {\n \t\trc = EINVAL;\n-\t\tgoto fail2;\n+\t\tgoto fail3;\n \t}\n \n \t/* Set up the handler table */\n@@ -1336,11 +1361,13 @@ 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-#if EFSYS_OPT_RX_SCALE\n-fail1:\n #endif\n+fail1:\n \tEFSYS_PROBE1(fail1, efx_rc_t, rc);\n \n \treturn (rc);\ndiff --git a/drivers/common/sfc_efx/base/efx_impl.h b/drivers/common/sfc_efx/base/efx_impl.h\nindex c1f98def40..a6b20704ac 100644\n--- a/drivers/common/sfc_efx/base/efx_impl.h\n+++ b/drivers/common/sfc_efx/base/efx_impl.h\n@@ -87,7 +87,8 @@ typedef struct efx_ev_ops_s {\n \tvoid\t\t(*eevo_fini)(efx_nic_t *);\n \tefx_rc_t\t(*eevo_qcreate)(efx_nic_t *, unsigned int,\n \t\t\t\t\t  efsys_mem_t *, size_t, uint32_t,\n-\t\t\t\t\t  uint32_t, uint32_t, efx_evq_t *);\n+\t\t\t\t\t  uint32_t, uint32_t, uint32_t,\n+\t\t\t\t\t  efx_evq_t *);\n \tvoid\t\t(*eevo_qdestroy)(efx_evq_t *);\n \tefx_rc_t\t(*eevo_qprime)(efx_evq_t *, unsigned int);\n \tvoid\t\t(*eevo_qpost)(efx_evq_t *, uint16_t);\ndiff --git a/drivers/common/sfc_efx/base/rhead_ev.c b/drivers/common/sfc_efx/base/rhead_ev.c\nindex 533cd9e34a..3eaed9e94b 100644\n--- a/drivers/common/sfc_efx/base/rhead_ev.c\n+++ b/drivers/common/sfc_efx/base/rhead_ev.c\n@@ -102,11 +102,11 @@ rhead_ev_qcreate(\n \t__in\t\tuint32_t id,\n \t__in\t\tuint32_t us,\n \t__in\t\tuint32_t flags,\n+\t__in\t\tuint32_t irq,\n \t__in\t\tefx_evq_t *eep)\n {\n \tconst efx_nic_cfg_t *encp = efx_nic_cfg_get(enp);\n \tsize_t desc_size;\n-\tuint32_t irq = 0;\n \tuint32_t target_evq = 0;\n \tefx_rc_t rc;\n \n@@ -141,7 +141,7 @@ rhead_ev_qcreate(\n \t/* INIT_EVQ expects function-relative vector number */\n \tif ((flags & EFX_EVQ_FLAGS_NOTIFY_MASK) ==\n \t    EFX_EVQ_FLAGS_NOTIFY_INTERRUPT) {\n-\t\tirq = index;\n+\t\t/* IRQ number is specified by caller */\n \t} else if (index == EFX_RHEAD_ALWAYS_INTERRUPTING_EVQ_INDEX) {\n \t\t/* Use the first interrupt for always interrupting EvQ */\n \t\tirq = 0;\ndiff --git a/drivers/common/sfc_efx/base/rhead_impl.h b/drivers/common/sfc_efx/base/rhead_impl.h\nindex 3bf9beceb0..dd38ded775 100644\n--- a/drivers/common/sfc_efx/base/rhead_impl.h\n+++ b/drivers/common/sfc_efx/base/rhead_impl.h\n@@ -131,6 +131,7 @@ rhead_ev_qcreate(\n \t__in\t\tuint32_t id,\n \t__in\t\tuint32_t us,\n \t__in\t\tuint32_t flags,\n+\t__in\t\tuint32_t irq,\n \t__in\t\tefx_evq_t *eep);\n \n LIBEFX_INTERNAL\ndiff --git a/drivers/common/sfc_efx/version.map b/drivers/common/sfc_efx/version.map\nindex 5e724fd102..d534d8ecb5 100644\n--- a/drivers/common/sfc_efx/version.map\n+++ b/drivers/common/sfc_efx/version.map\n@@ -7,6 +7,7 @@ INTERNAL {\n \tefx_ev_init;\n \tefx_ev_qcreate;\n \tefx_ev_qcreate_check_init_done;\n+\tefx_ev_qcreate_irq;\n \tefx_ev_qdestroy;\n \tefx_ev_qmoderate;\n \tefx_ev_qpending;\n",
    "prefixes": [
        "v3",
        "04/20"
    ]
}