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 20797A034E; Tue, 22 Feb 2022 11:27:17 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 48EC141143; Tue, 22 Feb 2022 11:27:13 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2086.outbound.protection.outlook.com [40.107.236.86]) by mails.dpdk.org (Postfix) with ESMTP id 4E94C41142 for ; Tue, 22 Feb 2022 11:27:12 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LRUXbrjLtlc31O6HVy0ZtE6E+FMFSr25lGeDGnJUYoDHIjVqtmr+x/RSnVSvrdwJ5hJvAmziyrMiqDukUPyGKGMcArgaP3365Lzn7o0lEb5HZunlmJnhFczqhF3sCBwykYQRdH6+5+xWZwc8ij0LwCIHXpOmFNbisq1cGGdYZASSIrkHgLwNzF8HlUOwTFq52qGr7DLlmE98pJ9ANyHrlSeJ/kEIZXG7XKW8psLkWSPVCunNTdammTtW4JgJk8r8jncQDPS6/2kg+FifwwiTPj0DH3dkIShPKOHjSzmfYnvAr3FkJSIJPUzR7Uw7o5yJWV925MiFMsOiAtLeG5ywHw== 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=/3jTdSuaju3bX78OmgBlzePJl+Xy8zj4FvOO70xhx4U=; b=hus8/KZtzw17VKycTZ4ITrksfZrv3PelBe71l7k+xo6UJeX91H0y+RFYxaoo/7PIZ/aa7FZD316AWkQfBKC4fzLeoRxbJ+xKKa4ZNbyF/a+xtdoWxt/lkR5FafYF2T9Rhr8845LffeYsNB/Tl8I6Qr8cS6j+DMHcn/USntyPgK6BuGZN579IJN/3xTcF14taairoxuroFmolGVJxXoWR4QTEEiO+ZPX7N0gNif1N6NKBFaHmOF6E9dheE5yGHjbRdT4PmfmGRpIbAjf/qj6WgVfF5Oj1484kPaSqE6C8mgC7GXchVn4D44cYX6WqqJh82nMaQ3IyKsocZrl6C0pkDA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.238) 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=/3jTdSuaju3bX78OmgBlzePJl+Xy8zj4FvOO70xhx4U=; b=JuRDQ2kzEJQe5HvI9i6hnQOj/ByADI1TkxM2LVHVMz9Xg5CdZBBEbxUVX1zhBEKwZ/Bgkh0ZrO/vll502P8zEs2XHFge613DtMdSOVM2NwN/oeHf0i4akOuQWMVjS/zzFXBCr7JAKH6YBq5Kf63z7KrR6GHL1adN4ZQQrk6cgcFFz0ThoW9rDQevUJ4AFgz3gaGn/wTId1Q50tOH7YzBrYDHMGCol0Ql2rd/DaTLhsj/xPnTkjrKa/aedoDwBwDeiQL5sx9SdGy5ZrMNX3kS+wd8A/kUapEhuw75Z9cofa+DfWKasCwmjoJYKSbEEmweANrNWJSfxIi/0At3Oew+xQ== Received: from BN6PR17CA0028.namprd17.prod.outlook.com (2603:10b6:405:75::17) by BL0PR12MB2450.namprd12.prod.outlook.com (2603:10b6:207:4d::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4995.16; Tue, 22 Feb 2022 10:27:10 +0000 Received: from BN8NAM11FT003.eop-nam11.prod.protection.outlook.com (2603:10b6:405:75:cafe::e7) by BN6PR17CA0028.outlook.office365.com (2603:10b6:405:75::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.22 via Frontend Transport; Tue, 22 Feb 2022 10:27:10 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.238) 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.238 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.238; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.238) by BN8NAM11FT003.mail.protection.outlook.com (10.13.177.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4995.15 via Frontend Transport; Tue, 22 Feb 2022 10:27:10 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL105.nvidia.com (10.27.9.14) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Tue, 22 Feb 2022 10:27:09 +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; Tue, 22 Feb 2022 02:27:07 -0800 From: Viacheslav Ovsiienko To: CC: , Subject: [PATCH v2 1/4] common/mlx5: add send on time capability check Date: Tue, 22 Feb 2022 12:26:45 +0200 Message-ID: <20220222102648.4662-2-viacheslavo@nvidia.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20220222102648.4662-1-viacheslavo@nvidia.com> References: <20220214085655.22648-2-viacheslavo@nvidia.com> <20220222102648.4662-1-viacheslavo@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 67cbe794-c42c-4492-3241-08d9f5ede276 X-MS-TrafficTypeDiagnostic: BL0PR12MB2450:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vg1SAWc8LuEKXMjzYsIJPs1E8coEYMYCr0hyAAG8LuSGJfxEtW+IoxJRAjlIBVDTjv7SxjR23AouccKRbssB+Io6Qy+3Mf4aSGuHfnP2KqaTdVoA7yqgRBVm/8bxbWYsZOx0zzSZbLntTmUN0jb5yDeLMPR38bOZ+/rM73tqfPK5YctOwUCCgrqKprXkuX54wN/9EB01XH8yFuBrlYjEpY7O27qp3GEAfx/POYYl8eZIQIpKg3KEC+ZPX4FVndgxpel1mLtslm5bzM3f2J7i/lNGp0A68EO0IdL2x5svwgqyXEvFMLtSDojE0oalHQTMboTKOaCOOvYzLb+OC52vTCiFNVTNGvTgGNWeDqq/WCl5G9QRweludlDW4SEMLg+ls/gJXcaEUGwWgBm/JgxOT21R5IUTlqVEVNCmxfm5PIyOV0La+u8M5ttJeeXiAWzoAKGiN4d8KTXqbz1tgf6mZsTXK43HNVYbTyBCAO4t+wxohwGCbLjgiK4EcRjJjua9TWKqz2/qbwIqZoEaY21Jz5B3/xZinq36DIG1FFyctGGuQ53Y1aRiXT3+zF+smQ8XLnNNrv8jwjF5O2Wjazk904R6LyW8X0m9ATX482DoeoGnQZB3R0jEpcmdzyHHlV/aShmPnYDaZMwRc+yFjsLO166W/GIttulitUS0DJnMF1ta0n+/0EsorUs2uufdT0wpMSqODrIa81FhlR00mvcLpw== X-Forefront-Antispam-Report: CIP:12.22.5.238; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230001)(4636009)(46966006)(40470700004)(36840700001)(70586007)(8936002)(70206006)(2906002)(8676002)(82310400004)(81166007)(356005)(7696005)(6666004)(508600001)(4326008)(5660300002)(6916009)(107886003)(316002)(36860700001)(336012)(55016003)(86362001)(6286002)(16526019)(426003)(1076003)(2616005)(36756003)(186003)(26005)(40460700003)(83380400001)(47076005)(54906003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Feb 2022 10:27:10.3212 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 67cbe794-c42c-4492-3241-08d9f5ede276 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.238]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT003.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB2450 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The patch provides check for send scheduling on time hardware capability. With this capability enabled hardware is able to handle Wait WQEs with directly specified timestamp values. No Clock Queue is needed anymore to handle send scheduling. Signed-off-by: Viacheslav Ovsiienko --- drivers/common/mlx5/mlx5_devx_cmds.c | 1 + drivers/common/mlx5/mlx5_devx_cmds.h | 1 + drivers/common/mlx5/mlx5_prm.h | 27 ++++++++++++++++++++++++++- 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c index 2e807a0829..fb55ef96ea 100644 --- a/drivers/common/mlx5/mlx5_devx_cmds.c +++ b/drivers/common/mlx5/mlx5_devx_cmds.c @@ -962,6 +962,7 @@ mlx5_devx_cmd_query_hca_attr(void *ctx, MLX5_GET(cmd_hca_cap, hcattr, umr_indirect_mkey_disabled); attr->umr_modify_entity_size_disabled = MLX5_GET(cmd_hca_cap, hcattr, umr_modify_entity_size_disabled); + attr->wait_on_time = MLX5_GET(cmd_hca_cap, hcattr, wait_on_time); attr->crypto = MLX5_GET(cmd_hca_cap, hcattr, crypto); if (attr->crypto) attr->aes_xts = MLX5_GET(cmd_hca_cap, hcattr, aes_xts); diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h index 37821b493e..909d91adae 100644 --- a/drivers/common/mlx5/mlx5_devx_cmds.h +++ b/drivers/common/mlx5/mlx5_devx_cmds.h @@ -201,6 +201,7 @@ struct mlx5_hca_attr { uint32_t scatter_fcs_w_decap_disable:1; uint32_t flow_hit_aso:1; /* General obj type FLOW_HIT_ASO supported. */ uint32_t roce:1; + uint32_t wait_on_time:1; uint32_t rq_ts_format:2; uint32_t sq_ts_format:2; uint32_t steering_format_version:4; diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h index 495b63191a..4ce302b478 100644 --- a/drivers/common/mlx5/mlx5_prm.h +++ b/drivers/common/mlx5/mlx5_prm.h @@ -133,6 +133,19 @@ #define MLX5_OPCODE_WAIT 0x0fu #endif +#define MLX5_OPC_MOD_WAIT_CQ_PI 0u +#define MLX5_OPC_MOD_WAIT_DATA 1u +#define MLX5_OPC_MOD_WAIT_TIME 2u + + +#define MLX5_WAIT_COND_INVERT 0x10u +#define MLX5_WAIT_COND_ALWAYS_TRUE 0u +#define MLX5_WAIT_COND_EQUAL 1u +#define MLX5_WAIT_COND_BIGGER 2u +#define MLX5_WAIT_COND_SMALLER 3u +#define MLX5_WAIT_COND_CYCLIC_BIGGER 4u +#define MLX5_WAIT_COND_CYCLIC_SMALLER 5u + #ifndef HAVE_MLX5_OPCODE_ACCESS_ASO #define MLX5_OPCODE_ACCESS_ASO 0x2du #endif @@ -348,6 +361,15 @@ struct mlx5_wqe_qseg { uint32_t qpn_cqn; } __rte_packed; +struct mlx5_wqe_wseg { + uint32_t operation; + uint32_t lkey; + uint32_t va_high; + uint32_t va_low; + uint64_t value; + uint64_t mask; +} __rte_packed; + /* The title WQEBB, header of WQE. */ struct mlx5_wqe { union { @@ -1659,7 +1681,10 @@ struct mlx5_ifc_cmd_hca_cap_bits { u8 num_vhca_ports[0x8]; u8 reserved_at_618[0x6]; u8 sw_owner_id[0x1]; - u8 reserved_at_61f[0x129]; + u8 reserved_at_61f[0x6C]; + u8 wait_on_data[0x1]; + u8 wait_on_time[0x1]; + u8 reserved_at_68d[0xBB]; u8 dma_mmo_qp[0x1]; u8 regexp_mmo_qp[0x1]; u8 compress_mmo_qp[0x1]; -- 2.18.1