From patchwork Fri May 15 22:16:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 11553139 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 26BC8138A for ; Fri, 15 May 2020 22:17:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0F93B20709 for ; Fri, 15 May 2020 22:17:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="I5BKbqOB" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726615AbgEOWRa (ORCPT ); Fri, 15 May 2020 18:17:30 -0400 Received: from mail-db8eur05on2063.outbound.protection.outlook.com ([40.107.20.63]:6026 "EHLO EUR05-DB8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726226AbgEOWR3 (ORCPT ); Fri, 15 May 2020 18:17:29 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kNK9KEDEWwhvShHJdGpm8rzqfhXZCbkhLjTPiLMW6OKbSwrohUAjPABiBngzxPQYSInnfTWI+e1sIO4uOoMdzXjkqR3CbwIp3j8ddTpFXeJzsG/BsqJuS1E5K1BsRh5bM0zp7wAQYtY71PPynkAdleB6+fPo6C/qACOFdiRN9O62Ix87qqijWjZGKGhGttyKTdpY9tCTMI3goepCPF197TJ8UiJocvCuRczsWeN+Ay+0N50YMzEmquVxduDPRuLGEbId5mRTpI9Qlqtc4i7Oy3wajDytiCVMiuC8u3H4fIgwvPdHxB9sDLFpZhhvWVkCtVSqZjRrmsZ9QoiBzU8ALQ== 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-SenderADCheck; bh=pZ0m82lqCiXtfXmRysBMJRQFCxqNP0T7BVXgAs5nuDw=; b=bh/q3JTDz+sYv8Xn6RdDFRqPPcStM/ee9QjpRC/wsRBYbnTlT/mPB62BgjUKwsFIoH5FR5Sr4mQp7+JgadP9hdF2md7blhUmPL+lBQKZZvu4MAVZlQrW4lZcaJ6Qt4QTJ6sESIpyk7JCD+fPXyxKMzXpwM5GHPEz1cNJte339DFuj39/wsuatplOGNkEseqjYIO0qEus88I6CkC3SvAceDzkLOAPq4shB2baNlQMAi2uPCnGl+uXuz1eVwFolbdhwtzoSaGGzPKoCDRFlVyWOp18wtH8rkU57A4Kp6pQ7FtTeIsD6QJD4Sln7zZIyczFuW6cZGLOixR3yVxikpgTcg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pZ0m82lqCiXtfXmRysBMJRQFCxqNP0T7BVXgAs5nuDw=; b=I5BKbqOB2UC4AWdPNfRFmeX7ztou4+Hi05A6CUnpMvrgKWwuQ7dEBAzRVh/iBhpc24Hqt1IKZmbtcQZBmVQt4QL3fTrX5dH6aU7DrJ8+Gph+521jiD167aGzj8fc576mtwoI26YtWDnavD7+cajNejt1DFa4dh+iyy+R10KlC8k= Authentication-Results: mellanox.com; dkim=none (message not signed) header.d=none;mellanox.com; dmarc=none action=none header.from=mellanox.com; Received: from VI1PR05MB5102.eurprd05.prod.outlook.com (2603:10a6:803:5e::23) by VI1PR05MB4301.eurprd05.prod.outlook.com (2603:10a6:803:41::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.25; Fri, 15 May 2020 22:17:25 +0000 Received: from VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::2405:4594:97a:13c]) by VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::2405:4594:97a:13c%2]) with mapi id 15.20.3000.022; Fri, 15 May 2020 22:17:25 +0000 From: Saeed Mahameed To: Saeed Mahameed , Leon Romanovsky Cc: netdev@vger.kernel.org, linux-rdma@vger.kernel.org, Raed Salem , Alex Vesker Subject: [PATCH mlx5-next 1/3] net/mlx5: Cleanup mlx5_ifc_fte_match_set_misc2_bits Date: Fri, 15 May 2020 15:16:52 -0700 Message-Id: <20200515221654.14224-2-saeedm@mellanox.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200515221654.14224-1-saeedm@mellanox.com> References: <20200515221654.14224-1-saeedm@mellanox.com> X-ClientProxiedBy: BYAPR01CA0047.prod.exchangelabs.com (2603:10b6:a03:94::24) To VI1PR05MB5102.eurprd05.prod.outlook.com (2603:10a6:803:5e::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from smtp.office365.com (73.15.39.150) by BYAPR01CA0047.prod.exchangelabs.com (2603:10b6:a03:94::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.20 via Frontend Transport; Fri, 15 May 2020 22:17:23 +0000 X-Mailer: git-send-email 2.25.4 X-Originating-IP: [73.15.39.150] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: c96ce904-a496-4bde-1795-08d7f91dbf43 X-MS-TrafficTypeDiagnostic: VI1PR05MB4301: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5516; X-Forefront-PRVS: 04041A2886 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: I/Bt4XsJf3gBwzylcFQh+zf4wxsn/meJS7s0Bef66spLWL0nDfhDm3DiCZRS6JCWvtYP7elJ/WNIUdhcCe2tnHkqqXUj2HPC60lCwnVDQaiCp0h0V9XFt3qnzs8mzCgxsmPbyQ5Y7zsjrsJON7WajbHrSWgg1moNb/ycs660ObjZ+pYN1e6+R6/8evZyaV2l4XzbGWp1Qf3rl7EdC9n9GAhS5j8m34LYapyNfOR3+imA3iXoy23DYRGXBQzhpOL0qMdfkYyHyKYI3X735QbMRpcsekRU8Mk1OzCZyIAiYl+NDBc+vjtOcaPOZ4FzGuDgSpWT4BQBCxwhv8HNNtefyPTHg6xe8f0J0jl++RJuREKBUrqwFIBW75IYDAaet56GU//H0qtNrCZXDExQqo775wzv30jyns5s3cFpOP5NUP2k1xwvFtJgPjou++j5/5kQHaS58viaqUrBMFjn/VteZaOLwETwh1HWyKeB3Yeim8TCJiLluaNT68mOxg4QgOan X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR05MB5102.eurprd05.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(136003)(366004)(396003)(39860400002)(376002)(346002)(107886003)(86362001)(6512007)(450100002)(4326008)(8676002)(5660300002)(478600001)(6486002)(6636002)(1076003)(66946007)(316002)(66556008)(66476007)(110136005)(54906003)(52116002)(6506007)(8936002)(16526019)(26005)(186003)(2616005)(36756003)(956004)(2906002)(6666004)(54420400002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: oNygDZe6XEft6vGp0qwLsFKJ10LBvM60BHMnPthjusOhYsY082bJXYh7WIW8URmwSFPr9oDctHLxap3GRl5bQ992nZpDeaBc98QAdLDv4dL5vRvYBTHCG9K79VGsgkoUCE4S+0b1GtTchTGncrtyRb+AGVs5r1Cz3myAWcupnI6Dm19NABGCbv/ElKr+4XtHJ/IJknbnPznWxZOdH1q8ufRAHa4Cmnzh/95MXrCrET97ixjjIPhSJWkOkVlIqogv7X4KL2YQ0hC8lsva3hFxbKbv68JPV5OWW36sGfh4m8CL82n9a/aT7JOJ3n5MDCTGsuT5y+pgKDjR5G3RsGUWjBbH80YuDPDQjcL5/dB1tRrYXsCO/AxNbagOSQ97sBd3tu6ULauMJsLElsT7IP3RKse+Yk1kxsokPLUl016hkfGdtWbGW58M3egWcNF43xZsdk0R7BJA7w3vI9/YsseQkAQTTk7xmvt7dW/w545FKYk= X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: c96ce904-a496-4bde-1795-08d7f91dbf43 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 May 2020 22:17:25.6966 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: fzFafNDj4HOVhPmdYYkasTEaNNbC6Na5By1SmHayupK9Niq6kZYhV8ZkDpad9wknOXEFU1mabLgH2wE5Haeh8g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB4301 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org From: Raed Salem Remove the "metadata_reg_b" field and all uses of this field in code to match the device specification. As this field is not in use in SW steering it is safe to remove it. Signed-off-by: Raed Salem Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c | 1 - drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h | 3 +-- include/linux/mlx5/mlx5_ifc.h | 4 +--- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c index c0e3a1e7389d..78c884911ceb 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c @@ -961,7 +961,6 @@ static void dr_ste_copy_mask_misc2(char *mask, struct mlx5dr_match_misc2 *spec) spec->metadata_reg_c_1 = MLX5_GET(fte_match_set_misc2, mask, metadata_reg_c_1); spec->metadata_reg_c_0 = MLX5_GET(fte_match_set_misc2, mask, metadata_reg_c_0); spec->metadata_reg_a = MLX5_GET(fte_match_set_misc2, mask, metadata_reg_a); - spec->metadata_reg_b = MLX5_GET(fte_match_set_misc2, mask, metadata_reg_b); } static void dr_ste_copy_mask_misc3(char *mask, struct mlx5dr_match_misc3 *spec) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h index 984783238baa..71fa01ce348a 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h @@ -554,8 +554,7 @@ struct mlx5dr_match_misc2 { u32 metadata_reg_c_1; /* metadata_reg_c_1 */ u32 metadata_reg_c_0; /* metadata_reg_c_0 */ u32 metadata_reg_a; /* metadata_reg_a */ - u32 metadata_reg_b; /* metadata_reg_b */ - u8 reserved_auto2[8]; + u8 reserved_auto2[12]; }; struct mlx5dr_match_misc3 { diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h index c9dd6e99ad56..fd8da4875ea0 100644 --- a/include/linux/mlx5/mlx5_ifc.h +++ b/include/linux/mlx5/mlx5_ifc.h @@ -584,9 +584,7 @@ struct mlx5_ifc_fte_match_set_misc2_bits { u8 metadata_reg_a[0x20]; - u8 metadata_reg_b[0x20]; - - u8 reserved_at_1c0[0x40]; + u8 reserved_at_1a0[0x60]; }; struct mlx5_ifc_fte_match_set_misc3_bits { From patchwork Fri May 15 22:16:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 11553141 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1FFD3138A for ; Fri, 15 May 2020 22:17:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0577820709 for ; Fri, 15 May 2020 22:17:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="DirU09WY" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726675AbgEOWRd (ORCPT ); Fri, 15 May 2020 18:17:33 -0400 Received: from mail-db8eur05on2063.outbound.protection.outlook.com ([40.107.20.63]:6026 "EHLO EUR05-DB8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726183AbgEOWRd (ORCPT ); Fri, 15 May 2020 18:17:33 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HQXiEl8RMbyJUKd8ZyRL337gqmmhqmxMM4YmYZhNNkheGAcPrSlYQw4+Mx8QcyGc1CGclf83Dex5MDFW6Ze2995+dc7AzUDa2i7ohx8KAs2xZFbCYuzBQxnj2VArfSjoeVWXRfa7AWrtpdSIKVlplT+ezqIkS+NtjHapKO4Mu4Cr7RovzzvPbcwpoj1wYrOJLozkJvK83pbeW6V3sg5QVGuZ7w0lOS1Z/eiDOXQfCP/MXidBSwa6FdDkfTq/CT2UP1bamNIkPHbZQw4Dhis+h/uh/r3XfLVGjyeV73IUmWozHtDzYeHIYPEBpfVdmFOASYOH/YJ/595bZdecMx1puQ== 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-SenderADCheck; bh=1ApQYwAF5IUuW8ksOhPGHRXYKPre4kgfB8X7NzPmN9s=; b=QwDTwIununEp8o2P9p7eyo3m9bylR3WImUNypyT1Gz78vJpwmWPER71b6oBi0YcC9EUdmfJIUfX29/HL0zAEHSLTqqsqKXsFzh2yfD+hgW9H9UHNwZH2AjW2g00CYIYMfkWliTudEs7j+ozuor/eBL5qZRSaObgSNCAcQj5Zp5EGSvht210I2yCM9ldh9TolKP67odiY22BOxATJCCuumxIh00iUuPifu8IACHrYvmf9JG9T9+ahsUuRGuPZP5LrKi9MzTs1tPg66rA+lGUQLqjpO7WaGVppEWko3ymVsYG0EXFUORpkzhCZ7dwUamwAQJPVsEIr+cgcD6+usshfHg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1ApQYwAF5IUuW8ksOhPGHRXYKPre4kgfB8X7NzPmN9s=; b=DirU09WYALhtIhR+CbijW5q6tUcYf/iW1TVgk2qvloX13XizV4t1hlftSRinYvDoEWUZrY9ZAf2rFfBp0wnqsIp3SRSIHpY7x/1jf3DbPo0PAc67xHUFPIjKzAbR3Ytljc51um0BypPXI4hu5tTuZU2yDOkKOF8CY1lVcFez9Dg= Authentication-Results: mellanox.com; dkim=none (message not signed) header.d=none;mellanox.com; dmarc=none action=none header.from=mellanox.com; Received: from VI1PR05MB5102.eurprd05.prod.outlook.com (2603:10a6:803:5e::23) by VI1PR05MB4301.eurprd05.prod.outlook.com (2603:10a6:803:41::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.25; Fri, 15 May 2020 22:17:27 +0000 Received: from VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::2405:4594:97a:13c]) by VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::2405:4594:97a:13c%2]) with mapi id 15.20.3000.022; Fri, 15 May 2020 22:17:27 +0000 From: Saeed Mahameed To: Saeed Mahameed , Leon Romanovsky Cc: netdev@vger.kernel.org, linux-rdma@vger.kernel.org, Parav Pandit Subject: [PATCH mlx5-next 2/3] net/mlx5: Move iseg access helper routines close to mlx5_core driver Date: Fri, 15 May 2020 15:16:53 -0700 Message-Id: <20200515221654.14224-3-saeedm@mellanox.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200515221654.14224-1-saeedm@mellanox.com> References: <20200515221654.14224-1-saeedm@mellanox.com> X-ClientProxiedBy: BYAPR01CA0047.prod.exchangelabs.com (2603:10b6:a03:94::24) To VI1PR05MB5102.eurprd05.prod.outlook.com (2603:10a6:803:5e::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from smtp.office365.com (73.15.39.150) by BYAPR01CA0047.prod.exchangelabs.com (2603:10b6:a03:94::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.20 via Frontend Transport; Fri, 15 May 2020 22:17:26 +0000 X-Mailer: git-send-email 2.25.4 X-Originating-IP: [73.15.39.150] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 8cba2fd8-e379-40d1-daa6-08d7f91dc07d X-MS-TrafficTypeDiagnostic: VI1PR05MB4301: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:669; X-Forefront-PRVS: 04041A2886 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fKHhvBeu5hFoU/+q9QK6ISzl/J3IpgGKMwWS0PbDswWaXza8jnWUw7P+0afqRwJmiQ/XtpZ/IboYwgdXFXKhtO++zAEU3tQjE0ybMH3tmKqAIUcCwt2EMjc5FXo83SDF+XnMhq3EsGIor1yf2L0Fov54tra1P508J8EH5U9bl2eSFA8aV8WWImLQdaXkR185LUs68GmUp/6LX8+fMlHj2SdAPETVTj5pca+rv1vqcTQDONYkYHltyjA9PZJFrapCdpAserQ2zOUo5Lm5C/g66ZGTmTaULH4LAKnSsPFRjJ9rBQv+KVORfHFt6unzlLICLWPhnH+BA1kSC7wJnugB89kuz76e6Phx80zD//6k7h0DWhBrm2pxHOgDEjxSyksrzOQiccr2aTfs+gb5Mptu6CiLT08EP7CW3oPh6/TuaNXXiRRvcZr0WaFYNHqaQhOw2PrUbFc5YMuyywNxw49lrnXn/2T2VhojJ+bg37tR9lA39UHnYYslKT5NSNSQWB3s X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR05MB5102.eurprd05.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(136003)(366004)(396003)(39860400002)(376002)(346002)(107886003)(86362001)(6512007)(450100002)(4326008)(8676002)(5660300002)(478600001)(6486002)(6636002)(1076003)(66946007)(316002)(66556008)(66476007)(110136005)(52116002)(6506007)(8936002)(16526019)(26005)(186003)(2616005)(36756003)(956004)(2906002)(6666004)(54420400002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: J3rwcn9x/cP6vw7XxMCEk468vTzGbyp+BkZObKokOn6ofNjTzzflLo2ZYI7X21JiRz3L6VZK3DLfgP2U1Xf4BGLjkGDcmGrVRy2ePO48A6lPwiopsmyW6utqJhfvoZE2EuYmaED6UdjTS8twheZdpDh20uz4RCOjseneJDpu/XSDgCjFjQOhic6ZXUIZKSiHql6kGZKY4VGan9Ba0h74Rg9p5F9wwuRqJqneESOgHi2EaoEoVJibIx8+OwlkUmfpgx91OsjVUy54JFU9wj2tyxkZM/3oie2d+FJCcR49EqvWz58ljL3QkwZHQZDxaCfgIZrGrNzZlpM3/eWQXhR4HinzyfF0zHIUukuPCIQfZhkHqT+rXrdnNdpKHpwyzH7tJRtE0SKFdbZl1a1KuPyNODgD/hQTbpqAQ0Bi+hSO375q7dy2MWlc0wua1JzcZgjggeKGJ6/FwLdzNKN28Dz2x1ubF6H5pR3EE4vrIniu5XE= X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8cba2fd8-e379-40d1-daa6-08d7f91dc07d X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 May 2020 22:17:27.8124 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: eZzbbxpM5PtgzamVKOjmgAumUKo2Vg9AUpmYkRO86Vis0grAf56kCOdiofmyc6tM0JzdY1jaENOd1r6KGcb+ag== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB4301 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org From: Parav Pandit Only mlx5_core driver handles fw initialization check and command interface revision check. Hence move them inside the mlx5_core driver where it is used. This avoid exposing these helpers to all mlx5 drivers. Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 5 +++++ drivers/net/ethernet/mellanox/mlx5/core/main.c | 5 +++++ include/linux/mlx5/driver.h | 10 ---------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c index 34cba97f7bf4..e6567d5570ba 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c @@ -1890,6 +1890,11 @@ static void free_cmd_page(struct mlx5_core_dev *dev, struct mlx5_cmd *cmd) cmd->alloc_dma); } +static u16 cmdif_rev(struct mlx5_core_dev *dev) +{ + return ioread32be(&dev->iseg->cmdif_rev_fw_sub) >> 16; +} + int mlx5_cmd_init(struct mlx5_core_dev *dev) { int size = sizeof(struct mlx5_cmd_prot_block); diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c index 061b69ea9cc4..8a375e3ed5c1 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c @@ -177,6 +177,11 @@ static struct mlx5_profile profile[] = { #define FW_PRE_INIT_TIMEOUT_MILI 120000 #define FW_INIT_WARN_MESSAGE_INTERVAL 20000 +static int fw_initializing(struct mlx5_core_dev *dev) +{ + return ioread32be(&dev->iseg->initializing) >> 31; +} + static int wait_fw_init(struct mlx5_core_dev *dev, u32 max_wait_mili, u32 warn_time_mili) { diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h index 24e04901f92e..a988eb405aa6 100644 --- a/include/linux/mlx5/driver.h +++ b/include/linux/mlx5/driver.h @@ -823,11 +823,6 @@ static inline u16 fw_rev_sub(struct mlx5_core_dev *dev) return ioread32be(&dev->iseg->cmdif_rev_fw_sub) & 0xffff; } -static inline u16 cmdif_rev(struct mlx5_core_dev *dev) -{ - return ioread32be(&dev->iseg->cmdif_rev_fw_sub) >> 16; -} - static inline u32 mlx5_base_mkey(const u32 key) { return key & 0xffffff00u; @@ -1012,11 +1007,6 @@ int mlx5_core_roce_gid_set(struct mlx5_core_dev *dev, unsigned int index, u8 roce_version, u8 roce_l3_type, const u8 *gid, const u8 *mac, bool vlan, u16 vlan_id, u8 port_num); -static inline int fw_initializing(struct mlx5_core_dev *dev) -{ - return ioread32be(&dev->iseg->initializing) >> 31; -} - static inline u32 mlx5_mkey_to_idx(u32 mkey) { return mkey >> 8; From patchwork Fri May 15 22:16:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 11553143 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CDC6090 for ; Fri, 15 May 2020 22:17:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B150D20758 for ; Fri, 15 May 2020 22:17:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="LkeR1oCs" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726183AbgEOWRh (ORCPT ); Fri, 15 May 2020 18:17:37 -0400 Received: from mail-db8eur05on2063.outbound.protection.outlook.com ([40.107.20.63]:6026 "EHLO EUR05-DB8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726226AbgEOWRg (ORCPT ); Fri, 15 May 2020 18:17:36 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fQLM3EPESDGus2hIwbgw1VdTIpr+zesMZHMqt6S7Yh2Q2lJHQFLONShAiuJ3vK/NdLtgBti25skJJSmfXu8/T6+aJYmj819v1Y4Tni1tkzGznwkI4xHMzr4oCU+l7mOv1LY8M19S3RYYMZwmY+UprdTcWaJcjVUGXdKqh9Lp5RzvjX5Vqjf+l1u1MEfKHl9Hu1d5PyT2T4+GuJfq2/p3RZqzlNqH6JWLkDABlNlRS2PfTFmvsKbTxLhbZCaapNsvN/mgU0WvYO5D7WsrvdFg3mUd3sKYCRjiBmtLhzRrIArlta3+kZ418J37dExECt7JrWkK93Ptjb8LTba5MfIdDg== 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-SenderADCheck; bh=lBq8LZoq2VsROgOM5rdC8h/zmfiXDhJZ8Ks6tCD8uGg=; b=LzE1ddXQQkzuAOYdumcaIOp8iT4nttEDGLpmmKkCJ3EODnTd8LSRbHWrmGKLg8ERDQljeLaFQ5i32YXhKt12rb1RSX+WktQWQELa9YjlnO0mwbDOIX6MbsXjQ9WhrjVgI7/CjTYjCTMHKKYEM7EjsKlkCNvW8Q24Tx/LbnkqU+0K5U1NaX25vzMgIpiEKlz6aq/PXmknm4RfH9TYDWuAYuaMhsbdDGesxj3iYrapMhSF29KV6as6M2Eq05T4Ncm4Rii9ERS95Bkyzh0WuySLCvBJU6Hi6ZrFjk6IujvRB0Qnbk761u5mwDBZhSHc3wpM6j4iCewjZSudOW9F9bZw/w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lBq8LZoq2VsROgOM5rdC8h/zmfiXDhJZ8Ks6tCD8uGg=; b=LkeR1oCs+pfh5WsNOnH5ZzFzDORdnUvYwYNo4N2xOqgvOFVEkkYNYXNOekemYq/cTqzlCV49H9kLWA3p9Rjicc2+LfoBqGFPdkWjMjaJJm2erusfYKL3UOvu11CLJoBEBrVDNOImeTTnnc3pSA/Q3KkYE5YPVOEM7iCWIGK89w0= Authentication-Results: mellanox.com; dkim=none (message not signed) header.d=none;mellanox.com; dmarc=none action=none header.from=mellanox.com; Received: from VI1PR05MB5102.eurprd05.prod.outlook.com (2603:10a6:803:5e::23) by VI1PR05MB4301.eurprd05.prod.outlook.com (2603:10a6:803:41::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.25; Fri, 15 May 2020 22:17:30 +0000 Received: from VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::2405:4594:97a:13c]) by VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::2405:4594:97a:13c%2]) with mapi id 15.20.3000.022; Fri, 15 May 2020 22:17:30 +0000 From: Saeed Mahameed To: Saeed Mahameed , Leon Romanovsky Cc: netdev@vger.kernel.org, linux-rdma@vger.kernel.org, Michael Guralnik , Mark Bloch , Maor Gottlieb Subject: [PATCH mlx5-next 3/3] net/mlx5: Add support for RDMA TX FT headers modifying Date: Fri, 15 May 2020 15:16:54 -0700 Message-Id: <20200515221654.14224-4-saeedm@mellanox.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200515221654.14224-1-saeedm@mellanox.com> References: <20200515221654.14224-1-saeedm@mellanox.com> X-ClientProxiedBy: BYAPR01CA0047.prod.exchangelabs.com (2603:10b6:a03:94::24) To VI1PR05MB5102.eurprd05.prod.outlook.com (2603:10a6:803:5e::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from smtp.office365.com (73.15.39.150) by BYAPR01CA0047.prod.exchangelabs.com (2603:10b6:a03:94::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.20 via Frontend Transport; Fri, 15 May 2020 22:17:28 +0000 X-Mailer: git-send-email 2.25.4 X-Originating-IP: [73.15.39.150] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: dc95a831-1e56-4c21-bd27-08d7f91dc1e7 X-MS-TrafficTypeDiagnostic: VI1PR05MB4301: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2399; X-Forefront-PRVS: 04041A2886 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ufaYoD/RzOyswvA2ugEfai0n4MSzdjKlSPt5Ae2nQcjFKX+NnL54jNGIJPi+ZhGiEw/FkkFA0sQxPjXrLhdMzOKeERhIi+ahkWK30KEnDoAwZsD/YPT8dJ/0++x8vsV4FLcT3+wCXvbLbh0j/eRrbCAm16dadwt37kQD2Dw/y2n/dEWtY3myEN5Fehq5optTl6Fw/YwF4AHTX/wnZNpLmymsOerXmi+xxECowLgiroxVpRYChI1os3GOjDUNZm5GA1uGH3ntDNxL9QN2z0hvgqgM+tF4mNFCelPdTQhz6uu8jx2M1BCaaynCo3503QCFYb5/MNQNxtKcIeOmsusXneVCiYz+kubBTrYcC0ZyntS9RM3JdEPQErVVlxs6Qz2I3g2MoQtfgK41Zmhy8GoLJtqCOhwgrLEoKmAxNaw1yr+IKXbc+wVQjHSo/IKNlp5Ehys3OLE3YnBULHVkjbqhonGoAx1yGuPysj8Nuj1nFP7JkxKaGkH2WEZsitnOKtzy X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR05MB5102.eurprd05.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(136003)(366004)(396003)(39860400002)(376002)(346002)(107886003)(86362001)(6512007)(450100002)(4326008)(8676002)(5660300002)(478600001)(6486002)(6636002)(1076003)(66946007)(316002)(66556008)(66476007)(110136005)(54906003)(52116002)(6506007)(8936002)(16526019)(26005)(186003)(2616005)(36756003)(956004)(2906002)(6666004)(54420400002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: GBtN86UnZ8gur9oooqdXnu14e4MccWwuFanP9eRXrVLTVm4RtpmEtpJN4u6ih2lsoXbhnZY2HnMuZLiPXCOivuT+RhzpoEGvuhl8IC8NZz8WyLng3YiriaQPZyJwfu0XgfSh9g3Evp382VHMVw/DJCXmgQm4BYva43veCWXSHqCo5JG04IK525IlAPj0B9b/a0ozuuUJoQjlFf/shsrJCVwo+V9b77NA7YMwgb6Slv77VrO9mNaLcB/gURuuYlUg7Cs6NniI7NWAXBMYUfyJZKm0k8JQRzg6gfuKGBQU16hH4ksm4uAzBb6FAQx8p3bJ6mrKZNdBo58BT8po9nB9TMXIeeY32qOm5fLc54h1zqwIJTjekfeMbFwni+DbYt2qk3ibyUA25VYHFSvOoyXLn5TqDLHD3cRBgg0PL93MmSffkmJE3vPLNj0N20OExYm256tNdoi5MWm40WV94IE8ilpYPiVu5b0AfhsxwOmJToQ= X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: dc95a831-1e56-4c21-bd27-08d7f91dc1e7 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 May 2020 22:17:30.1240 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: PxfrGyzjhkwW2VeXM6Xx9l0P5iom09Qf+JXCLRuwQczD4ucDEsj0CGiFhhyCVAe9J10DYnvSx73eCwiEOAjzOQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB4301 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org From: Michael Guralnik Support adding header modifying actions to the RDMA TX flow table. Signed-off-by: Michael Guralnik Reviewed-by: Mark Bloch Reviewed-by: Maor Gottlieb Signed-off-by: Saeed Mahameed --- drivers/infiniband/hw/mlx5/flow.c | 5 ++++- drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/mlx5/flow.c b/drivers/infiniband/hw/mlx5/flow.c index 69cb7e6e8955..3a0601c2052c 100644 --- a/drivers/infiniband/hw/mlx5/flow.c +++ b/drivers/infiniband/hw/mlx5/flow.c @@ -404,7 +404,10 @@ static bool mlx5_ib_modify_header_supported(struct mlx5_ib_dev *dev) { return MLX5_CAP_FLOWTABLE_NIC_RX(dev->mdev, max_modify_header_actions) || - MLX5_CAP_FLOWTABLE_NIC_TX(dev->mdev, max_modify_header_actions); + MLX5_CAP_FLOWTABLE_NIC_TX(dev->mdev, + max_modify_header_actions) || + MLX5_CAP_FLOWTABLE_RDMA_TX(dev->mdev, + max_modify_header_actions); } static int UVERBS_HANDLER(MLX5_IB_METHOD_FLOW_ACTION_CREATE_MODIFY_HEADER)( diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c index 1a8e826ac86b..465a1076a477 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c @@ -781,6 +781,10 @@ static int mlx5_cmd_modify_header_alloc(struct mlx5_flow_root_namespace *ns, max_actions = MLX5_CAP_ESW_INGRESS_ACL(dev, max_modify_header_actions); table_type = FS_FT_ESW_INGRESS_ACL; break; + case MLX5_FLOW_NAMESPACE_RDMA_TX: + max_actions = MLX5_CAP_FLOWTABLE_RDMA_TX(dev, max_modify_header_actions); + table_type = FS_FT_RDMA_TX; + break; default: return -EOPNOTSUPP; }