• David Vrabel's avatar
    xen-netfront: recreate queues correctly when reconnecting · ce58725f
    David Vrabel authored
    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: default avatarDavid Vrabel <david.vrabel@citrix.com>
    Reviewed-by: default avatarWei Liu <wei.liu2@citrix.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    ce58725f
xen-netfront.c 60.4 KB