From patchwork Fri Jun 16 20:11:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 13283266 X-Patchwork-Delegate: kuba@kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 904711ED58 for ; Fri, 16 Jun 2023 20:11:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 45EADC433C9; Fri, 16 Jun 2023 20:11:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686946306; bh=6OpojD3Xe+AnBZcW3gSPYy8ClR4/NRvqsXse+WOTvc8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Al/F10A6aCya2mmAHvod/FR/JAwelo72tcFXSeckgIAvubdL/VFl9z/5c+0t/1yVP di/a5h7MtxuMYnpuzbhFPj9Jl5RG7Z+5OpCDpUx6vNC8T8nJDSaFCakAsB6v0OD4mw h9aonlOqRAESBAz8kQSUXtPqmoIiTn3QtoD5H9SYkU7kU0EFP2xoZC5mlEY+kwsI5M PPcpZMpni/ZgB7Fh0mHbvHQYsLxcVutIWPGDzzyldTJ67wyBJw0gDdXt0hyaYD6TNS xgnSCm4j4IsRrbbFwu3nOlJ3wx5Hj0QYvtqW+V+xiVlj8ccBzdoNjMRd02bG5ljmUf tSHH/uMmK0r+w== From: Saeed Mahameed To: "David S. Miller" , Jakub Kicinski , Paolo Abeni , Eric Dumazet Cc: Saeed Mahameed , netdev@vger.kernel.org, Tariq Toukan , Daniel Jurgens Subject: [net-next 12/15] net/mlx5: Fix the macro for accessing EC VF vports Date: Fri, 16 Jun 2023 13:11:10 -0700 Message-Id: <20230616201113.45510-13-saeed@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230616201113.45510-1-saeed@kernel.org> References: <20230616201113.45510-1-saeed@kernel.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org From: Daniel Jurgens The last value is not set correctly. This results in representors not being created for all EC VFs when the base value is higher than 0. Fixes: a7719b29a821 ("net/mlx5: Add management of EC VF vports") Signed-off-by: Daniel Jurgens Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h index bcbab06759c4..7064609f4998 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h @@ -668,6 +668,7 @@ void mlx5e_tc_clean_fdb_peer_flows(struct mlx5_eswitch *esw); index, \ vport, \ MLX5_CAP_GEN_2((esw->dev), ec_vf_vport_base), \ + MLX5_CAP_GEN_2((esw->dev), ec_vf_vport_base) +\ (last) - 1) struct mlx5_eswitch *mlx5_devlink_eswitch_get(struct devlink *devlink);