mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-20 19:23:57 +08:00
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: Saeed Mahameed <saeedm@nvidia.com> Reviewed-by: Roi Dayan <roid@nvidia.com>
This commit is contained in:
parent
3094552bcd
commit
03e219c4cf
@ -621,11 +621,7 @@ bool mlx5e_rep_tc_update_skb(struct mlx5_cqe64 *cqe,
|
||||
int err;
|
||||
|
||||
reg_c0 = (be32_to_cpu(cqe->sop_drop_qpn) & MLX5E_TC_FLOW_ID_MASK);
|
||||
if (reg_c0 == MLX5_FS_DEFAULT_FLOW_TAG)
|
||||
reg_c0 = 0;
|
||||
reg_c1 = be32_to_cpu(cqe->ft_metadata);
|
||||
|
||||
if (!reg_c0)
|
||||
if (!reg_c0 || reg_c0 == MLX5_FS_DEFAULT_FLOW_TAG)
|
||||
return true;
|
||||
|
||||
/* 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,
|
||||
*/
|
||||
skb->mark = 0;
|
||||
|
||||
reg_c1 = be32_to_cpu(cqe->ft_metadata);
|
||||
|
||||
priv = netdev_priv(skb->dev);
|
||||
esw = priv->mdev->priv.eswitch;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user