]> git.baikalelectronics.ru Git - kernel.git/commit
xen-netfront: recreate queues correctly when reconnecting
authorDavid Vrabel <david.vrabel@citrix.com>
Wed, 18 Jun 2014 09:47:28 +0000 (10:47 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 21 Jun 2014 23:14:26 +0000 (16:14 -0700)
commit9bdcfbc393104033c45d3f59df2da6ee3d66e1a2
tree0c2b20bc313a7e0b292904e2352b7ac72719044a
parent59583b9ff48ff08329b37cfbf142649b22731118
xen-netfront: recreate queues correctly when reconnecting

When reconnecting to the backend (after a resume/migration, for example),
a different number of queues may be required (since the guest may have
moved to a different host with different capabilities).  During the
reconnection the old queues are torn down and new ones created.

Introduce xennet_create_queues() and xennet_destroy_queues() that fixes
three bugs during the reconnection.

- The old info->queues was leaked.
- The old queue's napi instances were not deleted.
- The new queue's napi instances were left disabled (which meant no
  packets could be received).

The xennet_destroy_queues() calls is deferred until the reconnection
instead of the disconnection (in xennet_disconnect_backend()) because
napi_disable() might sleep.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/xen-netfront.c