Skip to content

Commit e0b87fa

Browse files
isharoni-nvraslandarawsheh
authored andcommitted
net/mlx5/windows: fix match criteria in flow creation
Currently the Windows implementation hardcodes match criteria to MLX5_MATCH_OUTER_HEADERS when creating flow rules, which prevents matching on inner headers and other criteria types like NVGRE. The fix uses the matcher's match_criteria_enable attribute instead of hardcoding OUTER_HEADERS, and moves the assignment outside the action switch block to apply to all cases. NVGRE item type is also added to the supported items list. Fixes: 1d19449 ("net/mlx5: create flow rule on Windows") Cc: stable@dpdk.org Signed-off-by: Itai Sharoni <isharoni@nvidia.com> Acked-by: Bing Zhao <bingz@nvidia.com>
1 parent aff44ad commit e0b87fa

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,7 @@ Ilyes Ben Hamouda <ilyes.ben_hamouda@6wind.com>
639639
Intiyaz Basha <intiyaz.basha@caviumnetworks.com>
640640
Ioana Ciornei <ioana.ciornei@nxp.com>
641641
Isaac Boukris <iboukris@gmail.com>
642+
Itai Sharoni <isharoni@nvidia.com>
642643
Itamar Gozlan <igozlan@nvidia.com>
643644
Itsuro Oda <oda@valinux.co.jp>
644645
Ivan Boule <ivan.boule@6wind.com>

doc/guides/nics/mlx5.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,6 +1231,10 @@ On Windows, the features are limited:
12311231
- IPv4/TCP with CVLAN filtering
12321232
- L4 steering rules for port RSS of IP, UDP, TCP
12331233

1234+
- Tunnel protocol support:
1235+
1236+
- NVGRE (requires DevX dynamic insertion mode)
1237+
12341238

12351239
.. _mlx5_multiproc:
12361240

drivers/net/mlx5/windows/mlx5_flow_os.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,9 @@ mlx5_flow_os_create_flow(void *matcher, void *match_value,
219219
default:
220220
break;
221221
}
222-
MLX5_SET(devx_fs_rule_add_in, in, match_criteria_enable,
223-
MLX5_MATCH_OUTER_HEADERS);
224222
}
223+
MLX5_SET(devx_fs_rule_add_in, in, match_criteria_enable,
224+
mlx5_matcher->attr.match_criteria_enable);
225225
*flow = mlx5_glue->devx_fs_rule_add(mlx5_matcher->ctx, in, sizeof(in));
226226
return (*flow) ? 0 : -1;
227227
}

drivers/net/mlx5/windows/mlx5_flow_os.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ mlx5_flow_os_item_supported(int item)
4747
case RTE_FLOW_ITEM_TYPE_IPV6:
4848
case RTE_FLOW_ITEM_TYPE_VLAN:
4949
case RTE_FLOW_ITEM_TYPE_ESP:
50+
case RTE_FLOW_ITEM_TYPE_NVGRE:
5051
return true;
5152
default:
5253
return false;

0 commit comments

Comments
 (0)