> +void mlx5e_fill_hwstamp(struct mlx5e_tstamp *tstamp,
> +                       struct skb_shared_hwtstamps *hwts,
> +                       u64 timestamp)
> +{
> +       unsigned long flags;
> +       u64 nsec;
> +
> +       memset(hwts, 0, sizeof(struct skb_shared_hwtstamps));
> +       read_lock_irqsave(&tstamp->lock, flags);

Richard and others,
Any special reason to use read_lock_irqsave and not just read_lock?
On second thought could not see any good reason for that,
but saw many other examples which uses irqsave.

thanks,
Eran

> +       nsec = timecounter_cyc2time(&tstamp->clock, timestamp);
> +       read_unlock_irqrestore(&tstamp->lock, flags);
> +
> +       hwts->hwtstamp = ns_to_ktime(nsec);
> +}
> +
> +static cycle_t mlx5e_read_clock(const struct cyclecounter *cc)
> +{
> +       struct mlx5e_tstamp *tstamp = container_of(cc, struct mlx5e_tstamp,
> +                                                  cycles);
> +       struct mlx5e_priv *priv = container_of(tstamp, struct mlx5e_priv,
> +                                              tstamp);
> +
> +       return mlx5_core_read_clock(priv->mdev) & cc->mask;
> +}
> +
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to