Re: [RFC PATCH net-next 00/10] Use robust notifiers in DSA
From: Andrew Lunn <andrew@lunn.ch>
Date: 2022-08-18 22:35:16
On Fri, Aug 19, 2022 at 01:28:50AM +0300, Vladimir Oltean wrote:
On Thu, Aug 18, 2022 at 11:49:24PM +0200, Andrew Lunn wrote:quoted
I would split it into two classes of errors: Bus transactions fail. This very likely means the hardware design is bad, connectors are loose, etc. There is not much we can do about this, bad things are going to happen no what. We have consumed all of some sort of resource. Out of memory, the ATU is full, too many LAGs, etc. We try to roll back in order to get out of this resource problem. So i would say -EIO, -ETIMEDOUT, we don't care about too much. -ENOMEM, -ENOBUF, -EOPNOTSUPP or whatever, we should try to do a robust rollback. The original design of switchdev was two phase: 1) Allocate whatever resources are needed, can fail 2) Put those resources into use, must not fail At some point that all got thrown away.So you think that rollback at the cross-chip notifier layer is a new problem we need to tackle, because we don't have enough transactional layering in the code?
No, i don't think it is a new problem, but it might help explain why
you don't feel quite right about it. Some errors we simply don't care
about because we cannot do anything about it. Other errors we should
try to rollback, and hence need robust notifiers for those errors.
Andrew