Patch "net/mlx5e: Allow to match on MPLS parameters only for MPLS over UDP" has been added to the 5.11-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: Allow to match on MPLS parameters only for MPLS over UDP

to the 5.11-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-allow-to-match-on-mpls-parameters-only-for.patch
and it can be found in the queue-5.11 subdirectory.

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



commit 3287b19c80edd52ba2b888b99f74749c593ff291
Author: Alaa Hleihel <alaa@xxxxxxxxxx>
Date:   Wed Mar 10 17:01:46 2021 +0200

    net/mlx5e: Allow to match on MPLS parameters only for MPLS over UDP
    
    [ Upstream commit 7d6c86e3ccb5ceea767df5c7a9a17cdfccd3df9a ]
    
    Currently, we support hardware offload only for MPLS over UDP.
    However, rules matching on MPLS parameters are now wrongly offloaded
    for regular MPLS, without actually taking the parameters into
    consideration when doing the offload.
    Fix it by rejecting such unsupported rules.
    
    Fixes: 72046a91d134 ("net/mlx5e: Allow to match on mpls parameters")
    Signed-off-by: Alaa Hleihel <alaa@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.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
index e9b7da05f14a..95cbefed1b32 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
@@ -2595,6 +2595,16 @@ static int __parse_cls_flower(struct mlx5e_priv *priv,
 			*match_level = MLX5_MATCH_L4;
 	}
 
+	/* Currenlty supported only for MPLS over UDP */
+	if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_MPLS) &&
+	    !netif_is_bareudp(filter_dev)) {
+		NL_SET_ERR_MSG_MOD(extack,
+				   "Matching on MPLS is supported only for MPLS over UDP");
+		netdev_err(priv->netdev,
+			   "Matching on MPLS is supported only for MPLS over UDP\n");
+		return -EOPNOTSUPP;
+	}
+
 	return 0;
 }
 



[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