Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3922534pxj; Mon, 21 Jun 2021 09:26:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1XwEeHNo1n8hYqt/W/A56I0aLVWwlDSS5J16rJ2ohwV1gFXsf4XdstL0BhYRUifO3k26R X-Received: by 2002:a17:906:ae0c:: with SMTP id le12mr16401596ejb.343.1624292790179; Mon, 21 Jun 2021 09:26:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624292790; cv=none; d=google.com; s=arc-20160816; b=NIIGzEVrJzslQvsbTKRFqccIMKvkjMiKg0tFk2pAp+SjPKNSznv2plSCr2267biC7T TA1L4pgbBuXarIzTR1du2pgV9+t30KTNiIaMexGLj36kJ9421ZNnxyNkEs4ZTbq/YZ0d gdge4lW8QV/mAPuZ/zfRyPRdPF4lbhV8BOzl0qQalq1VdNJiEJY5ojLjgw1Wn1g2fFI/ RVwm9JdnQ91+Uo/ch7je8iNEvW/xRvaaagQKmTSUKssRxMmCrvvLwEaJLYAamKs7lY0c ivB+vpsKMvv/tr7ruELeamefIeWhF8a+B/uOu9zt3Fa7uyqf+sFe4ejRsRzvVvOJ6iGt cebA== 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=yjeEmpGULmamYF+SZgvLnJvBd2Vi/SCxN6EoCfc3zYaOOQHBtZoF01eHpv72dIaVQ5 kv0VZNxLH++5rXoSTXXlB8HDvYR5cMgIqYLRu6j8I0M2pr+aCD0Goc5UPjpY7MRQgcyt /om5GLzYqT3qqj/EETyapCwxkbeMkyZsCgbAHoVXPjvUAknr+KlQIrBa/Ms8+zcxIIQl 5Ng0WRpImDgCDj7aj2XhJX/qavWXV8LmIip9MUIkdJy4XSpMSJ8u5lpMvJdO+2+1EReX bzqimQF4zShv4iMS+wqnAUMXwSVKwu0Jhu4ZEnaMgbEnYA3LVQS8hXmaow35IVFw7NHw tNyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QBFi7thl; 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 r18si17682659edd.158.2021.06.21.09.26.07; Mon, 21 Jun 2021 09:26:30 -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=QBFi7thl; 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 S231861AbhFUQ13 (ORCPT + 99 others); Mon, 21 Jun 2021 12:27:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:41468 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231225AbhFUQZj (ORCPT ); Mon, 21 Jun 2021 12:25:39 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AB2726134F; Mon, 21 Jun 2021 16:21:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624292516; bh=4X2/9wtd1+Rg1rY65WpgQucz5GudgJI3ZMxX7snrEbM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QBFi7thlpaHafI8S56MXbaan0qf5Fn5KsGMjurt+7flKWzyTNcOETDt6lS+vuLR+o FedB5Qh6qvuNnIqVfSpX1KVmPGYLQBtFkjN3eSZTLesGsXVdH210z/EubIIZ3VdeTb VBg8tc5j/Cw9yd5Dky9DPm0Er7KDOlnqdpEq86Rk= 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.10 028/146] net/mlx5e: Remove dependency in IPsec initialization flows Date: Mon, 21 Jun 2021 18:14:18 +0200 Message-Id: <20210621154912.232256864@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154911.244649123@linuxfoundation.org> References: <20210621154911.244649123@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