From patchwork Mon Apr 20 21:22:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 220915 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 7F177C55181 for ; Mon, 20 Apr 2020 21:23:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 575D620782 for ; Mon, 20 Apr 2020 21:23:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="sLKdwM8v" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727792AbgDTVW7 (ORCPT ); Mon, 20 Apr 2020 17:22:59 -0400 Received: from mail-eopbgr30042.outbound.protection.outlook.com ([40.107.3.42]:11830 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726050AbgDTVW6 (ORCPT ); Mon, 20 Apr 2020 17:22:58 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KFPFk4Sds1XmS/lwE2lwCijR7JpxzmX+EXmkmVC4ohfncWQeYA1nGhXGdZG+j/WiZq/ad+m0ilBzVv213Il26/0OA2oUlF/Dh8a+5R0SMXZy9/DB6lvJI03TvgBLIDGE4EQyNGsk09bC7mdOfMC1DY1aNCVpbEm/kVMMQfrxh5gFw4rbGb+NzwLT4zfEqSJPyoMhcStSHj/zi9Llo1XuOgR7+c2fkbuptdbOzFZgA6fkwmAZYZwoh45+cHwJyjNLzAJhM1MO0Y4MEGRNcUg4p8BCk7J7me64vOSLlTz1J/H6jdEYdOXdwaV/l4rBur4ROK256yhf7v/8HwhqzVUD9g== 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=2GLWmictuiMELEPc22A1CQcKt551pd8cGYqJp2TYC1k=; b=e1LjybwFh4AC5xFjiwuHArsZN1qx8EaGiCdMQGxgnvpIdoo9SUmFm8hlkYDh/Zr6XAjHJduHGrkaNswRL4cAm4TAmd3qtPz0zGy4s19VpuBUTjWmXXycpOeK5bI3RXlxZf0Xi2CoReAptP4T+Fc+RU2X7rf7wgb6q5Fo+laxINUdq3Rxfp2V55YmcMcIOulihbliY6qrQG+VhX2g8+JvDriWf6Db7zOamEXuOXHy/tFfPxZHTsYVTafcBDXYRqX7FHytG0OU5RoFaAN/VgDfY5qbYV1lldYsdz1llhi0sqqeV2C4hZznqRDYgSspIFKYxPngDn7MKDUW/liZ5Sud8w== 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=2GLWmictuiMELEPc22A1CQcKt551pd8cGYqJp2TYC1k=; b=sLKdwM8vxUBmw4QgR17hMJ7X75Swc2FQy9eJ0Ahk5c4cOV9WI++uM2P8LqVjW9svhLOyElLa0woa3A5b9fjj4L73pfAJBXi4VjEe9wGA8mR2g9/AT8ubVudDRvyERCm+8+YJ8EwfLOJqptDpMkdcfKAkKeb1nZi30AnD1e1RoPY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=saeedm@mellanox.com; Received: from VI1PR05MB5102.eurprd05.prod.outlook.com (2603:10a6:803:5e::23) by VI1PR05MB6478.eurprd05.prod.outlook.com (2603:10a6:803:f3::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.29; Mon, 20 Apr 2020 21:22:56 +0000 Received: from VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::9d19:a564:b84e:7c19]) by VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::9d19:a564:b84e:7c19%7]) with mapi id 15.20.2921.027; Mon, 20 Apr 2020 21:22:56 +0000 From: Saeed Mahameed To: "David S. Miller" , kuba@kernel.org Cc: netdev@vger.kernel.org, Raed Salem , Boris Pismenny , Huy Nguyen , Tariq Toukan , Saeed Mahameed Subject: [net-next 01/10] net/mlx5: Use the correct IPsec capability function for FPGA ops Date: Mon, 20 Apr 2020 14:22:14 -0700 Message-Id: <20200420212223.41574-2-saeedm@mellanox.com> X-Mailer: git-send-email 2.25.3 In-Reply-To: <20200420212223.41574-1-saeedm@mellanox.com> References: <20200420212223.41574-1-saeedm@mellanox.com> X-ClientProxiedBy: BYAPR04CA0032.namprd04.prod.outlook.com (2603:10b6:a03:40::45) 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 BYAPR04CA0032.namprd04.prod.outlook.com (2603:10b6:a03:40::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.27 via Frontend Transport; Mon, 20 Apr 2020 21:22:53 +0000 X-Mailer: git-send-email 2.25.3 X-Originating-IP: [73.15.39.150] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 5873fe03-ff1a-4fe2-6546-08d7e570fdb1 X-MS-TrafficTypeDiagnostic: VI1PR05MB6478:|VI1PR05MB6478: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-Forefront-PRVS: 03793408BA 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:(10009020)(4636009)(136003)(346002)(376002)(396003)(39860400002)(366004)(107886003)(6506007)(86362001)(2906002)(186003)(16526019)(26005)(4326008)(5660300002)(36756003)(316002)(1076003)(66556008)(478600001)(956004)(6666004)(66946007)(52116002)(66476007)(6512007)(6486002)(2616005)(54906003)(8676002)(8936002)(81156014)(54420400002); DIR:OUT; SFP:1101; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bggR04sn6677q4R2sHe+c8lKUw7UAq7rYo+BRX6Fp8AVdTsLex0qbqmYwRg+Xk3doSSo79R+2GjucaGrUzAgs1WFEAlaUimK49LGILF+xSBYwodhAtsME7XlyBsyxMLu4D77cvPh7l8NBcbP88p+IgbF8HB7ec3MDmuUqF9uxidLd+JMm1+QnfS7Z6QlCJ4UG8ta5zI5B/L3/mXPt/7YbbnHQY7vl3FmnVseM9l6zQva+06nM46WRFJsXlqK8palCxranfW9HB4gvnVN7lUyNoMDCjPO/0W2LZwPZogKksE/3uHbbuXg7P4puK79xSJjzqqR0h+BUQ2DQ/y9SjgIYfDa5ePZdP5gztK+tkXpAYItCqunQUpVl1ck1F2sSozeqjsiofbH6A6pXwIiIWs6FATlaPg1VFdnmxcfFUqf3lJ4x+AOkwAINIYhrQZT2YqPXqSv1zcbpr2kgz52qzpTspSmpjeyroSj+uTN89IoihDh52EpWT8yq604fovB9qnd X-MS-Exchange-AntiSpam-MessageData: G+3VU0ktcNA1Nc3Ju5lUgFy3Xz6tFeTqtkK20C8Gf5/eW9A7kVuktTWDOT7FenLGzrMkAF0RSJFRtIp3305oDOoN+faD/fQBl+51jGwYUOJnAlnXspPv0C3YdCE84u06+IjtNX8hZ4MG/X3mKnfkvw== X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5873fe03-ff1a-4fe2-6546-08d7e570fdb1 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2020 21:22:55.7180 (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: Gau9PaMZ2fb7toRjGCEwz0KoQbXIPZH74axaSja5ydOIMNTwvH2RUp90mDXYZj6SaUMRzKztAsp0xc9WUcRodA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB6478 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Raed Salem Currently the IPsec acceleration capability function is also used at IPsec fpga capable device code. This could cause a future bug as the acceleration layer is agnostic to the device implementing its API. Fix by using the IPsec FPGA capability function instead of acceleration layer capability function in case of FPGA IPsec only related operations. Downstream patches will add support for Connect-X IPsec, this can avoid a future bug. Signed-off-by: Raed Salem Reviewed-by: Boris Pismenny Reviewed-by: Huy Nguyen Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/fpga/ipsec.c | 2 +- .../net/ethernet/mellanox/mlx5/core/fpga/ipsec.h | 15 ++++++++++++++- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 5 +++-- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c b/drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c index b794888fa3ba..c8736b6b4172 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c @@ -602,7 +602,7 @@ static bool mlx5_is_fpga_ipsec_rule(struct mlx5_core_dev *dev, const u32 *match_c, const u32 *match_v) { - u32 ipsec_dev_caps = mlx5_accel_ipsec_device_caps(dev); + u32 ipsec_dev_caps = mlx5_fpga_ipsec_device_caps(dev); bool ipv6_flow; ipv6_flow = mlx5_fs_is_outer_ipv6_flow(dev, match_c, match_v); diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.h b/drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.h index 382985e65b48..d01b1fc8e11b 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.h @@ -37,6 +37,7 @@ #include "accel/ipsec.h" #include "fs_cmd.h" +#ifdef CONFIG_MLX5_FPGA_IPSEC u32 mlx5_fpga_ipsec_device_caps(struct mlx5_core_dev *mdev); unsigned int mlx5_fpga_ipsec_counters_count(struct mlx5_core_dev *mdev); int mlx5_fpga_ipsec_counters_read(struct mlx5_core_dev *mdev, u64 *counters, @@ -63,5 +64,17 @@ int mlx5_fpga_esp_modify_xfrm(struct mlx5_accel_esp_xfrm *xfrm, const struct mlx5_flow_cmds * mlx5_fs_cmd_get_default_ipsec_fpga_cmds(enum fs_flow_table_type type); +#else +static inline u32 mlx5_fpga_ipsec_device_caps(struct mlx5_core_dev *mdev) +{ + return 0; +} -#endif /* __MLX5_FPGA_SADB_H__ */ +static inline const struct mlx5_flow_cmds * +mlx5_fs_cmd_get_default_ipsec_fpga_cmds(enum fs_flow_table_type type) +{ + return mlx5_fs_cmd_get_default(type); +} + +#endif /* CONFIG_MLX5_FPGA_IPSEC */ +#endif /* __MLX5_FPGA_IPSEC_H__ */ diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c index d5defe09339a..2da45e9b9b6d 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c @@ -2359,7 +2359,7 @@ static struct mlx5_flow_root_namespace struct mlx5_flow_root_namespace *root_ns; struct mlx5_flow_namespace *ns; - if (mlx5_accel_ipsec_device_caps(steering->dev) & MLX5_ACCEL_IPSEC_CAP_DEVICE && + if (mlx5_fpga_ipsec_device_caps(steering->dev) & MLX5_ACCEL_IPSEC_CAP_DEVICE && (table_type == FS_FT_NIC_RX || table_type == FS_FT_NIC_TX)) cmds = mlx5_fs_cmd_get_default_ipsec_fpga_cmds(table_type); @@ -2943,7 +2943,8 @@ int mlx5_init_fs(struct mlx5_core_dev *dev) goto err; } - if (MLX5_IPSEC_DEV(dev) || MLX5_CAP_FLOWTABLE_NIC_TX(dev, ft_support)) { + if (mlx5_fpga_ipsec_device_caps(steering->dev) & MLX5_ACCEL_IPSEC_CAP_DEVICE || + MLX5_CAP_FLOWTABLE_NIC_TX(dev, ft_support)) { err = init_egress_root_ns(steering); if (err) goto err; From patchwork Mon Apr 20 21:22:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 220914 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 52125C55181 for ; Mon, 20 Apr 2020 21:23:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1FF652084D for ; Mon, 20 Apr 2020 21:23:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="SjKTmKH7" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728166AbgDTVXI (ORCPT ); Mon, 20 Apr 2020 17:23:08 -0400 Received: from mail-eopbgr30051.outbound.protection.outlook.com ([40.107.3.51]:60862 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726050AbgDTVXH (ORCPT ); Mon, 20 Apr 2020 17:23:07 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KWeA6SnPK48Z9W10NfFs6mE0YuE2OSP7m5JypGtw2MYYvYfreP28P5Hp96cZctyOzt17x2PPkv00XOaozH+G9F/nCzEtmaHj/A2bt91TpsGdeiF6W1Pj7RXipWa/AsXXMb7+8oezkficBJsktZIBibLbe7qS3/2okO+6iE1WFBT1CawUEqd5UzA6F7ubdV0AQlEwR+diVhhAIWENkPgqaISWe9BoQV2O7yfZ5hQGHWY/eMqQ70Cv8b5zLj77TiZdbPoGHHZ6K7qVGlbuu0gEeSPuP3V1exKqluD6s5RSBoNd2Of2hTgCYeVDhtq9r9Zit48nY3LOrDeEBKCkAUhHUQ== 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=+k4anqKfDs3FuBKQwLKOfJY2m6CM6gXWVKiyJFxrdC8=; b=FMp91IvtvGwz+qBKUPmNCUVWWnzNp7UDUKTGiNW/v60k73eltov5H/3K41b2/g/xnq5KjBDlBqvSIOSWywYEn096SdDib8KQeyt1cONd/CcCsTXXj95UFwub15pFrymUUZg+PjcLjzhKs69vTtKR30dN6zh6vz3qgmMeWtJHIvTuILryGOYu6GXc+yjPa9hJITJJjQxVgQWT273EvxADy9nCjVUgiykpm1lefVFQxrieYNy/YS7adrkyUXtHAfPX6l8B9h1v9v+Ax5CW1pvwCadKTzGr8LZfm9Jm8uQvXYb2mdimY2y2wvXXneGWU2sh5IR10jkgAooqqNSxbenMqg== 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=+k4anqKfDs3FuBKQwLKOfJY2m6CM6gXWVKiyJFxrdC8=; b=SjKTmKH7uVxqHSceabSatyO02dZD8Kbmk/G/aMj+1p/hEj8vI1OhLbfAaDeU7Zm0mQhDHPWDrANcxR8ei/gWxUEjiJHlXVeC/BgTQOGoEECEvcs3nnuDnkBigHBoGCJWp9edTcVmigysfrBmvIyCXyRkha2NdxFYhv6jOgiSCD4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=saeedm@mellanox.com; Received: from VI1PR05MB5102.eurprd05.prod.outlook.com (2603:10a6:803:5e::23) by VI1PR05MB6478.eurprd05.prod.outlook.com (2603:10a6:803:f3::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.29; Mon, 20 Apr 2020 21:23:03 +0000 Received: from VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::9d19:a564:b84e:7c19]) by VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::9d19:a564:b84e:7c19%7]) with mapi id 15.20.2921.027; Mon, 20 Apr 2020 21:23:02 +0000 From: Saeed Mahameed To: "David S. Miller" , kuba@kernel.org Cc: netdev@vger.kernel.org, Raed Salem , Boris Pismenny , Huy Nguyen , Saeed Mahameed Subject: [net-next 03/10] net/mlx5: Refactor mlx5_accel_esp_create_hw_context parameter list Date: Mon, 20 Apr 2020 14:22:16 -0700 Message-Id: <20200420212223.41574-4-saeedm@mellanox.com> X-Mailer: git-send-email 2.25.3 In-Reply-To: <20200420212223.41574-1-saeedm@mellanox.com> References: <20200420212223.41574-1-saeedm@mellanox.com> X-ClientProxiedBy: BYAPR04CA0032.namprd04.prod.outlook.com (2603:10b6:a03:40::45) 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 BYAPR04CA0032.namprd04.prod.outlook.com (2603:10b6:a03:40::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.27 via Frontend Transport; Mon, 20 Apr 2020 21:22:59 +0000 X-Mailer: git-send-email 2.25.3 X-Originating-IP: [73.15.39.150] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 6dfa0b32-efef-4a24-a3b6-08d7e5710177 X-MS-TrafficTypeDiagnostic: VI1PR05MB6478:|VI1PR05MB6478: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-Forefront-PRVS: 03793408BA 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:(10009020)(4636009)(136003)(346002)(376002)(396003)(39860400002)(366004)(107886003)(6506007)(86362001)(2906002)(186003)(16526019)(26005)(4326008)(5660300002)(36756003)(316002)(1076003)(66556008)(478600001)(956004)(6666004)(66946007)(52116002)(66476007)(6512007)(6486002)(2616005)(54906003)(8676002)(8936002)(81156014)(54420400002); DIR:OUT; SFP:1101; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yfZt31iXW8pgaNHmXPgYK7kmJXIWJrHiZ7xcuMtO8vB8zcdRRKn3EdxfM0AeiL6Q6aU/2CaZp4o1YjjzwezViNea7jX77CIiuz/VNH+sK7Y4pr9GsW79llk9R2renuaBfHoQp+2QFIPNBsci/ZOd8rtfmIn7CwLfE1FfGpByO82ztJ3iyBI3f3QhKxHXKD9Ut0pfUXN7iPp0Cds6oBZE6TmNo2CeStEoY+pJkuaZYS6C9Ge7qS/52NGcXO75IpIFnMLLQJS6eDK0/z+by7lupsnDMlXnQPWHHVfXoBY9602bmwxc0J0LG4Y14+PTnJJBVXFXhCY85c8aSAJEMM3zod4pZPucY16rXI+EFOT43WpuU20iHifULN/ydCGN1m53PORje/GXDbSQqz1c8pNW96cHTD24dnPgSgWDfg4mC7EbCTPJwI9Sq7jgVCstLWwoABAJ2WKLFEa346fVPmu6zKtNe+ZM73vtGkzkW4D5LJ+E3SabKAWrdYpFEZPXyCdD X-MS-Exchange-AntiSpam-MessageData: m2Oq3eXbN5VDXfRK4ZovSMRRcCFTEpYtD/51ixLc9zd9v0ZMLckVLAmRnmoSjwuDlSNEg1T3ILIEHALVgTDpb9qkyMnloDluiRQgYuX1VIQjACo1767kLrUareh3Yqshm+6wDUdBGoS1dF+ZRyVv6g== X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6dfa0b32-efef-4a24-a3b6-08d7e5710177 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2020 21:23:02.8389 (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: crrKZfgE15dwwpiGa0yyhmM7jjyxPmvA/kF9m8HnNm4Lqi1UNUZyPXwxykRXyR0C+5r7Sd6Fe4ZXOjLvLEjI3g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB6478 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Raed Salem Currently the FPGA IPsec is the only hw implementation of the IPsec acceleration api, and so the mlx5_accel_esp_create_hw_context was wrongly made to suit this HW api, among other in its parameter list and some of its parameter endianness. This implementation might not be suitable for different HW. Refactor by group and pass all function arguments of mlx5_accel_esp_create_hw_context in common mlx5_accel_esp_xfrm_attrs struct field of mlx5_accel_esp_xfrm struct and correct the endianness according to the HW being called. Signed-off-by: Raed Salem Reviewed-by: Boris Pismenny Reviewed-by: Huy Nguyen Signed-off-by: Saeed Mahameed --- .../ethernet/mellanox/mlx5/core/accel/ipsec.c | 20 +++++++++++----- .../ethernet/mellanox/mlx5/core/accel/ipsec.h | 10 ++------ .../mellanox/mlx5/core/en_accel/ipsec.c | 23 ++++++++----------- include/linux/mlx5/accel.h | 12 ++++++++++ 4 files changed, 37 insertions(+), 28 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/accel/ipsec.c b/drivers/net/ethernet/mellanox/mlx5/core/accel/ipsec.c index eddc34e4a762..a92cd88d369c 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/accel/ipsec.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/accel/ipsec.c @@ -57,13 +57,21 @@ int mlx5_accel_ipsec_counters_read(struct mlx5_core_dev *mdev, u64 *counters, } void *mlx5_accel_esp_create_hw_context(struct mlx5_core_dev *mdev, - struct mlx5_accel_esp_xfrm *xfrm, - const __be32 saddr[4], - const __be32 daddr[4], - const __be32 spi, bool is_ipv6) + struct mlx5_accel_esp_xfrm *xfrm) { - return mlx5_fpga_ipsec_create_sa_ctx(mdev, xfrm, saddr, daddr, - spi, is_ipv6); + __be32 saddr[4] = {}, daddr[4] = {}; + + if (!xfrm->attrs.is_ipv6) { + saddr[3] = xfrm->attrs.saddr.a4; + daddr[3] = xfrm->attrs.daddr.a4; + } else { + memcpy(saddr, xfrm->attrs.saddr.a6, sizeof(saddr)); + memcpy(daddr, xfrm->attrs.daddr.a6, sizeof(daddr)); + } + + return mlx5_fpga_ipsec_create_sa_ctx(mdev, xfrm, saddr, + daddr, xfrm->attrs.spi, + xfrm->attrs.is_ipv6); } void mlx5_accel_esp_free_hw_context(void *context) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/accel/ipsec.h b/drivers/net/ethernet/mellanox/mlx5/core/accel/ipsec.h index 530e428d46ab..f9b8e2a041c1 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/accel/ipsec.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/accel/ipsec.h @@ -47,10 +47,7 @@ int mlx5_accel_ipsec_counters_read(struct mlx5_core_dev *mdev, u64 *counters, unsigned int count); void *mlx5_accel_esp_create_hw_context(struct mlx5_core_dev *mdev, - struct mlx5_accel_esp_xfrm *xfrm, - const __be32 saddr[4], - const __be32 daddr[4], - const __be32 spi, bool is_ipv6); + struct mlx5_accel_esp_xfrm *xfrm); void mlx5_accel_esp_free_hw_context(void *context); int mlx5_accel_ipsec_init(struct mlx5_core_dev *mdev); @@ -63,10 +60,7 @@ void mlx5_accel_ipsec_cleanup(struct mlx5_core_dev *mdev); static inline void * mlx5_accel_esp_create_hw_context(struct mlx5_core_dev *mdev, - struct mlx5_accel_esp_xfrm *xfrm, - const __be32 saddr[4], - const __be32 daddr[4], - const __be32 spi, bool is_ipv6) + struct mlx5_accel_esp_xfrm *xfrm) { return NULL; } diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c index 29626c6c9c25..9e6c2216c93e 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c @@ -199,6 +199,14 @@ mlx5e_ipsec_build_accel_xfrm_attrs(struct mlx5e_ipsec_sa_entry *sa_entry, attrs->flags |= (x->props.mode == XFRM_MODE_TRANSPORT) ? MLX5_ACCEL_ESP_FLAGS_TRANSPORT : MLX5_ACCEL_ESP_FLAGS_TUNNEL; + + /* spi */ + attrs->spi = x->id.spi; + + /* source , destination ips */ + memcpy(&attrs->saddr, x->props.saddr.a6, sizeof(attrs->saddr)); + memcpy(&attrs->daddr, x->id.daddr.a6, sizeof(attrs->daddr)); + attrs->is_ipv6 = (x->props.family != AF_INET); } static inline int mlx5e_xfrm_validate_state(struct xfrm_state *x) @@ -284,8 +292,6 @@ static int mlx5e_xfrm_add_state(struct xfrm_state *x) struct net_device *netdev = x->xso.dev; struct mlx5_accel_esp_xfrm_attrs attrs; struct mlx5e_priv *priv; - __be32 saddr[4] = {0}, daddr[4] = {0}, spi; - bool is_ipv6 = false; int err; priv = netdev_priv(netdev); @@ -331,20 +337,9 @@ static int mlx5e_xfrm_add_state(struct xfrm_state *x) } /* create hw context */ - if (x->props.family == AF_INET) { - saddr[3] = x->props.saddr.a4; - daddr[3] = x->id.daddr.a4; - } else { - memcpy(saddr, x->props.saddr.a6, sizeof(saddr)); - memcpy(daddr, x->id.daddr.a6, sizeof(daddr)); - is_ipv6 = true; - } - spi = x->id.spi; sa_entry->hw_context = mlx5_accel_esp_create_hw_context(priv->mdev, - sa_entry->xfrm, - saddr, daddr, spi, - is_ipv6); + sa_entry->xfrm); if (IS_ERR(sa_entry->hw_context)) { err = PTR_ERR(sa_entry->hw_context); goto err_xfrm; diff --git a/include/linux/mlx5/accel.h b/include/linux/mlx5/accel.h index 5613e677a5f9..b919d143a9a6 100644 --- a/include/linux/mlx5/accel.h +++ b/include/linux/mlx5/accel.h @@ -92,6 +92,18 @@ struct mlx5_accel_esp_xfrm_attrs { union { struct aes_gcm_keymat aes_gcm; } keymat; + + union { + __be32 a4; + __be32 a6[4]; + } saddr; + + union { + __be32 a4; + __be32 a6[4]; + } daddr; + + u8 is_ipv6; }; struct mlx5_accel_esp_xfrm { From patchwork Mon Apr 20 21:22:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 220912 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 E583CC55181 for ; Mon, 20 Apr 2020 21:23:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B8F50207FC for ; Mon, 20 Apr 2020 21:23:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="Q7ofIc8N" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728040AbgDTVXx (ORCPT ); Mon, 20 Apr 2020 17:23:53 -0400 Received: from mail-eopbgr30068.outbound.protection.outlook.com ([40.107.3.68]:52910 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726056AbgDTVXv (ORCPT ); Mon, 20 Apr 2020 17:23:51 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GtoESOjB4s7oUS84PYiCCf8lApHUanmtFBo9T36TuNll2p9oAlITNt/V+SdL0AKLWhgp4i3PMy607uLJnZaklHmPIuzUbQjyt8QR1Qgp55HMSmuLZfNZ8tEzI5Ik2HBIA2ZZSFr92r03jU3thLUy1iqjnvtn2Fk2mTsVSjH52K9ZAXQ3B6jEBImJLj8AbqprfdBKgiHC+78McqFSS+OIXmGl+lqyW8wmZ/pBdBwupu35rRTLwnPFQzBXV1GdxLO9MAwI7p3gGIkBQkR5nzuqFUgOOGIVrppOFUjioPVY3LBm7yoR1/EzuRpLYOyL61OvPUsPhM8N83bIEhUk/b7DWQ== 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=7qtG1Lqhm1Sp3q1WZ4RvsGlSHfMs/aMQ6Jku+ORGr60=; b=Jz5vZAGm781AqNjZHjMjVWpsqHP9kdRGQQU3uA1E0q/Bo/G2p0VujVSxKDZV/rddBKl+Vp2brv3I1iXWKmKIov5sSbSVBKG/dQmXCRjphPsgCt8ehPMpo3ceZwEVbn7yIarO/SkJ6JmXMm9nFYsIq3R6em1dnT309PCS/L0PXB1JLXFk5WN84IXXaqwcEQXcf8enLPlyhO2jCNEQ3bjGz514yEzAULhQDhp11vQfgv/nsqukhmW5dTUJ4q+7fHBAjyv5t4d/8TwKfHc1oUWUwuZ4AKe77xNyTD1xrh+S+f0JuZu3G0z8soGVmlubOOCF2cb3wu/nksed4uLyblFovg== 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=7qtG1Lqhm1Sp3q1WZ4RvsGlSHfMs/aMQ6Jku+ORGr60=; b=Q7ofIc8NeZZDuoP6hHxh30yeTqgMaAhu2Dp6wAfkL8/v098ZaCrB2PdbMxOt+jdtKNqHce/IB41uuyQonL2Vxljlz/KdB5Wk5rR3M+Ub+Y5zMwHokMO6S4OZLsGrR/YWNQixtzTK9hvxRaPuPx2tvJcbIkUKsyhCQ9iBDoa3K/A= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=saeedm@mellanox.com; Received: from VI1PR05MB5102.eurprd05.prod.outlook.com (2603:10a6:803:5e::23) by VI1PR05MB6478.eurprd05.prod.outlook.com (2603:10a6:803:f3::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.29; Mon, 20 Apr 2020 21:23:13 +0000 Received: from VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::9d19:a564:b84e:7c19]) by VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::9d19:a564:b84e:7c19%7]) with mapi id 15.20.2921.027; Mon, 20 Apr 2020 21:23:13 +0000 From: Saeed Mahameed To: "David S. Miller" , kuba@kernel.org Cc: netdev@vger.kernel.org, Roi Dayan , Paul Blakey , Saeed Mahameed Subject: [net-next 07/10] net/mlx5e: Allow partial data mask for tunnel options Date: Mon, 20 Apr 2020 14:22:20 -0700 Message-Id: <20200420212223.41574-8-saeedm@mellanox.com> X-Mailer: git-send-email 2.25.3 In-Reply-To: <20200420212223.41574-1-saeedm@mellanox.com> References: <20200420212223.41574-1-saeedm@mellanox.com> X-ClientProxiedBy: BYAPR04CA0032.namprd04.prod.outlook.com (2603:10b6:a03:40::45) 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 BYAPR04CA0032.namprd04.prod.outlook.com (2603:10b6:a03:40::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.27 via Frontend Transport; Mon, 20 Apr 2020 21:23:11 +0000 X-Mailer: git-send-email 2.25.3 X-Originating-IP: [73.15.39.150] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: e8132df1-1e88-496f-c6d0-08d7e5710837 X-MS-TrafficTypeDiagnostic: VI1PR05MB6478:|VI1PR05MB6478: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-Forefront-PRVS: 03793408BA 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:(10009020)(4636009)(136003)(346002)(376002)(396003)(39860400002)(366004)(107886003)(6506007)(86362001)(2906002)(186003)(16526019)(26005)(4326008)(5660300002)(36756003)(316002)(1076003)(66556008)(478600001)(956004)(6666004)(66946007)(52116002)(66476007)(6512007)(6486002)(2616005)(54906003)(8676002)(8936002)(81156014)(54420400002); DIR:OUT; SFP:1101; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: naw/aKg/pPV+yKBwQ4bDq5XX08+aFRFLdPyvk+yxNfMBb6v4Es2N8SbOTyUvt5CTwIJB06+hTIMRymFIOB/m9b7YeQ9C66EneEWPiKVxTgUSsaSLhwQQKeddEbyfzN3i7aiWVEah6x+BOE+BDgscdZ2PFsRq3bnMmWKcBfR/mDXBhrA+4C5cbV6julVMSIn2dUjr68befv9C6L6aaLKYetO2OKAggKTMsbFesK3nlj7kAI2kANEg4KWdT9qpjwff4Bky8kwIj2f1pcFW0e1sipJ5dD0TiVmu/ZQdkN3WPmd1jSstTzdp+V33frffFjV+P5yTvBj1vN8IW8+dKzRHbu6z1a5Iwsz6ZJuCwMObqpG5zzCdC3eAwWBBEZg9krCrwjnk74L6VDU4iX+7ZwdeMH1XUCVgrBdflrn17rOkwn9BmryGc0pAWq0A3XFdOd/KNxBIvHiRSSBP8NfrxsxGDYfOii1rLQfa+Da6FtxVjwjgl+nDz+4IdqGsNlL9GfaR X-MS-Exchange-AntiSpam-MessageData: b0Z46pmEC6T6SYEgB4lPdmXR0B7wSVQKg5ndRnIqYXW6c+qBqnJfjjrMP6m+DRDz6hnYqE2BWH6DZsoDbiyQx7pPMubJqVxbUrxbWu+iQuBoYRnQ5Io+hj1UEhSswVzZ1ME3UWgZ0Q/jtNHEyhycUA== X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: e8132df1-1e88-496f-c6d0-08d7e5710837 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2020 21:23:13.0501 (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: k2XTe0H9xsx7ehenFU1OlXoDDJk9zYBZuBgwGPdhrmW98fqaZUkB8t4lDx3lrxyPI8zbzDXHZA/+3K+T8S4YIA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB6478 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Roi Dayan We use mapping to save and restore the tunnel options. Save also the tunnel options mask. Signed-off-by: Roi Dayan Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/en_tc.c | 32 +++++++++++++------ 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c index a574c588269a..7d2b05576f44 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c @@ -171,6 +171,11 @@ struct tunnel_match_key { int filter_ifindex; }; +struct tunnel_match_enc_opts { + struct flow_dissector_key_enc_opts key; + struct flow_dissector_key_enc_opts mask; +}; + /* Tunnel_id mapping is TUNNEL_INFO_BITS + ENC_OPTS_BITS. * Upper TUNNEL_INFO_BITS for general tunnel info. * Lower ENC_OPTS_BITS bits for enc_opts. @@ -1824,9 +1829,7 @@ enc_opts_is_dont_care_or_full_match(struct mlx5e_priv *priv, *dont_care = false; if (opt->opt_class != U16_MAX || - opt->type != U8_MAX || - memchr_inv(opt->opt_data, 0xFF, - opt->length * 4)) { + opt->type != U8_MAX) { NL_SET_ERR_MSG(extack, "Partial match of tunnel options in chain > 0 isn't supported"); netdev_warn(priv->netdev, @@ -1863,6 +1866,7 @@ static int mlx5e_get_flow_tunnel_id(struct mlx5e_priv *priv, struct mlx5_esw_flow_attr *attr = flow->esw_attr; struct mlx5e_tc_mod_hdr_acts *mod_hdr_acts; struct flow_match_enc_opts enc_opts_match; + struct tunnel_match_enc_opts tun_enc_opts; struct mlx5_rep_uplink_priv *uplink_priv; struct mlx5e_rep_priv *uplink_rpriv; struct tunnel_match_key tunnel_key; @@ -1905,8 +1909,14 @@ static int mlx5e_get_flow_tunnel_id(struct mlx5e_priv *priv, goto err_enc_opts; if (!enc_opts_is_dont_care) { + memset(&tun_enc_opts, 0, sizeof(tun_enc_opts)); + memcpy(&tun_enc_opts.key, enc_opts_match.key, + sizeof(*enc_opts_match.key)); + memcpy(&tun_enc_opts.mask, enc_opts_match.mask, + sizeof(*enc_opts_match.mask)); + err = mapping_add(uplink_priv->tunnel_enc_opts_mapping, - enc_opts_match.key, &enc_opts_id); + &tun_enc_opts, &enc_opts_id); if (err) goto err_enc_opts; } @@ -4707,7 +4717,7 @@ void mlx5e_tc_nic_cleanup(struct mlx5e_priv *priv) int mlx5e_tc_esw_init(struct rhashtable *tc_ht) { - const size_t sz_enc_opts = sizeof(struct flow_dissector_key_enc_opts); + const size_t sz_enc_opts = sizeof(struct tunnel_match_enc_opts); struct mlx5_rep_uplink_priv *uplink_priv; struct mlx5e_rep_priv *priv; struct mapping_ctx *mapping; @@ -4802,7 +4812,7 @@ static bool mlx5e_restore_tunnel(struct mlx5e_priv *priv, struct sk_buff *skb, u32 tunnel_id) { struct mlx5_eswitch *esw = priv->mdev->priv.eswitch; - struct flow_dissector_key_enc_opts enc_opts = {}; + struct tunnel_match_enc_opts enc_opts = {}; struct mlx5_rep_uplink_priv *uplink_priv; struct mlx5e_rep_priv *uplink_rpriv; struct metadata_dst *tun_dst; @@ -4840,7 +4850,7 @@ static bool mlx5e_restore_tunnel(struct mlx5e_priv *priv, struct sk_buff *skb, } } - tun_dst = tun_rx_dst(enc_opts.len); + tun_dst = tun_rx_dst(enc_opts.key.len); if (!tun_dst) { WARN_ON_ONCE(true); return false; @@ -4854,9 +4864,11 @@ static bool mlx5e_restore_tunnel(struct mlx5e_priv *priv, struct sk_buff *skb, key32_to_tunnel_id(key.enc_key_id.keyid), TUNNEL_KEY); - if (enc_opts.len) - ip_tunnel_info_opts_set(&tun_dst->u.tun_info, enc_opts.data, - enc_opts.len, enc_opts.dst_opt_type); + if (enc_opts.key.len) + ip_tunnel_info_opts_set(&tun_dst->u.tun_info, + enc_opts.key.data, + enc_opts.key.len, + enc_opts.key.dst_opt_type); skb_dst_set(skb, (struct dst_entry *)tun_dst); dev = dev_get_by_index(&init_net, key.filter_ifindex); From patchwork Mon Apr 20 21:22:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 220913 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 A8887C55181 for ; Mon, 20 Apr 2020 21:23:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7D7C02084D for ; Mon, 20 Apr 2020 21:23:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="SzvdWS6e" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728276AbgDTVXU (ORCPT ); Mon, 20 Apr 2020 17:23:20 -0400 Received: from mail-vi1eur05on2042.outbound.protection.outlook.com ([40.107.21.42]:29847 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726457AbgDTVXU (ORCPT ); Mon, 20 Apr 2020 17:23:20 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ncrJUEmipH0/Fntr21cdsD71wJGpTfrMzkwEqiDNiM7u8brW15z1DLiNtEITBcKrtBCjSF2Mml0hXh7gQOkg9XQwlx7UeeDhDwt5GYktzf6hcorJYKaqLptvKjJkVmqfeOFPBgQ2W+JQz9vlCJZ5D+WqUiDI40xHtVD0sRf6gGv0UOYO1wgooFZZ0imVcc3xRlgH2VbOCE5sFI8BkcH9bsRG8LqO7peRwoct8M7QkglMIwlRTbmRzg7zpQPs++CJT6YYZBsieF/Bi/LPTgI/xg0oLKuyxYz27Pot+QppSojO/mMKPxjbvT4VBXwWsVIMrq5hjOfhctKmnq31dn/jDQ== 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=HyGwYGwCRTjPtIEQ82Spsc3NYfL+kmVx6TcNy/V2L7M=; b=N9bfSJfKOQ8Oj9hlutl27WLRr5LlRxbjawjOVzSQfNYTsNv2hTd5jPPwSCQUfUag1ZVEk1VU47mm3hErh5GgJIYeUDObQT5hzdWzFIhbvzJf/WRcmQIgVRDEAVjvzALO5bf6dN8CjIFuQ6SzQEMnyWPLJ0bH264uPq0kyhlO305IhMNxZ0HrO/XavA1c55kwb5vdQsRVmS6g8QXTf8GkOeRIBqIG+xgbye9LZl/3YWR65l0TcMctLPFLSbeJhZfs/3nJ5Qm1LQ+DfoS1EsXuDgLXyXq62ZFib7qX42gjdhdCmFfFtkv2qWw79o04/03u00Addt0kQbJuYiWNbioNbg== 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=HyGwYGwCRTjPtIEQ82Spsc3NYfL+kmVx6TcNy/V2L7M=; b=SzvdWS6eYRcEuN4g2jZScEnnlPDd9E9sZ1lx8aw3zTuGbeiFxxsI00Qzby3rP95guLobvvlUXdJx5Q9cJ5eXJ5ztacMhX9YKFC4wtrXiNN3VJZ3daLB3rcKN0V7SA94+xeOoLJU2RzptueiiTuxF3g4fOdy/8enDXr0SeOtiM10= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=saeedm@mellanox.com; Received: from VI1PR05MB5102.eurprd05.prod.outlook.com (2603:10a6:803:5e::23) by VI1PR05MB6382.eurprd05.prod.outlook.com (2603:10a6:803:ff::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.28; Mon, 20 Apr 2020 21:23:17 +0000 Received: from VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::9d19:a564:b84e:7c19]) by VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::9d19:a564:b84e:7c19%7]) with mapi id 15.20.2921.027; Mon, 20 Apr 2020 21:23:17 +0000 From: Saeed Mahameed To: "David S. Miller" , kuba@kernel.org Cc: netdev@vger.kernel.org, Parav Pandit , Bodong Wang , Saeed Mahameed Subject: [net-next 09/10] net/mlx5: Read embedded cpu bit only once Date: Mon, 20 Apr 2020 14:22:22 -0700 Message-Id: <20200420212223.41574-10-saeedm@mellanox.com> X-Mailer: git-send-email 2.25.3 In-Reply-To: <20200420212223.41574-1-saeedm@mellanox.com> References: <20200420212223.41574-1-saeedm@mellanox.com> X-ClientProxiedBy: BYAPR04CA0032.namprd04.prod.outlook.com (2603:10b6:a03:40::45) 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 BYAPR04CA0032.namprd04.prod.outlook.com (2603:10b6:a03:40::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.27 via Frontend Transport; Mon, 20 Apr 2020 21:23:15 +0000 X-Mailer: git-send-email 2.25.3 X-Originating-IP: [73.15.39.150] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 93969138-ae47-47df-e595-08d7e5710ada X-MS-TrafficTypeDiagnostic: VI1PR05MB6382:|VI1PR05MB6382: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:343; X-Forefront-PRVS: 03793408BA 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:(10009020)(4636009)(346002)(396003)(376002)(136003)(39860400002)(366004)(6486002)(54906003)(956004)(186003)(8936002)(16526019)(52116002)(26005)(6512007)(2616005)(81156014)(6506007)(8676002)(478600001)(1076003)(2906002)(36756003)(316002)(4326008)(66476007)(66946007)(66556008)(107886003)(6666004)(86362001)(5660300002)(54420400002); DIR:OUT; SFP:1101; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wBSrTq64AoPfgFdPqQyVcHUjUfxmpvEE9o61D6JsYVHvmagHntNew4ALXrWMqMOxeAgqlrcZc33efhexKsli6BjX4IQtxe3G1JWLf3B/D6vyjohOWb69fKyZolyyasu0/5/I0qoo5dN9dPi4fs3gxZbR4DvSHEqO0wjdlF6SNEtnB1kiKEzIgveiaCEc0Y4KP+EF3J+kcvEFff2EqlwAKmsLCAgn/sY3+5HDPJ67ftOM44UHoYU6fc7g884HrJAcakFUmBIIyQu1iibDaCeEJs6dUyLyK4paZNEOnE4l05jDnPY7oZPFRLnAVRFzlXi34kHRN06mmSSg/Ry05XpHH7aVZ4/erxe0rncTzHLfyEVrRnIFNwYga87uIRr6TzZcUV0fYVpuWos4wnpmBExWnV+NXHG3eFyUWDNlkE4Dfl3P3nSFQL8GiYqNd0l/Ib9R+Pu19KBIWicxLkz/DnplrgEUm6MiFQyjcJJOJ11K2UtWyjmH3MVs1BhjAo/1QsZR X-MS-Exchange-AntiSpam-MessageData: TX3E/txXUXoP8N64JJEM3PCfGPAM/3Jgnxwmgq5PwvUu0Z9/PF8wlBGp59c/g1/glXdmwScJdLV1evncpsq0cUQY4YLpb6D8Jyz+3AVjG9A7+eEzIWSL7HJQl4UcL3ta5Zg6UymrFz52XKiUfQmocQ== X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 93969138-ae47-47df-e595-08d7e5710ada X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2020 21:23:17.6784 (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: CXK1vWdFgi6C9jpB4i8tKfH6LKxWQ9+grQPfoI4me29CA1SWILoWMzouwPrK+NKzGGZ07LEDwQPTAAiyf3ykgQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB6382 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Parav Pandit Embedded CPU bit doesn't change with PCI resume/suspend. Hence read it only once while probing the PCI device. Signed-off-by: Parav Pandit Reviewed-by: Bodong Wang Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c index 7af4210c1b96..5a97e98e937c 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c @@ -782,7 +782,7 @@ static int mlx5_pci_init(struct mlx5_core_dev *dev, struct pci_dev *pdev, } mlx5_pci_vsc_init(dev); - + dev->caps.embedded_cpu = mlx5_read_embedded_cpu(dev); return 0; err_clr_master: @@ -1180,7 +1180,6 @@ int mlx5_load_one(struct mlx5_core_dev *dev, bool boot) { int err = 0; - dev->caps.embedded_cpu = mlx5_read_embedded_cpu(dev); mutex_lock(&dev->intf_state_mutex); if (test_bit(MLX5_INTERFACE_STATE_UP, &dev->intf_state)) { mlx5_core_warn(dev, "interface is up, NOP\n"); From patchwork Mon Apr 20 21:22:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 220911 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 9BF2EC54FD0 for ; Mon, 20 Apr 2020 21:23:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 718E220782 for ; Mon, 20 Apr 2020 21:23:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="Y8Kj/LnV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728285AbgDTVX6 (ORCPT ); Mon, 20 Apr 2020 17:23:58 -0400 Received: from mail-eopbgr30068.outbound.protection.outlook.com ([40.107.3.68]:52910 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726056AbgDTVX5 (ORCPT ); Mon, 20 Apr 2020 17:23:57 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fMXnq2MelJN5NlHbJ7AtM/7xK/6iZ1KX8u+j64Ern0XMUrUPa3prCPSuC8vF+oF3z8yLbftQhbRVihgY4XQFJxhoyQV8pWqfE/yvWCu0Ws08VILgNiVsP84c+4mMqhI8Wlj+qm6sVa9u/O3I/CZfTKUrtBuctomGuKB7xoL13VwKFoFhMXh46nRyLqRE80Ce3KvoXGyKmOGFW//rUf0ZaluH7U4PNkKs9Y95WwlfQEt2XmYkS4EldHNpv+nex8BE/FrSGwRw5ayyLjZ4SCKEdGt3nY+tXNpiXXIK7eiyJ5Ly2DmhrOHiF7feFAjbqOYIX3KBAesWvFraQmVLF6Ycyg== 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=q6/knVzbPmrOFjfjjDSorwuQC49iwOEqKl+wa1qmOEI=; b=h1Mths269hSr7KddFk0XebJQqM/zZuEsUefetA7Jr3SsdJkourYWlSFjuo1kDGDjYrrpZsgbdHWR5RZpsyuRqYV5FYObbcW+817FwWHZ+yUYbkmFrOkHpV/3kGED0OYMUaxAMkoaevSDBEyKic8NNCU4q9KlP658JBaOg0hYC2ZdTVWn5Gj719ibwFZbDwIaNwklCfMN1+1+MVVZjcB463wf6C2Bc8RAgwspLxzEiUe2F+iIxJzjfb8lgX3QQINbfKTI/eFPO7iA/vb3Rq3Th8nZRULSzlBJmXpNkNqg36I+B9qHSnPJ6Gu07cnOBEflMvWgAXV0uto+Y7wg5H4VrA== 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=q6/knVzbPmrOFjfjjDSorwuQC49iwOEqKl+wa1qmOEI=; b=Y8Kj/LnVe7D4jLh5uJRws+3ETBf82OoKZJrYexuh4HirC/u+gTKl1QAH7de4VwbUshcfq47zkhxSHj5F2gjRxF9kCXuCnrZ2phnXVBxePK9NSJ+gTIZYrVS8GTSrAdJGNceSnZeCHhh1bpy8OjKqzSC0004ZjLZSF9ntHs7FCOs= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=saeedm@mellanox.com; Received: from VI1PR05MB5102.eurprd05.prod.outlook.com (2603:10a6:803:5e::23) by VI1PR05MB6478.eurprd05.prod.outlook.com (2603:10a6:803:f3::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.29; Mon, 20 Apr 2020 21:23:20 +0000 Received: from VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::9d19:a564:b84e:7c19]) by VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::9d19:a564:b84e:7c19%7]) with mapi id 15.20.2921.027; Mon, 20 Apr 2020 21:23:20 +0000 From: Saeed Mahameed To: "David S. Miller" , kuba@kernel.org Cc: netdev@vger.kernel.org, Hu Haowen , Saeed Mahameed Subject: [net-next 10/10] net/mlx5: improve some comments Date: Mon, 20 Apr 2020 14:22:23 -0700 Message-Id: <20200420212223.41574-11-saeedm@mellanox.com> X-Mailer: git-send-email 2.25.3 In-Reply-To: <20200420212223.41574-1-saeedm@mellanox.com> References: <20200420212223.41574-1-saeedm@mellanox.com> X-ClientProxiedBy: BYAPR04CA0032.namprd04.prod.outlook.com (2603:10b6:a03:40::45) 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 BYAPR04CA0032.namprd04.prod.outlook.com (2603:10b6:a03:40::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.27 via Frontend Transport; Mon, 20 Apr 2020 21:23:18 +0000 X-Mailer: git-send-email 2.25.3 X-Originating-IP: [73.15.39.150] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 479b43d8-f882-4d20-917b-08d7e5710c28 X-MS-TrafficTypeDiagnostic: VI1PR05MB6478:|VI1PR05MB6478: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-Forefront-PRVS: 03793408BA 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:(10009020)(4636009)(136003)(346002)(376002)(396003)(39860400002)(366004)(107886003)(6506007)(86362001)(2906002)(186003)(16526019)(26005)(4326008)(5660300002)(36756003)(316002)(1076003)(66556008)(478600001)(956004)(6666004)(66946007)(52116002)(66476007)(6512007)(6486002)(2616005)(54906003)(8676002)(8936002)(81156014)(54420400002); DIR:OUT; SFP:1101; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BQFjUKQ0d3gsQAf6fjU2nsJs9iqKYoprJmDfIIscZNmJlxD1rLpzpBoJCRmlgfQmg/1cYG7gWwldzE4B/aMmMLR+5TM4tU4Hb9lttfqeZZvY0IIDtw7hd7VU2LB9JzIMfUU1czdwSMSnvlVFnuruzjcVLJQe6xnmdpa9rGLZHF98PKJCYU2kemKseVp/v/E31n+DR3ZvWTwulKxgfEyDiWlmxrpldQrYOphqj3myyMFTu4jl/kdeKzBUs1Zp7UhLABh6YCvgR2rmejIl7qfNG9FK6rQKUA4sXxzBr+/MwaJVWwEPlu/GMAiq/yBAUqBM0cU7fJrEdCHgD6ljg3I3eEujKmfdplZDBzJey6ZmwcBTR9J6WsrZ/vvD0zQmWBYOZKDvOt3ZGCg+erY3ng9WxQPqmS8kNIfVNso402mN7aKkESsZgWEijKKOX3wlqbofhSzbZpSjMvxb93fK8s1FCU3HQTAGqntTcobUI+LnyNS/KaaujZUp2Bh31qAcbkO4 X-MS-Exchange-AntiSpam-MessageData: 6+HIubMgU9hVqfKtouKfiVZD5CFH25IDNKP3yk3r92rIW0apIbSr5pZK+UsETek7ls4njVLH7Koy99YL3kBMGCFl78RyjpSbnKhVCOsJJ/GMf5hceL8FrhWuVFGCCN5qedjG4cLH8SR9Q4JHMKjDbA== X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 479b43d8-f882-4d20-917b-08d7e5710c28 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2020 21:23:19.9152 (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: SOkB6vCAofUUCRLwL3aVBYqcKH2dLS13bBlZKrYg3qq3xW1typBUHq6DPo3UtGNwhrwz7ptbn9RZJ9PHg0D6dw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB6478 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Hu Haowen Replaced "its" with "it's". Signed-off-by: Hu Haowen Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c b/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c index c9c9b479bda5..0a8adda073c2 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c @@ -684,7 +684,7 @@ static void mlx5_fw_tracer_handle_traces(struct work_struct *work) get_block_timestamp(tracer, &tmp_trace_block[TRACES_PER_BLOCK - 1]); while (block_timestamp > tracer->last_timestamp) { - /* Check block override if its not the first block */ + /* Check block override if it's not the first block */ if (!tracer->last_timestamp) { u64 *ts_event; /* To avoid block override be the HW in case of buffer