Skip to contentSkip to conversation

net/mlx5: fix tunnel offload rules validation on VF representor.

PATCH In review Gregory Etelson 2 participants 2 messages Dec 11, 2020 – Dec 17, 2020 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/mlx5: fix tunnel offload rules validation on VF representor.

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")
---
 drivers/net/mlx5/mlx5_flow_dv.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/net/mlx5/mlx5_flow_dv.c +5 -0
index aa21ff9613..8ea9bc4770 100644
@@ -5282,6 +5282,11 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 	} else {
 		tunnel = 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 = tunnel_use_standard_attr_group_translate
 				(dev, tunnel, attr, items, actions);
 	ret = flow_dv_validate_attributes(dev, tunnel, attr, &grp_info, error);
Signature · 1 line
2.29.2
#1 lore raw

Hi,

Quoted 11 lines

-----Original Message-----
From: Gregory Etelson <[email protected]>
Sent: Friday, December 11, 2020 4:46 PM
To: [email protected]
Cc: Gregory Etelson <[email protected]>; Matan Azrad <[email protected]>; Raslan Darawsheh <[email protected]>; [email protected]; Slava Ovsiienko <[email protected]>; Shahaf Shuler <[email protected]>
Subject: [PATCH] net/mlx5: fix tunnel offload rules validation on VF representor.

Changed commit log, fixed wrong headline format and removed offload extra word to keep title shorter.

Quoted 10 lines

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")

Quoted 7 lines
Fixes 4ec6360de37d ("net/mlx5: implement tunnel offload")

---

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh