From patchwork Wed May 26 09:57:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tariq Toukan X-Patchwork-Id: 12281151 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=-19.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,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 1F719C2B9F7 for ; Wed, 26 May 2021 09:58:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E423661440 for ; Wed, 26 May 2021 09:58:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233762AbhEZJ7u (ORCPT ); Wed, 26 May 2021 05:59:50 -0400 Received: from mail-bn8nam12on2082.outbound.protection.outlook.com ([40.107.237.82]:7648 "EHLO NAM12-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233264AbhEZJ7n (ORCPT ); Wed, 26 May 2021 05:59:43 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lswFct16koTUBT+5VbGSOevPpM9nksn5oEmo7e5Fanpba7B65mDIwtZ9q9xbHO+l/9Z2BUEpw+wx6sJ9occbnlInBSbH+9h0cMIbrgQt5ERbYLMzbM7HOyGCbdjpdT16OGITr5qxVOWKGXbgYguZCFBttJY6lw1Mf0BeGODYj/E7GlTUW+vQJYsghtO8ZqFWl66UvpBaJY72IBc4wx0y2A7O7KNMKG1MpKrZfAm6lq+loY0rBiy69Dh5t27UjIYo0MDicZ1udfaDvedkUQUaYaUCbXlBHg3Lc4bCxsH6/qGbGQ7vCMkVq/QN8/IFBvcDC5cuVbb+TiqteN4KQbO6ZA== 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=/XzvUJqm9kbQ4S8OvilFXQU0ECjg2dIHQ13EJygsVQg=; b=dGN2TrJsiLHyukOPSEtrwCkcNTNFzyZJVt7ZoimhdIRfzXlN8lKVuvVhSkESfpK5neY8IzOcJtFms2RE7myrdIhwZgRC4g+ZK8PWdT5Lyd4klT/1PVSMHxTX9HGg1Ttp4Hd0fuu2LvHfhLznyGlSDhuFxu7WU6x+UrvSavyLRC0dBVWEsujRr/+gNKECKVzjrw0Zaz0RX6LCZsJ0yTVmrNxLsaGXp4k/eIv1qh+XyJLP8TXJ2FvEIeM3SsANLmSnUGH7OiJy4k8N35nPRw3wVHxjVsGNd6KhHxZeRWLw886UPflAUent9kxeKKb5UcBccZ2l5YGsPaHhZSACXbc02Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.36) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/XzvUJqm9kbQ4S8OvilFXQU0ECjg2dIHQ13EJygsVQg=; b=CELa7qj0XJ78QInLPrjUnBIM8dNtiInVfpa8d/c0VVpDy4E4r8KyTOT+obEuA7te65OlDUDuPaCdK9qE/n2J0HNaxRxh4S55hrd3EwcBTXMDZdjnuDRijEi1AVibPQRg+o5nKRl1WZ/8u93cUSpLtAjJ70RNrGfDwZV7TUFt93aIBlil8KZtDjU8J18MuhPiohOwWsonT4i5FFsIZBdec49SPUPiWvz+1GuFj3nKYkfdPIKoRZsfn8eBri+AHHzqGsmHequ7gYsnTaLgPW3AXW3UZO8pUlR9Becn1a063sDmp8vnIKsc4FNFAj1CZ3AqaSERjGY0ugsL1H911H68bw== Received: from BN1PR14CA0016.namprd14.prod.outlook.com (2603:10b6:408:e3::21) by DM6PR12MB2843.namprd12.prod.outlook.com (2603:10b6:5:48::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23; Wed, 26 May 2021 09:58:11 +0000 Received: from BN8NAM11FT052.eop-nam11.prod.protection.outlook.com (2603:10b6:408:e3:cafe::c8) by BN1PR14CA0016.outlook.office365.com (2603:10b6:408:e3::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.20 via Frontend Transport; Wed, 26 May 2021 09:58:11 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.36) smtp.mailfrom=nvidia.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.36 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.36; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.36) by BN8NAM11FT052.mail.protection.outlook.com (10.13.177.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4129.25 via Frontend Transport; Wed, 26 May 2021 09:58:10 +0000 Received: from HQMAIL105.nvidia.com (172.20.187.12) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 26 May 2021 09:58:10 +0000 Received: from vdi.nvidia.com (172.20.145.6) by mail.nvidia.com (172.20.187.12) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 26 May 2021 09:58:08 +0000 From: Tariq Toukan To: "David S. Miller" , Jakub Kicinski CC: , Moshe Shemesh , Boris Pismenny , Saeed Mahameed , Maxim Mikityanskiy , Tariq Toukan Subject: [RFC PATCH 1/6] net: Fix features skip in for_each_netdev_feature() Date: Wed, 26 May 2021 12:57:42 +0300 Message-ID: <20210526095747.22446-2-tariqt@nvidia.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20210526095747.22446-1-tariqt@nvidia.com> References: <20210526095747.22446-1-tariqt@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6113a137-da9c-4339-b082-08d9202cc542 X-MS-TrafficTypeDiagnostic: DM6PR12MB2843: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 47rk1Sf4Hx1gq39zKb8+1QGzCmwzFK83p5mCwifZvMCgHjzaZXH8s6t/jcqmII77uKlW0MSUhzPlzw5KSsYjtUlN1rusYwlF8+iYx+4cK9xq97JucXtErlQHKqrygzB95D3mydW6bVFAZL77pzT+HjlG+UwtH0vmRYqxMAZJrTn44+ePYR1JjI9XdAXHpo8CUW1IBjqI9H55IJP5NoGoJEQ7lfnTren5wCfcYf4i2sgMEIlApXxKdJIkA5xCKebBaEWWwwd7LtPVO4pJ51o1f3+byPx6KkmTxbF8Nh91AmCWTXS6P0A71hJNDHPvvOsEfa8ZQlvWYYjg/s2/BsPZOImVdiOVzKS/qxORRUxwCDFkQHtno/KJQKcQ919v97tnb9Rj2Gx55KtJ+V0+CSQ+CtqeQP/tJ5kJ6dCTS/X86VMtN+KrqLEJ4IiNGtCxYgY+8pGIvVYI6aqS/gpU9oNB9x6lWUZRYmOGp1KDdmPUtiAbW8Qb6VNwBN4INazhg4d9Al5aC1mXAsmYIq3ZsleULLi9Mg3dr9VZ6YIlUseEKiga8iydqrVX2zc/EpGUCHTqYffqVYW+0Nf1aZfec8GTwdp6/6F+IsQtDTsCGn8kvy9OWLyz1wjIskFqbA1pI/QelTZ3qgpiO6+VLCn1VPjnoX2JccjOJeCG3qCRg9G/eNc= X-Forefront-Antispam-Report: CIP:216.228.112.36;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:schybrid05.nvidia.com;CAT:NONE;SFS:(4636009)(346002)(39860400002)(376002)(136003)(396003)(46966006)(36840700001)(6666004)(110136005)(4326008)(478600001)(54906003)(2906002)(86362001)(356005)(8936002)(36860700001)(5660300002)(7696005)(36906005)(70206006)(70586007)(82310400003)(47076005)(316002)(2616005)(7636003)(186003)(8676002)(83380400001)(426003)(82740400003)(107886003)(36756003)(26005)(336012)(1076003);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 May 2021 09:58:10.7509 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6113a137-da9c-4339-b082-08d9202cc542 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.112.36];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT052.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB2843 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-State: RFC The find_next_netdev_feature() macro gets the "remaining length", not bit index. Passing "bit - 1" for the following iteration is wrong as it skips the adjacent bit. Pass "bit" instead. Fixes: 3b89ea9c5902 ("net: Fix for_each_netdev_feature on Big endian") Signed-off-by: Tariq Toukan --- include/linux/netdev_features.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h index 3de38d6a0aea..1a5f0c51bc99 100644 --- a/include/linux/netdev_features.h +++ b/include/linux/netdev_features.h @@ -169,7 +169,7 @@ enum { #define NETIF_F_HW_HSR_FWD __NETIF_F(HW_HSR_FWD) #define NETIF_F_HW_HSR_DUP __NETIF_F(HW_HSR_DUP) -/* Finds the next feature with the highest number of the range of start till 0. +/* Finds the next feature with the highest number of the range of start-1 till 0. */ static inline int find_next_netdev_feature(u64 feature, unsigned long start) { @@ -188,7 +188,7 @@ static inline int find_next_netdev_feature(u64 feature, unsigned long start) for ((bit) = find_next_netdev_feature((mask_addr), \ NETDEV_FEATURE_COUNT); \ (bit) >= 0; \ - (bit) = find_next_netdev_feature((mask_addr), (bit) - 1)) + (bit) = find_next_netdev_feature((mask_addr), (bit))) /* Features valid for ethtool to change */ /* = all defined minus driver/device-class-related */ From patchwork Wed May 26 09:57:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tariq Toukan X-Patchwork-Id: 12281153 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=-19.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,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 4CD7BC47082 for ; Wed, 26 May 2021 09:58:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 28DA961437 for ; Wed, 26 May 2021 09:58:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233767AbhEZJ7v (ORCPT ); Wed, 26 May 2021 05:59:51 -0400 Received: from mail-dm6nam11on2076.outbound.protection.outlook.com ([40.107.223.76]:12576 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233728AbhEZJ7q (ORCPT ); Wed, 26 May 2021 05:59:46 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KLjYvPv8bIrqD7hINYjbAppa9y3GsUldZeBsr+eD6jyjbvwWl8Doi/x6YFFRpmr+/4b9O+D8R05RfX8SIZZuE8ckMB/S902CmhbcQPgwbBbowqYa+hFlBk+7iXOSCLRShAV/VL0+f+L2PHcshFWAGYpDPCickUs1Ls8oPpr6PBOZst7McxzHNIKbnBEEhQrkuyVWZwQBZq/XLmYieTjSsVfuLIdmMSx/X5h71LwZT2OOVx6+vEMS87Rxir12s2Kn0LFg9MnE6fqpQSgIiHR9NFvK4c2+jRSmnbwpd9rfLc8677LYzSUV5AIIKIB4Tr37laIwHBSWaNa1KO19/xyygg== 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=LSo3G/SuWkPTSEBHC/GXh45A5rwT6sIQjXRYBwqHJWA=; b=hEwLUOZAUKCahwlPT6heSLpd69ne1ROsjctiUzKZytVs/aK4YH6vuq3wKA1KzojgUq9EV1K0YCxhfmDfiESsQL+0QTDCo7h3CDGDsxaAb/TJ3ebVDcI9wySehI8tYpSUKvD7bxxis9W39ftT/FsmyH+a8/tsU2gU9kVZXXS4Sthl9nOdoS+6jguNcUA1COz0Vbm8H6ehBGPX2lXfh4uGMHo0FUIP9pTradP3P6sHUBac8SIGkL8b5/4+xg7ez3qfM+B6RD5141WZ5g+2GzKNlahOkbLUjc9d9d9Kl0MVlUO87E4UDoadFezlAPskk/RBbRnfqmdpPy1qLV8I1xaKoA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.32) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LSo3G/SuWkPTSEBHC/GXh45A5rwT6sIQjXRYBwqHJWA=; b=PPzkAuumJ8tO4rGaAKhwWpMva4CnlIdQ0g5ME9ZQBUGIqp2HLmLsYmbQfbNB7qwHppXO98qo9MI6Czi9M1b0PPon0jdwDIAuIKdnRtFYIq7jWV5QGvI/tHvR1U57K93gTmdaEiUop0I9RtEXCzTl7WjSjM/WeB2IBA5MAuNJJoTpF5kYuggJCJWTBytbCWkxcudmYzAhNn5z259BumogKg2R9m7Ia5WqgC6ZfgiLOshdBHEnrMBcRremAMfP8vGkj0QtWdfcUBiWRYp6W9O9elnjzNJXYy1v75gkx6qiC5YJ/FS4UdX2phnunZKtnJwRrzJ47uRlv9HsOasoeYr9Kw== Received: from DM5PR12CA0005.namprd12.prod.outlook.com (2603:10b6:4:1::15) by CH2PR12MB3703.namprd12.prod.outlook.com (2603:10b6:610:2d::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.27; Wed, 26 May 2021 09:58:13 +0000 Received: from DM6NAM11FT022.eop-nam11.prod.protection.outlook.com (2603:10b6:4:1:cafe::8e) by DM5PR12CA0005.outlook.office365.com (2603:10b6:4:1::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.20 via Frontend Transport; Wed, 26 May 2021 09:58:13 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.32) smtp.mailfrom=nvidia.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.32 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.32; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.32) by DM6NAM11FT022.mail.protection.outlook.com (10.13.172.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4129.25 via Frontend Transport; Wed, 26 May 2021 09:58:12 +0000 Received: from HQMAIL105.nvidia.com (172.20.187.12) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 26 May 2021 02:58:12 -0700 Received: from vdi.nvidia.com (172.20.145.6) by mail.nvidia.com (172.20.187.12) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 26 May 2021 09:58:10 +0000 From: Tariq Toukan To: "David S. Miller" , Jakub Kicinski CC: , Moshe Shemesh , Boris Pismenny , Saeed Mahameed , Maxim Mikityanskiy , Tariq Toukan Subject: [RFC PATCH 2/6] net: Disable TX TLS device offload on lower devices if disabled on the upper Date: Wed, 26 May 2021 12:57:43 +0300 Message-ID: <20210526095747.22446-3-tariqt@nvidia.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20210526095747.22446-1-tariqt@nvidia.com> References: <20210526095747.22446-1-tariqt@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8b610199-c39b-4a6f-b9eb-08d9202cc680 X-MS-TrafficTypeDiagnostic: CH2PR12MB3703: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8nkQApXsAEYdhQ8eJxrSKqDmsia6XDHWHmDUxWmGYSPgafDj4SgX6sNTxaYQ+SQo7P4cU2k9IJYTVbEaMEfwlfs+E6uX7+pSL3Y9bYHFwJEtt+NrKNPjVW5/DOn0Xb8Gw2H+QHQvMc92vgKqtL9JuElVjED2+QMpOjh13NdbnCJ27wVKJ9TTo/HAY5NZZJBVPeNq6CcJoK2lr1Ent7BqqnQF/v1ZqM44MTo12/00UhiV5Vf3dkeaqOvW0rLfj0d/CqpCwCqSDPXLtfukVMOerVSL/gJVWoKMS9EG+1BJeQ2KUvc+mSCT2M3LIg0zr5jer0oCdZPGYHF8vpbw/iX/G9Z4uGVwLmP8bKjLp6vfSCx0efk90Q2Ct7t0fO4F+SJbu1g+LbZpHpXC3ff4u6sOeiWOdhOMcJIrcJ1xC0klD0Cvsk3EWTaR9KRVkJf0lc48+k+sCosa8A7OsVY5CAFJ51ieUQiVH2SSxhgrONtzjedRuwkwo/AkJs5VTXN8Hy95dG+EICU8R+Q4CQ8nDTCbXEAB/T3a+0c3A5tea56VdFZipM0oTh3mP6B9vVPbAjM0Xx8yIYIPc7BYamBiB/6paVvUG0aR2XvzSGv/aawi2JNcvVD+8TDVnFQCUH9zr8aV6jJBGU/4qRs91UPwxB74fR++PJbYm4ucxCuy0JmK0Ig= X-Forefront-Antispam-Report: CIP:216.228.112.32;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:schybrid01.nvidia.com;CAT:NONE;SFS:(4636009)(376002)(396003)(346002)(39860400002)(136003)(46966006)(36840700001)(8676002)(82310400003)(356005)(6666004)(4326008)(83380400001)(70586007)(7696005)(5660300002)(478600001)(70206006)(426003)(2616005)(107886003)(86362001)(8936002)(110136005)(47076005)(54906003)(2906002)(36756003)(7636003)(336012)(316002)(26005)(186003)(1076003)(82740400003)(36860700001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 May 2021 09:58:12.9551 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8b610199-c39b-4a6f-b9eb-08d9202cc680 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.112.32];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT022.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB3703 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-State: RFC In the control flow of the TLS device offload feature, the upper device gives a pointer to the target lower device. All struct tlsdev_ops are called directly against the lower device, bypassing the upper. This means, the upper device has very limited means of blocking/disabling the TLS device offload. Today, for instance, disabling TX checksum offload of the upper dev automatically disables the TX TLS device offload capability. However, this does not affect the lower device at all, and it keeps doing TLS device offload for all new connections. Here we fix this, by propagating the disablement of the TLS TX device offload features to all lower devices. Fixes: ae0b04b238e2 ("net: Disable NETIF_F_HW_TLS_TX when HW_CSUM is disabled") Signed-off-by: Tariq Toukan --- include/linux/netdev_features.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h index 1a5f0c51bc99..0061c5b988c1 100644 --- a/include/linux/netdev_features.h +++ b/include/linux/netdev_features.h @@ -239,7 +239,7 @@ static inline int find_next_netdev_feature(u64 feature, unsigned long start) * If upper/master device has these features disabled, they must be disabled * on all lower/slave devices as well. */ -#define NETIF_F_UPPER_DISABLES NETIF_F_LRO +#define NETIF_F_UPPER_DISABLES (NETIF_F_LRO | NETIF_F_HW_TLS_TX) /* changeable features with no special hardware requirements */ #define NETIF_F_SOFT_FEATURES (NETIF_F_GSO | NETIF_F_GRO) From patchwork Wed May 26 09:57:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tariq Toukan X-Patchwork-Id: 12281155 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=-19.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,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 2FA15C2B9F7 for ; Wed, 26 May 2021 09:58:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 006E561437 for ; Wed, 26 May 2021 09:58:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233770AbhEZJ7y (ORCPT ); Wed, 26 May 2021 05:59:54 -0400 Received: from mail-bn8nam11on2057.outbound.protection.outlook.com ([40.107.236.57]:9888 "EHLO NAM11-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233751AbhEZJ7r (ORCPT ); Wed, 26 May 2021 05:59:47 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YjtG4ionUQwXaA8HvZY1jjLTCLgH6rDIHHz3c8ld9ZKRB0FhMCwUU/agExh6zB/jn/KPae7NLBmyuhnYoxq4FO48AtfbcMY3OalMPUbr+UqyexPohKEmMeWwYJLcUlX0dHdPFtOpvRWZf6mZLwuP9gPcveKypzq/KrFEeKGMHVAxYvcoIlDjzwjklLsl+oZEb8S26tzeavjFapi1lxyab4w7cn+nYXH6oSTwSp8M5Ol/Zge4QQmLwew64JxiVOVqeJ58jwxgbGDkCQ8BqmA2EOMgAc5LMGHV5ZExMsQ1mZjpaZ/Ylcg+9VIXuV1NsfYtnwPjnW2b/wtHpvmtRwPoHw== 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=rZ8f/ILsypibjjcY8Ki/KTv9w9ZC8Nb2PwPEEkcjAyY=; b=DNxliqhXg+4QSGqR1d2LhC6jPCCEyOgiPUqdsFaBhXCy7JCJjG+Rug2f4q8DNhP0exk3g3W+DgDJaiWR2uBjPckCd6zhqVm5yvx9sLDy2eZP2w8s4pZQ/Welip9K+RfniIcqSH43ztNJgVZ/KMwjLUdyEhXcnHzRwUxeOOAQfUNHkOmUFfOmxTwQ38RyEv7dgX+6kN3DOw+2d4Pn0aAKKULnl9c7iEhU/bb3Ny1lR5G/+Ghbb6Fn9P2o6LFdc6TkRIdAw64szdDx5zd+l6B5cgEPiR1QNx39G6sR6mGL1ZjnXQmcRQfnSFXX3H66a3GIU8YCEG9wiUor0fTeFGpnVw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.35) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rZ8f/ILsypibjjcY8Ki/KTv9w9ZC8Nb2PwPEEkcjAyY=; b=nQhPaEmec1Ef740/GoRuLP03xzYShyLjUBFJE8OPrvipQjRZMbisUSSiX2MiXrwt8Ki3gIlNzEwuJNHRttSfCWToToAjndWda8R+2gwK18nH87WLf2Qs0MiGlpBXWWER28/r+P81W8fdOE2NTVgPQR4y7HgYgR/l9qaMApb2kPgEjcPTsINJZvlrB1rxUhCmVF4aaEeILxD7HVZNqtvUJGrAuzsa5RdcyqUQrNgISck94yIAFFNEBTvrqNnsEEFBg/c98+dSBfmVR2gx5gKlwBZqqp5jC5qjysQSLFATBBY4b6VyVqMJnkaxqU7f7HcpTchJryPYOGhh9QzXf44dbg== Received: from DM6PR08CA0051.namprd08.prod.outlook.com (2603:10b6:5:1e0::25) by BL1PR12MB5304.namprd12.prod.outlook.com (2603:10b6:208:314::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.26; Wed, 26 May 2021 09:58:15 +0000 Received: from DM6NAM11FT034.eop-nam11.prod.protection.outlook.com (2603:10b6:5:1e0:cafe::36) by DM6PR08CA0051.outlook.office365.com (2603:10b6:5:1e0::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.21 via Frontend Transport; Wed, 26 May 2021 09:58:15 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.35) smtp.mailfrom=nvidia.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.35 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.35; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.35) by DM6NAM11FT034.mail.protection.outlook.com (10.13.173.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4129.25 via Frontend Transport; Wed, 26 May 2021 09:58:15 +0000 Received: from HQMAIL105.nvidia.com (172.20.187.12) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 26 May 2021 09:58:14 +0000 Received: from vdi.nvidia.com (172.20.145.6) by mail.nvidia.com (172.20.187.12) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 26 May 2021 09:58:12 +0000 From: Tariq Toukan To: "David S. Miller" , Jakub Kicinski CC: , Moshe Shemesh , Boris Pismenny , Saeed Mahameed , Maxim Mikityanskiy , Tariq Toukan Subject: [RFC PATCH 3/6] net: Disable RX TLS device offload on lower devices if disabled on the upper Date: Wed, 26 May 2021 12:57:44 +0300 Message-ID: <20210526095747.22446-4-tariqt@nvidia.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20210526095747.22446-1-tariqt@nvidia.com> References: <20210526095747.22446-1-tariqt@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ef37ad41-de50-4ce5-88ea-08d9202cc7ec X-MS-TrafficTypeDiagnostic: BL1PR12MB5304: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ro8z5y2/lt61Wf06mU2zH/ix+Mq21duQ6Qid3dlmNdj55GskIalEgWk6/jy5oXe/tR3QZqImoi+8KXZpMYR5y5iUNC/VP+LkfbFnjTvReFGXWZq6qQtoyLZz8xNagwuvXIc1EhivX06uywRoO3u3GKUxdNaGNWx3NTJD1/QpntxfuQC12i8I8e63+EUEH/M4EmZtKqrH2psaaXREDWCgr4RIdpA7JfEingHy6MZqz0vY5/C/pNAYqu83dvdjkn3sQjkGtdpW4ONyHBVjWFBXqcCllJ2xxeBaBesKFGI5m+EwUVRL3U4XVsXkhytkcpEn3e6UhSoU94Y71gw5PH3Cbn7w/7EMU5Z4vItAqiXb502vrigvLrWbf0x/PPzvyp4SKuZ9rhXTiCm3YP/w2L1jYFa/1vfMb2eoHBR/TUx0vtecT0HZD4rdoJK6dLOhCP/ZweN6KdCMoYhtK5EVXO1/qFEvHP54gA5jcSrsfeHqt/VPuril7itNVptzl1HmLDLcOy5YBn6XjuDXDou1o8sI/uMcgVEHIAHYTTTm7dqGZLD01tiIyB9ctypDJ9Vt0pyzwk8yxko/oLYBHbFr3QXn9ySGtMsXFqpy42UxP/QYWq/BuOHDCpIs7GaMDJD7qhra6kBLDSBiNHJCtjpTpv6KU2PEAqWJ9OCcLRmO+MX48h8= X-Forefront-Antispam-Report: CIP:216.228.112.35;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:schybrid04.nvidia.com;CAT:NONE;SFS:(4636009)(346002)(39860400002)(396003)(376002)(136003)(46966006)(36840700001)(107886003)(316002)(82310400003)(6666004)(86362001)(4326008)(356005)(8676002)(1076003)(70206006)(5660300002)(2616005)(36906005)(2906002)(26005)(70586007)(7636003)(36756003)(336012)(478600001)(82740400003)(110136005)(8936002)(7696005)(83380400001)(36860700001)(47076005)(54906003)(186003)(426003);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 May 2021 09:58:15.3283 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ef37ad41-de50-4ce5-88ea-08d9202cc7ec X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.112.35];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT034.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5304 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-State: RFC In the control flow of the TLS device offload feature, the upper device gives a pointer to the target lower device. All struct tlsdev_ops are called directly against the lower device, bypassing the upper. This means, the upper device has very limited means of blocking/disabling the TLS device offload. Today, for instance, disabling RX checksum offload of the upper dev automatically disables the RX TLS device offload capability. However, this does not affect the lower device at all, and it keeps doing TLS device offload for all new connections. Here we fix this, by propagating the disablement of the TLS RX device offload features to all lower devices. Fixes: a3eb4e9d4c92 ("net: Disable NETIF_F_HW_TLS_RX when RXCSUM is disabled") Signed-off-by: Tariq Toukan --- include/linux/netdev_features.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h index 0061c5b988c1..a8b33313ad17 100644 --- a/include/linux/netdev_features.h +++ b/include/linux/netdev_features.h @@ -239,7 +239,7 @@ static inline int find_next_netdev_feature(u64 feature, unsigned long start) * If upper/master device has these features disabled, they must be disabled * on all lower/slave devices as well. */ -#define NETIF_F_UPPER_DISABLES (NETIF_F_LRO | NETIF_F_HW_TLS_TX) +#define NETIF_F_UPPER_DISABLES (NETIF_F_LRO | NETIF_F_HW_TLS_TX | NETIF_F_HW_TLS_RX) /* changeable features with no special hardware requirements */ #define NETIF_F_SOFT_FEATURES (NETIF_F_GSO | NETIF_F_GRO) From patchwork Wed May 26 09:57:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tariq Toukan X-Patchwork-Id: 12281157 X-Patchwork-Delegate: kuba@kernel.org 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=-19.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,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 6F8B1C2B9F7 for ; Wed, 26 May 2021 09:58:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4A0E761440 for ; Wed, 26 May 2021 09:58:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233750AbhEZJ7z (ORCPT ); Wed, 26 May 2021 05:59:55 -0400 Received: from mail-co1nam11on2077.outbound.protection.outlook.com ([40.107.220.77]:41312 "EHLO NAM11-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233759AbhEZJ7u (ORCPT ); Wed, 26 May 2021 05:59:50 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HyKGn309qBuNRaJ/HiUj5gfARJbhJ4LQdb7qP3aTStnW78qqE3Q2Gupwkh9uHeUWuPKhDmHmXB/Lr2nbgHG9fRLbvg7/C8YlCc/nKA23GQTVtONFcqDNrKj/bl9K49INCkLrEmyyHVf0qH535YPR3Jl3QaE9k+KZ2CTJp4mWxzOsnfRxyzQqaPSsGVkOJvaLRwrhE0Db1I2JN3DXH+jBIF0aKkQtEYhoDonYOwn7zn+CmsVaFEzplOzp8XELu6DnLKXD9cFpYlAr5Y49EAeCpDZsr6UDJKDBZVTtpgabnnyxulcYQiBJknE212F3UZjPLQ4Uw5B57NXlPwipN0F/Ew== 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=0kC97LWaWURHsYwhtkxh1vrLYNm7I/Q4iqxsO8K7MZs=; b=g9mnNt58u2JIapwQ87Tv49px4aEhxPehaLHjMeGBJOKQD9nyouOrEgQmU90JZ6zrM662rXHG+BVa+9XV508DyQUR9PvfJVNG83B1j6zEu4NJdmE/EYrkXC8OLTftxbfFnjIP9ypWw7vTQ1Y32dqJLJwxiQoiSymtJdgG/EfaKUS2aAbFP/sK3s3vKR99Yqd8740jqoZYFN+Mic/mEeyIs6bv+7n8/Cjdkut7T+bHExb3ahAmbVJOHJJwuoEewPG2pvfdfwdbOXIJPPZ4scEleuTm1xXTgOMcZzd8TRFhtmvefCgkgyp2Y67GcTstyQEvDFNd2KsH+ipeOCIqi4aoaw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0kC97LWaWURHsYwhtkxh1vrLYNm7I/Q4iqxsO8K7MZs=; b=tzlzcxvGQ3YtfxYZm2SCArUkF26sGow6sk/SPeNY4nhr28h0qXieuQJMEMKwkFCJUViKc28VurKeGXGwSiqLxfhdxY6VwOuTmnOy7d/zhzjXYsTcMCIkgMw7PL3WTq6XxiSOxpgOMNzdjYM9X8JmWalVHJocrz4jGeJusM7/UO4rcgOCWyJcaejp7cXi3Bum0ogQ2xv5UiOYD1frrFkRhLqTSzwSDNC/UTzR6JnNQb6tZY1NDNKCYlsZkN7ejwGfSRJL/POb2OPAm6LBAitYFaJRMACg4zvOjPB5DhVJpFaV6wN8sA57SZl26DvqwqVW/Vyo3BPQWweplBQrQz09nA== Received: from MW4PR04CA0115.namprd04.prod.outlook.com (2603:10b6:303:83::30) by BYAPR12MB2615.namprd12.prod.outlook.com (2603:10b6:a03:61::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.27; Wed, 26 May 2021 09:58:17 +0000 Received: from CO1NAM11FT044.eop-nam11.prod.protection.outlook.com (2603:10b6:303:83:cafe::91) by MW4PR04CA0115.outlook.office365.com (2603:10b6:303:83::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.20 via Frontend Transport; Wed, 26 May 2021 09:58:17 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by CO1NAM11FT044.mail.protection.outlook.com (10.13.175.188) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4129.25 via Frontend Transport; Wed, 26 May 2021 09:58:17 +0000 Received: from HQMAIL105.nvidia.com (172.20.187.12) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 26 May 2021 09:58:17 +0000 Received: from vdi.nvidia.com (172.20.145.6) by mail.nvidia.com (172.20.187.12) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 26 May 2021 09:58:15 +0000 From: Tariq Toukan To: "David S. Miller" , Jakub Kicinski CC: , Moshe Shemesh , Boris Pismenny , Saeed Mahameed , Maxim Mikityanskiy , Tariq Toukan Subject: [RFC PATCH 4/6] net/bond: Enable RXCSUM feature for bond Date: Wed, 26 May 2021 12:57:45 +0300 Message-ID: <20210526095747.22446-5-tariqt@nvidia.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20210526095747.22446-1-tariqt@nvidia.com> References: <20210526095747.22446-1-tariqt@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0d80a6e1-89b4-4896-de07-08d9202cc950 X-MS-TrafficTypeDiagnostic: BYAPR12MB2615: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:913; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: slIKk5u02hisRKPjUgfYYwo6Js7iRpOvelzb/IV2HP1hFfobjW3SImbI1XbpVA6POmMM5VO5uBSLQ0J5x+3J/jFogvihmJRWuOBGY9Ej1Goz+6GKvaZdwDrZiWfbWRFWd7G2r8246fJT/KBx2xNIA6O3rAUUJbtDWPunli/AS5OyYFCzSCyaXa5WCHygNKcXbcGsmgIStgzDLFfgogUT8BRHvGse4n44qUHDu4hQ2Aj+Zba5kT3+19vJzrgJQPycf6xsfGq+TqW1A8u3pcZA89Hdm7sDRxTr+w4xIcGWD9uRNP4E53VYA+DOUVMFaNViilpsMHKL2itpZ/xSMT6fLZWonUowXIbd4H+Hf4OeD+vkEifrxa2x07MaWFgQYCXc5foPHleurMdfL0HBiRshG+OEft6Ja9XRv5pZzs3LkwKhPdt+C0FPlmuHS1cY7ScWVOUubNp2nhLHRDNcNMEcD6uqqPLAfpNnGF2klM5wC1QnuXnNQk0vgaeT149cjY7MYQgANoW8ervHUfbAHYT39fJVFcvNBir6AR3mSTISb0qVrIONaxk8ubx/Akib+2ugblHPD4WYZgLs4EQJnNWiM/gI0ahQsglGTqPppLALFNm/3pHr8cByGyzLb8RHqR5FiHnzVMNYyvW9/6vdpRVafhtCFpPYMKw0qp00Cdio5N8= X-Forefront-Antispam-Report: CIP:216.228.112.34;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:schybrid03.nvidia.com;CAT:NONE;SFS:(4636009)(39860400002)(376002)(396003)(346002)(136003)(36840700001)(46966006)(107886003)(7696005)(86362001)(4326008)(82740400003)(6666004)(83380400001)(8936002)(70206006)(336012)(316002)(26005)(186003)(7636003)(356005)(110136005)(70586007)(36860700001)(36906005)(5660300002)(478600001)(82310400003)(8676002)(1076003)(47076005)(4744005)(2906002)(36756003)(54906003)(426003)(2616005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 May 2021 09:58:17.6766 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0d80a6e1-89b4-4896-de07-08d9202cc950 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.112.34];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT044.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB2615 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC Enable RXCSUM device offload on bond, otherwise the TLS RX device offload will be blocked. Fixes: dc5809f9e2b6 ("net/bonding: Declare TLS RX device offload support") Signed-off-by: Tariq Toukan --- drivers/net/bonding/bond_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index c5a646d06102..9091db0d1540 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -4903,6 +4903,7 @@ void bond_setup(struct net_device *bond_dev) NETIF_F_HW_VLAN_CTAG_FILTER; bond_dev->hw_features |= NETIF_F_GSO_ENCAP_ALL; + bond_dev->hw_features |= NETIF_F_RXCSUM; bond_dev->features |= bond_dev->hw_features; bond_dev->features |= NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_STAG_TX; #ifdef CONFIG_XFRM_OFFLOAD From patchwork Wed May 26 09:57:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tariq Toukan X-Patchwork-Id: 12281159 X-Patchwork-Delegate: kuba@kernel.org 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=-19.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,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 05DC3C47082 for ; Wed, 26 May 2021 09:58:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D297561437 for ; Wed, 26 May 2021 09:58:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233772AbhEZJ75 (ORCPT ); Wed, 26 May 2021 05:59:57 -0400 Received: from mail-dm3nam07on2085.outbound.protection.outlook.com ([40.107.95.85]:15681 "EHLO NAM02-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233728AbhEZJ7w (ORCPT ); Wed, 26 May 2021 05:59:52 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OZVtrdeEECGNOdSRYwpOACRgqXPpTt+Qt8HzyzLWWbpOyNcU7luwBG8iAb2ESl71/VKdtUbgp3zIARQGvTxQjoaD8CPoRoX4JBuaLheqxd6mV76u2mA8p3qG9t1PAPNuQxfiS7V9FTOpkUOSdVvAG1aWzmWeNHIbl1cX1tegTU0yehycy/FoMPGnCe7oW3rg6AufnFT5F5aw6R4lt7Ir5uFyJbmF8fJcgCqiNeAOI1gVPJ+BkiMB/XLCu0k1IOW6PjxtbqDv4vBMpzEYirQTi/OJ3mvn6ZcfRNPatikMXgdjPPnt41wyJBWpoMVMztD+ZJApRQy6PYZd3WmTP/YxPg== 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=pNEYMTET4h6qVJGdOKEDu34EgxOiY+OE0xnvGsiF9KA=; b=El5piIhN0Y7iTVDVvF7UKSlXRRMdmG5VKEfac/EGeYfim6yWXR+1q01kXuBUgn7WjK9eovDFW71Sd8rT/sV+Y63ruNyGTL/X2sJGnfQI2VDLQdxKBUOVDRto8bdOjVheKOnxxFewD3uvlLtNaIE9WH0BbqeRuP+UtXvOVG+it1sySjrDJT8GMz016hhiiEvKWE7LLTsB3duKIKeRqPs+/orO3atBcLVr7KjgJ8YFQSO5dcFZS2zR16TQu/vlPxLkda9e/FTJffHKyjEwKM0uyvVnnL1Jf1fMJMBi3iiYYNtFhd8VphzopzWtugmhSFaLNMHH754w+Wglzl/W02iItA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.35) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pNEYMTET4h6qVJGdOKEDu34EgxOiY+OE0xnvGsiF9KA=; b=FPMl7vuq9AO2oI7ULiCGMnCQ2njkgmHHcNi4Fra1kJ6Y03T0ypUFiYf7jSz5Bw0zChxm1fh1mESrVMlob16mCcbZlggXjrmN4R3OFU9RTA9d+halgLk2KD5CEh0N5xkGS4yn/UwVRh5W5DFZs2r2V+d+T5sXlYdXht5o6OKJY4BXJPAlQh4qlgq7rBLKKsblLKpqNubLFpEb724MlkHbUucjtVF5TP462gS4K05u+NeYvszU+frAdXMRzuhB1JrMTmTwRDDyzEpwu7r/db3bq37lYCtesaOOkxUikyZ/hBtk+cEwWPDEdSRMGPpjPHDkR05/L1LfBagwNGyR/AzDjg== Received: from DM5PR08CA0031.namprd08.prod.outlook.com (2603:10b6:4:60::20) by CH0PR12MB5154.namprd12.prod.outlook.com (2603:10b6:610:b9::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23; Wed, 26 May 2021 09:58:20 +0000 Received: from DM6NAM11FT038.eop-nam11.prod.protection.outlook.com (2603:10b6:4:60:cafe::ad) by DM5PR08CA0031.outlook.office365.com (2603:10b6:4:60::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.20 via Frontend Transport; Wed, 26 May 2021 09:58:20 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.35) smtp.mailfrom=nvidia.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.35 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.35; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.35) by DM6NAM11FT038.mail.protection.outlook.com (10.13.173.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4129.25 via Frontend Transport; Wed, 26 May 2021 09:58:20 +0000 Received: from HQMAIL105.nvidia.com (172.20.187.12) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 26 May 2021 09:58:19 +0000 Received: from vdi.nvidia.com (172.20.145.6) by mail.nvidia.com (172.20.187.12) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 26 May 2021 09:58:17 +0000 From: Tariq Toukan To: "David S. Miller" , Jakub Kicinski CC: , Moshe Shemesh , Boris Pismenny , Saeed Mahameed , Maxim Mikityanskiy , Tariq Toukan Subject: [RFC PATCH 5/6] net/bond: Allow explicit control of the TLS device offload features Date: Wed, 26 May 2021 12:57:46 +0300 Message-ID: <20210526095747.22446-6-tariqt@nvidia.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20210526095747.22446-1-tariqt@nvidia.com> References: <20210526095747.22446-1-tariqt@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: eff23524-b9fd-42d2-46af-08d9202ccabb X-MS-TrafficTypeDiagnostic: CH0PR12MB5154: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3968; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xlMJrungE/bOAlWhnBkZkxwUwKxO5sUXo1PQ3QJdJIaNk/ePxomhKVYIyNck0qAePYOnPczxL7F2j5WAOio7L+XWGwlRInhShDkO/qD4MC/ocbizNH65oGT4L11AUYFA/jfQQNrfc6l5gkdVlmyDQm0+RKz96C/Ls40d1Jjg0wnJX8VC5KO5f90V9iLt6nlYoIyHpWvUirm7S0D5Me05NZ4suH5I5+jZxpXYR6+0Svhbqief5Izkdmees3LuU9Fe5PS/j79FWLHvvPTyLyRK21nWZbLuTlhB4Cpn6smgZiz0xDdc3mbMDUpBaadiq0Sq9OdVfhgv/j76DQwbUrqzR8bfeE6aAXwbOWYW0MUJzD48TtgTLqLeajo3sIcd76eqm3naPlhK608yns2rip4VptbIaJbCFgEwN0jPD993UQ03NWu/eSIbYAzpon6QbqY39iAyYQoamblmudrIYev7o3NOppB0m9Toa2pLCZf/1MBwx8fb1ZNTeA0R6rwyA5DNlK3j0vHl7Tl8ffLnT0BdfhFTQ/wlC/7zOfaj/AVAPePmYlDin+kZNo9YOTij76mhLr5Q1JWlcK6BclC8iXem8PURjqBFH/u8hzbj986GltO02H8XOR01tfONPjieh/phAb+VS2tSGfmsMY071j6CtP7F6WRBGtqV63SEYeJvu/0= X-Forefront-Antispam-Report: CIP:216.228.112.35;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:schybrid02.nvidia.com;CAT:NONE;SFS:(4636009)(39860400002)(136003)(396003)(376002)(346002)(46966006)(36840700001)(8676002)(2616005)(7696005)(426003)(70586007)(54906003)(4744005)(6666004)(7636003)(356005)(26005)(8936002)(82310400003)(86362001)(336012)(478600001)(107886003)(36756003)(70206006)(316002)(186003)(36860700001)(110136005)(5660300002)(1076003)(82740400003)(47076005)(2906002)(4326008)(36906005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 May 2021 09:58:20.0517 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: eff23524-b9fd-42d2-46af-08d9202ccabb X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.112.35];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT038.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5154 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC Allow direct control of the TLS device offload features on the bond. Disabling a TLS offload feature is propagated to all lower devices. This solves an issue in which the bond interface had no means of enforcing disablement of a TLS offload, as it is bypassed by direct communication with the lower device. Fixes: 89df6a810470 ("net/bonding: Implement TLS TX device offload") Signed-off-by: Tariq Toukan --- drivers/net/bonding/bond_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 9091db0d1540..34a72981df38 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -4913,6 +4913,7 @@ void bond_setup(struct net_device *bond_dev) bond_dev->features |= BOND_XFRM_FEATURES; #endif /* CONFIG_XFRM_OFFLOAD */ #if IS_ENABLED(CONFIG_TLS_DEVICE) + bond_dev->hw_features |= BOND_TLS_FEATURES; if (bond_sk_check(bond)) bond_dev->features |= BOND_TLS_FEATURES; #endif From patchwork Wed May 26 09:57:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tariq Toukan X-Patchwork-Id: 12281161 X-Patchwork-Delegate: kuba@kernel.org 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=-19.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,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 ED980C2B9F7 for ; Wed, 26 May 2021 09:58:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D31FC613B5 for ; Wed, 26 May 2021 09:58:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233751AbhEZKAC (ORCPT ); Wed, 26 May 2021 06:00:02 -0400 Received: from mail-mw2nam10on2086.outbound.protection.outlook.com ([40.107.94.86]:27616 "EHLO NAM10-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233778AbhEZJ7z (ORCPT ); Wed, 26 May 2021 05:59:55 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NrdqL1Yk+EKoF6PcKXWUUmTlZuaAbDh55t90Ew8dUsPHy8KRZf1pZN5cS6rQEmzQZJRWuBTX4l9mCtxBws7OqR4zrJpcNC0Xy5anLNLhwe3zV6qPeUvPKxYsmw7QQQTmy/T9T95W+JbFdMUKdUwtH6ERNzanmBTphxjV4lMAi6kAZ2spSBw7WHcTZxuPiFFNAwKWxEecvkCk8i96tzQrmbRgNTi/ibxmDq3CU+0q2KAT0nO2dOBS/HUf0ggAh3R1PcO/HpjFn7ybTyU2jrJOwFG9hCBAjWP70c8QpEFUX6BTW0+iU+ZLDON4aL6WtcW79Ix10VXO7hI86A1fnssr8g== 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=P38DaO/PxflhvB8YeQCfqQgxTJalAi1/VMEKHgCTZC0=; b=I4ZAKctHdCmmTi86WOE3u+kIDSJIAO461v6h++MyPU4mnbWdXxRB0k0sMoq65MKGR8loOmW/dDg3uZHNAwqsJwLWyrx5J3HMZzyMFyZ6Bzgsfs/xXrYvU3Ss0Pj0ZjMtw72IXeH6V14kYlkXDClumM9ukEw9EyqtsoZgB4uce0SJPfHxkE2DDBJoZ0lgvW3meI/qh3lJDPP2SlzP7C2FcDJLkE6nFIglrzFUAw7FUb+pz7oyyk2Eo+Ze4CPI0qRvwGGr96nCk4cBo5BXch4W1AxrKxq1odpna3nM5ZxHBJaRSE7aaLTio5WrMeSLYPLOf1YuQk2R31XJZ3e2di9BwA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.36) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=P38DaO/PxflhvB8YeQCfqQgxTJalAi1/VMEKHgCTZC0=; b=tlVkrhL9YQx5SQVaMPKYJ2O0jXcaTfA6yynYGwwQGmrfTNBIk3zMvhBZhpoNiwLhJmHDON/Ld+N16nBAPpbPxPic3RKlK3yyTUJ1E2pgTsUQFubgGxcSpec8k7l4Ys1uiUv96SYizBvi1nlGu/FxKMl/hzU/TcM/uWio8c9L4ryqf1vmMwCNQcfm1ppWl38qg8EeQLQ3UMSQwfxSldXPZGOT871HkzQ5m/015/y+GGqWM5O45nMJ9Q92oTqMSDuJQKIWlxsi3+ENGm5ySVUV5Ke8AZ0qTj6spYS4zownSIck0rTeGHxBEmLpCmi6JZd7SQst1Kuz2jI9ushYCP8AMA== Received: from BN7PR06CA0066.namprd06.prod.outlook.com (2603:10b6:408:34::43) by MWHPR12MB1405.namprd12.prod.outlook.com (2603:10b6:300:13::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.27; Wed, 26 May 2021 09:58:23 +0000 Received: from BN8NAM11FT019.eop-nam11.prod.protection.outlook.com (2603:10b6:408:34:cafe::1b) by BN7PR06CA0066.outlook.office365.com (2603:10b6:408:34::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.21 via Frontend Transport; Wed, 26 May 2021 09:58:22 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.36) smtp.mailfrom=nvidia.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.36 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.36; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.36) by BN8NAM11FT019.mail.protection.outlook.com (10.13.176.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4129.25 via Frontend Transport; Wed, 26 May 2021 09:58:22 +0000 Received: from HQMAIL105.nvidia.com (172.20.187.12) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 26 May 2021 09:58:22 +0000 Received: from vdi.nvidia.com (172.20.145.6) by mail.nvidia.com (172.20.187.12) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 26 May 2021 09:58:19 +0000 From: Tariq Toukan To: "David S. Miller" , Jakub Kicinski CC: , Moshe Shemesh , Boris Pismenny , Saeed Mahameed , Maxim Mikityanskiy , Tariq Toukan Subject: [RFC PATCH 6/6] net/bond: Do not turn on TLS features in bond_fix_features() Date: Wed, 26 May 2021 12:57:47 +0300 Message-ID: <20210526095747.22446-7-tariqt@nvidia.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20210526095747.22446-1-tariqt@nvidia.com> References: <20210526095747.22446-1-tariqt@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5f564cb2-c175-41bf-65cc-08d9202ccc4e X-MS-TrafficTypeDiagnostic: MWHPR12MB1405: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1227; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WPkTNnHJJqM2t/Cyu8mGB9/sOBSolfYOPEW+4Tze8OB2JAHROGQz4GrUf228RmnwN1sLwszPFBPIA60qY57B+ivB1PwO6FN9oYmkKdzyxmAa+u4GIjl/pGry4060EsTaw+WUqZnivA1+mwz/NpkXYsuGWAriRbENy4eUr8G0meQieX5jJ/os9l0ZCH8F9jGqWGbby3NqWpKLdhpfCht59mIXa7gljJj5m5tFalJwh/3lq+OEJ/oKcZ52Ids2eFfQfzDqGlb3Tcak+MygFdI0UbqhVQkXo0046IQ+WF4cy+U0mXXfryj7qeYeAQYdHePxHlBPylrBdoenqUYMvSXbblMPFMH/k0e5ykKGTAqf0/FAWWcaoOqp/8IXiyh0oPYEtr5fyDhZvxUco7eBmDeJ9uLycJYFD3oJBxPCbiHIFVxjVxTQZxZUBcAEz/az38eo1I2PcL5JLjUKJutsKrdMaFBY57sU+H9v/rR2qNhD942vYovJB/70OVNXjDZl2193KME1WUFSSDf6A5dEijXyW2e3rwIybzhsquSns3T9DdSpTTE8E9qtYrn5zHhazhob2SaxCDdb93EM7cMLFMq1qK9lHnv/2G4sIbT79xx6CrBN//+JF/yVb4PlvJUNZcXhKRc4Fctl0Njr507/aHZOUA34aFisooebFDKPmLuRXJk= X-Forefront-Antispam-Report: CIP:216.228.112.36;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:schybrid05.nvidia.com;CAT:NONE;SFS:(4636009)(346002)(376002)(396003)(39860400002)(136003)(36840700001)(46966006)(6666004)(70206006)(7636003)(426003)(54906003)(8936002)(5660300002)(1076003)(83380400001)(316002)(478600001)(2616005)(107886003)(4326008)(8676002)(336012)(26005)(356005)(36906005)(70586007)(86362001)(36756003)(4744005)(82740400003)(110136005)(186003)(82310400003)(36860700001)(7696005)(47076005)(2906002);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 May 2021 09:58:22.6096 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5f564cb2-c175-41bf-65cc-08d9202ccc4e X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.112.36];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT019.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1405 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC There is no more need to enforce TLS features in bond_fix_features() when supported, as they became explicitly controllable for a bond interface. Fixes: 89df6a810470 ("net/bonding: Implement TLS TX device offload") Signed-off-by: Tariq Toukan --- drivers/net/bonding/bond_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 34a72981df38..3c9466e6114a 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -1229,9 +1229,7 @@ static netdev_features_t bond_fix_features(struct net_device *dev, struct slave *slave; #if IS_ENABLED(CONFIG_TLS_DEVICE) - if (bond_sk_check(bond)) - features |= BOND_TLS_FEATURES; - else + if (!bond_sk_check(bond) && (features & BOND_TLS_FEATURES)) features &= ~BOND_TLS_FEATURES; #endif