Re: [PATCH v3 18/20] net/xen-netback: Make it running on 64KB page granularity

2015-08-10 Thread Julien Grall
On 10/08/15 12:39, Wei Liu wrote: > On Mon, Aug 10, 2015 at 10:57:48AM +0100, Julien Grall wrote: >> while (size > 0) { >> BUG_ON(offset >= PAGE_SIZE); >> >> bytes = PAGE_SIZE - offset; >> if (bytes > size) >> bytes = s

Re: [PATCH v3 18/20] net/xen-netback: Make it running on 64KB page granularity

2015-08-10 Thread Wei Liu
On Mon, Aug 10, 2015 at 10:57:48AM +0100, Julien Grall wrote: [...] > > >>+ info.page = page; > >>+ gnttab_foreach_grant_in_range(page, offset, bytes, > >>+ xenvif_gop_frag_copy_grant, > >>+ &info);

Re: [PATCH v3 18/20] net/xen-netback: Make it running on 64KB page granularity

2015-08-10 Thread Julien Grall
Hi Wei, On 08/08/2015 15:55, Wei Liu wrote: struct xenvif_rx_meta { int id; @@ -80,16 +81,18 @@ struct xenvif_rx_meta { /* Discriminate from any valid pending_idx value. */ #define INVALID_PENDING_IDX 0x -#define MAX_BUFFER_OFFSET PAGE_SIZE +#define MAX_BUFFER_OFFSET XEN_PAGE_

Re: [PATCH v3 18/20] net/xen-netback: Make it running on 64KB page granularity

2015-08-08 Thread Wei Liu
On Fri, Aug 07, 2015 at 05:46:57PM +0100, Julien Grall wrote: > The PV network protocol is using 4KB page granularity. The goal of this > patch is to allow a Linux using 64KB page granularity working as a > network backend on a non-modified Xen. > > It's only necessary to adapt the ring size and b

[PATCH v3 18/20] net/xen-netback: Make it running on 64KB page granularity

2015-08-07 Thread Julien Grall
The PV network protocol is using 4KB page granularity. The goal of this patch is to allow a Linux using 64KB page granularity working as a network backend on a non-modified Xen. It's only necessary to adapt the ring size and break skb data in small chunk of 4KB. The rest of the code is relying on