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

2019-05-31 Thread Ivan Khoronzhuk
On Sat, Jun 01, 2019 at 12:37:36AM +0200, Jesper Dangaard Brouer wrote: On Fri, 31 May 2019 20:03:33 +0300 Ivan Khoronzhuk wrote: Probably it's not good example for others how it should be used, not a big problem to move it to separate pools.., even don't remember why I decided to use shared p

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

2019-05-31 Thread Ivan Khoronzhuk
On Fri, May 31, 2019 at 10:08:03PM +, Saeed Mahameed wrote: On Fri, 2019-05-31 at 20:03 +0300, Ivan Khoronzhuk wrote: On Fri, May 31, 2019 at 06:32:41PM +0200, Jesper Dangaard Brouer wrote: > On Fri, 31 May 2019 19:25:24 +0300 Ivan Khoronzhuk < > ivan.khoronz...@linaro.org> wrote: > > > On F

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

2019-05-31 Thread Jesper Dangaard Brouer
On Fri, 31 May 2019 20:03:33 +0300 Ivan Khoronzhuk wrote: > Probably it's not good example for others how it should be used, not > a big problem to move it to separate pools.., even don't remember why > I decided to use shared pool, there was some more reasons... need > search in history. Using

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

2019-05-31 Thread Saeed Mahameed
On Fri, 2019-05-31 at 20:03 +0300, Ivan Khoronzhuk wrote: > On Fri, May 31, 2019 at 06:32:41PM +0200, Jesper Dangaard Brouer > wrote: > > On Fri, 31 May 2019 19:25:24 +0300 Ivan Khoronzhuk < > > ivan.khoronz...@linaro.org> wrote: > > > > > On Fri, May 31, 2019 at 05:46:43PM +0200, Jesper Dangaard

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

2019-05-31 Thread Ivan Khoronzhuk
On Fri, May 31, 2019 at 06:32:41PM +0200, Jesper Dangaard Brouer wrote: On Fri, 31 May 2019 19:25:24 +0300 Ivan Khoronzhuk wrote: On Fri, May 31, 2019 at 05:46:43PM +0200, Jesper Dangaard Brouer wrote: > >From below code snippets, it looks like you only allocated 1 page_pool >and sharing it

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

2019-05-31 Thread Jesper Dangaard Brouer
On Fri, 31 May 2019 19:25:24 +0300 Ivan Khoronzhuk wrote: > On Fri, May 31, 2019 at 05:46:43PM +0200, Jesper Dangaard Brouer wrote: > > > >From below code snippets, it looks like you only allocated 1 page_pool > >and sharing it with several RX-queues, as I don't have the full context > >and do

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

2019-05-31 Thread Ivan Khoronzhuk
On Fri, May 31, 2019 at 05:46:43PM +0200, Jesper Dangaard Brouer wrote: Hi Jesper, Hi Ivan, From below code snippets, it looks like you only allocated 1 page_pool and sharing it with several RX-queues, as I don't have the full context and don't know this driver, I might be wrong? To be clear

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

2019-05-31 Thread Jesper Dangaard Brouer
Hi Ivan, >From below code snippets, it looks like you only allocated 1 page_pool and sharing it with several RX-queues, as I don't have the full context and don't know this driver, I might be wrong? To be clear, a page_pool object is needed per RX-queue, as it is accessing a small RX page cache

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

2019-05-30 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 ca