From mboxrd@z Thu Jan 1 00:00:00 1970 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 B975B19899 for ; Wed, 26 Jul 2023 21:32:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 88C05C4339A; Wed, 26 Jul 2023 21:32:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690407133; bh=iFY+HhTsmiJNucZipuoAgaSV8bgi1txl7OiGzXz82HI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r0dNb6GCUpcgbwwkP+8tVi1WntpJMZrYqy2Gij9+OeX6jjgczPmiQuYA3vLiOW71q +eKRrL9YsJyBM3ZeUiyojW6oHSqPwj39CqcLYLAkrE1d2Yv2+HvV1rI+IduNIZJdCV PAmcX7+yJQPbJd/dPPOzZfDkwHSyMuRSd63w+JdUlEh+fE5uPSNnY6YxsfQuxlj6me RtFNAiiqV++sUkvYlnNu7yOUGkQNjptugicw3qfGce3rWCpVuZ9vXwzitUdAExrsWt b1LhGODhqFtnouOHhoK82d7KNr1VQsTOGFV43ll2xeAV5kOPbYXIyDUuDFzEZ+rAzH 7nNqpcTe39qzA== From: Saeed Mahameed To: "David S. Miller" , Jakub Kicinski , Paolo Abeni , Eric Dumazet Cc: Saeed Mahameed , netdev@vger.kernel.org, Tariq Toukan , Shay Drory , Roi Dayan Subject: [net 05/15] net/mlx5: Honor user input for migratable port fn attr Date: Wed, 26 Jul 2023 14:31:56 -0700 Message-ID: <20230726213206.47022-6-saeed@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230726213206.47022-1-saeed@kernel.org> References: <20230726213206.47022-1-saeed@kernel.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Shay Drory Currently, whenever a user is setting migratable port fn attr, the driver is always turn migratable capability on. Fix it by honor the user input Fixes: e5b9642a33be ("net/mlx5: E-Switch, Implement devlink port function cmds to control migratable") Signed-off-by: Shay Drory Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c index bdfe609cc9ec..93b2b94d41cd 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c @@ -4196,7 +4196,7 @@ int mlx5_devlink_port_fn_migratable_set(struct devlink_port *port, bool enable, } hca_caps = MLX5_ADDR_OF(query_hca_cap_out, query_ctx, capability); - MLX5_SET(cmd_hca_cap_2, hca_caps, migratable, 1); + MLX5_SET(cmd_hca_cap_2, hca_caps, migratable, enable); err = mlx5_vport_set_other_func_cap(esw->dev, hca_caps, vport->vport, MLX5_SET_HCA_CAP_OP_MOD_GENERAL_DEVICE2); -- 2.41.0