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: <Y2sSH/WAwivllMtI@lunn.ch>
Date:   Wed, 9 Nov 2022 03:36:15 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Jiawen Wu <jiawenwu@...stnetic.com>
Cc:     'Jakub Kicinski' <kuba@...nel.org>,
        'Mengyuan Lou' <mengyuanlou@...-swift.com>,
        netdev@...r.kernel.org
Subject: Re: [PATCH net-next 2/5] net: txgbe: Initialize service task

On Wed, Nov 09, 2022 at 10:16:32AM +0800, Jiawen Wu wrote:
> On Wednesday, November 9, 2022 7:56 AM, Jakub wrote:
> > On Tue,  8 Nov 2022 19:19:04 +0800 Mengyuan Lou wrote:
> > > +	__TXGBE_TESTING,
> > > +	__TXGBE_RESETTING,
> > > +	__TXGBE_DOWN,
> > > +	__TXGBE_HANGING,
> > > +	__TXGBE_DISABLED,
> > > +	__TXGBE_REMOVING,
> > > +	__TXGBE_SERVICE_SCHED,
> > > +	__TXGBE_SERVICE_INITED,
> > 
> > Please don't try to implement a state machine in the driver.
> > Protect data structures with locks, like a normal piece of SW.
> > 
> 
> The state machine will be used in interrupt events, locks don't seem to fit it.

spinlock can be used with interrupts.

Also, once you make use of phylink, you might not need any of this.

	 Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ