diff options
author | K. Y. Srinivasan <kys@microsoft.com> | 2014-02-03 21:42:45 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-02-08 00:22:40 +0100 |
commit | 8a7206a89f85c8439561b0eff85bb9440a2e97a9 (patch) | |
tree | 61f763919607368481ac128f56416df1f49cd187 | |
parent | Drivers: hv: vmbus: Cleanup the packet send path (diff) | |
download | linux-8a7206a89f85c8439561b0eff85bb9440a2e97a9.tar.xz linux-8a7206a89f85c8439561b0eff85bb9440a2e97a9.zip |
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: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | include/linux/hyperv.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index 9b07e1f070ac..d47bab9e7a18 100644 --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h @@ -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); |