From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4773BA00C5 for ; Mon, 14 Feb 2022 07:03:44 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 354D741140; Mon, 14 Feb 2022 07:03:44 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2087.outbound.protection.outlook.com [40.107.92.87]) by mails.dpdk.org (Postfix) with ESMTP id AF15C4067E; Mon, 14 Feb 2022 07:03:41 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hOlHB2+LWXL83Q4aNHq0KbP7CF8w6WYeCARSCMg485G9fPKSLo4T4tmmK7i/VctwgICCWBRGy3E83gKt5FAhjk7OvbCAwf7Kh1VSiw7Uk0uM9ZYjfpe/VEoL1f/RfaIU7TNb1jNvoLJp56PlPH2ZfC4fz0bJ5idt3xLtOBU1ke++dCY2n7+KeZcxfKShUJvKXYhB11C0WhWkC7lGPtaUy54d1TypappN6xgNq7RuTdHBckxhAYxqzC+a8Q+x3/1j9japghX6kwfyx6Ef1khnRFwyBuokJZkNyHlIaAV1goTb7ovOgg3VLco8ISz/z0E1dbewliE7BESSzR3IfK3/Yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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; bh=A7YTc4YwZwZQjMIfmeorQ+JnIvuCGGSHjp0Zc7L0eto=; b=Lud5A7p4lYYX5673DTVCauTE+Duh/7Cf3wApegW0RjzY7uzgBopgH93XhZnJLZQQgnUN3DD8p5rfeazDGPy8Co8o3cVfI8aVmtYkFg1HTn8IQwlYeHDr3CKeJtX1KTC6d81mJ/tnNyPHB3gMu9XcZKsAclmXReiWQ9P/QE4903B7Hw0qIhRPVCj7LxwCRB3YQmJzOm+wB+qVjj5xpWqGCEbh/38ftmDcSlZR+t9CouDvOxn3OoAg5mG2OcwsOrbJYBMuqMfMFoFo8kr3ADWIdZ3RV4uE4jtiZjR+hNJ1xpnge7TZxRMa/mfoJD7+aB1c/vpMxxAw8puAIFNDmQJifw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.236) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=A7YTc4YwZwZQjMIfmeorQ+JnIvuCGGSHjp0Zc7L0eto=; b=qrExxOv1pKXo1+wlhYAQD/oJaT7qD0Qr6upSrwN2QOp6JNcRimvFhQNus+yl7ZsvO728n1QZ/VFRl4ivMD+GYDJEUo2iJy9dlTqLHBAH+ZrSOJNgg7hdy1828QMBDBc8Bruv20jPHcXH8hiRRuMl/NVCeTvqHuWLE2lubEQFznri9RgbgMDBJ+sTj4nKFWYJqmC04AdNJHgd0fmTIK9DGzcgmB00FEf76jrMantENt6/mEZZDAM1iqa4KtHUYWzmEhmJyT4MZ4H3EUExMZvfgrg0kjuORHgJfmWCqXEZiHluk14GE/v5edRK7lqszkEB5aLZ2dCwSkgwc6bDrgghCg== Received: from MW4PR03CA0299.namprd03.prod.outlook.com (2603:10b6:303:b5::34) by PH0PR12MB5631.namprd12.prod.outlook.com (2603:10b6:510:144::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.12; Mon, 14 Feb 2022 06:03:39 +0000 Received: from CO1NAM11FT009.eop-nam11.prod.protection.outlook.com (2603:10b6:303:b5:cafe::be) by MW4PR03CA0299.outlook.office365.com (2603:10b6:303:b5::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11 via Frontend Transport; Mon, 14 Feb 2022 06:03:39 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.236) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.236 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.236; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.236) by CO1NAM11FT009.mail.protection.outlook.com (10.13.175.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4975.11 via Frontend Transport; Mon, 14 Feb 2022 06:03:39 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL109.nvidia.com (10.27.9.19) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 14 Feb 2022 06:03:38 +0000 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.9; Sun, 13 Feb 2022 22:03:36 -0800 From: Yajun Wu To: , , CC: , , , , Subject: [PATCH] common/mlx5: fix QP ack timeout configuration Date: Mon, 14 Feb 2022 08:03:19 +0200 Message-ID: <20220214060319.1669846-1-yajunw@nvidia.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 43afa16d-2e01-44a6-5546-08d9ef7fbedf X-MS-TrafficTypeDiagnostic: PH0PR12MB5631:EE_ X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: h3q2xs6QUt17TBecWHa0oxQrj+xQcjZ90+SqKiPQ3GSWrZb0cGOG94X2UKb3AzcEgfdfGkuXhYTtNFj45fYg8AKqITktTe4UDSVkeLj4E423JMwzIIOY+QzaJGqnFUaJ5BerHVOjC/MBZOzrDIP7kO7MQ1UGpYBoYz7sAav6AK2inI9D7wmDrXu37mMcV3r08k6b2wNXPzOrq44lX4IhEsY1ufNJxK8fr7VJRZH9PW6DOxEL1v+vUNABfaEpdPFKGwvf0X3mwOCpYIYi5VE0SjBo3hYYc0x3bIt3gIP0igkIvZcY02SojmtxUcY8OuOypvqPXLLMuNINTl82Bu4CfVkIMrRCChHdeLZ/qnKMQNlV5j3svNuBTRX4rTmkvum2/wkyF3d8U7QGD12K/mHV1L9XCh3xtlTh6gVwNem4XqgqV4vaUpHNYCUfZmqS+EpQKQE12wsGjfYtJDuWHdIsyF/wadJhnkDkNnedprkcuyZ/4QOA7ltRD7jrbhV8wu8nDEZKRnL0qsWQK8cIJgQNwKrPo/MtL7kSOJM2XyT2IEAcucj4YYCtaKkQ2qo0LagnLn2YHAMV7oOmn2jBYkw2C3OKBfvJHj/aR8n9HMOfvJtv7gQTYfhRVy8+wgUIMKRSPScAUKen9joija/6ekvgDcZExTcRt7eSS++RAX00D1I8HlJFA7C8LAQceKUqvAB06uVQt3gGcU7NtrhbA3xpHw== X-Forefront-Antispam-Report: CIP:12.22.5.236; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230001)(4636009)(40470700004)(46966006)(36840700001)(40460700003)(36756003)(26005)(16526019)(6286002)(186003)(356005)(81166007)(5660300002)(8936002)(47076005)(36860700001)(2906002)(7696005)(70206006)(70586007)(55016003)(4326008)(8676002)(83380400001)(82310400004)(316002)(6666004)(86362001)(426003)(110136005)(336012)(54906003)(6636002)(508600001)(2616005)(1076003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Feb 2022 06:03:39.0734 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 43afa16d-2e01-44a6-5546-08d9ef7fbedf X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.236]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT009.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB5631 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org VDPA driver creates two QPs(1 queue pair include 1 send queue and 1 receive queue) per virtio queue to get traffic events from NIC to SW. Two QPs(called FW QP and SW QP) are created as loopback QP and FW QP'SQ is connected to SW QP'RQ internally. When packet receive or send out, HW will send WQE by FW QP'SQ, then SW will get CQE from the CQ of SW QP. With large scale and heavy traffic, the SQ's request may fail to get ACK from RQ HW, because HW is busy. SQ will retry the request with qpc.retry_count times and each time wait for 4.096 uS *2^(ack_timeout) for the response. If still can’t get RQ’s HW response, SQ will go to an error state. 16 is experienced value. It should not be too high or too low. Too high will make QP waits too long in case it’s packet drop. Too low will cause QP to go to an error state(retry-exceeded) easily. Fixes: 15c3807e86a ("common/mlx5: support DevX QP operations") Cc: stable@dpdk.org Signed-off-by: Yajun Wu Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_devx_cmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c index 2e807a0829..7732613c69 100644 --- a/drivers/common/mlx5/mlx5_devx_cmds.c +++ b/drivers/common/mlx5/mlx5_devx_cmds.c @@ -2279,7 +2279,7 @@ mlx5_devx_cmd_modify_qp_state(struct mlx5_devx_obj *qp, uint32_t qp_st_mod_op, case MLX5_CMD_OP_RTR2RTS_QP: qpc = MLX5_ADDR_OF(rtr2rts_qp_in, &in, qpc); MLX5_SET(rtr2rts_qp_in, &in, qpn, qp->id); - MLX5_SET(qpc, qpc, primary_address_path.ack_timeout, 14); + MLX5_SET(qpc, qpc, primary_address_path.ack_timeout, 16); MLX5_SET(qpc, qpc, log_ack_req_freq, 0); MLX5_SET(qpc, qpc, retry_count, 7); MLX5_SET(qpc, qpc, rnr_retry, 7); -- 2.27.0