diff options
author | sephe <sephe@FreeBSD.org> | 2016-10-19 02:14:04 +0000 |
---|---|---|
committer | sephe <sephe@FreeBSD.org> | 2016-10-19 02:14:04 +0000 |
commit | e208cb5e626181b37b5a8c78412d98be56a22bd2 (patch) | |
tree | 955e09c3bd7a243d48bb8fb6d61b868410c98331 /sys/dev/hyperv/include | |
parent | b2fb58708798a845272cbe9fae0e7ab96ef3c626 (diff) | |
download | FreeBSD-src-e208cb5e626181b37b5a8c78412d98be56a22bd2.zip FreeBSD-src-e208cb5e626181b37b5a8c78412d98be56a22bd2.tar.gz |
MFC 306072-306074,306076
306072
hyperv/vmbus: Allow bufrings preallocation.
The assumption that the channel is only opened upon synthetic device
attach time no longer holds, e.g. Hyper-V network device MTU changes.
We have to allow device drivers to preallocate bufrings, e.g. in
attach DEVMETHOD, to prevent bufring allocation failure once the
system memory is fragmented after running for a while.
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7960
306073
hyperv/hn: Allocate bufrings in attach DEVMETHOD.
So that reinitialization, e.g. MTU change, will not fail when the system
memory is excessively fragmented.
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7961
306074
hyperv/vmbus: Assert that the bufring address is page aligned.
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7962
306076
hyperv/hn: Put debug messages under bootverbose
While I'm here, strip blank line.
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7963
Diffstat (limited to 'sys/dev/hyperv/include')
-rw-r--r-- | sys/dev/hyperv/include/vmbus.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/dev/hyperv/include/vmbus.h b/sys/dev/hyperv/include/vmbus.h index 452d29a..090f9b1 100644 --- a/sys/dev/hyperv/include/vmbus.h +++ b/sys/dev/hyperv/include/vmbus.h @@ -108,6 +108,13 @@ struct vmbus_chanpkt_rxbuf { struct vmbus_rxbuf_desc cp_rxbuf[]; } __packed; +struct vmbus_chan_br { + void *cbr; + bus_addr_t cbr_paddr; + int cbr_txsz; + int cbr_rxsz; +}; + struct vmbus_channel; struct hyperv_guid; @@ -122,6 +129,9 @@ vmbus_get_channel(device_t dev) int vmbus_chan_open(struct vmbus_channel *chan, int txbr_size, int rxbr_size, const void *udata, int udlen, vmbus_chan_callback_t cb, void *cbarg); +int vmbus_chan_open_br(struct vmbus_channel *chan, + const struct vmbus_chan_br *cbr, const void *udata, + int udlen, vmbus_chan_callback_t cb, void *cbarg); void vmbus_chan_close(struct vmbus_channel *chan); int vmbus_chan_gpadl_connect(struct vmbus_channel *chan, |