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]
Message-ID: <Z41PbIkIrfE4xn9K@hoboy.vegasvil.org>
Date: Sun, 19 Jan 2025 11:15:56 -0800
From: Richard Cochran <richardcochran@...il.com>
To: Jiawen Wu <jiawenwu@...stnetic.com>
Cc: andrew+netdev@...n.ch, davem@...emloft.net, edumazet@...gle.com,
	kuba@...nel.org, pabeni@...hat.com, linux@...linux.org.uk,
	horms@...nel.org, jacob.e.keller@...el.com, netdev@...r.kernel.org,
	vadim.fedorenko@...ux.dev, mengyuanlou@...-swift.com
Subject: Re: [PATCH net-next v5 4/4] net: ngbe: Add support for 1PPS and TOD

On Fri, Jan 17, 2025 at 02:20:51PM +0800, Jiawen Wu wrote:
> +static int wx_ptp_feature_enable(struct ptp_clock_info *ptp,
> +				 struct ptp_clock_request *rq, int on)
> +{

...

> +	if (rq->perout.period.sec != 1 || rq->perout.period.nsec) {
> +		wx_err(wx, "Only 1pps is supported.\n");
> +		return -EINVAL;
> +	}
> +
> +	if (rq->perout.flags & PTP_PEROUT_DUTY_CYCLE) {
> +		struct timespec64 ts_on;
> +
> +		ts_on.tv_sec = rq->perout.on.sec;
> +		ts_on.tv_nsec = rq->perout.on.nsec;
> +		wx->pps_width = timespec64_to_ns(&ts_on);
> +	} else {
> +		wx->pps_width = 120000000;
> +	}

This looks fine to me now.

Thanks,
Richard

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ