Re: [PATCH net-next 3/3] net: ethernet: ti: cpsw: add XDP support

2019-05-29 Thread Ivan Khoronzhuk
On Wed, May 29, 2019 at 10:16:59AM +0200, Jesper Dangaard Brouer wrote: On Thu, 23 May 2019 21:20:35 +0300 Ivan Khoronzhuk wrote: +static struct page *cpsw_alloc_page(struct cpsw_common *cpsw) +{ + struct page_pool *pool = cpsw->rx_page_pool; + struct page *page, *prev_page =

Re: [PATCH net-next 3/3] net: ethernet: ti: cpsw: add XDP support

2019-05-29 Thread Jesper Dangaard Brouer
On Thu, 23 May 2019 21:20:35 +0300 Ivan Khoronzhuk wrote: > +static struct page *cpsw_alloc_page(struct cpsw_common *cpsw) > +{ > + struct page_pool *pool = cpsw->rx_page_pool; > + struct page *page, *prev_page = NULL; > + int try = pool->p.pool_size << 2; > + int start_free = 0,

Re: [PATCH net-next 3/3] net: ethernet: ti: cpsw: add XDP support

2019-05-27 Thread Ivan Khoronzhuk
On Fri, May 24, 2019 at 08:49:38PM +0300, grygorii wrote: Hi Ivan, On 23/05/2019 21:20, Ivan Khoronzhuk wrote: Add XDP support based on rx page_pool allocator, one frame per page. Page pool allocator is used with assumption that only one rx_handler is running simultaneously. DMA map/unmap is

Re: [PATCH net-next 3/3] net: ethernet: ti: cpsw: add XDP support

2019-05-27 Thread Ivan Khoronzhuk
On Fri, May 24, 2019 at 02:05:11PM +0300, Ilias Apalodimas wrote: On Thu, May 23, 2019 at 09:20:35PM +0300, Ivan Khoronzhuk wrote: Add XDP support based on rx page_pool allocator, one frame per page. Page pool allocator is used with assumption that only one rx_handler is running simultaneously.

Re: [PATCH net-next 3/3] net: ethernet: ti: cpsw: add XDP support

2019-05-27 Thread Ivan Khoronzhuk
On Fri, May 24, 2019 at 01:54:18PM +0200, Jesper Dangaard Brouer wrote: On Thu, 23 May 2019 21:20:35 +0300 Ivan Khoronzhuk wrote: Add XDP support based on rx page_pool allocator, one frame per page. Page pool allocator is used with assumption that only one rx_handler is running

Re: [PATCH net-next 3/3] net: ethernet: ti: cpsw: add XDP support

2019-05-24 Thread grygorii
Hi Ivan, On 23/05/2019 21:20, Ivan Khoronzhuk wrote: Add XDP support based on rx page_pool allocator, one frame per page. Page pool allocator is used with assumption that only one rx_handler is running simultaneously. DMA map/unmap is reused from page pool despite there is no need to map whole

Re: [PATCH net-next 3/3] net: ethernet: ti: cpsw: add XDP support

2019-05-24 Thread Jesper Dangaard Brouer
On Thu, 23 May 2019 21:20:35 +0300 Ivan Khoronzhuk wrote: > Add XDP support based on rx page_pool allocator, one frame per page. > Page pool allocator is used with assumption that only one rx_handler > is running simultaneously. DMA map/unmap is reused from page pool > despite there is no need

Re: [PATCH net-next 3/3] net: ethernet: ti: cpsw: add XDP support

2019-05-24 Thread Ilias Apalodimas
On Thu, May 23, 2019 at 09:20:35PM +0300, Ivan Khoronzhuk wrote: > Add XDP support based on rx page_pool allocator, one frame per page. > Page pool allocator is used with assumption that only one rx_handler > is running simultaneously. DMA map/unmap is reused from page pool > despite there is no

[PATCH net-next 3/3] net: ethernet: ti: cpsw: add XDP support

2019-05-23 Thread Ivan Khoronzhuk
Add XDP support based on rx page_pool allocator, one frame per page. Page pool allocator is used with assumption that only one rx_handler is running simultaneously. DMA map/unmap is reused from page pool despite there is no need to map whole page. Due to specific of cpsw, the same TX/RX handler