get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 103877,
    "url": "https://patches.dpdk.org/api/patches/103877/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20211105153039.186885-2-bingz@nvidia.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": "<20211105153039.186885-2-bingz@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20211105153039.186885-2-bingz@nvidia.com",
    "date": "2021-11-05T15:30:38",
    "name": "[v7,1/2] net/mlx5: add support for Rx queue delay drop",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "13d7d62385f6ca5ede10b7d372043331edd058d0",
    "submitter": {
        "id": 1976,
        "url": "https://patches.dpdk.org/api/people/1976/?format=api",
        "name": "Bing Zhao",
        "email": "bingz@nvidia.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/20211105153039.186885-2-bingz@nvidia.com/mbox/",
    "series": [
        {
            "id": 20347,
            "url": "https://patches.dpdk.org/api/series/20347/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=20347",
            "date": "2021-11-05T15:30:37",
            "name": "Add delay drop support for Rx queue",
            "version": 7,
            "mbox": "https://patches.dpdk.org/series/20347/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/103877/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/103877/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 7F6B3A0C55;\n\tFri,  5 Nov 2021 16:31:10 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 46BE641226;\n\tFri,  5 Nov 2021 16:31:04 +0100 (CET)",
            "from NAM12-DM6-obe.outbound.protection.outlook.com\n (mail-dm6nam12on2082.outbound.protection.outlook.com [40.107.243.82])\n by mails.dpdk.org (Postfix) with ESMTP id A49E940E5A\n for <dev@dpdk.org>; Fri,  5 Nov 2021 16:31:02 +0100 (CET)",
            "from BN9PR03CA0898.namprd03.prod.outlook.com (2603:10b6:408:13c::33)\n by BN6PR1201MB0241.namprd12.prod.outlook.com (2603:10b6:405:58::18)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.10; Fri, 5 Nov\n 2021 15:31:00 +0000",
            "from BN8NAM11FT028.eop-nam11.prod.protection.outlook.com\n (2603:10b6:408:13c:cafe::e5) by BN9PR03CA0898.outlook.office365.com\n (2603:10b6:408:13c::33) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.13 via Frontend\n Transport; Fri, 5 Nov 2021 15:31:00 +0000",
            "from mail.nvidia.com (216.228.112.34) by\n BN8NAM11FT028.mail.protection.outlook.com (10.13.176.225) with Microsoft SMTP\n Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id\n 15.20.4669.10 via Frontend Transport; Fri, 5 Nov 2021 15:30:59 +0000",
            "from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com\n (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Fri, 5 Nov\n 2021 15:30:57 +0000"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=VaI1IrcxRn9IHq/3t9ZA5wzsnYbscI+7BqD9MAW0d0N7sqbt8beKSZEXm8AhFY7V+0TZw6aV28t/EZAIxNvdzih8+GlEvKkIn0RyLvBIxocdzZEb6gUBAYBx6HsKzqIpaYR0vVtn0To2GXtvlDC1b1C+qYwgiSq+yuYLeIdq5AaPZaUL8MWnadKHLFzkH/bPSqU6zwYwwABazt6k92IzfQazatRet9yvJe4nYd8v9fSL4OjB4ARkZCgjv+tS3s0atVMM+vylSivhwK2M2HlEwK5c0Y3b5VyJHLYDQyEw76IGgkH3F7LhB6QnUx1dt2DCA+eVU115Q2wOLHig6HUNiA==",
        "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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=tdLqty/7O9IfARROP39CKiUGpfKAtawd9TYs0izW7XQ=;\n b=Zu2u2orOgpcAjkS3oaw37f1drxAukuaxtqRgVdYfVA1EeiuG9/BLiXmlE7oWzPf0y6w1CfWTW5jXA2qLzx+l5oa9Gjobc70Uo0IcKpP3x+oWj5XueJ4vEzeQZAquxxhRgxnYug06X/av1N6Mh/b0sbpFF68K5IicSWIAZ1/fs9aKYo2fMy+meecIUMzFEcUs2oglF8aFb5/pajFydhTvsyKR7kfWguL1/UVRH2v6Z57YpdLyFv5mIpXM459seM71FHWFr1/XljBpyxgviq2/rAxXnMHei6ERT9JeWJ/oNkn0dpCoyE0U62IbvfPU3L8x/KbuqZ5z4sCQh2lgYjp4XQ==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 216.228.112.34) smtp.rcpttodomain=monjalon.net smtp.mailfrom=nvidia.com;\n dmarc=pass (p=quarantine sp=quarantine pct=100) action=none\n header.from=nvidia.com; dkim=none (message not signed); arc=none",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;\n s=selector2;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=tdLqty/7O9IfARROP39CKiUGpfKAtawd9TYs0izW7XQ=;\n b=TJoZvCDGsiEO3J7E4DN2W0r9KXB9fMO7L4xJtBLvTocw6uBxlYkW046d4NrmMmFTgtoFF2dlpBcGXxCZ4rTvGKcD8z3Q7Ok2rgC5E4KEA4VUKOv1qLamFZaMCdv7IxywozJXZ3+TkVPK7pgaibUyPrxsXO/l7UZb/RRd6q+gHU7An8UCx2+RWr4r8D361otSi5ofhDwjpbjaAf9Vt9cHkFAEByN5NI57QkdXz4qxIjDpvqGYxvmvrTKRdYV0JmhXs0vtGzVvnWDUZ6K2PttXp01NWny/ZOsTYVtCgF0jPnQIJpiWJ5vjaKO5EKF0rST1lYT68k2KFzzex0Fusw7RhA==",
        "X-MS-Exchange-Authentication-Results": "spf=pass (sender IP is 216.228.112.34)\n smtp.mailfrom=nvidia.com; monjalon.net; dkim=none (message not signed)\n header.d=none;monjalon.net; dmarc=pass action=none header.from=nvidia.com;",
        "Received-SPF": "Pass (protection.outlook.com: domain of nvidia.com designates\n 216.228.112.34 as permitted sender) receiver=protection.outlook.com;\n client-ip=216.228.112.34; helo=mail.nvidia.com;",
        "From": "Bing Zhao <bingz@nvidia.com>",
        "To": "<viacheslavo@nvidia.com>, <matan@nvidia.com>",
        "CC": "<dev@dpdk.org>, <rasland@nvidia.com>, <thomas@monjalon.net>,\n <orika@nvidia.com>",
        "Date": "Fri, 5 Nov 2021 17:30:38 +0200",
        "Message-ID": "<20211105153039.186885-2-bingz@nvidia.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20211105153039.186885-1-bingz@nvidia.com>",
        "References": "<20211104112644.17278-1-bingz@nvidia.com>\n <20211105153039.186885-1-bingz@nvidia.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[172.20.187.5]",
        "X-ClientProxiedBy": "HQMAIL107.nvidia.com (172.20.187.13) To\n HQMAIL107.nvidia.com (172.20.187.13)",
        "X-EOPAttributedMessage": "0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-Office365-Filtering-Correlation-Id": "117f8c2e-959c-43f9-afe6-08d9a071451b",
        "X-MS-TrafficTypeDiagnostic": "BN6PR1201MB0241:",
        "X-LD-Processed": "43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr",
        "X-Microsoft-Antispam-PRVS": "\n <BN6PR1201MB0241EBD05D9402624A0203B3D08E9@BN6PR1201MB0241.namprd12.prod.outlook.com>",
        "X-MS-Oob-TLC-OOBClassifiers": "OLM:7219;",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n TiCo51xlmDaaSCbmLapGSh7wOglVTYVKQCCnf4f7co3zdMqlxnvtXg38bUP/z/KlvnmAg6eysBWhaSmam0+R3yugWGbbR2RFJu9uFuXkZMYykzyjQAsXyVY4dfNnDxc/ilJsbbTBu1mQaIHyEItDBPSFqAoDkntG9g7uE5ml1HFDcbbOvUloDhxSLafu2Tu7RLHQV7bHqWfq79jKktTfasLWEGcna+GfhE4zaywWPxn/Ev85pDGgBemUC/QHqmPbmuAMnsBsjHsJsWo5Fz76E8+i8jakgBqBAWu6gBwTY/BitiwvbAKi8kOYl2WThQZ5L6DWWAUumlWa6kaATUiAQe0bKHxA+REl0ZSkaO9UBU03zIDcxwHG0vZx5J/FiMEQ//7uZM6mwhumAFVsFuV3Ay8AaA+7LPmcZ5J3CmP9QghSXcGC6hrPBWDmfSTNc29uDHaFKrlmQQIV84EeVBi1G73H/46tQQsEKFI5fqB/fUJc1p+U4sZ40ISC0QamYF44MhnSXtR4ojah1gm189k57iMH3gkKa3G0WLXhYKMbKUR7OKwkoGwx/wgYkQWkkj/jq3X6w9ffuQiR+5ERkGFiu7fZsid2SPrTMHYwhTTMwTxLcOoVyTWzQeQIhy6xAVX5WAg6ryGIw2XXEbdXd3JnL31VE20YOKeHyevSboVTa3jyZLj3ic03IQKGVl+qjWjk2Jm2pkjXGvqerTUnuBm4sww6xJDe95AUiQ8DSa2xOo0=",
        "X-Forefront-Antispam-Report": "CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1;\n SRV:;\n IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE;\n SFS:(4636009)(46966006)(36840700001)(186003)(6636002)(107886003)(356005)(508600001)(82310400003)(16526019)(47076005)(1076003)(6286002)(55016002)(2906002)(26005)(36756003)(426003)(5660300002)(6666004)(316002)(110136005)(7636003)(70586007)(7696005)(70206006)(4326008)(54906003)(36860700001)(86362001)(36906005)(2616005)(8936002)(336012)(83380400001)(8676002)(309714004);\n DIR:OUT; SFP:1101;",
        "X-OriginatorOrg": "Nvidia.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "05 Nov 2021 15:30:59.9087 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 117f8c2e-959c-43f9-afe6-08d9a071451b",
        "X-MS-Exchange-CrossTenant-Id": "43083d15-7273-40c1-b7db-39efd9ccc17a",
        "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "\n TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34];\n Helo=[mail.nvidia.com]",
        "X-MS-Exchange-CrossTenant-AuthSource": "\n BN8NAM11FT028.eop-nam11.prod.protection.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "BN6PR1201MB0241",
        "Subject": "[dpdk-dev] [PATCH v7 1/2] net/mlx5: add support for Rx queue delay\n drop",
        "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": "For the Ethernet RQs, if there all receiving descriptors are\nexhausted, the packets being received will be dropped. This behavior\nprevents slow or malicious software entities at the host from\naffecting the network. While for hairpin cases, even if there is no\nsoftware involved during the packet forwarding from Rx to Tx side,\nsome hiccup in the hardware or back pressure from Tx side may still\ncause the descriptors to be exhausted. In certain scenarios it may be\npreferred to configure the device to avoid such packet drops,\nassuming the posting of descriptors will resume shortly.\n\nTo support this, a new devarg \"delay_drop\" is introduced. By default,\nthe delay drop is enabled for hairpin Rx queues and disabled for\nstandard Rx queues. This value is used as a bit mask:\n  - bit 0: enablement of standard Rx queue\n  - bit 1: enablement of hairpin Rx queue\nAnd this attribute will be applied to all Rx queues of a device.\n\nThe \"rq_delay_drop\" capability in the HCA_CAP is checked before\ncreating any queue. If the hardware capabilities do not support\nthis delay drop, all the Rx queues will still be created without\nthis attribute, and the devarg setting will be ignored even if it\nis specified explicitly. A warning log is used to notify the\napplication when this occurs.\n\nSigned-off-by: Bing Zhao <bingz@nvidia.com>\nAcked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>\n---\n doc/guides/nics/mlx5.rst               | 11 +++++++++++\n doc/guides/rel_notes/release_21_11.rst |  1 +\n drivers/common/mlx5/mlx5_devx_cmds.c   |  1 +\n drivers/common/mlx5/mlx5_devx_cmds.h   |  1 +\n drivers/net/mlx5/linux/mlx5_os.c       | 11 +++++++++++\n drivers/net/mlx5/mlx5.c                |  7 +++++++\n drivers/net/mlx5/mlx5.h                |  9 +++++++++\n drivers/net/mlx5/mlx5_devx.c           |  5 +++++\n drivers/net/mlx5/mlx5_rx.h             |  1 +\n 9 files changed, 47 insertions(+)",
    "diff": "diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst\nindex 824971d89a..0ecd4f8738 100644\n--- a/doc/guides/nics/mlx5.rst\n+++ b/doc/guides/nics/mlx5.rst\n@@ -114,6 +114,7 @@ Features\n - Sub-Function representors.\n - Sub-Function.\n - Shared Rx queue.\n+- Rx queue delay drop.\n \n \n Limitations\n@@ -608,6 +609,16 @@ Driver options\n   - POWER8 and ARMv8 with ConnectX-4 Lx, ConnectX-5, ConnectX-6, ConnectX-6 Dx,\n     ConnectX-6 Lx, BlueField and BlueField-2.\n \n+- ``delay_drop`` parameter [int]\n+\n+  Bitmask value for the Rx queue delay drop attribute. Bit 0 is used for the\n+  standard Rx queue and bit 1 is used for the hairpin Rx queue. By default, the\n+  delay drop is disabled for all Rx queues. It will be ignored if the port does\n+  not support the attribute even if it is enabled explicitly.\n+\n+  The packets being received will not be dropped immediately when the WQEs are\n+  exhausted in a Rx queue with delay drop enabled.\n+\n - ``mprq_en`` parameter [int]\n \n   A nonzero value enables configuring Multi-Packet Rx queues. Rx queue is\ndiff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst\nindex 92180bb4bd..9556aa8bd9 100644\n--- a/doc/guides/rel_notes/release_21_11.rst\n+++ b/doc/guides/rel_notes/release_21_11.rst\n@@ -192,6 +192,7 @@ New Features\n   * Added implicit mempool registration to avoid data path hiccups (opt-out).\n   * Added NIC offloads for the PMD on Windows (TSO, VLAN strip, CRC keep).\n   * Added socket direct mode bonding support.\n+  * Added delay drop support for Rx queue.\n \n * **Updated Solarflare network PMD.**\n \ndiff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c\nindex fca1470be7..49db07facc 100644\n--- a/drivers/common/mlx5/mlx5_devx_cmds.c\n+++ b/drivers/common/mlx5/mlx5_devx_cmds.c\n@@ -965,6 +965,7 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,\n \tattr->ct_offload = !!(MLX5_GET64(cmd_hca_cap, hcattr,\n \t\t\t\t\t general_obj_types) &\n \t\t\t      MLX5_GENERAL_OBJ_TYPES_CAP_CONN_TRACK_OFFLOAD);\n+\tattr->rq_delay_drop = MLX5_GET(cmd_hca_cap, hcattr, rq_delay_drop);\n \tif (attr->qos.sup) {\n \t\thcattr = mlx5_devx_get_hca_cap(ctx, in, out, &rc,\n \t\t\t\tMLX5_GET_HCA_CAP_OP_MOD_QOS_CAP |\ndiff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h\nindex 344cd7bbf3..447f76f1f9 100644\n--- a/drivers/common/mlx5/mlx5_devx_cmds.h\n+++ b/drivers/common/mlx5/mlx5_devx_cmds.h\n@@ -178,6 +178,7 @@ struct mlx5_hca_attr {\n \tuint32_t swp_csum:1;\n \tuint32_t swp_lso:1;\n \tuint32_t lro_max_msg_sz_mode:2;\n+\tuint32_t rq_delay_drop:1;\n \tuint32_t lro_timer_supported_periods[MLX5_LRO_NUM_SUPP_PERIODS];\n \tuint16_t lro_min_mss_size;\n \tuint32_t flex_parser_protocols;\ndiff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c\nindex e0304b685e..de880ee4c9 100644\n--- a/drivers/net/mlx5/linux/mlx5_os.c\n+++ b/drivers/net/mlx5/linux/mlx5_os.c\n@@ -1508,6 +1508,15 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,\n \t\tgoto error;\n #endif\n \t}\n+\tif (config->std_delay_drop || config->hp_delay_drop) {\n+\t\tif (!config->hca_attr.rq_delay_drop) {\n+\t\t\tconfig->std_delay_drop = 0;\n+\t\t\tconfig->hp_delay_drop = 0;\n+\t\t\tDRV_LOG(WARNING,\n+\t\t\t\t\"dev_port-%u: Rxq delay drop is not supported\",\n+\t\t\t\tpriv->dev_port);\n+\t\t}\n+\t}\n \tif (sh->devx) {\n \t\tuint32_t reg[MLX5_ST_SZ_DW(register_mtutc)];\n \n@@ -2077,6 +2086,8 @@ mlx5_os_config_default(struct mlx5_dev_config *config)\n \tconfig->decap_en = 1;\n \tconfig->log_hp_size = MLX5_ARG_UNSET;\n \tconfig->allow_duplicate_pattern = 1;\n+\tconfig->std_delay_drop = 0;\n+\tconfig->hp_delay_drop = 0;\n }\n \n /**\ndiff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c\nindex 8614b8ffdd..9c8d1cc76f 100644\n--- a/drivers/net/mlx5/mlx5.c\n+++ b/drivers/net/mlx5/mlx5.c\n@@ -183,6 +183,9 @@\n /* Device parameter to configure implicit registration of mempool memory. */\n #define MLX5_MR_MEMPOOL_REG_EN \"mr_mempool_reg_en\"\n \n+/* Device parameter to configure the delay drop when creating Rxqs. */\n+#define MLX5_DELAY_DROP \"delay_drop\"\n+\n /* Shared memory between primary and secondary processes. */\n struct mlx5_shared_data *mlx5_shared_data;\n \n@@ -2091,6 +2094,9 @@ mlx5_args_check(const char *key, const char *val, void *opaque)\n \t\tconfig->decap_en = !!tmp;\n \t} else if (strcmp(MLX5_ALLOW_DUPLICATE_PATTERN, key) == 0) {\n \t\tconfig->allow_duplicate_pattern = !!tmp;\n+\t} else if (strcmp(MLX5_DELAY_DROP, key) == 0) {\n+\t\tconfig->std_delay_drop = tmp & MLX5_DELAY_DROP_STANDARD;\n+\t\tconfig->hp_delay_drop = tmp & MLX5_DELAY_DROP_HAIRPIN;\n \t} else {\n \t\tDRV_LOG(WARNING, \"%s: unknown parameter\", key);\n \t\trte_errno = EINVAL;\n@@ -2153,6 +2159,7 @@ mlx5_args(struct mlx5_dev_config *config, struct rte_devargs *devargs)\n \t\tMLX5_DECAP_EN,\n \t\tMLX5_ALLOW_DUPLICATE_PATTERN,\n \t\tMLX5_MR_MEMPOOL_REG_EN,\n+\t\tMLX5_DELAY_DROP,\n \t\tNULL,\n \t};\n \tstruct rte_kvargs *kvlist;\ndiff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h\nindex 51f4578838..b2022f3300 100644\n--- a/drivers/net/mlx5/mlx5.h\n+++ b/drivers/net/mlx5/mlx5.h\n@@ -99,6 +99,13 @@ enum mlx5_flow_type {\n \tMLX5_FLOW_TYPE_MAXI,\n };\n \n+/* The mode of delay drop for Rx queues. */\n+enum mlx5_delay_drop_mode {\n+\tMLX5_DELAY_DROP_NONE = 0, /* All disabled. */\n+\tMLX5_DELAY_DROP_STANDARD = RTE_BIT32(0), /* Standard queues enable. */\n+\tMLX5_DELAY_DROP_HAIRPIN = RTE_BIT32(1), /* Hairpin queues enable. */\n+};\n+\n /* Hlist and list callback context. */\n struct mlx5_flow_cb_ctx {\n \tstruct rte_eth_dev *dev;\n@@ -264,6 +271,8 @@ struct mlx5_dev_config {\n \tunsigned int dv_miss_info:1; /* restore packet after partial hw miss */\n \tunsigned int allow_duplicate_pattern:1;\n \t/* Allow/Prevent the duplicate rules pattern. */\n+\tunsigned int std_delay_drop:1; /* Enable standard Rxq delay drop. */\n+\tunsigned int hp_delay_drop:1; /* Enable hairpin Rxq delay drop. */\n \tstruct {\n \t\tunsigned int enabled:1; /* Whether MPRQ is enabled. */\n \t\tunsigned int stride_num_n; /* Number of strides. */\ndiff --git a/drivers/net/mlx5/mlx5_devx.c b/drivers/net/mlx5/mlx5_devx.c\nindex a9f9f4af70..e46f79124d 100644\n--- a/drivers/net/mlx5/mlx5_devx.c\n+++ b/drivers/net/mlx5/mlx5_devx.c\n@@ -277,6 +277,7 @@ mlx5_rxq_create_devx_rq_resources(struct mlx5_rxq_priv *rxq)\n \t\t\t\t\t\tMLX5_WQ_END_PAD_MODE_NONE;\n \trq_attr.wq_attr.pd = cdev->pdn;\n \trq_attr.counter_set_id = priv->counter_set_id;\n+\trq_attr.delay_drop_en = rxq_data->delay_drop;\n \trq_attr.user_index = rte_cpu_to_be_16(priv->dev_data->port_id);\n \tif (rxq_data->shared) /* Create RMP based RQ. */\n \t\trxq->devx_rq.rmp = &rxq_ctrl->obj->devx_rmp;\n@@ -439,6 +440,8 @@ mlx5_rxq_obj_hairpin_new(struct mlx5_rxq_priv *rxq)\n \t\t\tattr.wq_attr.log_hairpin_data_sz -\n \t\t\tMLX5_HAIRPIN_QUEUE_STRIDE;\n \tattr.counter_set_id = priv->counter_set_id;\n+\trxq_ctrl->rxq.delay_drop = priv->config.hp_delay_drop;\n+\tattr.delay_drop_en = priv->config.hp_delay_drop;\n \ttmpl->rq = mlx5_devx_cmd_create_rq(priv->sh->cdev->ctx, &attr,\n \t\t\t\t\t   rxq_ctrl->socket);\n \tif (!tmpl->rq) {\n@@ -496,6 +499,7 @@ mlx5_rxq_devx_obj_new(struct mlx5_rxq_priv *rxq)\n \t\tDRV_LOG(ERR, \"Failed to create CQ.\");\n \t\tgoto error;\n \t}\n+\trxq_data->delay_drop = priv->config.std_delay_drop;\n \t/* Create RQ using DevX API. */\n \tret = mlx5_rxq_create_devx_rq_resources(rxq);\n \tif (ret) {\n@@ -941,6 +945,7 @@ mlx5_rxq_devx_obj_drop_create(struct rte_eth_dev *dev)\n \t\t\tdev->data->port_id);\n \t\tgoto error;\n \t}\n+\trxq_ctrl->rxq.delay_drop = 0;\n \t/* Create RQ using DevX API. */\n \tret = mlx5_rxq_create_devx_rq_resources(rxq);\n \tif (ret != 0) {\ndiff --git a/drivers/net/mlx5/mlx5_rx.h b/drivers/net/mlx5/mlx5_rx.h\nindex eda6eca8de..3b797e577a 100644\n--- a/drivers/net/mlx5/mlx5_rx.h\n+++ b/drivers/net/mlx5/mlx5_rx.h\n@@ -97,6 +97,7 @@ struct mlx5_rxq_data {\n \tunsigned int dynf_meta:1; /* Dynamic metadata is configured. */\n \tunsigned int mcqe_format:3; /* CQE compression format. */\n \tunsigned int shared:1; /* Shared RXQ. */\n+\tunsigned int delay_drop:1; /* Enable delay drop. */\n \tvolatile uint32_t *rq_db;\n \tvolatile uint32_t *cq_db;\n \tuint16_t port_id;\n",
    "prefixes": [
        "v7",
        "1/2"
    ]
}