Patch set 105813

net/mlx5: fix RSS expansion compilation

Submitter
Gregory Etelson
Applied on
dpdk (6f716880ee53ac1e50c9c75dc749886e3257bb8f)
Date submitted
Jan. 14, 2022, 3:16 p.m.

Test Results Apply Error

Checking patch drivers/net/mlx5/mlx5_flow.c...
error: while searching for:
	switch (item->type) {
	case RTE_FLOW_ITEM_TYPE_ETH:
		MLX5_XSET_ITEM_MASK_SPEC(eth, type);
		ret = mlx5_ethertype_to_item_type(spec, mask, false);
		break;
	case RTE_FLOW_ITEM_TYPE_VLAN:
		MLX5_XSET_ITEM_MASK_SPEC(vlan, inner_type);
		ret = mlx5_ethertype_to_item_type(spec, mask, false);
		break;
	case RTE_FLOW_ITEM_TYPE_IPV4:
		MLX5_XSET_ITEM_MASK_SPEC(ipv4, hdr.next_proto_id);
		ret = mlx5_inet_proto_to_item_type(spec, mask);
		break;
	case RTE_FLOW_ITEM_TYPE_IPV6:
		MLX5_XSET_ITEM_MASK_SPEC(ipv6, hdr.proto);
		ret = mlx5_inet_proto_to_item_type(spec, mask);
		break;
	case RTE_FLOW_ITEM_TYPE_GENEVE:

error: patch failed: drivers/net/mlx5/mlx5_flow.c:261
Applying patch drivers/net/mlx5/mlx5_flow.c with 1 reject...
Rejected hunk #1.
diff a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c	(rejected hunks)
@@ -261,18 +261,26 @@ mlx5_flow_expand_rss_item_complete(const struct rte_flow_item *item)
 	switch (item->type) {
 	case RTE_FLOW_ITEM_TYPE_ETH:
 		MLX5_XSET_ITEM_MASK_SPEC(eth, type);
+		if (!mask)
+			return RTE_FLOW_ITEM_TYPE_VOID;
 		ret = mlx5_ethertype_to_item_type(spec, mask, false);
 		break;
 	case RTE_FLOW_ITEM_TYPE_VLAN:
 		MLX5_XSET_ITEM_MASK_SPEC(vlan, inner_type);
+		if (!mask)
+			return RTE_FLOW_ITEM_TYPE_VOID;
 		ret = mlx5_ethertype_to_item_type(spec, mask, false);
 		break;
 	case RTE_FLOW_ITEM_TYPE_IPV4:
 		MLX5_XSET_ITEM_MASK_SPEC(ipv4, hdr.next_proto_id);
+		if (!mask)
+			return RTE_FLOW_ITEM_TYPE_VOID;
 		ret = mlx5_inet_proto_to_item_type(spec, mask);
 		break;
 	case RTE_FLOW_ITEM_TYPE_IPV6:
 		MLX5_XSET_ITEM_MASK_SPEC(ipv6, hdr.proto);
+		if (!mask)
+			return RTE_FLOW_ITEM_TYPE_VOID;
 		ret = mlx5_inet_proto_to_item_type(spec, mask);
 		break;
 	case RTE_FLOW_ITEM_TYPE_GENEVE: