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: <ZIlG4otXfQ7uhMsc@hoboy.vegasvil.org>
Date:   Tue, 13 Jun 2023 21:49:38 -0700
From:   Richard Cochran <richardcochran@...il.com>
To:     Horatiu Vultur <horatiu.vultur@...rochip.com>
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        andrew@...n.ch, hkallweit1@...il.com, linux@...linux.org.uk,
        davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
        pabeni@...hat.com
Subject: Re: [PATCH net-next v2 2/2] net: micrel: Schedule work to read
 seconds for lan8841

On Tue, Jun 13, 2023 at 11:45:26AM +0200, Horatiu Vultur wrote:
> @@ -3840,6 +3847,12 @@ static void lan8841_ptp_enable_processing(struct kszphy_ptp_priv *ptp_priv,
>  			       LAN8841_PTP_INSERT_TS_32BIT,
>  			       LAN8841_PTP_INSERT_TS_EN |
>  			       LAN8841_PTP_INSERT_TS_32BIT);
> +
> +		/* Schedule the work to read the seconds, which will be used in
> +		 * the received timestamp
> +		 */
> +		schedule_delayed_work(&ptp_priv->seconds_work,
> +				      nsecs_to_jiffies(LAN8841_GET_SEC_LTC_DELAY));

Why not do this in the PTP kworker thread?

The thread's scheduling can be easily tuned with chrt to give it
appropriate priority, but work can't.

Also, If you have seconds thread, then you don't have to defer the
received frames.

Thanks,
Richard

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ