diff options
author | David S. Miller <davem@davemloft.net> | 2017-12-03 10:10:03 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-12-03 10:10:03 -0500 |
commit | b8278f2c12b29b97c17cebf6b49b0f59337f1f03 (patch) | |
tree | f09b1169817849c0c1d2ae71524465bf5cdef428 /include/linux/hyperv.h | |
parent | 5e51fe6f4472510a85e637907e24d4fbe5e39489 (diff) | |
parent | 0487426fedf7cf800115bac7ea391de1e2e0fa5f (diff) |
Merge branch 'hv_netvsc-minor-optimizations'
Stephen Hemminger says:
====================
hv_netvsc: minor optimizations
These are a set of local optimizations the Hyper-V networking driver.
Also include a vmbus patch in this set, because it depends on the
netvsc that last used that function.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/hyperv.h')
-rw-r--r-- | include/linux/hyperv.h | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index f3e97c5f94c9..5f8bd0cebddf 100644 --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h @@ -127,28 +127,6 @@ struct hv_ring_buffer_info { u32 priv_read_index; }; -/* - * - * hv_get_ringbuffer_availbytes() - * - * Get number of bytes available to read and to write to - * for the specified ring buffer - */ -static inline void -hv_get_ringbuffer_availbytes(const struct hv_ring_buffer_info *rbi, - u32 *read, u32 *write) -{ - u32 read_loc, write_loc, dsize; - - /* Capture the read/write indices before they changed */ - read_loc = rbi->ring_buffer->read_index; - write_loc = rbi->ring_buffer->write_index; - dsize = rbi->ring_datasize; - - *write = write_loc >= read_loc ? dsize - (write_loc - read_loc) : - read_loc - write_loc; - *read = dsize - *write; -} static inline u32 hv_get_bytes_to_read(const struct hv_ring_buffer_info *rbi) { |