lkml.org 
[lkml]   [2020]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [RFC v2 07/11] hv_netvsc: Use HV_HYP_PAGE_SIZE for Hyper-V communication
On Sat, Sep 05, 2020 at 12:30:48AM +0000, Michael Kelley wrote:
> From: Boqun Feng <boqun.feng@gmail.com> Sent: Tuesday, September 1, 2020 8:01 PM
[...]
> > 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

> >
> > /* 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
>

\
 
 \ /
  Last update: 2020-09-07 02:09    [W:0.064 / U:1.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site