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 89D60423B7; Thu, 12 Jan 2023 14:50:20 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 806C542D4B; Thu, 12 Jan 2023 14:50:20 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2045.outbound.protection.outlook.com [40.107.93.45]) by mails.dpdk.org (Postfix) with ESMTP id 4FCA840E25 for ; Thu, 12 Jan 2023 14:50:18 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fCgIC5TnM3wKPtMF5OYc8YBrb/aVzx81ClbpvAvAOhrqFkJ+Aq0akLPV+xKBPAVzuQpkyEg89ZLmNxRGxLO8wnn/k+Eul21Y2xHAk+NLWUJZONdbGKTK1IXt/T3WYp2SCK1ixMNLUJw8S2ViW5UaGleLX5aiXSvGktVWU+m368ETL3D0uv2varkx0Me21m1KCoAa0wQvD+veVrLbKlenOsB+wecbUdZAFvsgg3VcU/yyivuXXFXWgQGB3Angm3p9zJoifXDy5dJQkLSsM+ZFPvB79Q1n1J/SXmjf/VKUZgwTN3ny+Y+lQx6HnSk7T3okDZXisQtQI7xSHDzRtoYmDQ== 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=a8P5poUWAyUlmQYEXr1psjpZ2ShWBICTBEzslhkkiY0=; b=IHgikZXgP2GPBcLn8y8PSfTXZhbha3PGtLBlkS+PaRA0b6JjYXCxC9j9HUemG0iuH0TosZThqtZNPTLEjNQPljAWzdXhN1VlbrRNUTyrNnybmMWW4O+LNN9AFpLCM8MRIS55nVCWJnhm6/KPyT49VIMZJBY6X2GFF6V88oQn1XJ1ES24+d3cf6idbesSlATpbDsNlKbFu76XSgAwW/SYtKktM3fYfRXwR9CLZK58e2kvYUoSJ2WlOz1ulODceQ4Tj+gCVgAHoBuyo0wEHjxjPNkijIhtW/j3grHisgr7mFvq2f2A3n+ltiqRoiVyflrUSHCeauk7KG9FvIxiUGakpA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=monjalon.net 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=a8P5poUWAyUlmQYEXr1psjpZ2ShWBICTBEzslhkkiY0=; b=BkJayKcRA5a5JVumhgl+6aiwl7aEvpQanmDesoiYXTs8Kyc39sam6Zs5urooAwzXqIAIG79ZCxFeu3kzoWuZcrpfg7OqmTooXdBfJLTXrAf07Bb5oQw4XwzfjhVycQnDRnuSxaEnwwMXeBuGSChJbHmCCPvtbs8HobAwda+M8olkHIAqJL8R2fjk0tCtSTtJV5YtcKrt+oVcm0cxRep9bfpGx+nfsedS48Hx4A8+IGJdMOGi41cK5cobVIYaSyDbsA7gQYx/AviPpn5gZObFTk+IhUDG0ZODvnqmYxqjdiLLk74sHcRvkMTHghBGpvzOmyob7tQttVhmGWLMHn6igw== Received: from MW2PR16CA0022.namprd16.prod.outlook.com (2603:10b6:907::35) by IA1PR12MB6284.namprd12.prod.outlook.com (2603:10b6:208:3e4::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.18; Thu, 12 Jan 2023 13:50:16 +0000 Received: from CO1NAM11FT003.eop-nam11.prod.protection.outlook.com (2603:10b6:907:0:cafe::1a) by MW2PR16CA0022.outlook.office365.com (2603:10b6:907::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.13 via Frontend Transport; Thu, 12 Jan 2023 13:50:16 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CO1NAM11FT003.mail.protection.outlook.com (10.13.175.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.18 via Frontend Transport; Thu, 12 Jan 2023 13:50:16 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Thu, 12 Jan 2023 05:50:05 -0800 Received: from nvidia.com (10.126.231.37) 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.36; Thu, 12 Jan 2023 05:50:02 -0800 From: Yevgeny Kliteynik To: , , , , Matan Azrad CC: , Subject: [PATCH 2/4] net/mlx5/hws: read capabilities for Split/Linear tables Date: Thu, 12 Jan 2023 15:49:10 +0200 Message-ID: <20230112134913.2632849-2-kliteyn@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20230112134913.2632849-1-kliteyn@nvidia.com> References: <20230112134913.2632849-1-kliteyn@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.37] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT003:EE_|IA1PR12MB6284:EE_ X-MS-Office365-Filtering-Correlation-Id: a47bf6bf-3df9-480d-f5a2-08daf4a3ef81 X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: y+tSvJmTIyMrmzut+3/92aWflLYDxTSnYT04MjPz2jKXrrltErY9nptG1uUL37dczZZt5c1EIwfKodryqnJidnlCyZL0reV1LatQMoi9DDEEIUID/YyBjL/tFZDb94IY/LDqoB8kfdNwsfzSWIgDYEzQ07Tg6EuM6PYSMBtHYDeGiiwu7jwx1xeM+y60LO3nqEk3N9kroLcPxrOZgq7IC8mJ06ciLLs4qMpcrrQpQGLADC6wKY1MTKXLW21/Vp6svz6AK8RT/hXpCtSpxahygxLgMFT+2AjTS8l8Lk5AYJ3TSRG6WZnaBhJU7Z+QB3IR/+IRFyKoVQQbbVBbm18yqlzek6wLOXXC5+IH1ptgN6Gq4/kOXCoGNzfRiZn4tWefCb2yW7NzuaNgjAE4R42qwHttv2TaPNXkLNuB6yroL3AZr6PHDkDMNuaGfZnK3KnFtXzBTtI4Qwg64gJ6V1P4fdlAR7FncP/Zr+LPJ2jUWviMaoUpHS/3Vhp8L9J292QczF7sSp+T8qq4ssNsEwpKKd14Dn5umwsU2eWxAOjnzF6cbOeXlOngfKCOONfZgNS7tKb9B3DdT2Qgyvf/g6dbjNAUw01VhNCuUo9nGBCpo5nNYL/MlaEQbHpMeW2b9nyP+4c1YDrGLnNezJ5ftiX56N2rumEXR604bFilWaRTGN8qIx5WWY057jp0pdX1NGo8x2fJ51QPgUJ+o0m9QDS5bQ== X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230022)(4636009)(346002)(136003)(396003)(39860400002)(376002)(451199015)(40470700004)(46966006)(36840700001)(36756003)(83380400001)(86362001)(6636002)(70206006)(110136005)(107886003)(4326008)(54906003)(70586007)(8676002)(41300700001)(40460700003)(7636003)(82740400003)(356005)(36860700001)(186003)(26005)(6666004)(5660300002)(316002)(8936002)(40480700001)(2906002)(478600001)(7696005)(426003)(55016003)(2616005)(82310400005)(1076003)(16526019)(336012)(47076005)(6286002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2023 13:50:16.0371 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a47bf6bf-3df9-480d-f5a2-08daf4a3ef81 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT003.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6284 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 Read device capabilities that describe the support for Hash Split table and Linear RTC table. Signed-off-by: Yevgeny Kliteynik --- drivers/net/mlx5/hws/mlx5dr_cmd.c | 16 ++++++++++++++++ drivers/net/mlx5/hws/mlx5dr_cmd.h | 4 ++++ 2 files changed, 20 insertions(+) diff --git a/drivers/net/mlx5/hws/mlx5dr_cmd.c b/drivers/net/mlx5/hws/mlx5dr_cmd.c index c64f127de8..32378673cf 100644 --- a/drivers/net/mlx5/hws/mlx5dr_cmd.c +++ b/drivers/net/mlx5/hws/mlx5dr_cmd.c @@ -970,6 +970,22 @@ int mlx5dr_cmd_query_caps(struct ibv_context *ctx, caps->stc_alloc_log_gran = MLX5_GET(query_hca_cap_out, out, capability.wqe_based_flow_table_cap. stc_alloc_log_granularity); + + caps->rtc_hash_split_table = MLX5_GET(query_hca_cap_out, out, + capability.wqe_based_flow_table_cap. + rtc_hash_split_table); + + caps->rtc_linear_lookup_table = MLX5_GET(query_hca_cap_out, out, + capability.wqe_based_flow_table_cap. + rtc_linear_lookup_table); + + caps->access_index_mode = MLX5_GET(query_hca_cap_out, out, + capability.wqe_based_flow_table_cap. + access_index_mode); + + caps->linear_match_definer = MLX5_GET(query_hca_cap_out, out, + capability.wqe_based_flow_table_cap. + linear_match_definer_reg_c3); } if (caps->eswitch_manager) { diff --git a/drivers/net/mlx5/hws/mlx5dr_cmd.h b/drivers/net/mlx5/hws/mlx5dr_cmd.h index 5d8d779708..468557ba16 100644 --- a/drivers/net/mlx5/hws/mlx5dr_cmd.h +++ b/drivers/net/mlx5/hws/mlx5dr_cmd.h @@ -170,7 +170,11 @@ struct mlx5dr_cmd_query_caps { uint8_t format_select_gtpu_dw_1; uint8_t format_select_gtpu_dw_2; uint8_t format_select_gtpu_ext_dw_0; + uint32_t linear_match_definer; + uint8_t access_index_mode; bool full_dw_jumbo_support; + bool rtc_hash_split_table; + bool rtc_linear_lookup_table; struct mlx5dr_cmd_query_ft_caps nic_ft; struct mlx5dr_cmd_query_ft_caps fdb_ft; bool eswitch_manager; -- 2.27.0