• David Vrabel's avatar
    xen-netfront: release per-queue Tx and Rx resource when disconnecting · a5b5dc3c
    David Vrabel authored
    Since netfront may reconnect to a backend with a different number of
    queues, all per-queue Rx and Tx resources (skbs and grant references)
    should be freed when disconnecting.
    
    Without this fix, the Tx and Rx grant refs are not released and
    netfront will exhaust them after only a few reconnections.  netfront
    will fail to connect when no free grant references are available.
    
    Since all Rx bufs are freed and reallocated instead of reused this
    will add some additional delay to the reconnection but this is
    expected to be small compared to the time taken by any backend hotplug
    scripts etc.
    Signed-off-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    a5b5dc3c
xen-netfront.c 59 KB