diff options
author | Stephen Hemminger <stephen@networkplumber.org> | 2017-06-25 12:30:27 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-07-17 17:16:05 +0200 |
commit | 05d00bc94ac27d220d8a78e365d7fa3a26dcca17 (patch) | |
tree | 64da1c51e2148467c6b9a3acb71ab113510d42ad /include/linux/hyperv.h | |
parent | 8dd45f2ab005a1f3301296059b23b03ec3dbf79b (diff) |
vmbus: eliminate duplicate cached index
Don't need cached read index anymore now that packet iterator
is used. The iterator has the original read index until the
visible read_index is updated.
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/hyperv.h')
-rw-r--r-- | include/linux/hyperv.h | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index 308e1f9706bb..27db4e650b8c 100644 --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h @@ -125,7 +125,6 @@ struct hv_ring_buffer_info { u32 ring_datasize; /* < ring_size */ u32 priv_read_index; - u32 cached_read_index; }; /* @@ -178,19 +177,6 @@ static inline u32 hv_get_bytes_to_write(const struct hv_ring_buffer_info *rbi) return write; } -static inline u32 hv_get_cached_bytes_to_write( - const struct hv_ring_buffer_info *rbi) -{ - u32 read_loc, write_loc, dsize, write; - - dsize = rbi->ring_datasize; - read_loc = rbi->cached_read_index; - write_loc = rbi->ring_buffer->write_index; - - write = write_loc >= read_loc ? dsize - (write_loc - read_loc) : - read_loc - write_loc; - return write; -} /* * VMBUS version is 32 bit entity broken up into * two 16 bit quantities: major_number. minor_number. |