Message ID | 20210314121940.2807621-9-idosch@idosch.org |
---|---|
State | New |
Headers | show |
Series | [net-next,01/11] psample: Encapsulate packet metadata in a struct | expand |
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c index 3b15f8d728a3..3d8e8d8dfff5 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c @@ -2225,15 +2225,12 @@ void mlxsw_sp_sample_receive(struct mlxsw_sp *mlxsw_sp, struct sk_buff *skb, goto out; } - rcu_read_lock(); sample = rcu_dereference(mlxsw_sp_port->sample); if (!sample) - goto out_unlock; + goto out; md.trunc_size = sample->truncate ? sample->trunc_size : skb->len; md.in_ifindex = mlxsw_sp_port->dev->ifindex; psample_sample_packet(sample->psample_group, skb, sample->rate, &md); -out_unlock: - rcu_read_unlock(); out: consume_skb(skb); }