Show a patch.

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

{
    "id": 74576,
    "url": "https://patches.dpdk.org/api/patches/74576/",
    "web_url": "https://patches.dpdk.org/patch/74576/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/",
        "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"
    },
    "msgid": "<20200721142449.24767-2-ophirmu@mellanox.com>",
    "date": "2020-07-21T14:24:49",
    "name": "[v2] net/mlx5: return EAGAIN on premature disable interrupt calls",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "ae8c624e4b2ce3059ce4d2f65501d0d7bec5cb2d",
    "submitter": {
        "id": 793,
        "url": "https://patches.dpdk.org/api/people/793/",
        "name": "Ophir Munk",
        "email": "ophirmu@mellanox.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/patch/74576/mbox/",
    "series": [
        {
            "id": 11213,
            "url": "https://patches.dpdk.org/api/series/11213/",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=11213",
            "date": "2020-07-21T14:24:49",
            "name": "[v2] net/mlx5: return EAGAIN on premature disable interrupt calls",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/11213/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/74576/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/74576/checks/",
    "tags": {},
    "headers": {
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "Hosted",
        "X-Mailman-Version": "2.1.15",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "AM6PR05MB5588",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "Precedence": "list",
        "X-MS-Exchange-Transport-Forked": "True",
        "X-BeenThere": "dev@dpdk.org",
        "X-LD-Processed": "a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtFwd",
        "X-ClientProxiedBy": "AM3PR07CA0129.eurprd07.prod.outlook.com\n (2603:10a6:207:8::15) To AM6PR05MB4216.eurprd05.prod.outlook.com\n (2603:10a6:209:41::13)",
        "X-MS-Exchange-CrossTenant-UserPrincipalName": "\n w50bMeMS5tXSdEwbKgUTeVll8F2kp7Vdhgcr96ksu+Th4d7yYouavobAt66y+AApyotbwwNO/3IEErdVOF3Azw==",
        "X-MS-Exchange-CrossTenant-AuthAs": "Internal",
        "X-MS-Exchange-AntiSpam-MessageData": "\n FsH6uJlXL2vFE63MWuIQosPz3IjFyDcvrinu8oIziwMJM1PQqhaJjz9NeUuEIvdC8qk0L4YxXs0/bP0FXN3dR25fh9YkHGjozWH7pzGu08D8Jpks3CYnjeseRrTX/1U8fxpqHqu4qXN9FoyhdsPbnDjgPLfZHJVOmrHDUQP/ai38xRVLc0hRdEXUoBA8+Lxplts+sfX3dpm82/aR2/d1O51TdHU+sqwSVsgwoSB01kJ2/FsrapDl4hTYHME/nJawTYTCSr4SA8XYrqynGzDoY15/cpRbQGaorRkwHTZPHSeE+9+YvEBXxmLfeZbwXp0GbFWmlhLlPyJLT52vPENxEnnsVZi8MlvZj5d+3o2YNclRtaJhOgQFbmor9IfXpLTXBaky+/Crs9kakytuq+qwmmZCbx+XOXOJM/vUEucZd/UWWVAuAQhyrkuEF9gH3ygvuyb82L5En7GY/QCYeJufKWwQrVsXSDWtRpupJYR3REYYle3RgaySpfRsBYihHtlL",
        "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 00429A0526;\n\tTue, 21 Jul 2020 16:25:07 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 159C81BFFE;\n\tTue, 21 Jul 2020 16:25:03 +0200 (CEST)",
            "from EUR03-DB5-obe.outbound.protection.outlook.com\n (mail-eopbgr40082.outbound.protection.outlook.com [40.107.4.82])\n by dpdk.org (Postfix) with ESMTP id D8F161BFEF\n for <dev@dpdk.org>; Tue, 21 Jul 2020 16:24:59 +0200 (CEST)",
            "from AM6PR05MB4216.eurprd05.prod.outlook.com (2603:10a6:209:41::13)\n by AM6PR05MB5588.eurprd05.prod.outlook.com (2603:10a6:20b:5a::33)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.18; Tue, 21 Jul\n 2020 14:24:58 +0000",
            "from AM6PR05MB4216.eurprd05.prod.outlook.com\n ([fe80::b40f:4c0e:77de:a785]) by AM6PR05MB4216.eurprd05.prod.outlook.com\n ([fe80::b40f:4c0e:77de:a785%4]) with mapi id 15.20.3195.026; Tue, 21 Jul 2020\n 14:24:57 +0000",
            "from mellanox.com (37.142.13.130) by\n AM3PR07CA0129.eurprd07.prod.outlook.com (2603:10a6:207:8::15) with Microsoft\n SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.20.3216.14 via Frontend Transport; Tue, 21 Jul 2020 14:24:57 +0000"
        ],
        "Subject": "[dpdk-dev] [PATCH v2] net/mlx5: return EAGAIN on premature disable\n\tinterrupt calls",
        "X-MS-PublicTrafficType": "Email",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "Message-Id": "<20200721142449.24767-2-ophirmu@mellanox.com>",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com;\n s=selector1;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=RwjfJrHV9g4naORrthaEpG8d+E8H1C6ohOcOqcHrV2g=;\n b=pbGbpTswNZQ5qEOtLluYixI1XKKAh4OZcd4yUKY4D0zm1mGA17Cd2vn891xfiib0IpmjQ0fH5wSlsY2GLrUQOsOytbZHB3pTy84b9+WA+ugYduyiMfme7DSGrMYhjKncZ1XwB06/mHa2nPzDhtlvYoNqO5a5m7ABb907ILwIpDY=",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "X-MS-Office365-Filtering-HT": "Tenant",
        "To": "dev@dpdk.org",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "From": "Ophir Munk <ophirmu@mellanox.com>",
        "X-Microsoft-Antispam-Message-Info": "\n Ox/Hl5nRptk02kMSBVZDrYfbeWyY0OUCekb1zescU4Sp7ShulxQZlWxGXKrT/j7oLbU/VD9cJh0Xp3/Q/yetnz1j13dwPxxWot86TE33xvCKJgHz5MuR+4x7nPH9J0o0T2u1BqOdE2EQUrAbl08mvh1BllDQvujPL/n19WvySAtqNFzhb3oAYeKVzuSHjKj0UHk/SF7zZEo4PwXbppgx41sSkc3JGMLeYfFPySNmN4nyIpEVgG2CRd8LVEsppkvNHPju0ekGBkYVtYxODBbHZD73hSRAvRJztuoWkv8VQRnUkOIqn5gjYoC4SCk6/sFc6v83uxmRVUBZhDaaRqh96g==",
        "Cc": "Raslan Darawsheh <rasland@mellanox.com>,\n Ophir Munk <ophirmu@mellanox.com>,\n Matan Azrad <matan@mellanox.com>",
        "X-MS-Exchange-CrossTenant-AuthSource": "AM6PR05MB4216.eurprd05.prod.outlook.com",
        "X-MS-TrafficTypeDiagnostic": "AM6PR05MB5588:",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com;\n dkim=pass header.d=mellanox.com; arc=none",
        "Authentication-Results": "dpdk.org; dkim=none (message not signed)\n header.d=none;dpdk.org; dmarc=none action=none header.from=mellanox.com;",
        "X-OriginatorOrg": "Mellanox.com",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "X-Microsoft-Antispam-PRVS": "\n <AM6PR05MB55886688A474912D1D034036D1780@AM6PR05MB5588.eurprd05.prod.outlook.com>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "MIME-Version": "1.0",
        "In-Reply-To": "<20200721142449.24767-1-ophirmu@mellanox.com>",
        "X-MS-Exchange-MessageSentRepresentingType": "1",
        "References": "<20200716053658.30453-1-ophirmu@mellanox.com>\n <20200721142449.24767-1-ophirmu@mellanox.com>",
        "Content-Type": "text/plain",
        "X-MS-Oob-TLC-OOBClassifiers": "OLM:923;",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "X-Originating-IP": "[37.142.13.130]",
        "X-Forefront-Antispam-Report": "CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:AM6PR05MB4216.eurprd05.prod.outlook.com; PTR:; CAT:NONE;\n SFTY:;\n SFS:(4636009)(366004)(66946007)(5660300002)(66556008)(7696005)(52116002)(66476007)(86362001)(186003)(54906003)(16526019)(26005)(107886003)(8676002)(6916009)(8936002)(55016002)(498600001)(2906002)(1076003)(4326008)(956004)(8886007)(2616005)(6666004)(83380400001)(36756003);\n DIR:OUT; SFP:1101;",
        "X-Mailer": [
            "git-send-email 2.8.4",
            "git-send-email 2.8.4"
        ],
        "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=RwjfJrHV9g4naORrthaEpG8d+E8H1C6ohOcOqcHrV2g=;\n b=ZLE/v3wbq7BGUHe2GfFRm83B9ZUeF14tEed/BbMSTZNAQ3EJ/MXJQFz0wCtSxM7O2iuNYrfZzVpa+l5joYlzT801srPij5PROqtUywIycyF4LZ7B3jEvKjkzFyLQGdFQTzZOUFM7OKaWmlN4sgfbhUWhhWKtYyZCAmgLa0vDfjM7aS48WRiatyrKO95iROXvyqaDECA9S2HQG5DSKyCEBmF5GolVM2RTF3N9SPw9LUZoDgAZOY4qQdbmDuuaPacMBzGejgWduW2EP243/etXlGvOTJgdbr170BiKvSE7e5vtQ2bGcFvTWO6Vvjk/hKbmb7vB8N8m+35tn7Fi7sipKQ==",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 8bfbd472-4254-471a-dec7-08d82d81d856",
        "Date": "Tue, 21 Jul 2020 14:24:49 +0000",
        "X-MS-Office365-Filtering-Correlation-Id": "8bfbd472-4254-471a-dec7-08d82d81d856",
        "X-MS-Exchange-CrossTenant-MailboxType": "HOSTED",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-CrossTenant-Id": "a652971c-7d2e-4d9b-a6a4-d149256f461b",
        "X-Microsoft-Antispam": "BCL:0;",
        "Errors-To": "dev-bounces@dpdk.org",
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=V7p8vOchJV1CdZYtq5hdUvAPePZ+WxRqMPUGFVV/ZHzG5vVAiPXp4IdLVhIdWd+VsXEW01UIqFFepcJb0vv9pUJgmyInJs9qTvziL0EmFTB5lxy/CcFKZS8lkYtZsvR+NlNDVSrfuPBqSmrGXp1FZSQSLNC9SVcb5ImnSHMHxZ4gAC8WScHEhsZaUtiewEYN3KvadJmN26W/QX0haCGLNPKvoRFR4/0jhUHAqJMdLyswCFlqlb7h5kt2xeJ1NKiCLgoBBZJmtlOtduManG4w8dJ0Siwd0qPXZ3ukcGmPcCjcI9O2zhVNqDp1/qskSbvS3/Ou3NLGveZo+jZkfs00hA==",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "21 Jul 2020 14:24:57.8816 (UTC)"
    },
    "content": "RXQ interrupts under Linux are based on the epoll mechanism. An\nexpected order of operations is as follows:\n1. Call rte_eth_dev_rx_intr_enable(), to arm the CQ for receiving events\non data input.\n2. Block on rte_epoll_wait() with an array of file descriptors\nrepresenting the CQ events. Upon data arrival the kernel will signal an\ninput event on the corresponding CQ fd.\n3. Call rte_eth_dev_rx_intr_disable() after the event was received and\ncontinue in polling mode. The mlx5 implementation of\nrte_eth_dev_rx_intr_disable() is to get the CQ event and ack it.\n\nIn practice applications may wake up from rte_epoll_wait() due to\ntimeout with no event to ack but still call\nrte_eth_dev_rx_intr_disable() unconditionally.  In such cases the call\nshould return EAGAIN (since the file descriptors are non-blocked), as\nopposed to EINVAL which indicates a real failure.  In case of EAGAIN the\nPMD should not warn on \"Unable to disable interrupt on Rx queue\".\n\nThis commit also fixes (1) where a 0 returned value from function\ndevx_get_event() was considered an error.\n\nFixes: 19e429e5c7c2 (\"net/mlx5: implement CQ for RxQ using DevX API\")\n\nSigned-off-by: Ophir Munk <ophirmu@mellanox.com>\nAcked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>\nAcked-by: Raslan Darawsheh <rasland@mellanox.com>\n---\n drivers/net/mlx5/mlx5_rxq.c | 23 ++++++++++++++---------\n 1 file changed, 14 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c\nindex e6dc5ac..c78e522 100644\n--- a/drivers/net/mlx5/mlx5_rxq.c\n+++ b/drivers/net/mlx5/mlx5_rxq.c\n@@ -1188,10 +1188,8 @@ mlx5_rx_intr_disable(struct rte_eth_dev *dev, uint16_t rx_queue_id)\n \tif (rxq_obj->type == MLX5_RXQ_OBJ_TYPE_IBV) {\n \t\tret = mlx5_glue->get_cq_event(rxq_obj->ibv_channel, &ev_cq,\n \t\t\t\t\t      &ev_ctx);\n-\t\tif (ret || ev_cq != rxq_obj->ibv_cq) {\n-\t\t\trte_errno = EINVAL;\n+\t\tif (ret < 0 || ev_cq != rxq_obj->ibv_cq)\n \t\t\tgoto exit;\n-\t\t}\n \t\tmlx5_glue->ack_cq_events(rxq_obj->ibv_cq, 1);\n \t} else if (rxq_obj->type == MLX5_RXQ_OBJ_TYPE_DEVX_RQ) {\n #ifdef HAVE_IBV_DEVX_EVENT\n@@ -1200,22 +1198,29 @@ mlx5_rx_intr_disable(struct rte_eth_dev *dev, uint16_t rx_queue_id)\n \t\tret = mlx5_glue->devx_get_event\n \t\t\t\t(rxq_obj->devx_channel, event_data,\n \t\t\t\t sizeof(struct mlx5dv_devx_async_event_hdr));\n-\t\tif (ret <= 0 || event_data->cookie !=\n-\t\t\t\t(uint64_t)(uintptr_t)rxq_obj->devx_cq) {\n-\t\t\trte_errno = EINVAL;\n+\t\tif (ret < 0 || event_data->cookie !=\n+\t\t\t\t(uint64_t)(uintptr_t)rxq_obj->devx_cq)\n \t\t\tgoto exit;\n-\t\t}\n #endif /* HAVE_IBV_DEVX_EVENT */\n \t}\n \trxq_data->cq_arm_sn++;\n \tmlx5_rxq_obj_release(rxq_obj);\n \treturn 0;\n exit:\n+\t/**\n+\t * For ret < 0 save the errno (may be EAGAIN which means the get_event\n+\t * function was called before receiving one).\n+\t */\n+\tif (ret < 0)\n+\t\trte_errno = errno;\n+\telse\n+\t\trte_errno = EINVAL;\n \tret = rte_errno; /* Save rte_errno before cleanup. */\n \tif (rxq_obj)\n \t\tmlx5_rxq_obj_release(rxq_obj);\n-\tDRV_LOG(WARNING, \"port %u unable to disable interrupt on Rx queue %d\",\n-\t\tdev->data->port_id, rx_queue_id);\n+\tif (ret != EAGAIN)\n+\t\tDRV_LOG(WARNING, \"port %u unable to disable interrupt on Rx queue %d\",\n+\t\t\tdev->data->port_id, rx_queue_id);\n \trte_errno = ret; /* Restore rte_errno. */\n \treturn -rte_errno;\n }\n",
    "prefixes": [
        "v2"
    ]
}