diff options
author | K. Y. Srinivasan <kys@microsoft.com> | 2014-02-03 15:42:45 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-02-07 18:22:40 -0500 |
commit | 8a7206a89f85c8439561b0eff85bb9440a2e97a9 (patch) | |
tree | 61f763919607368481ac128f56416df1f49cd187 /include | |
parent | 011a7c3cc3aa60c7ea6bb49d847e80a299ba7b36 (diff) |
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>
Diffstat (limited to 'include')
-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 { | |||
727 | * This will be NULL for the primary channel. | 727 | * This will be NULL for the primary channel. |
728 | */ | 728 | */ |
729 | struct vmbus_channel *primary_channel; | 729 | struct vmbus_channel *primary_channel; |
730 | /* | ||
731 | * Support per-channel state for use by vmbus drivers. | ||
732 | */ | ||
733 | void *per_channel_state; | ||
730 | }; | 734 | }; |
731 | 735 | ||
732 | static inline void set_channel_read_state(struct vmbus_channel *c, bool state) | 736 | 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) | |||
734 | c->batched_reading = state; | 738 | c->batched_reading = state; |
735 | } | 739 | } |
736 | 740 | ||
741 | static inline void set_per_channel_state(struct vmbus_channel *c, void *s) | ||
742 | { | ||
743 | c->per_channel_state = s; | ||
744 | } | ||
745 | |||
746 | static inline void *get_per_channel_state(struct vmbus_channel *c) | ||
747 | { | ||
748 | return c->per_channel_state; | ||
749 | } | ||
750 | |||
737 | void vmbus_onmessage(void *context); | 751 | void vmbus_onmessage(void *context); |
738 | 752 | ||
739 | int vmbus_request_offers(void); | 753 | int vmbus_request_offers(void); |