Commit 8a7206a8 authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Greg Kroah-Hartman

Drivers: hv: vmbus: Support per-channel driver state

As we implement Virtual Receive Side Scaling on the networking side
(the VRSS patches are currently under review), it will be useful to have
per-channel state that vmbus drivers can manage. Add support for
managing per-channel state.
Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 011a7c3c
......@@ -727,6 +727,10 @@ struct vmbus_channel {
* This will be NULL for the primary channel.
*/
struct vmbus_channel *primary_channel;
/*
* Support per-channel state for use by vmbus drivers.
*/
void *per_channel_state;
};
static inline void set_channel_read_state(struct vmbus_channel *c, bool state)
......@@ -734,6 +738,16 @@ static inline void set_channel_read_state(struct vmbus_channel *c, bool state)
c->batched_reading = state;
}
static inline void set_per_channel_state(struct vmbus_channel *c, void *s)
{
c->per_channel_state = s;
}
static inline void *get_per_channel_state(struct vmbus_channel *c)
{
return c->per_channel_state;
}
void vmbus_onmessage(void *context);
int vmbus_request_offers(void);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment