Re: question lan9303: DSA concurrency and locking,

2017-11-16 Thread Egil Hjelmeland
On 15. nov. 2017 15:08, Andrew Lunn wrote: On Wed, Nov 15, 2017 at 01:08:22PM +0100, Egil Hjelmeland wrote: Hi experts Hi, thanks for response, both Andrew and Vivien! I am hoping for some guidance. Does DSA offer any protection against concurrent calls of dsa_switch_ops? Hi Egil DSA it

Re: question lan9303: DSA concurrency and locking,

2017-11-15 Thread Vivien Didelot
Hi, >> Does DSA offer any protection against concurrent calls of >> dsa_switch_ops? This is something I thought about for a while. Since DSA offers an abstraction of different net stack entry points to its drivers, like netlink (bridge, etc.) or ioctl (ethtool), it would make sense to add a mutex

Re: question lan9303: DSA concurrency and locking,

2017-11-15 Thread Andrew Lunn
On Wed, Nov 15, 2017 at 01:08:22PM +0100, Egil Hjelmeland wrote: > Hi experts > > I am hoping for some guidance. > > Does DSA offer any protection against concurrent calls of dsa_switch_ops? Hi Egil DSA itself does not. There are various upper locks, which protect some calls, in some ways. e.g

question lan9303: DSA concurrency and locking,

2017-11-15 Thread Egil Hjelmeland
Hi experts I am hoping for some guidance. Does DSA offer any protection against concurrent calls of dsa_switch_ops? I did not include any locking in the code I contributed to lan9303. First I felt bad locking is worse than no locking. Second I assumed that reviewers would point out if locking