Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3922719pxj; Mon, 21 Jun 2021 09:26:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMwAhGZZ9+aQgYBSdjH2qVHeWXcLav+Y/tG/NJ/Vdibt+vz5TtQAawQQFxmT2BjU7eBsWp X-Received: by 2002:a17:907:1609:: with SMTP id hb9mr16007516ejc.368.1624292803410; Mon, 21 Jun 2021 09:26:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624292803; cv=none; d=google.com; s=arc-20160816; b=Oz3dvMGKr5EERkkZ/rNi35y9FxM68/bZmcjYzA9gNY9lFdguUX1ITiQii197Xr4/M3 YA3RGOgTzsCvQfKqql7GJHgLZ8WeJw5GQfmjorbwJ0GuRCDex6kJOSUBO7OnE7jX1AyR AInCz6Y7D6rSEK601o2rOZbmFSmJCyaJuWk0ms6L6IJymFY+UvjG9+EBSd0JXOsrmMl2 xKwbMUnY2+WCilRBXNHxnqKtbHLN2Sv4kOEbAubLmRzwmloGDu/7Bx3AtYmdc54247Ck lR3rNQETpOPYncQQCVnZmadFuUe4twz3BcOMvqr8ez5YFVOkoXg4I9k68qWNJCP9u2Mw 2afw== 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=oz82lFswCrfJCHBpvy4qAjlb92E5NbP4GPByXlcivDc=; b=Nv2aDZkKJs4j1ZR9E5gQvSiZe8smcEBi0RUNG27LlrhC96kiGkHadrrWDTQ+XCFQQM FxQxJFWBht2DAQ6daEEpqWaaXX9cU9oAhFkf9u/6ItBfDjRg1q84hon8ODcw6NRPWSPs Oeu5pFQbr3QopWh3aFxViOTjgUs0QJ7SJM1SaVh5rrnlsENvwis9C5ULNil7kxdENLGc dmsRXq3I6CO2jk71S2gHIwOlalUFEntcPMMuyLLlkEdCUHCNbqESyPKK2rB8bR+ghcOR cUEha0LToKQwuLdQkqfSyYitGGp+T1Ir76dWjB8asRW7v2CWxK/V9LgeE55UoAhN1Zsm DrUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wNU0EJom; 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 w17si67736ejb.524.2021.06.21.09.26.19; Mon, 21 Jun 2021 09:26:43 -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=wNU0EJom; 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 S231321AbhFUQ1k (ORCPT + 99 others); Mon, 21 Jun 2021 12:27:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:42736 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231906AbhFUQZw (ORCPT ); Mon, 21 Jun 2021 12:25:52 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 16CEC6138C; Mon, 21 Jun 2021 16:22:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624292526; bh=NDZNwh+bBldmUqE49BIqZcrIJBNlkcvI8m9AxcYqJTg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wNU0EJomx5sdRAHget7RFECux/9/gBSFhJXJciOQJJt+3+wJITvlpbjmbJvQTWopV cUDO18IC8Ki9lQcZu+8V4x1W+RKNP3DeoWhE9v6+TkqJZOmqrwfanXi+EUQ2KgR9PT dAlSTUwXt5EqvB0JljiUjJotVgY7Zx6BdxKYibDU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Maor Gottlieb , Alex Vesker , Yevgeny Kliteynik , Saeed Mahameed , Sasha Levin Subject: [PATCH 5.10 032/146] net/mlx5: DR, Dont use SW steering when RoCE is not supported Date: Mon, 21 Jun 2021 18:14:22 +0200 Message-Id: <20210621154912.380403140@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: Maor Gottlieb [ Upstream commit 4aaf96ac8b45d8e2e019b6b53cce65a73c4ace2c ] SW steering uses RC QP to write/read to/from ICM, hence it's not supported when RoCE is not supported as well. Fixes: 70605ea545e8 ("net/mlx5: DR, Expose APIs for direct rule managing") Signed-off-by: Maor Gottlieb Reviewed-by: Alex Vesker Reviewed-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed Signed-off-by: Sasha Levin --- .../net/ethernet/mellanox/mlx5/core/steering/mlx5dr.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/mlx5dr.h b/drivers/net/ethernet/mellanox/mlx5/core/steering/mlx5dr.h index 6f3db8dc896c..454968ba6831 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/steering/mlx5dr.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/mlx5dr.h @@ -124,10 +124,11 @@ int mlx5dr_action_destroy(struct mlx5dr_action *action); static inline bool mlx5dr_is_supported(struct mlx5_core_dev *dev) { - return MLX5_CAP_ESW_FLOWTABLE_FDB(dev, sw_owner) || - (MLX5_CAP_ESW_FLOWTABLE_FDB(dev, sw_owner_v2) && - (MLX5_CAP_GEN(dev, steering_format_version) <= - MLX5_STEERING_FORMAT_CONNECTX_6DX)); + return MLX5_CAP_GEN(dev, roce) && + (MLX5_CAP_ESW_FLOWTABLE_FDB(dev, sw_owner) || + (MLX5_CAP_ESW_FLOWTABLE_FDB(dev, sw_owner_v2) && + (MLX5_CAP_GEN(dev, steering_format_version) <= + MLX5_STEERING_FORMAT_CONNECTX_6DX))); } #endif /* _MLX5DR_H_ */ -- 2.30.2