get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 103871,
    "url": "https://patches.dpdk.org/api/patches/103871/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20211105133617.177189-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": "<20211105133617.177189-2-bingz@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20211105133617.177189-2-bingz@nvidia.com",
    "date": "2021-11-05T13:36:16",
    "name": "[v5,1/2] net/mlx5: add support for Rx queue delay drop",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "53c10cdecee13299718f652a50a1d767af5ebe2f",
    "submitter": {
        "id": 1976,
        "url": "https://patches.dpdk.org/api/people/1976/?format=api",
        "name": "Bing Zhao",
        "email": "bingz@nvidia.com"
    },
    "delegate": {
        "id": 3268,
        "url": "https://patches.dpdk.org/api/users/3268/?format=api",
        "username": "rasland",
        "first_name": "Raslan",
        "last_name": "Darawsheh",
        "email": "rasland@nvidia.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20211105133617.177189-2-bingz@nvidia.com/mbox/",
    "series": [
        {
            "id": 20345,
            "url": "https://patches.dpdk.org/api/series/20345/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=20345",
            "date": "2021-11-05T13:36:15",
            "name": "Add delay drop support for Rx queue",
            "version": 5,
            "mbox": "https://patches.dpdk.org/series/20345/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/103871/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/103871/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 95B1CA0C56;\n\tFri,  5 Nov 2021 14:36:52 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id D34CC41226;\n\tFri,  5 Nov 2021 14:36:41 +0100 (CET)",
            "from NAM10-MW2-obe.outbound.protection.outlook.com\n (mail-mw2nam10on2071.outbound.protection.outlook.com [40.107.94.71])\n by mails.dpdk.org (Postfix) with ESMTP id A35D8411DB\n for <dev@dpdk.org>; Fri,  5 Nov 2021 14:36:40 +0100 (CET)",
            "from MWHPR22CA0071.namprd22.prod.outlook.com (2603:10b6:300:12a::33)\n by MN2PR12MB3374.namprd12.prod.outlook.com (2603:10b6:208:c9::17)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11; Fri, 5 Nov\n 2021 13:36:38 +0000",
            "from CO1NAM11FT029.eop-nam11.prod.protection.outlook.com\n (2603:10b6:300:12a:cafe::38) by MWHPR22CA0071.outlook.office365.com\n (2603:10b6:300:12a::33) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11 via Frontend\n Transport; Fri, 5 Nov 2021 13:36:38 +0000",
            "from mail.nvidia.com (216.228.112.34) by\n CO1NAM11FT029.mail.protection.outlook.com (10.13.174.214) 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 13:36:37 +0000",
            "from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com\n (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Fri, 5 Nov\n 2021 13:36:35 +0000"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=U78Dixr8sstLtutnUqL3F83ztv1ODkEQziTjUi9aFirTioCFfd6H5B6aNQcGZbBNne/CMTM6l9CjVRJCjAbDMEzAE96ig5YkqfDMl8rpC8LaB8XoajahcYIcPXf5vI5mfoPmXdBLCjUNu7O4SvcHdtU0C1eRJ0QHMbXGZGPpvta1ns0Lta0rDO30gEoEB8I+OqFI3jlSpwqaNqxgRFveV5sSVbEx6Kr+Js+5khUO0+bFwlc2pdFiV+6EgqgIzdf71OAngdX9AT5t/AY46UZMZkwROjaZzDaT7TRKg/pRyDaRIgdADRZK2kE7hQDBH2NTUIkd4HQWqaG/5LZK8OqTAw==",
        "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=iglj/061yW2cpz2Rja72vf9nwodlk04JZjpRMNBUPsk=;\n b=SDc6ZsJuReUgOIHYJp1aim7hBGoSOCVRi7ONCAAl8hndaxywqHI/06qAXgJFrdMPeuPC1v/RRxImSEcK1V6Kc3ZIVw6bxVQgzmCZfHrUhNIfWOALfnZ0sOSu3d+/2X+kMXOSiFR4+yKzpFMKDGWw1dipWi5vSwO3tuHvdmhY9wSJEFrLQS663n50QbkS9eiLwS+yAuealhkYJCT08vbjo8SmbOMlxyY0U1t3CMG/qkYkrWFFRj6Qvx/t2d58Bnj07rf2bsd3vaGHC8fdvql2GkQ92jU0zPRAwIn8RpOt4jkgiQOW+v5kHTyKf9AbEgXZXpVmns30rRaMznPD7XsMNg==",
        "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=iglj/061yW2cpz2Rja72vf9nwodlk04JZjpRMNBUPsk=;\n b=O+4MzZyRelJoLrrcOM9dUfIAwL4ZBNhBPyDxbkvxSQ2A0aP+7NMrbdHWLb5rhob3Z86VaLWOKHwxOBc5qSAD350YbX847ARcSmR3ckX6GrbJTHw+mgaZlvcaro9x6dT7vBIRpkm6y3UseenCbbzpOkyOKyobmXsuZPl//hn7RajvS53z8g/vdZtLC7ZRHVCcDp/i01q5lIPL9vfGJXmIZxvoNSqyTpRi9XroW/O2Jrxd2iElw+2K+g1AGgetx9qHYLIHViETb88Q0GsbbyTAxOmAoZR9hC9V08dYBVV1LOYmxOnm5052qVe0jsfjR/XjQtucCKhsAxWfKK+yqV/WqA==",
        "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 15:36:16 +0200",
        "Message-ID": "<20211105133617.177189-2-bingz@nvidia.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20211105133617.177189-1-bingz@nvidia.com>",
        "References": "<20211104112644.17278-1-bingz@nvidia.com>\n <20211105133617.177189-1-bingz@nvidia.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[172.20.187.6]",
        "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": "4a9dfc7e-8b1b-4e59-d8fb-08d9a0614ad3",
        "X-MS-TrafficTypeDiagnostic": "MN2PR12MB3374:",
        "X-LD-Processed": "43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr",
        "X-Microsoft-Antispam-PRVS": "\n <MN2PR12MB3374538F30B4B0C38D1EF216D08E9@MN2PR12MB3374.namprd12.prod.outlook.com>",
        "X-MS-Oob-TLC-OOBClassifiers": "OLM:6790;",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n fNxzxf7tk4vR8K4rftvegYf0TIKhEdpa47Aoylu9UqpRreC28A++MBs4f957HvcHcvAjQkjgBYwpUQLUIHm5za6XM0ka3v3emZ2iW0LYEbI3oxUTUUcO9agQif284KTGRSOEh9iHGUP53xsbbkI0H+nm3Hfxvxvw4y7gV6cLmIbFmKOWLX+MzIRi3wXIpeWcff2kWLilYpmTlmeP23yZJGUT5EGl0jK2FFY3ymomKp8sJC22QFUffzMU8I1v7kFaY/qC/GqKBULgP/vmemkFJpM5pD3S9L2MOjgMmRm5OGo2cQDtLN3D0OxUy+ZXl4MsyDodtMGZJOn9PznqxH9VyI97hdDykB6cox8zDu2OrDoK73VgMPEkAkfzi0UcLrjculPaAkISyhD+5WnWg6b1K5+vpL7h3gENnldNZlLEupZOph1wQdCc+6fctFgJVjShVvmWfHjBwnKkLRLdlLmd6hBas8Wc924ezl8rM2eTQffeHPfXtbpaAcYQ6lc9pe9w4FZxAjHXkDVEHcaaSiNhLItFqcy+cEWRsvX0bHRaguW/WpGz9MoEQpgwjQvq/OdiJmY+lSmmU74YQuvyP0Ze+NMkXGKeC9DNb7o5D34uZT8ZyiQLGHuFwt0w7UUkLVQV00/KBJY6Y69+7fDkUFZPLvkmwMWAR8ajCIckFZG8nW7BGoCH2FZFj8CZVHDcNIml3VEmxyxh2FyDxlhxMgdLmf1gyPnc6XYLOIaAkedJ41c=",
        "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)(316002)(1076003)(70586007)(8676002)(5660300002)(86362001)(7696005)(54906003)(47076005)(6666004)(16526019)(186003)(2906002)(2616005)(110136005)(508600001)(356005)(82310400003)(107886003)(6286002)(83380400001)(7636003)(4326008)(426003)(55016002)(336012)(6636002)(70206006)(26005)(8936002)(36756003)(36860700001)(309714004);\n DIR:OUT; SFP:1101;",
        "X-OriginatorOrg": "Nvidia.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "05 Nov 2021 13:36:37.6265 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 4a9dfc7e-8b1b-4e59-d8fb-08d9a0614ad3",
        "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 CO1NAM11FT029.eop-nam11.prod.protection.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "MN2PR12MB3374",
        "Subject": "[dpdk-dev] [PATCH v5 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\nThe document of \"mlx5.rst\" is updated.\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 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 8 files changed, 46 insertions(+)",
    "diff": "diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst\nindex 824971d89a..061a44c723 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_en`` 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/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..4e289402a8 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_EN \"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_EN, 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_EN,\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": [
        "v5",
        "1/2"
    ]
}