Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1863751rwb; Fri, 19 Aug 2022 10:38:43 -0700 (PDT) X-Google-Smtp-Source: AA6agR4sX7ZAVD3HpeIg6OPZ/i2/+Oez79K2EzKjuh4MY4dq57CrA4VL7AlC2kF4GDRxpbs+SE4V X-Received: by 2002:a05:6402:5107:b0:43d:6b26:bdc5 with SMTP id m7-20020a056402510700b0043d6b26bdc5mr6913438edd.156.1660930723520; Fri, 19 Aug 2022 10:38:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660930723; cv=none; d=google.com; s=arc-20160816; b=OtwGwcL6a59vozvuUyi9geeARy45g9r0tWMJfG6/ISL4lfS6yGcCS9OYLTDmtMRm0S vuIYdLjEqj/XIwaQCTfgKvSHhOD3RE+jB/SQYKdXAHOqh11NTt5NIA5X9vqanx40I/hN A76XvtZTnw8rVSBq/zCdWcKDe8sWA9TQsoVcK84Matd0tZndMSiI+yTkpV8fz+YYNFYK vKGO8RBKCue6xpe/4oH4qR/TY64UCGuYm+oXZ8hKkKkJOwVmqkaASWpYbKgTKBhVvXP3 OEHz/8zDAby/S9NxGBFdogg/HN/+SfgxI57HQJs8IV95JcgAt1GLiftzWeL+Y60roxGh QDiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=glGZX/f3xlhjSHVGaaCH9G5cYEEcKyVVJaH0slffXxM=; b=QChXDc/GLgCDSia922AjYbZhmACkzMtET+j0fnxkrHkmc4tDSl/CvoRNoPB6vcd1aC RiTfVHEFGWkQrckcDHR+lO2wGygn3hmqJ/5GWVvcUlMnlPysyxsLknoBwEFABF3c9U4v +/rTkjBUdczrYAWbhQ3XzNfnMykrVOkM4TgAASPu80ISJpLSJluFeK151xJOa17gWuJz fqV8fRwUJS0b+KJ2tWwMU7ub+pltbSlsERMv7+BQHpGeU2c1xJgpTaxYMgwvfmk+KmhZ VGHxwO+CyNDaZyYwNoqFqMdIj8BYyRiKPf4DHo8c6G9cgYsdyQdxBtQcknwRKZ08AOtA Btxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=U5PNgSc5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ga12-20020a1709070c0c00b007330bee74cdsi3689971ejc.676.2022.08.19.10.38.17; Fri, 19 Aug 2022 10:38:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=U5PNgSc5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352153AbiHSQVS (ORCPT + 99 others); Fri, 19 Aug 2022 12:21:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352422AbiHSQQf (ORCPT ); Fri, 19 Aug 2022 12:16:35 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F292115B61; Fri, 19 Aug 2022 08:59:48 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 44AFDB8280C; Fri, 19 Aug 2022 15:59:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A3887C433D7; Fri, 19 Aug 2022 15:59:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660924785; bh=mhpuv9HjBqol44psX3H2JTsxdSQzFEryQdIpjKeeeGI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U5PNgSc5+YWpGJmhI1tmlN4fkkvfGl3zvxNqXAHlx1CLfz6hULuMwODP91IQp/eYc mAaEnppOHu6nHqyTGA8F+uQRlEd+d6NrRBBm2V7eaXe/TKV11AF0LBX+oAvXygsDme kNzyocCtBueVtMVlitrWnOtjKHZhIO0kpgtO3D7w= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Gal Pressman , Tariq Toukan , Maxim Mikityanskiy , Saeed Mahameed , Sasha Levin Subject: [PATCH 5.10 252/545] net/mlx5e: Remove WARN_ON when trying to offload an unsupported TLS cipher/version Date: Fri, 19 Aug 2022 17:40:22 +0200 Message-Id: <20220819153840.638107979@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220819153829.135562864@linuxfoundation.org> References: <20220819153829.135562864@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Gal Pressman [ Upstream commit 115d9f95ea7ab780ef315dc356bebba2e07cb731 ] The driver reports whether TX/RX TLS device offloads are supported, but not which ciphers/versions, these should be handled by returning -EOPNOTSUPP when .tls_dev_add() is called. Remove the WARN_ON kernel trace when the driver gets a request to offload a cipher/version that is not supported as it is expected. Fixes: d2ead1f360e8 ("net/mlx5e: Add kTLS TX HW offload support") Signed-off-by: Gal Pressman Reviewed-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.c index 1b392696280d..f824d781b99e 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.c @@ -15,7 +15,7 @@ static int mlx5e_ktls_add(struct net_device *netdev, struct sock *sk, struct mlx5_core_dev *mdev = priv->mdev; int err; - if (WARN_ON(!mlx5e_ktls_type_check(mdev, crypto_info))) + if (!mlx5e_ktls_type_check(mdev, crypto_info)) return -EOPNOTSUPP; if (direction == TLS_OFFLOAD_CTX_DIR_TX) -- 2.35.1