[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210709125658.6c44e4e6@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Fri, 9 Jul 2021 12:56:58 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Paolo Abeni <pabeni@...hat.com>
Cc: Toke Høiland-Jørgensen <toke@...hat.com>,
netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>
Subject: Re: [RFC PATCH 1/3] veth: implement support for set_channel ethtool
op
On Fri, 09 Jul 2021 18:35:59 +0200 Paolo Abeni wrote:
> > + if (netif_running(dev))
> > + veth_open(dev);
> > + return 0;
> >
> >
> > (also, shouldn't the result of veth_open() be returned? bit weird if you
> > don't get an error but the device stays down...)
>
> Agreed.
We've been fighting hard to make sure ethtool -L/-G/etc don't leave
devices half-broken. Maybe it's not as important for software devices,
but we should set a good example. We shouldn't take the device down
unless we are sure we'll be able to bring it up. So if veth_open()
"can't fail" it should be a WARN_ON(veth_open()), not return; and if
it may fail due to memory allocations etc we should do a prepare/commit.
Powered by blists - more mailing lists