Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2750971pxj; Mon, 31 May 2021 09:49:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqS0+3JKtAserDhsHAZ6aE7975/n60ikc0xyZp2VBK00vW9PcBv/9xLAC/EQjjHWb+km7i X-Received: by 2002:a17:906:b317:: with SMTP id n23mr6257916ejz.324.1622479753110; Mon, 31 May 2021 09:49:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622479753; cv=none; d=google.com; s=arc-20160816; b=EuU8J6Mn1EUJ9AE9Q1qNanNJ9rVqbhhFeiSaJOpC0DnaEP315vq+cPXMuObLAVF3XM QKQjsiMVraFaa29XUvtcru1SOWzro69TtGyQqJZ+IfjdpmHgIZCj1r9ivN1kz7Hxvnu1 5WHwVr8Sv+6+yp8t6PsOcXzq0FGeIaHc62EoI8iLHrV23G7SwIe0PIlPAYxp3fbMx/Lr ez9rzecTDbKnYwfhxaIiHzVsCMkAe5ttgovKxvoKOMXI5/TQilrxUN4ybkxsXA/3NoCW Vifz9pPEf21F38s16LGra9LgBN2EPGtadISyKIEwRBN2my3yQxhj1ZoU4x74/wpJ7zjS Lpwg== 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=kV/MaGLGrKkDRLfpKfFtNKkshiORB0j3moiW6Cp8VQg=; b=VJOFJHEXq9+CEYMCg/YaHWh4Ct9ybi9K5JIASQvHCTkW8Nf79NlzlPHQrhNKwqmpAQ iaQgfcRD1MQ7RGmpc8YkAdr/Jz/dbnVqRANhERwi7FX0baTa1cShr2R7V5dBYBGziyz3 hdEGCI67n1GyulS6+N3j7yTVXKZWDJhEQnsHiZX9c9dYxcsDDUd++aRAq9fuA48fZLdS S1zGXplTWLPltHxpNa+c8T2dj7zRzw39HnCTqxlmhY+AsZfUPrdLkfRx38zz1dy3mwsC 4w6puqFmND4wO7CSITdFeWTc9Nl3RYZw9BFI14VKZULZB+d7UFKoRlWUhAjEDO/ItjvD OCCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=MnDC7eIm; 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 h15si15646930ejq.124.2021.05.31.09.48.50; Mon, 31 May 2021 09:49:13 -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=MnDC7eIm; 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 S233952AbhEaQta (ORCPT + 99 others); Mon, 31 May 2021 12:49:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:50622 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231693AbhEaO4F (ORCPT ); Mon, 31 May 2021 10:56:05 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CCD9261CBB; Mon, 31 May 2021 14:00:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622469607; bh=Pfm5elhLty2T0dvGkOYXa40LNca4aqBke3gcjM3Vgmg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MnDC7eImJJ1fAqyEn8RyI2VQlboUp+yDgeBV/WH1Hd1dGSNqL8Te7wYwuvIKBcnK9 mChOTWhsW8peufaBm1Jac0NrBFrP4vBZex6hpnjjqBVU33Bo4p+WMNmnOBdK781RTD 5HOfCgeDC8BmsuIYcp3oyd2hMPnhpfPUTC2zwTOA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vlad Buslov , Roi Dayan , Saeed Mahameed , Sasha Levin Subject: [PATCH 5.12 263/296] net/mlx5e: Reject mirroring on source port change encap rules Date: Mon, 31 May 2021 15:15:18 +0200 Message-Id: <20210531130712.590916301@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130703.762129381@linuxfoundation.org> References: <20210531130703.762129381@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: Vlad Buslov [ Upstream commit 7d1a3d08c8a6398e7497a98cf3f7b73ea13d9939 ] Rules with MLX5_ESW_DEST_CHAIN_WITH_SRC_PORT_CHANGE dest flag are translated to destination FT in eswitch. Currently it is not possible to mirror such rules because firmware doesn't support mixing FT and Vport destinations in single rule when one of them adds encapsulation. Since the only use case for MLX5_ESW_DEST_CHAIN_WITH_SRC_PORT_CHANGE destination is support for tunnel endpoints on VF and trying to offload such rule with mirror action causes either crash in fs_core or firmware error with syndrome 0xff6a1d, reject all such rules in mlx5 TC layer. Fixes: 10742efc20a4 ("net/mlx5e: VF tunnel TX traffic offloading") Signed-off-by: Vlad Buslov Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c index 2d28116be8d0..840cc9d8a2ee 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c @@ -1353,6 +1353,12 @@ mlx5e_tc_add_fdb_flow(struct mlx5e_priv *priv, esw_attr->dests[out_index].mdev = out_priv->mdev; } + if (vf_tun && esw_attr->out_count > 1) { + NL_SET_ERR_MSG_MOD(extack, "VF tunnel encap with mirroring is not supported"); + err = -EOPNOTSUPP; + goto err_out; + } + err = mlx5_eswitch_add_vlan_action(esw, attr); if (err) goto err_out; -- 2.30.2