Re: [net PATCH v4 5/6] virtio: add pci_down/pci_up configuration
From: John Fastabend <john.fastabend@gmail.com>
Date: 2017-01-17 18:45:41
On 17-01-15 08:04 PM, John Fastabend wrote:
On 17-01-15 07:57 PM, Jason Wang wrote:quoted
On 2017年01月16日 08:01, John Fastabend wrote:quoted
In virtio_net we need to do a full reset of the device to support queue reconfiguration and also we can trigger this via ethtool commands. So instead of open coding this in net driver push this into generic code in virtio. This also avoid exporting a handful of internal virtio routines.Looks like this is not a pci specific stuffs. And there's some driver left (e.g scsi and block). In fact, I'm not sure touching other drivers is really needed. Maybe we can just: - move virtio_device_freeze(), virtio_device_restore() and .freeze/.restore in virtio_driver out of CONFIG_PM_SLEEP - move virtnet_freeze() and virtnet_restore() out of CONFIG_PM_SLEEP - introduce virtio_net_reset() and call virtio_device_freeze()/virtio_device_restore() thereMichael, what do you think? I was following your suggestion on writing a generic virtio reset here. I don't have a preference either way.
Actually if I roll it into virtio_net per above suggestion I can probably get the locking correct. As DaveM points out its complete junk at the moment around the rtnl_try_lock() logic. Ugh. I'll spin a v5...
quoted
Another possible issue for sleep/hibernation is xdp_prog were not restored, if this is not XDP intended, we'd better fix this.Yep this bug exists even without this series. I'll add it to my list of things to fix. Along with small packet max_mtu.quoted
Thanks [...]