net/mlx5: DR, Support IPv6 matching on flow label for STEv0
authorYevgeny Kliteynik <kliteyn@nvidia.com>
Sun, 4 Jul 2021 14:17:33 +0000 (17:17 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 26 Aug 2021 22:38:01 +0000 (15:38 -0700)
Add missing support for matching on IPv6 flow label for STEv0.

Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Reviewed-by: Alex Vesker <valex@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste_v0.c

index e4dd4eed5aee9dcc808b3a189d7f56eb466dfd63..22902c32002c19a352273abad1adb0bebc2612dc 100644 (file)
@@ -1157,6 +1157,7 @@ dr_ste_v0_build_eth_ipv6_l3_l4_tag(struct mlx5dr_match_param *value,
                                   u8 *tag)
 {
        struct mlx5dr_match_spec *spec = sb->inner ? &value->inner : &value->outer;
+       struct mlx5dr_match_misc *misc = &value->misc;
 
        DR_STE_SET_TAG(eth_l4, tag, dst_port, spec, tcp_dport);
        DR_STE_SET_TAG(eth_l4, tag, src_port, spec, tcp_sport);
@@ -1168,6 +1169,11 @@ dr_ste_v0_build_eth_ipv6_l3_l4_tag(struct mlx5dr_match_param *value,
        DR_STE_SET_TAG(eth_l4, tag, ecn, spec, ip_ecn);
        DR_STE_SET_TAG(eth_l4, tag, ipv6_hop_limit, spec, ttl_hoplimit);
 
+       if (sb->inner)
+               DR_STE_SET_TAG(eth_l4, tag, flow_label, misc, inner_ipv6_flow_label);
+       else
+               DR_STE_SET_TAG(eth_l4, tag, flow_label, misc, outer_ipv6_flow_label);
+
        if (spec->tcp_flags) {
                DR_STE_SET_TCP_FLAGS(eth_l4, tag, spec);
                spec->tcp_flags = 0;