]> git.baikalelectronics.ru Git - kernel.git/commit
xen-netfront: release per-queue Tx and Rx resource when disconnecting
authorDavid Vrabel <david.vrabel@citrix.com>
Thu, 31 Jul 2014 16:38:23 +0000 (17:38 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Aug 2014 05:23:52 +0000 (22:23 -0700)
commit0230b893071b950936c842d69b07f38f1c566a91
treed8866e761fbccad617f7fe073694513f8158b2ba
parent76dd85c3ddd104b4d91c74656f68c944407f1788
xen-netfront: release per-queue Tx and Rx resource when disconnecting

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: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/xen-netfront.c