]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/linux/0025-Drivers-hv-vmbus-Support-per-channel-driver-state.patch
util-linux: update rootfile (armv5tel)
[ipfire-2.x.git] / src / patches / linux / 0025-Drivers-hv-vmbus-Support-per-channel-driver-state.patch
CommitLineData
a7b0967d
MT
1From 4b71288758aa1d510402b84ca93b1ef566575d22 Mon Sep 17 00:00:00 2001
2From: "K. Y. Srinivasan" <kys@microsoft.com>
3Date: Mon, 3 Feb 2014 12:42:45 -0800
4Subject: [PATCH 25/25] Drivers: hv: vmbus: Support per-channel driver state
5
6As we implement Virtual Receive Side Scaling on the networking side
7(the VRSS patches are currently under review), it will be useful to have
8per-channel state that vmbus drivers can manage. Add support for
9managing per-channel state.
10
11Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
12Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13---
14 include/linux/hyperv.h | 14 ++++++++++++++
15 1 file changed, 14 insertions(+)
16
17diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
18index 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--
502.4.3
51