get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 78282,
    "url": "http://patches.dpdk.org/api/patches/78282/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1600764594-14752-36-git-send-email-arybchenko@solarflare.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<1600764594-14752-36-git-send-email-arybchenko@solarflare.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1600764594-14752-36-git-send-email-arybchenko@solarflare.com",
    "date": "2020-09-22T08:49:29",
    "name": "[35/60] common/sfc_efx/base: handle Rx events for Riverhead",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "1576b17c4dce604e40d34f3d66b8a061ffd2391e",
    "submitter": {
        "id": 607,
        "url": "http://patches.dpdk.org/api/people/607/?format=api",
        "name": "Andrew Rybchenko",
        "email": "arybchenko@solarflare.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1600764594-14752-36-git-send-email-arybchenko@solarflare.com/mbox/",
    "series": [
        {
            "id": 12400,
            "url": "http://patches.dpdk.org/api/series/12400/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=12400",
            "date": "2020-09-22T08:48:59",
            "name": "common/sfc_efx: support Riverhead NIC family",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/12400/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/78282/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/78282/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 8B742A04E1;\n\tTue, 22 Sep 2020 10:56:06 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 24AF01DB6C;\n\tTue, 22 Sep 2020 10:51:08 +0200 (CEST)",
            "from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com\n [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id 2514A1D736\n for <dev@dpdk.org>; Tue, 22 Sep 2020 10:50:21 +0200 (CEST)",
            "from mx1-us1.ppe-hosted.com (unknown [10.110.50.150])\n by dispatch1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id\n C126620050 for <dev@dpdk.org>; Tue, 22 Sep 2020 08:50:20 +0000 (UTC)",
            "from us4-mdac16-6.at1.mdlocal (unknown [10.110.49.173])\n by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id C06DE800A3\n for <dev@dpdk.org>; Tue, 22 Sep 2020 08:50:20 +0000 (UTC)",
            "from mx1-us1.ppe-hosted.com (unknown [10.110.50.12])\n by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id\n 39C07100061\n for <dev@dpdk.org>; Tue, 22 Sep 2020 08:50:20 +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 032A740051\n for <dev@dpdk.org>; Tue, 22 Sep 2020 08:50:20 +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; Tue, 22 Sep 2020 09:50:11 +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; Tue, 22 Sep 2020 09:50:11 +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 08M8oAba004741\n for <dev@dpdk.org>; Tue, 22 Sep 2020 09:50:11 +0100",
            "from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1])\n by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id E429A1613A9\n for <dev@dpdk.org>; Tue, 22 Sep 2020 09:50:10 +0100 (BST)"
        ],
        "X-Virus-Scanned": "Proofpoint Essentials engine",
        "From": "Andrew Rybchenko <arybchenko@solarflare.com>",
        "To": "<dev@dpdk.org>",
        "Date": "Tue, 22 Sep 2020 09:49:29 +0100",
        "Message-ID": "<1600764594-14752-36-git-send-email-arybchenko@solarflare.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1600764594-14752-1-git-send-email-arybchenko@solarflare.com>",
        "References": "<1600764594-14752-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-6.819800-8.000000-10",
        "X-TMASE-MatchedRID": "SKbLpZM5T542jeY+Udg/Ij42t8NRMRfEH6pHzc00RUrwJYZa/L83HX8Q\n cMWiCE6P2ax6tv+nTknJtGCjz42SzYv86dLVvWqPqJSK+HSPY+/uo8ooMQqOsleIuu+Gkot88g3\n /FrlIBYoqjtfrxHD0XtL8EByfWwBiLGmmJTL2jhwD2WXLXdz+AfngX/aL8PCN90btya4ycSgGXY\n vX9dFbnDePvvYKqjb95gwMghrrzQlCXIPbCpslEFCCVuPjoP0CovA/6ONsv0oda1Vk3RqxOIO5T\n fSzrxQ77tfc12PNMitUEHGr7esKgSctS4FwlL6VIwk7p1qp3JYwjY20D2quYuy9vsxhLmzepBjV\n yjacfaxEpHaTXB/p5WjxB4+cTFbXvfadVsSXb6csisyWO3dp26crPbNuRpm6yaz/THj7NZyjxYy\n RBa/qJcFwgTvxipFajoczmuoPCq3rAumP/cOT6YPUepLeN+d5xvqhKk+auUjlawy734N43qqRR+\n 8fQZKSQwymtxuJ6y0=",
        "X-TM-AS-User-Approved-Sender": "Yes",
        "X-TM-AS-User-Blocked-Sender": "No",
        "X-TMASE-Result": "10--6.819800-8.000000",
        "X-TMASE-Version": "SMEX-12.5.0.1300-8.6.1012-25674.003",
        "X-MDID": "1600764620-Z2dtpTfFoCTj",
        "Subject": "[dpdk-dev] [PATCH 35/60] common/sfc_efx/base: handle Rx events for\n\tRiverhead",
        "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": "Rx event on Riverhead provides a number of received packets and\nno classification/offloads information is available Rx event.\n\nIntroduce a new event callback to be implemented by drivers.\nThe callback provides information about the number of completed\npackets. libefx-based drivers should implement the new callback\nfor Riverhead and keep the old one for Siena and EF10 NICs.\nThe new callback may be used for Medford2 NO_CONT_EV Rx mode\nsupport.\n\nSigned-off-by: Andrew Rybchenko <arybchenko@solarflare.com>\nReviewed-by: Andy Moreton <amoreton@xilinx.com>\n---\n drivers/common/sfc_efx/base/efx.h      |  8 ++++\n drivers/common/sfc_efx/base/rhead_ev.c | 56 +++++++++++++++++++++++++-\n 2 files changed, 63 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/common/sfc_efx/base/efx.h b/drivers/common/sfc_efx/base/efx.h\nindex 2c49280a43..983b723145 100644\n--- a/drivers/common/sfc_efx/base/efx.h\n+++ b/drivers/common/sfc_efx/base/efx.h\n@@ -2277,6 +2277,13 @@ typedef\t__checkReturn\tboolean_t\n \t__in\t\tuint32_t size,\n \t__in\t\tuint16_t flags);\n \n+typedef\t__checkReturn\tboolean_t\n+(*efx_rx_packets_ev_t)(\n+\t__in_opt\tvoid *arg,\n+\t__in\t\tuint32_t label,\n+\t__in\t\tunsigned int num_packets,\n+\t__in\t\tuint32_t flags);\n+\n #if EFSYS_OPT_RX_PACKED_STREAM || EFSYS_OPT_RX_ES_SUPER_BUFFER\n \n /*\n@@ -2394,6 +2401,7 @@ typedef __checkReturn\tboolean_t\n typedef struct efx_ev_callbacks_s {\n \tefx_initialized_ev_t\t\teec_initialized;\n \tefx_rx_ev_t\t\t\teec_rx;\n+\tefx_rx_packets_ev_t\t\teec_rx_packets;\n #if EFSYS_OPT_RX_PACKED_STREAM || EFSYS_OPT_RX_ES_SUPER_BUFFER\n \tefx_rx_ps_ev_t\t\t\teec_rx_ps;\n #endif\ndiff --git a/drivers/common/sfc_efx/base/rhead_ev.c b/drivers/common/sfc_efx/base/rhead_ev.c\nindex 0205769e70..a624b1dd94 100644\n--- a/drivers/common/sfc_efx/base/rhead_ev.c\n+++ b/drivers/common/sfc_efx/base/rhead_ev.c\n@@ -16,6 +16,13 @@\n  */\n #define\tEFX_RHEAD_ALWAYS_INTERRUPTING_EVQ_INDEX\t(0)\n \n+static\t__checkReturn\tboolean_t\n+rhead_ev_rx_packets(\n+\t__in\t\tefx_evq_t *eep,\n+\t__in\t\tefx_qword_t *eqp,\n+\t__in\t\tconst efx_ev_callbacks_t *eecp,\n+\t__in_opt\tvoid *arg);\n+\n \n static\t__checkReturn\tboolean_t\n rhead_ev_mcdi(\n@@ -58,7 +65,7 @@ rhead_ev_qcreate(\n \t_NOTE(ARGUNUSED(id))\t/* buftbl id managed by MC */\n \n \t/* Set up the handler table */\n-\teep->ee_rx\t= NULL; /* FIXME */\n+\teep->ee_rx\t= rhead_ev_rx_packets;\n \teep->ee_tx\t= NULL; /* FIXME */\n \teep->ee_driver\t= NULL; /* FIXME */\n \teep->ee_drv_gen\t= NULL; /* FIXME */\n@@ -201,6 +208,10 @@ rhead_ev_qpoll(\n \n \t\t\tcode = EFX_QWORD_FIELD(ev[index], ESF_GZ_E_TYPE);\n \t\t\tswitch (code) {\n+\t\t\tcase ESE_GZ_EF100_EV_RX_PKTS:\n+\t\t\t\tshould_abort = eep->ee_rx(eep,\n+\t\t\t\t    &(ev[index]), eecp, arg);\n+\t\t\t\tbreak;\n \t\t\tcase ESE_GZ_EF100_EV_MCDI:\n \t\t\t\tshould_abort = eep->ee_mcdi(eep,\n \t\t\t\t    &(ev[index]), eecp, arg);\n@@ -274,6 +285,49 @@ rhead_ev_qstats_update(\n }\n #endif /* EFSYS_OPT_QSTATS */\n \n+static\t__checkReturn\tboolean_t\n+rhead_ev_rx_packets(\n+\t__in\t\tefx_evq_t *eep,\n+\t__in\t\tefx_qword_t *eqp,\n+\t__in\t\tconst efx_ev_callbacks_t *eecp,\n+\t__in_opt\tvoid *arg)\n+{\n+\tefx_nic_t *enp = eep->ee_enp;\n+\tuint32_t label;\n+\tuint32_t num_packets;\n+\tboolean_t should_abort;\n+\n+\tEFX_EV_QSTAT_INCR(eep, EV_RX);\n+\n+\t/* Discard events after RXQ/TXQ errors, or hardware not available */\n+\tif (enp->en_reset_flags &\n+\t    (EFX_RESET_RXQ_ERR | EFX_RESET_TXQ_ERR | EFX_RESET_HW_UNAVAIL))\n+\t\treturn (B_FALSE);\n+\n+\tlabel = EFX_QWORD_FIELD(*eqp, ESF_GZ_EV_RXPKTS_Q_LABEL);\n+\n+\t/*\n+\t * On EF100 the EV_RX event reports the number of received\n+\t * packets (unlike EF10 which reports a descriptor index).\n+\t * The client driver is responsible for maintaining the Rx\n+\t * descriptor index, and computing how many descriptors are\n+\t * occupied by each received packet (based on the Rx buffer size\n+\t * and the packet length from the Rx prefix).\n+\t */\n+\tnum_packets = EFX_QWORD_FIELD(*eqp, ESF_GZ_EV_RXPKTS_NUM_PKT);\n+\n+\t/*\n+\t * The receive event may indicate more than one packet, and so\n+\t * does not contain the packet length. Read the packet length\n+\t * from the prefix when handling each packet.\n+\t */\n+\tEFSYS_ASSERT(eecp->eec_rx_packets != NULL);\n+\tshould_abort = eecp->eec_rx_packets(arg, label, num_packets,\n+\t    EFX_PKT_PREFIX_LEN);\n+\n+\treturn (should_abort);\n+}\n+\n static\t__checkReturn\tboolean_t\n rhead_ev_mcdi(\n \t__in\t\tefx_evq_t *eep,\n",
    "prefixes": [
        "35/60"
    ]
}