Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2925358rwb; Mon, 15 Aug 2022 14:10:21 -0700 (PDT) X-Google-Smtp-Source: AA6agR58wzc1u7lyGFBtrtByOPYZXi0frQ+dgXIPPnrJ5TqvZMxHk4sIkvqA1UaSZpoYYr8OAzor X-Received: by 2002:a63:ec04:0:b0:41c:1149:4523 with SMTP id j4-20020a63ec04000000b0041c11494523mr15028868pgh.62.1660597820993; Mon, 15 Aug 2022 14:10:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660597820; cv=none; d=google.com; s=arc-20160816; b=KHNOCgElh6BsDufFuhUIAa+LLQfDJGSuSqYFo9eYSIeqRUCUD8mbobKwJXCdP7GCFR QEMNAoKyIgrAIdEFGs/1rRJBd9ycoBnCKugNy/3cNs7VvGoUi3HgXn8BE7/9jn9KdcBk SSTeUWYXu9hr3fzuDGPpAhJjGpynbv8QNO6ltIAv9mr4pSmnXcwbZ+uEBBTGEGzpSwPB JhYAO3MkNnDaSfjifzLwbm9fMyMav3tRiprMbzwJAiDHUFmEh7I+o2QdB3/cQIGhMPq5 WpQLM0daef1nxI+J/DbLzzEEG2ZEcVc7gCgNuNFGOcWCjhirgW/jb5IpJUstxxdGgYc6 QkOA== 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=1HdWzK+YawlceFMnunLS96Z1XM+tptwxmLi/GFB72hDXmbUYVL8i541gsIL1dpQSVg D7Q9TGFSHZsN93FU0JyIvzdr6vpC4ZdZBcCJV9Nhq4LcFZuQoopkBAsoMXQXkaC4dAWy jsjEwAXMRaIB7lYfepCfRciyyhXmtQC9iVBLAv1BmBmp75LMrsOpCDny2iFwkiy1aIQ3 B/D4BEqbPlDxrFOFFxb5rQKNxTwhU/RHJM1TkTyJwKc/mtwLnfPBWq0jPbBBI7/4EUkN MxcCOnTVhX4qZMT8te4c0DKZHZVQfaAmjVX7p5ra+gJIp7yYdwxjXecIoQhekRm6wRM1 z1JQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=g1ySNgQ3; 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 il16-20020a17090b165000b001f4c9f920f6si18332067pjb.157.2022.08.15.14.10.09; Mon, 15 Aug 2022 14:10:20 -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=g1ySNgQ3; 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 S231349AbiHOTCq (ORCPT + 99 others); Mon, 15 Aug 2022 15:02:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245232AbiHOS5D (ORCPT ); Mon, 15 Aug 2022 14:57:03 -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 312C0326F2; Mon, 15 Aug 2022 11:32:11 -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 7E127B8106C; Mon, 15 Aug 2022 18:32:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ADA3AC43143; Mon, 15 Aug 2022 18:32:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660588328; bh=BzYeuORAkJHPCD80V8MI5zoA/RwoFsTPI8noqeq6Vdg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g1ySNgQ3SJSaSmnb7cqjXv8/KyHcNBopp0hYGYLbCypyRNwk8coP4RLLDkWK/KR4g uo8sfc8XxV3IsOUyq0AZoeyTQm6+JgLCyin2CA0Ky+O2aUoV4onZEe6vQhOSZkEJrt SOhXlNOyMs4Mk7pbtOwQiLbu+ya+y+eIsy3WFec8= 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.15 368/779] net/mlx5e: Remove WARN_ON when trying to offload an unsupported TLS cipher/version Date: Mon, 15 Aug 2022 20:00:12 +0200 Message-Id: <20220815180352.981767985@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@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