Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3933954pxj; Mon, 21 Jun 2021 09:41:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxNt6h3oJFoTI7B7PVZab7CiucTZ7r1EryJzaLHFCSzyLYNkYG2DiYuQ0J8GTvpApvE2Mb X-Received: by 2002:a92:710a:: with SMTP id m10mr12112242ilc.254.1624293666618; Mon, 21 Jun 2021 09:41:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624293666; cv=none; d=google.com; s=arc-20160816; b=TJkLIS5JO3ZTvEIuQBZ9H+/DUGH4TPruarcAxpDoT546gERHCacChws1VDCwzMN7ia R84wnvEgPoUFCvB06mhXKZOylR6up9s+ZBVdWrB1RwsF5I0Cjgs7NwpUZiOEVZ41CZnY iXVL06SADfV8HbXuDTiozRfrwSoPN0EwPy6jvGGYIPMAZW2Okjn7uqcQtVnrLGa+0uEs ZlN5cf4E1xJkbKxGDSbZpKaxA0DwyOiYBkL0Odras/tBEIqmLmbt7diYaYfEFtCbfv7F GDExVGse9kbbrHSIKQZhc2wouAtdqwUK3CvB9OEB+Mebt/dqLar7cpKGLcKNlmWnzVZx u3Gg== 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=ApBt9LX8s/vfDyEnjuUrisUVQaBUcqfmOWjbFcAZr2c=; b=TGjrKI2Xhjr3xwfqr1XO1/5lISiS6FMFLaQMKfSwAUWbrpZYQDnvHNL1oVsGwGZrin fI1S5fC68nDsMNDEL1LGp5+IsG2nYaWUoSpoacn/6/LoRF5sRBJKyYxUKBrZk6WyYeHZ Ih3T8kTDFSyfVJNmRufsp92Re4wbLuQCZZ0HbmYxCRdsri4wUqvnXrdg7Pjz2Zf8xo8B S6C7YJl+tmqp08APU5Omu2MzYo4LRP63J6ogQIiaS/uG5Pdb1FFVjPeHzZfO51anTt+6 phxr4ADIH62UaiXaJo8DcXYDAjQhbb5ycGd9Yg3kSWc1wPUwOj99mRe+e3nIA0GhREXm f0wQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NWtanz7k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u18si18414147iol.87.2021.06.21.09.40.53; Mon, 21 Jun 2021 09:41:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NWtanz7k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S232596AbhFUQlB (ORCPT + 99 others); Mon, 21 Jun 2021 12:41:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:55204 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232296AbhFUQhJ (ORCPT ); Mon, 21 Jun 2021 12:37:09 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8A74961421; Mon, 21 Jun 2021 16:28:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624292918; bh=4X2/9wtd1+Rg1rY65WpgQucz5GudgJI3ZMxX7snrEbM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NWtanz7kyh/SikQBNVv7NgH5AHcbgYDF1fqTaRZmtE2sTpc0q0hcILW9krv3u2N8V vfrpRBVt0q3RkvLeGYsXP6Jn8CVWNqoLyz48BGyceLuajzG7Hyl/aTwS86Rk/A0THf zb674wftTgPlRshPU/BfGD/K2CPJSKkYjln0n4gQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Huy Nguyen , Raed Salem , Saeed Mahameed , Sasha Levin Subject: [PATCH 5.12 033/178] net/mlx5e: Remove dependency in IPsec initialization flows Date: Mon, 21 Jun 2021 18:14:07 +0200 Message-Id: <20210621154923.069066848@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154921.212599475@linuxfoundation.org> References: <20210621154921.212599475@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Huy Nguyen [ Upstream commit 8ad893e516a77209a1818a2072d2027d87db809f ] Currently, IPsec feature is disabled because mlx5e_build_nic_netdev is required to be called after mlx5e_ipsec_init. This requirement is invalid as mlx5e_build_nic_netdev and mlx5e_ipsec_init initialize independent resources. Remove ipsec pointer check in mlx5e_build_nic_netdev so that the two functions can be called at any order. Fixes: 547eede070eb ("net/mlx5e: IPSec, Innova IPSec offload infrastructure") Signed-off-by: Huy Nguyen Reviewed-by: Raed Salem Signed-off-by: Saeed Mahameed Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 3 --- 1 file changed, 3 deletions(-) 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 3d45341e2216..26f7fab109d9 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c @@ -532,9 +532,6 @@ void mlx5e_ipsec_build_netdev(struct mlx5e_priv *priv) struct mlx5_core_dev *mdev = priv->mdev; struct net_device *netdev = priv->netdev; - if (!priv->ipsec) - return; - if (!(mlx5_accel_ipsec_device_caps(mdev) & MLX5_ACCEL_IPSEC_CAP_ESP) || !MLX5_CAP_ETH(mdev, swp)) { mlx5_core_dbg(mdev, "mlx5e: ESP and SWP offload not supported\n"); -- 2.30.2