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: 219133 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C979C433E0 for ; Fri, 15 May 2020 22:17:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 563EF20709 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 S1726653AbgEOWRa (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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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: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: 219132 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 267C8C433E0 for ; Fri, 15 May 2020 22:17:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 039A520758 for ; Fri, 15 May 2020 22:17:38 +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 S1726724AbgEOWRh (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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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; }