Re: [RFC v2 07/11] hv_netvsc: Use HV_HYP_PAGE_SIZE for Hyper-V communication
From: Boqun Feng <hidden>
Date: 2020-09-07 00:09:27
Also in:
linux-hyperv, linux-scsi, lkml, netdev
From: Boqun Feng <hidden>
Date: 2020-09-07 00:09:27
Also in:
linux-hyperv, linux-scsi, lkml, netdev
On Sat, Sep 05, 2020 at 12:30:48AM +0000, Michael Kelley wrote:
From: Boqun Feng <redacted> Sent: Tuesday, September 1, 2020 8:01 PM
[...]
quoted
struct rndis_request { struct list_head list_ent; struct completion wait_event;@@ -215,18 +215,18 @@ static int rndis_filter_send_request(struct rndis_device *dev, packet->page_buf_cnt = 1; pb[0].pfn = virt_to_phys(&req->request_msg) >> - PAGE_SHIFT; + HV_HYP_PAGE_SHIFT; pb[0].len = req->request_msg.msg_len; pb[0].offset = - (unsigned long)&req->request_msg & (PAGE_SIZE - 1); + (unsigned long)&req->request_msg & (HV_HYP_PAGE_SIZE - 1);Use offset_in_hvpage() as defined in patch 6 of the series?
Fair enough, I will use offset_in_hvpage() in the next version Regards, Boqun
quoted
/* Add one page_buf when request_msg crossing page boundary */ - if (pb[0].offset + pb[0].len > PAGE_SIZE) { + if (pb[0].offset + pb[0].len > HV_HYP_PAGE_SIZE) { packet->page_buf_cnt++; - pb[0].len = PAGE_SIZE - + pb[0].len = HV_HYP_PAGE_SIZE - pb[0].offset; pb[1].pfn = virt_to_phys((void *)&req->request_msg - + pb[0].len) >> PAGE_SHIFT; + + pb[0].len) >> HV_HYP_PAGE_SHIFT; pb[1].offset = 0; pb[1].len = req->request_msg.msg_len - pb[0].len; -- 2.28.0