Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4848108pxj; Wed, 9 Jun 2021 03:26:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlyEwuodBISCFdHsb4SGK4q9H8UkF6gDxTOn2+7sKIhLhddjSRZp3TNeRirjzwUVtj5DL5 X-Received: by 2002:a50:eb8f:: with SMTP id y15mr30631005edr.285.1623234414040; Wed, 09 Jun 2021 03:26:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623234414; cv=none; d=google.com; s=arc-20160816; b=scnBkgO2Atp0RNC3O/DcqVyWuc8aONpHf18CVdGV6OTnpoYODpf41BMxrah59cPIKW 02ofepMe+KDpLd0KKE9rzbxcCFMtDRbGsPCMjzlqW9v4qtD5jdNDxs1j/iQHC/h88Zv9 tmLxBVzhN4T8lZfrqupHo5sCP3xiDQ0feDTxlz9aDwdlKxJx+VMUYiwQ4mvUeSM5cXyM /UmB5KP4wXeJ7Ew5q3mwIvgbyN8qae6Bd/1Fuh1yPknNIAfOkizbWLBWYycwpOQfi+S0 i/WX49Lbjmler5xA2Azh7n8KXUfU/cnJFel/R+xuvy+YcvTKu8l9MuHccPZBcnLGkJT2 5gNQ== 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=prCY0/lSeO3juE8KUBTJtfkNwibHlHRoOeeL0YSlD7Q=; b=tpc/Uh/1MxvMo0KTVKDChN7mz23pJ/uifuu1JbgXJpUD5RkMNZEBypTzeFCUgwyLKt Db0rsLqtGaQrfcqdcdY/uKwuEW1kj04UStGWBwmsBJ2AfyoAxxgvkFBsFd/BusJfULYQ 2o6YUar0zenWSVnIegyJSZqz8kpG0lDRyz0hB19+xMQyRHP6WIG22gfvx8tdJboH5JtV 64S75N4X8rMykTlq62eBMYaxlW6IS8zZyktO5tqHk7D748TlTLsGvdxgxx6Xj0L6EYhY CSjXO+2b4c3inC9fyRUVxeKBCe29iusHbp9dGZU6dCvbi4uKySWPKUMme+vOaSiLf5aH ymHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=s3jV88VF; 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 w14si2000419edv.384.2021.06.09.03.26.30; Wed, 09 Jun 2021 03:26:54 -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=s3jV88VF; 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 S235736AbhFHS6g (ORCPT + 99 others); Tue, 8 Jun 2021 14:58:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:47360 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235578AbhFHSv5 (ORCPT ); Tue, 8 Jun 2021 14:51:57 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D90BF61430; Tue, 8 Jun 2021 18:40:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623177603; bh=FPjiWu/wc3uQw8LBAXVmZNeVVvzU69FOpXoDTMX3VuE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s3jV88VFkVwlxM2H/GBj9Id174BPv8KnHdnrKE7WskzC0pNzxWqqovrqyOMNnNtKG wkhIMybR7M4Nd85PbvtpVjQRyG3Pfcbwar2Fw3LdB33DGSlbmEYKUBBXUptLlfAoEY fS5MrL+r00rx/5SDbN6Ev/2K5V0hx9RYt7OPOwzc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yevgeny Kliteynik , Alex Vesker , Saeed Mahameed , Sasha Levin Subject: [PATCH 5.10 032/137] net/mlx5: DR, Create multi-destination flow table with level less than 64 Date: Tue, 8 Jun 2021 20:26:12 +0200 Message-Id: <20210608175943.502989211@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210608175942.377073879@linuxfoundation.org> References: <20210608175942.377073879@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: Yevgeny Kliteynik [ Upstream commit 216214c64a8c1cb9078c2c0aec7bb4a2f8e75397 ] Flow table that contains flow pointing to multiple flow tables or multiple TIRs must have a level lower than 64. In our case it applies to muli- destination flow table. Fix the level of the created table to comply with HW Spec definitions, and still make sure that its level lower than SW-owned tables, so that it would be possible to point from the multi-destination FW table to SW tables. Fixes: 34583beea4b7 ("net/mlx5: DR, Create multi-destination table for SW-steering use") Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlx5/core/steering/dr_fw.c | 3 ++- include/linux/mlx5/mlx5_ifc.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_fw.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_fw.c index 1fbcd012bb85..7ccfd40586ce 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_fw.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_fw.c @@ -112,7 +112,8 @@ int mlx5dr_fw_create_md_tbl(struct mlx5dr_domain *dmn, int ret; ft_attr.table_type = MLX5_FLOW_TABLE_TYPE_FDB; - ft_attr.level = dmn->info.caps.max_ft_level - 2; + ft_attr.level = min_t(int, dmn->info.caps.max_ft_level - 2, + MLX5_FT_MAX_MULTIPATH_LEVEL); ft_attr.reformat_en = reformat_req; ft_attr.decap_en = reformat_req; diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h index cc9ee0776974..af8f4e2cf21d 100644 --- a/include/linux/mlx5/mlx5_ifc.h +++ b/include/linux/mlx5/mlx5_ifc.h @@ -1223,6 +1223,8 @@ enum mlx5_fc_bulk_alloc_bitmask { #define MLX5_FC_BULK_NUM_FCS(fc_enum) (MLX5_FC_BULK_SIZE_FACTOR * (fc_enum)) +#define MLX5_FT_MAX_MULTIPATH_LEVEL 63 + enum { MLX5_STEERING_FORMAT_CONNECTX_5 = 0, MLX5_STEERING_FORMAT_CONNECTX_6DX = 1, -- 2.30.2