Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3022546rwb; Mon, 15 Aug 2022 16:20:02 -0700 (PDT) X-Google-Smtp-Source: AA6agR60XXWWWr31sRzGAuAuJCR1uEpb6vKcQxMZSmoJebav2/aaokiK+exK7Cm2+EZ+jimOT9fA X-Received: by 2002:a17:907:7678:b0:730:e1ad:b128 with SMTP id kk24-20020a170907767800b00730e1adb128mr11802135ejc.67.1660605602603; Mon, 15 Aug 2022 16:20:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605602; cv=none; d=google.com; s=arc-20160816; b=cYh9DUEmgmpke+FbIirBkZPYlvT3bRv1hW0YtCjxjfntMTmEuRAsahMVvHKHRSgqKC 4RKCsvKT88PtsfpuWwob0CAObfUNSWKQLqWgm3OnI/LktZz0174rpTfHO8lE5B61lF59 je18mhyB1nvQty+3gTV48bJVLboxvnGIDYpUiR2Uh/a0OeFKmcKYfrd47KL9tclP1h4v E/j7m0D2DsnanrFptlakwEUce5X1JIyPmLdqAUQnaXDAJx7fPdwrCmknyc8IXDBRTt5J aVSop2h57OzWd2Vgx/obUPEbU2xA4oqG6VFLoGHQTn/JkeRi7E6djRlDZ6Snc2bKwA84 fHEw== 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=AK3lX9LSEb/ejO8ZvQMIlm/DkjD19Gl2X6tNpmqTH1Q=; b=MZIOs2863GXtHSGdjmt/9U6RQ5DVuR16JayCqDDM8o4guJTICM7uYQwng5Zbed9oWK Oah/gZInNl50auUUaMr6f1weIiHQ2p4cw2HEvqzngyJ53M4NB614WADKkTCJ3bFDdtJG y0DF07yQj7j9GbpvGcCq1mDGxOTLqvzSwPDIIEALnXleA2/qnmOpuns3PCtSHZLTC4LA xrDRIizsMoaOct+0MkyOtMOGW5Ic5aUjp6eh60TRSAsPBUG+5h+YET6m+gBdgu9lWxiW p2kkrH008mGx2PEAgdpFZh2BWoR0oD5D9pHlwoQ2vijPy7Yc8jYGveyIB7BdhNLoLWmM NU6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=A6UBcsal; 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 sd6-20020a170906ce2600b0072f0356abc7si7003823ejb.109.2022.08.15.16.19.37; Mon, 15 Aug 2022 16:20:02 -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=A6UBcsal; 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 S243184AbiHOVWV (ORCPT + 99 others); Mon, 15 Aug 2022 17:22:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343543AbiHOVRE (ORCPT ); Mon, 15 Aug 2022 17:17:04 -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 8C7E15FC1; Mon, 15 Aug 2022 12:20:23 -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 B995CB81120; Mon, 15 Aug 2022 19:20:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0FCC6C433C1; Mon, 15 Aug 2022 19:20:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660591220; bh=BzYeuORAkJHPCD80V8MI5zoA/RwoFsTPI8noqeq6Vdg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A6UBcsalR7sXbHuVTMQCuL/tSUehK3+dek0xbJsGSkMnqw+c6BbPDLCTN/J62GmOg 3EN47fXYSZjMUw3RkzjuIgOYRoPodna5ZWYPDJ6DmlST3lC2cSYzWVLy6MAZ6dNwtQ htDTi2yrBVh25XathOwNWTe8d/qSX296WUHkidf8= 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.18 0511/1095] net/mlx5e: Remove WARN_ON when trying to offload an unsupported TLS cipher/version Date: Mon, 15 Aug 2022 19:58:30 +0200 Message-Id: <20220815180450.662178110@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@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 d93aadbf10da..90ea78239d40 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.c @@ -16,7 +16,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