]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
xen/netfront: release resources on removal
authorroyger <royger@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 29 Mar 2017 15:34:52 +0000 (15:34 +0000)
committerroyger <royger@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 29 Mar 2017 15:34:52 +0000 (15:34 +0000)
commitbbcb7ec7b4602b2418ede5dfc9890e761eaeffde
treebada9de6cf2471179411be84aee28a613bfc0298
parentf095c1d9fad55da232e22287ea5fda78f2fdfdf4
xen/netfront: release resources on removal

Current netfront code doesn't release the resources (grants and mbufs) on
removal. Add a new helper that releases the resources, so FreeBSD doesn't run
out of grants or memory when performing heavy hotplug/unplug of Xen PV nic
devices.

This is a direct commit to stable/10 because the code in newer branches has
been completely refactored and no longer has this issue.

Reviewed by: royger
Submitted by: Ouyangzhaowei <ouyangzhaowei@huawei.com>
Differential review: https://reviews.freebsd.org/D10088

git-svn-id: svn://svn.freebsd.org/base/stable/10@316140 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/dev/xen/netfront/netfront.c