Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3918690pxj; Mon, 21 Jun 2021 09:21:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwsJnxOU2FkbsLhtFM6f50HqAK7W3JrACoRmz07ysOdd/uW5ehjINeqRdhQDdmhydmSu8X7 X-Received: by 2002:a05:6402:190a:: with SMTP id e10mr22416743edz.160.1624292488146; Mon, 21 Jun 2021 09:21:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624292488; cv=none; d=google.com; s=arc-20160816; b=g9Cm9+R1a1Kx50AZz5GDOiEWkOwzqvcSZGUjNs/6FMzKW/rR+7QsWFle2Ycst5zfc7 vcwfnc66/sHR6Ii90op5WbHAItwE5uLvOG+paF7qXUESUGVlWVZNnpQZCjOVnPZ1EetZ bj93DyLrs2PxraJxRTh4KRS7CIQMHESurUWwHVfsoojPUJM+j0sc+wD0QqeXlPp6voQg F3K/Wa/GjwAIPvSVsS2p/hQ1vwueWbT2SKdggy9EnCLO0kZWu6m1VXAghcHiAMZq5tta re3EorKtdUVzmCqoFYMQ9QhrsUfd5imiYjn1YeLGRV4LMbR1wXNWGzUzJnvX6qNRIQOo q61g== 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=HfIMRnwB0cKD6KwEUvx0tQL7rn/pA6BnphPvSkHpa3c=; b=fPV349MWXq972N3BngegM1nH8ciryHYjH716lLs1bWzp3JvUG8QhQSKn0JNjC6wiRc I3cLO5TlCb1IJuAvlX1hbA/yJHy43/Bkp/aAki+MzQRsrDjShidxl3KBBGmYiZgsU1Pn 8mZksClYP3niuIsmG5GPzwN+4bfuIH2cIfi5G/H0Eq0niFhwIXIGUMUB5AgPbuFwbhbI XoHNC8mZETaAkXlPbn9QAPkOyU0DMZuQdOf/f/QSqhM5d0CxU3OsIMG3t+IpTRgwDXzI K0w/DkCc42D/I4oAEflQpFRFSZL40VW/pBVcyev0wU8khbfqZw8VjE6ztKT8S9Hnqm/e 9Xuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qsTPyt6N; 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 f14si8956831ejx.530.2021.06.21.09.21.05; Mon, 21 Jun 2021 09:21:28 -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=qsTPyt6N; 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 S231280AbhFUQTp (ORCPT + 99 others); Mon, 21 Jun 2021 12:19:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:39682 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231127AbhFUQT2 (ORCPT ); Mon, 21 Jun 2021 12:19:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1312C611BD; Mon, 21 Jun 2021 16:17:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624292233; bh=ugoJC3wP4h9abBjTmplBKBMow6jxyx9uXeDiuZFMKYE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qsTPyt6NzZi0+viWtjX10g5zruIShDIIVpaLUNs2rJ5O/So33NBeWeiIg0f1EuXG5 lK/yF3+jEnAuwoMqgKSL5dtEdeBG5fZjO3mgJ8OscJ4OdsazC3V3zpVoHsvgT8mx1C iW94cYF3T9acAqZIrnZZ0DQk45F4aBUK/ex11YZY= 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.4 15/90] net/mlx5e: Remove dependency in IPsec initialization flows Date: Mon, 21 Jun 2021 18:14:50 +0200 Message-Id: <20210621154904.655800520@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154904.159672728@linuxfoundation.org> References: <20210621154904.159672728@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 cf58c9637904..c467f5e981f6 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c @@ -515,9 +515,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