Patch "net/mlx5e: Set geneve_tlv_option_0_exist when matching on geneve option" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net/mlx5e: Set geneve_tlv_option_0_exist when matching on geneve option

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-mlx5e-set-geneve_tlv_option_0_exist-when-matchin.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 674c33d35519ca4bbe6dfebdaa6c0d1cb2125cf5
Author: Maor Dickman <maord@xxxxxxxxxx>
Date:   Sun Aug 1 14:45:17 2021 +0300

    net/mlx5e: Set geneve_tlv_option_0_exist when matching on geneve option
    
    [ Upstream commit e54638a8380bd9c146a883035fffd0a821813682 ]
    
    The cited patch added support of matching on geneve option by setting
    geneve_tlv_option_0_data mask and key but didn't set geneve_tlv_option_0_exist
    bit which is required on some HWs when matching geneve_tlv_option_0_data parameter,
    this may cause in some cases for packets to wrongly match on rules with different
    geneve option.
    
    Example of such case is packet with geneve_tlv_object class=789 and data=456
    will wrongly match on rule with match geneve_tlv_object class=123 and data=456.
    
    Fix it by setting geneve_tlv_option_0_exist bit when supported by the HW when matching
    on geneve_tlv_option_0_data parameter.
    
    Fixes: 9272e3df3023 ("net/mlx5e: Geneve, Add support for encap/decap flows offload")
    Signed-off-by: Maor Dickman <maord@xxxxxxxxxx>
    Reviewed-by: Roi Dayan <roid@xxxxxxxxxx>
    Signed-off-by: Saeed Mahameed <saeedm@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_geneve.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_geneve.c
index f5b26f5a7de4..054d80c4e65c 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_geneve.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_geneve.c
@@ -273,6 +273,11 @@ static int mlx5e_tc_tun_parse_geneve_options(struct mlx5e_priv *priv,
 		 geneve_tlv_option_0_data, be32_to_cpu(opt_data_key));
 	MLX5_SET(fte_match_set_misc3, misc_3_c,
 		 geneve_tlv_option_0_data, be32_to_cpu(opt_data_mask));
+	if (MLX5_CAP_ESW_FLOWTABLE_FDB(priv->mdev,
+				       ft_field_support.geneve_tlv_option_0_exist)) {
+		MLX5_SET_TO_ONES(fte_match_set_misc, misc_c, geneve_tlv_option_0_exist);
+		MLX5_SET_TO_ONES(fte_match_set_misc, misc_v, geneve_tlv_option_0_exist);
+	}
 
 	spec->match_criteria_enable |= MLX5_MATCH_MISC_PARAMETERS_3;
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux