Commit 03e219c4 authored by Saeed Mahameed's avatar Saeed Mahameed

net/mlx5e: rep: Improve reg_cX conditions

There is no point of calculating reg_c1 or overriding reg_c0 if we are
going to abort the function.
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
Reviewed-by: default avatarRoi Dayan <roid@nvidia.com>
parent 3094552b
...@@ -621,11 +621,7 @@ bool mlx5e_rep_tc_update_skb(struct mlx5_cqe64 *cqe, ...@@ -621,11 +621,7 @@ bool mlx5e_rep_tc_update_skb(struct mlx5_cqe64 *cqe,
int err; int err;
reg_c0 = (be32_to_cpu(cqe->sop_drop_qpn) & MLX5E_TC_FLOW_ID_MASK); reg_c0 = (be32_to_cpu(cqe->sop_drop_qpn) & MLX5E_TC_FLOW_ID_MASK);
if (reg_c0 == MLX5_FS_DEFAULT_FLOW_TAG) if (!reg_c0 || reg_c0 == MLX5_FS_DEFAULT_FLOW_TAG)
reg_c0 = 0;
reg_c1 = be32_to_cpu(cqe->ft_metadata);
if (!reg_c0)
return true; return true;
/* If reg_c0 is not equal to the default flow tag then skb->mark /* If reg_c0 is not equal to the default flow tag then skb->mark
...@@ -633,6 +629,8 @@ bool mlx5e_rep_tc_update_skb(struct mlx5_cqe64 *cqe, ...@@ -633,6 +629,8 @@ bool mlx5e_rep_tc_update_skb(struct mlx5_cqe64 *cqe,
*/ */
skb->mark = 0; skb->mark = 0;
reg_c1 = be32_to_cpu(cqe->ft_metadata);
priv = netdev_priv(skb->dev); priv = netdev_priv(skb->dev);
esw = priv->mdev->priv.eswitch; esw = priv->mdev->priv.eswitch;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment