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