1 From 4b71288758aa1d510402b84ca93b1ef566575d22 Mon Sep 17 00:00:00 2001
2 From: "K. Y. Srinivasan" <kys@microsoft.com>
3 Date: Mon, 3 Feb 2014 12:42:45 -0800
4 Subject: [PATCH 25/25] Drivers: hv: vmbus: Support per-channel driver state
6 As we implement Virtual Receive Side Scaling on the networking side
7 (the VRSS patches are currently under review), it will be useful to have
8 per-channel state that vmbus drivers can manage. Add support for
9 managing per-channel state.
11 Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
12 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
14 include/linux/hyperv.h | 14 ++++++++++++++
15 1 file changed, 14 insertions(+)
17 diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
18 index 6088058a3e00..732dc7e37e96 100644
19 --- a/include/linux/hyperv.h
20 +++ b/include/linux/hyperv.h
21 @@ -1045,6 +1045,10 @@ struct vmbus_channel {
22 * This will be NULL for the primary channel.
24 struct vmbus_channel *primary_channel;
26 + * Support per-channel state for use by vmbus drivers.
28 + void *per_channel_state;
31 static inline void set_channel_read_state(struct vmbus_channel *c, bool state)
32 @@ -1052,6 +1056,16 @@ static inline void set_channel_read_state(struct vmbus_channel *c, bool state)
33 c->batched_reading = state;
36 +static inline void set_per_channel_state(struct vmbus_channel *c, void *s)
38 + c->per_channel_state = s;
41 +static inline void *get_per_channel_state(struct vmbus_channel *c)
43 + return c->per_channel_state;
46 void vmbus_onmessage(void *context);
48 int vmbus_request_offers(void);