Re: [PATCH bpf-next v3 03/11] xsk: add support to allow unaligned chunk placement

2019-07-25 Thread Laatz, Kevin
On 25/07/2019 03:22, Jakub Kicinski wrote: On Wed, 24 Jul 2019 05:10:35 +, Kevin Laatz wrote: Currently, addresses are chunk size aligned. This means, we are very restricted in terms of where we can place chunk within the umem. For example, if we have a chunk size of 2k, then our chunks can

Re: [PATCH bpf-next v3 03/11] xsk: add support to allow unaligned chunk placement

2019-07-25 Thread Laatz, Kevin
On 25/07/2019 10:27, Maxim Mikityanskiy wrote: On 2019-07-24 08:10, Kevin Laatz wrote: Currently, addresses are chunk size aligned. This means, we are very restricted in terms of where we can place chunk within the umem. For example, if we have a chunk size of 2k, then our chunks can only be p

Re: [PATCH bpf-next v3 03/11] xsk: add support to allow unaligned chunk placement

2019-07-25 Thread Jonathan Lemon
len) metalen = xdp->data - xdp->data_meta; } - to_buf = xdp_umem_get_data(xs->umem, addr); - memcpy(to_buf, from_buf, len + metalen); - addr += metalen; + __xsk_rcv_memcpy(xs->umem, addr + offset, from_buf, len, metalen); + + offset += metale

Re: [PATCH bpf-next v3 03/11] xsk: add support to allow unaligned chunk placement

2019-07-25 Thread Maxim Mikityanskiy
On 2019-07-24 08:10, Kevin Laatz wrote: > Currently, addresses are chunk size aligned. This means, we are very > restricted in terms of where we can place chunk within the umem. For > example, if we have a chunk size of 2k, then our chunks can only be placed > at 0,2k,4k,6k,8k... and so on (ie. eve

Re: [PATCH bpf-next v3 03/11] xsk: add support to allow unaligned chunk placement

2019-07-25 Thread Maxim Mikityanskiy
On 2019-07-24 08:10, Kevin Laatz wrote: > Currently, addresses are chunk size aligned. This means, we are very > restricted in terms of where we can place chunk within the umem. For > example, if we have a chunk size of 2k, then our chunks can only be placed > at 0,2k,4k,6k,8k... and so on (ie. eve

Re: [PATCH bpf-next v3 03/11] xsk: add support to allow unaligned chunk placement

2019-07-24 Thread Jakub Kicinski
On Wed, 24 Jul 2019 05:10:35 +, Kevin Laatz wrote: > Currently, addresses are chunk size aligned. This means, we are very > restricted in terms of where we can place chunk within the umem. For > example, if we have a chunk size of 2k, then our chunks can only be placed > at 0,2k,4k,6k,8k... and