lkml.org 
[lkml]   [2020]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[RFC 09/11] HID: hyperv: Make ringbuffer at least take two pages
    Date
    When PAGE_SIZE > HV_HYP_PAGE_SIZE, we need the ringbuffer size to be at
    least 2 * PAGE_SIZE: one page for the header and at least one page of
    the data part (because of the alignment requirement for double mapping).

    So make sure the ringbuffer sizes to be at least 2 * PAGE_SIZE when
    using vmbus_open() to establish the vmbus connection.

    Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
    ---
    drivers/hid/hid-hyperv.c | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    diff --git a/drivers/hid/hid-hyperv.c b/drivers/hid/hid-hyperv.c
    index 0b6ee1dee625..36c5e157c691 100644
    --- a/drivers/hid/hid-hyperv.c
    +++ b/drivers/hid/hid-hyperv.c
    @@ -104,8 +104,8 @@ struct synthhid_input_report {

    #pragma pack(pop)

    -#define INPUTVSC_SEND_RING_BUFFER_SIZE (40 * 1024)
    -#define INPUTVSC_RECV_RING_BUFFER_SIZE (40 * 1024)
    +#define INPUTVSC_SEND_RING_BUFFER_SIZE (128 * 1024)
    +#define INPUTVSC_RECV_RING_BUFFER_SIZE (128 * 1024)


    enum pipe_prot_msg_type {
    --
    2.27.0
    \
     
     \ /
      Last update: 2020-07-21 03:42    [W:3.162 / U:0.376 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site