lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 24 Oct 2019 07:04:28 -0700
From:   Richard Cochran <richardcochran@...il.com>
To:     Igor Russkikh <Igor.Russkikh@...antia.com>
Cc:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "epomozov@...vell.com" <epomozov@...vell.com>,
        Dmitry Bezrukov <Dmitry.Bezrukov@...antia.com>,
        "andrew@...n.ch" <andrew@...n.ch>,
        Simon Edelhaus <sedelhaus@...vell.com>,
        Sergey Samoilenko <Sergey.Samoilenko@...antia.com>
Subject: Re: [PATCH v3 net-next 03/12] net: aquantia: add basic ptp_clock
 callbacks

On Tue, Oct 22, 2019 at 09:53:27AM +0000, Igor Russkikh wrote:
> +/* aq_ptp_adjfine
> + * @ptp: the ptp clock structure
> + * @ppb: parts per billion adjustment from base

Kdoc needs update.

> + *
> + * adjust the frequency of the ptp cycle counter by the
> + * indicated ppb from the base frequency.
> + */
> +static int aq_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
> +{
> +	struct aq_ptp_s *aq_ptp = container_of(ptp, struct aq_ptp_s, ptp_info);
> +	struct aq_nic_s *aq_nic = aq_ptp->aq_nic;
> +
> +	mutex_lock(&aq_nic->fwreq_mutex);
> +	aq_nic->aq_hw_ops->hw_adj_clock_freq(aq_nic->aq_hw,
> +					     scaled_ppm_to_ppb(scaled_ppm));

If your HW has sub-ppm bits in its frequency word, then it does make a
difference to actually use the low order bits (instead of truncating
as you do here).

> +	mutex_unlock(&aq_nic->fwreq_mutex);
> +
> +	return 0;
> +}

Thanks,
Richard

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ