Re: [RFC PATCH net] net: dsa: flush switchdev workqueue before tearing down CPU/DSA ports
From: Vladimir Oltean <olteanv@gmail.com>
Date: 2021-09-12 16:33:47
On Sun, Sep 12, 2021 at 09:24:53AM -0700, Florian Fainelli wrote:
On 9/12/2021 9:19 AM, Vladimir Oltean wrote:quoted
On Sun, Sep 12, 2021 at 09:13:36AM -0700, Florian Fainelli wrote:quoted
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Did you post this as a RFC for a particular reason, or just to give reviewers some time?Both. In principle there's nothing wrong with what this patch does, only perhaps maybe something with what it doesn't do. We keep saying that a network interface should be ready to pass traffic as soon as it's registered, but that "walk dst->ports linearly when calling dsa_port_setup" might not really live up to that promise.That promise most definitively existed back when Lennert wrote this code and we had an array of ports and the switch drivers brought up their port in their ->setup() method, nowadays, not so sure anymore because of the .port_enable() as much as the list. This is making me wonder whether the occasional messages I am seeing on system suspend from __dev_queue_xmit: Virtual device %s asks to queue packet! might have something to do with that and/or the inappropriate ordering between suspending the switch and the DSA master.
Sorry, I have never tested the suspend/resume code path, mostly because I don't know what would the easiest way be to wake up my systems from suspend. If you could give me some pointers there I would be glad to look into it.