From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C39D6A09EE for ; Fri, 11 Dec 2020 15:46:36 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9ED1BC940; Fri, 11 Dec 2020 15:46:35 +0100 (CET) Received: from hqnvemgate26.nvidia.com (hqnvemgate26.nvidia.com [216.228.121.65]) by dpdk.org (Postfix) with ESMTP id B06B1AC9B; Fri, 11 Dec 2020 15:46:31 +0100 (CET) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Fri, 11 Dec 2020 06:46:29 -0800 Received: from nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 11 Dec 2020 14:46:27 +0000 From: Gregory Etelson To: CC: , , , , Viacheslav Ovsiienko , "Shahaf Shuler" Date: Fri, 11 Dec 2020 16:46:14 +0200 Message-ID: <20201211144614.24204-1-getelson@nvidia.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1607697989; bh=l0PSJ1f0k1M1XQfUDs84N+Lco1Ndt9BR2pmUj2R3aOo=; h=From:To:CC:Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding:Content-Type:X-Originating-IP: X-ClientProxiedBy; b=ScxsBD04GTlqjRG8cY84OaQ3Sd6n7bUNZq/OYVQgfGzgZaWbc01boQ/QGwpCprq6s 479/vBQrxYKiVTL2Bk3M75kSuhLsCd+SYOJCYL+q/KW2rZ+yDhVWKCHI/dtz22+VPD xZlp8d0hfwtQkHA2LAVoDUZ94o++KjeWi9RocH7H5VR5u1hUF/pJCBYBysBnwj866F jMVEKOahRWa2D+c42IcG9ckj1uLg6IqTlrdOq4Fv8l6ZQUqU1wQpxARSbu3K+tVt2n DkyX9rs16YWqXW2JcVcu5kXNS9a0afy2JAA6WYh2LGaOhqPYHvyhbJyVNL4A5xDoWq RsVUWxoGkHxOA== Subject: [dpdk-stable] [PATCH] net/mlx5: fix tunnel offload rules validation on VF representor. X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" MLX5 PMD implicitly adds vxlan_decap flow action to tunnel offload match type rules. However, VXLAN decap action on VF representors is not supported on MLX5 PMD hardware. The patch rejects attempt to create tunnel offload flow rules on VF representor. Refer: commit 9c4971e5231d ("net/mlx5: update VLAN and encap actions validation") Fixes: 4ec6360de37d ("net/mlx5: implement tunnel offload") cc: stable@dpdk.org Signed-off-by: Gregory Etelson Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_flow_dv.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_d= v.c index aa21ff9613..8ea9bc4770 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -5282,6 +5282,11 @@ flow_dv_validate(struct rte_eth_dev *dev, const stru= ct rte_flow_attr *attr, } else { tunnel =3D NULL; } + if (tunnel && priv->representor) + return rte_flow_error_set(error, ENOTSUP, + RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL, + "decap not supported " + "for VF representor"); grp_info.std_tbl_fix =3D tunnel_use_standard_attr_group_translate (dev, tunnel, attr, items, actions); ret =3D flow_dv_validate_attributes(dev, tunnel, attr, &grp_info, error); --=20 2.29.2