]> git.ipfire.org Git - ipfire-2.x.git/blob - src/patches/linux/0025-Drivers-hv-vmbus-Support-per-channel-driver-state.patch
core117: Regenerate language cache
[ipfire-2.x.git] / src / patches / linux / 0025-Drivers-hv-vmbus-Support-per-channel-driver-state.patch
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
5
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.
10
11 Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
12 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 ---
14 include/linux/hyperv.h | 14 ++++++++++++++
15 1 file changed, 14 insertions(+)
16
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.
23 */
24 struct vmbus_channel *primary_channel;
25 + /*
26 + * Support per-channel state for use by vmbus drivers.
27 + */
28 + void *per_channel_state;
29 };
30
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;
34 }
35
36 +static inline void set_per_channel_state(struct vmbus_channel *c, void *s)
37 +{
38 + c->per_channel_state = s;
39 +}
40 +
41 +static inline void *get_per_channel_state(struct vmbus_channel *c)
42 +{
43 + return c->per_channel_state;
44 +}
45 +
46 void vmbus_onmessage(void *context);
47
48 int vmbus_request_offers(void);
49 --
50 2.4.3
51