On Fri, Jan 26, 2018 at 6:10 AM, Michael S. Tsirkin <m...@redhat.com> wrote: > > This part?
Yes, dev_deactivate() as you quote. > > + bool up = dev->flags & IFF_UP; > + unsigned int i; > + int ret = 0; > + > + if (up) > + dev_deactivate(dev); > + > + for (i = 0; i < dev->num_tx_queues; i++) { > + ret = qdisc_change_tx_queue_len(dev, &dev->_tx[i]); > + > + /* TODO: revert changes on a partial failure */ > + if (ret) > + break; > + } > + > + if (up) > + dev_activate(dev); > > > I wonder whether it really is safe to read dev->flags like that > without any locks. I really to hate to point it out again we have RTNL here. You missed my previous response to John. ;) Please read v1 and v2 when you response to v3.