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 714B54123E for ; Tue, 14 Nov 2023 21:59:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="J5lyMx7O" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 329BCC433CB; Tue, 14 Nov 2023 21:59:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1699999146; bh=sfqj7BDpKAcb64THPOF02zidFNtaJRrUUhus6LZjwfw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J5lyMx7Ox9RNnJcWHVtGAupsO8VaE28aWE//+KiO1yB7tj3dNflcIuZV0g/OY314h +xQ2jluN2l8DAf8ANNuDqGS3ByNIIZWpxHXMW7j5vCgqXqQKn4pXY5JFpJBwmc0wQv U1m3DhlAcBL9a6+6J1FDFIbVo6SgWqqWYARBkvS8XgO/QhHy8sJ1zY7PZt7lp33u6B CBF8JHw8AY+2WijlFtyHM2tayhkrhC2UUpotXUeNbgzAjPaKPZJXOSjQWUkeGqAPC4 LdR2oe15rdvE+b11FC1TNl/FiuFPfTGvINeDD+vov+FXAMkALzL4ax+GPKhwkfYQT9 ZYHKyReH3rbeg== From: Saeed Mahameed To: "David S. Miller" , Jakub Kicinski , Paolo Abeni , Eric Dumazet Cc: Saeed Mahameed , netdev@vger.kernel.org, Tariq Toukan , Jianbo Liu , Leon Romanovsky , Roi Dayan Subject: [net V2 08/15] net/mlx5e: Don't modify the peer sent-to-vport rules for IPSec offload Date: Tue, 14 Nov 2023 13:58:39 -0800 Message-ID: <20231114215846.5902-9-saeed@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231114215846.5902-1-saeed@kernel.org> References: <20231114215846.5902-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: Jianbo Liu As IPSec packet offload in switchdev mode is not supported with LAG, it's unnecessary to modify those sent-to-vport rules to the peer eswitch. Fixes: c6c2bf5db4ea ("net/mlx5e: Support IPsec packet offload for TX in switchdev mode") Signed-off-by: Jianbo Liu Reviewed-by: Leon Romanovsky Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 3 ++- 1 file changed, 2 insertions(+), 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 b296ac52a439..88236e75fd90 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c @@ -984,7 +984,8 @@ 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 && on_esw->offloads.ft_ipsec_tx_pol) { + if (rep->vport == MLX5_VPORT_UPLINK && + on_esw == from_esw && on_esw->offloads.ft_ipsec_tx_pol) { dest.ft = on_esw->offloads.ft_ipsec_tx_pol; flow_act.flags = FLOW_ACT_IGNORE_FLOW_LEVEL; dest.type = MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE; -- 2.41.0