Drivers: hv: vmbus: Give control over how the ring access is serialized
On the channel send side, many of the VMBUS device drivers explicity serialize access to the outgoing ring buffer. Give more control to the VMBUS device drivers in terms how to serialize accesss to the outgoing ring buffer. The default behavior will be to aquire the ring lock to preserve the current behavior. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
3eba9a77d5
commit
fe760e4d64
@@ -811,8 +811,24 @@ struct vmbus_channel {
|
||||
* signaling control.
|
||||
*/
|
||||
enum hv_signal_policy signal_policy;
|
||||
/*
|
||||
* On the channel send side, many of the VMBUS
|
||||
* device drivers explicity serialize access to the
|
||||
* outgoing ring buffer. Give more control to the
|
||||
* VMBUS device drivers in terms how to serialize
|
||||
* accesss to the outgoing ring buffer.
|
||||
* The default behavior will be to aquire the
|
||||
* ring lock to preserve the current behavior.
|
||||
*/
|
||||
bool acquire_ring_lock;
|
||||
|
||||
};
|
||||
|
||||
static inline void set_channel_lock_state(struct vmbus_channel *c, bool state)
|
||||
{
|
||||
c->acquire_ring_lock = state;
|
||||
}
|
||||
|
||||
static inline bool is_hvsock_channel(const struct vmbus_channel *c)
|
||||
{
|
||||
return !!(c->offermsg.offer.chn_flags &
|
||||
|
Reference in New Issue
Block a user