From patchwork Tue Aug 3 23:19:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 12417623 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5CCDCC432BE for ; Tue, 3 Aug 2021 23:20:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3F9E561037 for ; Tue, 3 Aug 2021 23:20:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233666AbhHCXUe (ORCPT ); Tue, 3 Aug 2021 19:20:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:38958 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229986AbhHCXUc (ORCPT ); Tue, 3 Aug 2021 19:20:32 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 23EF260F93; Tue, 3 Aug 2021 23:20:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628032820; bh=CKn/KvEeyZAMuD+iFiH3gFauEveHmSMXEL5LWTioEbc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=t6eXw/E7p6Ij0lxShllsqHoBbFM3/hiGROIRM2adIiIkdeNJgOIJgSTthlygfxJVm ioa0yfwArIxq+fexGzcqOeuo6JT3o4vyc5jZMXgtW62z2E4nwjC2GHMEj5tYiU7vxk nHAsgvI+5KU5xF0qyxijFIJpi4NaBjbq3HDEJKCocz/Zi0yzIO6TxYEg6kgWNor3g6 3liyiJUEbFSja5be6sPo/SGHLtivN4+EnjSVTHgszsuHi/D1ur6xxOnNZEUFjnl4fQ XvzfzHo2wW+3lwt+vSeX86q3GrJhr8tIvEbRLUqU1sVbZgBvbKNIYk3gv0mW1xEM3H 4l4gjMqJJHc6w== From: Saeed Mahameed To: Saeed Mahameed , Leon Romanovsky Cc: netdev@vger.kernel.org, linux-rdma@vger.kernel.org, Ariel Levkovich , Roi Dayan Subject: [PATCH mlx5-next 06/14] net/mlx5: E-Switch, set flow source for send to uplink rule Date: Tue, 3 Aug 2021 16:19:51 -0700 Message-Id: <20210803231959.26513-7-saeed@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210803231959.26513-1-saeed@kernel.org> References: <20210803231959.26513-1-saeed@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org From: Ariel Levkovich Set the flow source param to local vport for the uplink rep send-to-vport rule. This will comply with the recent changes in SW steering that use the flow source as an indication for the rule type - rx or tx. Since the uplink send-to-vport rule is forwarding traffic to the wire it has to indicate that it is an sx rule and can't use the any port value in the flow source. Signed-off-by: Ariel Levkovich Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c index 12567002997f..1735be77e1fd 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c @@ -963,6 +963,9 @@ mlx5_eswitch_add_send_to_vport_rule(struct mlx5_eswitch *on_esw, dest.vport.flags |= MLX5_FLOW_DEST_VPORT_VHCA_ID; flow_act.action = MLX5_FLOW_CONTEXT_ACTION_FWD_DEST; + if (rep->vport == MLX5_VPORT_UPLINK) + spec->flow_context.flow_source = MLX5_FLOW_CONTEXT_FLOW_SOURCE_LOCAL_VPORT; + flow_rule = mlx5_add_flow_rules(on_esw->fdb_table.offloads.slow_fdb, spec, &flow_act, &dest, 1); if (IS_ERR(flow_rule))