[PATCH net-next] net: ethernet: ti: cpsw_ethtool: simplify slave loops

2019-06-11 Thread Ivan Khoronzhuk
Only for consistency reasons, do it like in main cpsw.c module and use ndev reference but not by means of slave. Signed-off-by: Ivan Khoronzhuk --- Based on net-next/master drivers/net/ethernet/ti/cpsw_ethtool.c | 40 ++ 1 file changed, 21 insertions(+), 19 deletions

Re: [PATCH v5 net-next 1/6] xdp: allow same allocator usage

2019-07-02 Thread Ivan Khoronzhuk
On Mon, Jul 01, 2019 at 01:40:59PM +0200, Jesper Dangaard Brouer wrote: I'm very skeptical about this approach. On Sun, 30 Jun 2019 20:23:43 +0300 Ivan Khoronzhuk wrote: XDP rxqs can be same for ndevs running under same rx napi softirq. But there is no ability to register same allocato

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

2019-07-02 Thread Ivan Khoronzhuk
On Mon, Jul 01, 2019 at 06:19:01PM +0200, Jesper Dangaard Brouer wrote: On Sun, 30 Jun 2019 20:23:48 +0300 Ivan Khoronzhuk wrote: +static int cpsw_ndev_create_xdp_rxq(struct cpsw_priv *priv, int ch) +{ + struct cpsw_common *cpsw = priv->cpsw; + int ret, new_pool = fa

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

2019-07-02 Thread Ivan Khoronzhuk
On Tue, Jul 02, 2019 at 03:39:02PM +0200, Jesper Dangaard Brouer wrote: On Tue, 2 Jul 2019 14:37:39 +0300 Ivan Khoronzhuk wrote: On Mon, Jul 01, 2019 at 06:19:01PM +0200, Jesper Dangaard Brouer wrote: >On Sun, 30 Jun 2019 20:23:48 +0300 >Ivan Khoronzhuk wrote: > >&

Re: [PATCH] net: core: page_pool: add user refcnt and reintroduce page_pool_destroy

2019-07-02 Thread Ivan Khoronzhuk
On Tue, Jul 02, 2019 at 04:31:39PM +0200, Jesper Dangaard Brouer wrote: From: Ivan Khoronzhuk Jesper recently removed page_pool_destroy() (from driver invocation) and moved shutdown and free of page_pool into xdp_rxq_info_unreg(), in-order to handle in-flight packets/pages. This created an

Re: [PATCH v5 net-next 1/6] xdp: allow same allocator usage

2019-07-02 Thread Ivan Khoronzhuk
On Tue, Jul 02, 2019 at 04:46:48PM +0200, Jesper Dangaard Brouer wrote: On Tue, 2 Jul 2019 13:27:07 +0300 Ivan Khoronzhuk wrote: On Mon, Jul 01, 2019 at 01:40:59PM +0200, Jesper Dangaard Brouer wrote: > >I'm very skeptical about this approach. > >On Sun, 30 Jun 2019 20:

Re: [PATCH] net: core: page_pool: add user refcnt and reintroduce page_pool_destroy

2019-07-02 Thread Ivan Khoronzhuk
On Tue, Jul 02, 2019 at 04:52:30PM +0200, Jesper Dangaard Brouer wrote: On Tue, 2 Jul 2019 17:44:27 +0300 Ivan Khoronzhuk wrote: On Tue, Jul 02, 2019 at 04:31:39PM +0200, Jesper Dangaard Brouer wrote: >From: Ivan Khoronzhuk > >Jesper recently removed page_pool_destroy() (fr

Re: [PATCH] net: core: page_pool: add user refcnt and reintroduce page_pool_destroy

2019-07-02 Thread Ivan Khoronzhuk
On Tue, Jul 02, 2019 at 05:10:29PM +0200, Jesper Dangaard Brouer wrote: On Tue, 2 Jul 2019 17:56:13 +0300 Ivan Khoronzhuk wrote: On Tue, Jul 02, 2019 at 04:52:30PM +0200, Jesper Dangaard Brouer wrote: >On Tue, 2 Jul 2019 17:44:27 +0300 >Ivan Khoronzhuk wrote: > >> On Tue, Jul

Re: [PATCH] net: core: page_pool: add user refcnt and reintroduce page_pool_destroy

2019-07-02 Thread Ivan Khoronzhuk
On Tue, Jul 02, 2019 at 08:29:07PM +0200, Jesper Dangaard Brouer wrote: On Tue, 2 Jul 2019 18:21:13 +0300 Ivan Khoronzhuk wrote: On Tue, Jul 02, 2019 at 05:10:29PM +0200, Jesper Dangaard Brouer wrote: >On Tue, 2 Jul 2019 17:56:13 +0300 >Ivan Khoronzhuk wrote: > >> On Tue, Jul

Re: [PATCH] net: core: page_pool: add user refcnt and reintroduce page_pool_destroy

2019-07-02 Thread Ivan Khoronzhuk
circumstances to send v6 ... -- Regards, Ivan Khoronzhuk

Re: [PATCH] net: core: page_pool: add user refcnt and reintroduce page_pool_destroy

2019-07-02 Thread Ivan Khoronzhuk
On Tue, Jul 02, 2019 at 09:58:40PM +0300, Ivan Khoronzhuk wrote: On Tue, Jul 02, 2019 at 08:29:07PM +0200, Jesper Dangaard Brouer wrote: On Tue, 2 Jul 2019 18:21:13 +0300 Ivan Khoronzhuk wrote: On Tue, Jul 02, 2019 at 05:10:29PM +0200, Jesper Dangaard Brouer wrote: On Tue, 2 Jul 2019 17:56

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

2019-07-03 Thread Ivan Khoronzhuk
On Wed, Jul 03, 2019 at 09:26:03AM +0200, Jesper Dangaard Brouer wrote: On Sun, 30 Jun 2019 20:23:48 +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

[PATCH v6 net-next 4/5] net: ethernet: ti: cpsw_ethtool: allow res split while down

2019-07-03 Thread Ivan Khoronzhuk
down. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw_ethtool.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ti/cpsw_ethtool.c b/drivers/net/ethernet/ti/cpsw_ethtool.c index 08d7aaee8299..fa4d75f5548e 100644 --- a/drivers/net/ethern

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

2019-07-03 Thread Ivan Khoronzhuk
somehow used in future, do flush in rx_handler, that allows to keep rx dev the same while reidrect. It allows to conform with tracing rx_dev pointed by Jesper. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/Kconfig| 1 + drivers/net/ethernet/ti/cpsw.c | 485

[PATCH v6 net-next 3/5] net: ethernet: ti: davinci_cpdma: allow desc split while down

2019-07-03 Thread Ivan Khoronzhuk
umber of rx descs, when interfaces are down. Also, if no dependency on intf state, move it to cpdma layer, where it should be. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw_ethtool.c | 9 - drivers/net/ethernet/ti/davinci_cpdma.c | 10 +- drivers/net/ethern

[PATCH v6 net-next 2/5] net: ethernet: ti: davinci_cpdma: add dma mapped submit

2019-07-03 Thread Ivan Khoronzhuk
In case if dma mapped packet needs to be sent, like with XDP page pool, the "mapped" submit can be used. This patch adds dma mapped submit based on regular one. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/davinci_cpdma.c | 89 ++--- drivers/net/e

[PATCH v6 net-next 1/5] xdp: allow same allocator usage

2019-07-03 Thread Ivan Khoronzhuk
different rx queues, add queue_index to xdp_mem_allocator to catch the obvious mistake where queue_index mismatch, as proposed by Jesper Dangaard Brouer. Adding this on xdp allocator level allows drivers with such dependency change the allocators w/o modifications. Signed-off-by: Ivan Khoronzhuk

[PATCH v6 net-next 0/5] net: ethernet: ti: cpsw: Add XDP support

2019-07-03 Thread Ivan Khoronzhuk
: simplify slave loops Ivan Khoronzhuk (5): xdp: allow same allocator usage net: ethernet: ti: davinci_cpdma: add dma mapped submit net: ethernet: ti: davinci_cpdma: allow desc split while down net: ethernet: ti: cpsw_ethtool: allow res split while down net: ethernet: ti: cpsw: add XDP support

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

2019-07-04 Thread Ivan Khoronzhuk
On Thu, Jul 04, 2019 at 12:39:02PM +0300, Ilias Apalodimas wrote: On Thu, Jul 04, 2019 at 11:19:39AM +0200, Jesper Dangaard Brouer wrote: On Wed, 3 Jul 2019 13:19:03 +0300 Ivan Khoronzhuk wrote: > Add XDP support based on rx page_pool allocator, one frame per page. > Page pool alloca

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

2019-07-04 Thread Ivan Khoronzhuk
On Thu, Jul 04, 2019 at 11:19:39AM +0200, Jesper Dangaard Brouer wrote: On Wed, 3 Jul 2019 13:19:03 +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 v6 net-next 5/5] net: ethernet: ti: cpsw: add XDP support

2019-07-04 Thread Ivan Khoronzhuk
On Thu, Jul 04, 2019 at 12:49:38PM +0300, Ilias Apalodimas wrote: On Thu, Jul 04, 2019 at 12:43:30PM +0300, Ivan Khoronzhuk wrote: On Thu, Jul 04, 2019 at 12:39:02PM +0300, Ilias Apalodimas wrote: >On Thu, Jul 04, 2019 at 11:19:39AM +0200, Jesper Dangaard Brouer wrote: >>On Wed, 3 Ju

Re: [PATCH v3 net-next 0/7] net: ethernet: ti: cpsw: Add XDP support

2019-06-06 Thread Ivan Khoronzhuk
On Thu, Jun 06, 2019 at 10:08:50AM +0200, Jesper Dangaard Brouer wrote: On Wed, 05 Jun 2019 12:14:50 -0700 (PDT) David Miller wrote: From: Ivan Khoronzhuk Date: Wed, 5 Jun 2019 16:20:02 +0300 > This patchset adds XDP support for TI cpsw driver and base it on > page_pool allocator.

Re: [PATCH v4 net-next 1/4] net: core: page_pool: add user cnt preventing pool deletion

2019-06-27 Thread Ivan Khoronzhuk
if (!xdp_alloc) return -ENOMEM; @@ -360,6 +396,7 @@ int xdp_rxq_info_reg_mem_model(struct xdp_rxq_info *xdp_rxq, xdp_rxq->mem.id = id; xdp_alloc->mem = xdp_rxq->mem; xdp_alloc->allocator = allocator; + xdp_alloc->refcnt = 1; /* Insert allocator into ID lookup table */ ptr = rhashtable_insert_slow(mem_id_ht, &id, &xdp_alloc->node); -- Regards, Ivan Khoronzhuk

Re: [PATCH v4 net-next 1/4] net: core: page_pool: add user cnt preventing pool deletion

2019-06-28 Thread Ivan Khoronzhuk
On Fri, Jun 28, 2019 at 08:35:20AM +0200, Jesper Dangaard Brouer wrote: On Fri, 28 Jun 2019 01:02:47 +0300 Ivan Khoronzhuk wrote: Hi Jesper, thanks you remember about it. > >I don't think that "create" and "free" routines paring looks "more >correct&quo

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

2019-06-30 Thread Ivan Khoronzhuk
prog is common for all channels till appropriate changes are added in XDP infrastructure. Also, once page_pool recycling becomes part of skb netstack some simplifications can be added, like removing page_pool_release_page() before skb receive. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet

[PATCH v5 net-next 5/6] net: ethernet: ti: cpsw_ethtool: allow res split while down

2019-06-30 Thread Ivan Khoronzhuk
down. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw_ethtool.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ti/cpsw_ethtool.c b/drivers/net/ethernet/ti/cpsw_ethtool.c index 6ab0cec8560a..99935c1d265d 100644 --- a/drivers/net/ethern

[PATCH v5 net-next 1/6] xdp: allow same allocator usage

2019-06-30 Thread Ivan Khoronzhuk
destination interface, afterwards it's freed. In order to schedule allocator destroy only after all users are unregistered, add refcnt to allocator object and schedule to destroy only it reaches 0. Signed-off-by: Ivan Khoronzhuk --- include/net/xdp_priv.h | 1 + net/core/xdp.c

[PATCH v5 net-next 0/6] net: ethernet: ti: cpsw: Add XDP support

2019-06-30 Thread Ivan Khoronzhuk
function to unmap dma addresses net: ethernet: ti: cpsw: use cpsw as drv data net: ethernet: ti: cpsw_ethtool: simplify slave loops Based on net-next/master Ivan Khoronzhuk (6): xdp: allow same allocator usage net: ethernet: ti: davinci_cpdma: add dma mapped submit net: ethernet: ti

[PATCH v5 net-next 3/6] net: ethernet: ti: davinci_cpdma: return handler status

2019-06-30 Thread Ivan Khoronzhuk
This change is needed to return flush status of rx handler for flushing redirected xdp frames after processing channel packets. Do it as separate patch for simplicity. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 23 +- drivers/net/ethernet/ti

[PATCH v5 net-next 4/6] net: ethernet: ti: davinci_cpdma: allow desc split while down

2019-06-30 Thread Ivan Khoronzhuk
umber of rx descs, when interfaces are down. Also, if no dependency on intf state, move it to cpdma layer, where it should be. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw_ethtool.c | 9 - drivers/net/ethernet/ti/davinci_cpdma.c | 10 +- drivers/net/ethern

[PATCH v5 net-next 2/6] net: ethernet: ti: davinci_cpdma: add dma mapped submit

2019-06-30 Thread Ivan Khoronzhuk
In case if dma mapped packet needs to be sent, like with XDP page pool, the "mapped" submit can be used. This patch adds dma mapped submit based on regular one. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/davinci_cpdma.c | 89 ++--- drivers/net/e

Re: [PATCH v6 net-next 1/5] xdp: allow same allocator usage

2019-07-04 Thread Ivan Khoronzhuk
On Wed, Jul 03, 2019 at 07:40:13PM +0200, Jesper Dangaard Brouer wrote: On Wed, 3 Jul 2019 13:18:59 +0300 Ivan Khoronzhuk wrote: First of all, it is an absolute requirement that each RX-queue have their own page_pool object/allocator. And this change is intendant to handle special case

Re: [PATCH v6 net-next 1/5] xdp: allow same allocator usage

2019-07-04 Thread Ivan Khoronzhuk
On Thu, Jul 04, 2019 at 02:41:44PM +0200, Jesper Dangaard Brouer wrote: On Thu, 4 Jul 2019 13:22:40 +0300 Ivan Khoronzhuk wrote: On Wed, Jul 03, 2019 at 07:40:13PM +0200, Jesper Dangaard Brouer wrote: >On Wed, 3 Jul 2019 13:18:59 +0300 >Ivan Khoronzhuk wrote: > >> First o

Re: [PATCH net-next V2] net: core: page_pool: add user refcnt and reintroduce page_pool_destroy

2019-07-04 Thread Ivan Khoronzhuk
On Thu, Jul 04, 2019 at 06:47:07PM +0200, Jesper Dangaard Brouer wrote: Have trouble with inet today...I will pick up it as my changes depend on it. And send probably in couple hours after verification. -- Regards, Ivan Khoronzhuk

[PATCH v7 net-next 1/5] net: core: page_pool: add user refcnt and reintroduce page_pool_destroy

2019-07-04 Thread Ivan Khoronzhuk
patch is a modified version of Ivan Khoronzhu's original patch. Link: https://lore.kernel.org/netdev/20190625175948.24771-2-ivan.khoronz...@linaro.org/ Fixes: 5c67bf0ec4d0 ("net: netsec: Use page_pool API") Signed-off-by: Jesper Dangaard Brouer Reviewed-by: Ilias Apalodimas Signe

[PATCH v7 net-next 4/5] net: ethernet: ti: cpsw_ethtool: allow res split while down

2019-07-04 Thread Ivan Khoronzhuk
down. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw_ethtool.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ti/cpsw_ethtool.c b/drivers/net/ethernet/ti/cpsw_ethtool.c index c477e6b620d6..e4d7185fde49 100644 --- a/drivers/net/ethern

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

2019-07-04 Thread Ivan Khoronzhuk
ndevs, based on switchdev for instance or else. In this case, driver can be modified like exposed here: https://lkml.org/lkml/2019/7/3/243 Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/Kconfig| 1 + drivers/net/ethernet/ti/cpsw.c | 502

[PATCH v7 net-next 2/5] net: ethernet: ti: davinci_cpdma: add dma mapped submit

2019-07-04 Thread Ivan Khoronzhuk
In case if dma mapped packet needs to be sent, like with XDP page pool, the "mapped" submit can be used. This patch adds dma mapped submit based on regular one. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/davinci_cpdma.c | 89 ++--- drivers/net/e

[PATCH v7 net-next 3/5] net: ethernet: ti: davinci_cpdma: allow desc split while down

2019-07-04 Thread Ivan Khoronzhuk
umber of rx descs, when interfaces are down. Also, if no dependency on intf state, move it to cpdma layer, where it should be. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw_ethtool.c | 17 +++-- drivers/net/ethernet/ti/davinci_cpdma.c | 17 - driver

[PATCH v7 net-next 0/5] net: ethernet: ti: cpsw: Add XDP support

2019-07-04 Thread Ivan Khoronzhuk
function to retrieve dma addresses net: page_pool: add helper function to unmap dma addresses net: ethernet: ti: cpsw: use cpsw as drv data net: ethernet: ti: cpsw_ethtool: simplify slave loops Ivan Khoronzhuk (5): net: core: page_pool: add user refcnt and reintroduce page_pool_destroy

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

2019-07-05 Thread Ivan Khoronzhuk
On Fri, Jul 05, 2019 at 01:13:54PM +0200, Jesper Dangaard Brouer wrote: On Fri, 5 Jul 2019 02:14:06 +0300 Ivan Khoronzhuk wrote: +static int cpsw_xdp_tx_frame(struct cpsw_priv *priv, struct xdp_frame *xdpf, +struct page *page) +{ + struct cpsw_common *cpsw

[PATCH v8 net-next 0/5] net: ethernet: ti: cpsw: Add XDP support

2019-07-05 Thread Ivan Khoronzhuk
loops Ivan Khoronzhuk (5): net: core: page_pool: add user refcnt and reintroduce page_pool_destroy net: ethernet: ti: davinci_cpdma: add dma mapped submit net: ethernet: ti: davinci_cpdma: allow desc split while down net: ethernet: ti: cpsw_ethtool: allow res split while down net

[PATCH v8 net-next 1/5] net: core: page_pool: add user refcnt and reintroduce page_pool_destroy

2019-07-05 Thread Ivan Khoronzhuk
y: Jesper Dangaard Brouer Signed-off-by: Ivan Khoronzhuk --- .../net/ethernet/mellanox/mlx5/core/en_main.c | 4 +-- drivers/net/ethernet/socionext/netsec.c | 8 ++ include/net/page_pool.h | 25 +++ net/core/page_pool.c |

[PATCH v8 net-next 4/5] net: ethernet: ti: cpsw_ethtool: allow res split while down

2019-07-05 Thread Ivan Khoronzhuk
down. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw_ethtool.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ti/cpsw_ethtool.c b/drivers/net/ethernet/ti/cpsw_ethtool.c index c477e6b620d6..e4d7185fde49 100644 --- a/drivers/net/ethern

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

2019-07-05 Thread Ivan Khoronzhuk
ndevs, based on switchdev for instance or else. In this case, driver can be modified like exposed here: https://lkml.org/lkml/2019/7/3/243 Acked-by: Jesper Dangaard Brouer Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/Kconfig| 1 + drivers/net/ethernet/ti/cpsw.c

[PATCH v8 net-next 3/5] net: ethernet: ti: davinci_cpdma: allow desc split while down

2019-07-05 Thread Ivan Khoronzhuk
umber of rx descs, when interfaces are down. Also, if no dependency on intf state, move it to cpdma layer, where it should be. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw_ethtool.c | 17 +++-- drivers/net/ethernet/ti/davinci_cpdma.c | 17 - driver

[PATCH v8 net-next 2/5] net: ethernet: ti: davinci_cpdma: add dma mapped submit

2019-07-05 Thread Ivan Khoronzhuk
In case if dma mapped packet needs to be sent, like with XDP page pool, the "mapped" submit can be used. This patch adds dma mapped submit based on regular one. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/davinci_cpdma.c | 89 ++--- drivers/net/e

[PATCH v9 net-next 2/5] net: ethernet: ti: davinci_cpdma: add dma mapped submit

2019-07-05 Thread Ivan Khoronzhuk
In case if dma mapped packet needs to be sent, like with XDP page pool, the "mapped" submit can be used. This patch adds dma mapped submit based on regular one. Signed-off-by: Ivan Khoronzhuk --- v9..v8 - fix potential warnings on arm64 caused by typos in type casting drivers/net/e

Re: [PATCH v8 net-next 0/5] net: ethernet: ti: cpsw: Add XDP support

2019-07-08 Thread Ivan Khoronzhuk
On Sun, Jul 07, 2019 at 06:35:11PM -0700, David Miller wrote: From: David Miller Date: Sun, 07 Jul 2019 18:31:46 -0700 (PDT) From: Ivan Khoronzhuk Date: Fri, 5 Jul 2019 18:04:57 +0300 This patchset adds XDP support for TI cpsw driver and base it on page_pool allocator. It was verified on

[PATCH v9 net-next 3/5] net: ethernet: ti: davinci_cpdma: allow desc split while down

2019-07-08 Thread Ivan Khoronzhuk
umber of rx descs, when interfaces are down. Also, if no dependency on intf state, move it to cpdma layer, where it should be. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw_ethtool.c | 17 +++-- drivers/net/ethernet/ti/davinci_cpdma.c | 17 - driver

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

2019-07-08 Thread Ivan Khoronzhuk
ndevs, based on switchdev for instance or else. In this case, driver can be modified like exposed here: https://lkml.org/lkml/2019/7/3/243 Acked-by: Jesper Dangaard Brouer Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/Kconfig| 1 + drivers/net/ethernet/ti/cpsw.c

[PATCH v9 net-next 0/5] net: ethernet: ti: cpsw: Add XDP support

2019-07-08 Thread Ivan Khoronzhuk
as drv data net: ethernet: ti: cpsw_ethtool: simplify slave loops Ivan Khoronzhuk (5): net: core: page_pool: add user refcnt and reintroduce page_pool_destroy net: ethernet: ti: davinci_cpdma: add dma mapped submit net: ethernet: ti: davinci_cpdma: allow desc split while down net

[PATCH v9 net-next 4/5] net: ethernet: ti: cpsw_ethtool: allow res split while down

2019-07-08 Thread Ivan Khoronzhuk
down. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw_ethtool.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ti/cpsw_ethtool.c b/drivers/net/ethernet/ti/cpsw_ethtool.c index c477e6b620d6..e4d7185fde49 100644 --- a/drivers/net/ethern

[PATCH v9 net-next 1/5] net: core: page_pool: add user refcnt and reintroduce page_pool_destroy

2019-07-08 Thread Ivan Khoronzhuk
y: Jesper Dangaard Brouer Reviewed-by: Saeed Mahameed Signed-off-by: Ivan Khoronzhuk --- .../net/ethernet/mellanox/mlx5/core/en_main.c | 4 +-- drivers/net/ethernet/socionext/netsec.c | 8 ++ include/net/page_pool.h | 25

[PATCH v9 net-next 2/5] net: ethernet: ti: davinci_cpdma: add dma mapped submit

2019-07-08 Thread Ivan Khoronzhuk
In case if dma mapped packet needs to be sent, like with XDP page pool, the "mapped" submit can be used. This patch adds dma mapped submit based on regular one. Signed-off-by: Ivan Khoronzhuk --- v8..v9: - fix warnings on arm64 caused by typos in type casting drivers/net/e

Re: [PATCH] [net-next] davinci_cpdma: don't cast dma_addr_t to pointer

2019-07-10 Thread Ivan Khoronzhuk
; could be used for smth else (who knows), looks ok. Reviewed-by: Ivan Khoronzhuk -- Regards, Ivan Khoronzhuk

Re: [RFC PATCH net-next 2/5] net: 8021q: vlan_dev: add vid tag for uc and mc address lists

2019-02-13 Thread Ivan Khoronzhuk
On Tue, Jan 22, 2019 at 03:12:41PM +0200, Ivan Khoronzhuk wrote: On Mon, Jan 21, 2019 at 03:37:41PM -0800, Florian Fainelli wrote: On 12/4/18 3:42 PM, Ivan Khoronzhuk wrote: On Tue, Dec 04, 2018 at 11:49:27AM -0800, Florian Fainelli wrote: [...] Ivan, based on the recent submission I

[PATCH net-next 0/6] net: ethernet: ti: cpsw: add MQPRIO and CBS Qdisc offload

2018-06-11 Thread Ivan Khoronzhuk
. For consistency reasons, in role of talker and listener, tools from patchset "TSN: Add qdisc based config interface for CBS" were used and can be seen here: https://www.spinics.net/lists/netdev/msg460869.html Based on net-next/master Ivan Khoronzhuk (6): net: ethernet: ti: cpsw:

[PATCH net-next 2/6] net: ethernet: ti: cpdma: fit rated channels in backward order

2018-06-11 Thread Ivan Khoronzhuk
According to TRM tx rated channels should be in 7..0 order, so correct it. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/davinci_cpdma.c | 31 - 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c b

[PATCH net-next 6/6] Documentation: networking: cpsw: add MQPRIO & CBS offload examples

2018-06-11 Thread Ivan Khoronzhuk
This document describes MQPRIO and CBS Qdisc offload configuration for cpsw driver based on examples. It potentially can be used in audio video bridging (AVB) and time sensitive networking (TSN). Signed-off-by: Ivan Khoronzhuk --- Documentation/networking/cpsw.txt | 540

[PATCH net-next 5/6] net: ethernet: ti: cpsw: restore shaper configuration while down/up

2018-06-11 Thread Ivan Khoronzhuk
frames are sent via ALE. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 47 ++ 1 file changed, 47 insertions(+) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 87a5586c5ea5..f39d2662c5ab 100644 --- a/drivers/net

[PATCH net-next 4/6] net: ethernet: ti: cpsw: add CBS Qdisc offload

2018-06-11 Thread Ivan Khoronzhuk
ged while reconnection, not always is true, so inform user in case speed of interface was changed, as it can impact on dependent shapers configuration. For more examples see Documentation. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 221

[PATCH net-next 1/6] net: ethernet: ti: cpsw: use cpdma channels in backward order for txq

2018-06-11 Thread Ivan Khoronzhuk
them, let assign tx cpdma channels in backward order to queues. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 534596c

[PATCH net-next 3/6] net: ethernet: ti: cpsw: add MQPRIO Qdisc offload

2018-06-11 Thread Ivan Khoronzhuk
part only maps L2 prio to classes of traffic, but not to transmit queues, so to direct traffic to traffic class vlan has to be created with appropriate egress map. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 82 ++ 1 file changed, 82 inser

[PATCH v2] net: ethernet: ti: cpsw: fix tx vlan priority mapping

2018-04-19 Thread Ivan Khoronzhuk
quot;net: ethernet: ti: cpsw: add multi queue support") Reviewed-by: Grygorii Strashko Signed-off-by: Ivan Khoronzhuk --- Based on net/master drivers/net/ethernet/ti/cpsw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti

Re: [PATCH 0/5] cpsw: add per channel shaper configuration

2016-12-05 Thread Ivan Khoronzhuk
On Mon, Dec 05, 2016 at 02:33:40PM -0600, Grygorii Strashko wrote: > Hi Ivan, > > On 11/29/2016 09:00 AM, Ivan Khoronzhuk wrote: > > This series is intended to allow user to set rate for per channel > > shapers at cpdma level. This patchset doesn't have impact on perfor

[PATCH] net: ethernet: ti: cpsw: fix early budget split

2016-12-05 Thread Ivan Khoronzhuk
udget according between channels") Signed-off-by: Ivan Khoronzhuk --- Based on net-next/master drivers/net/ethernet/ti/cpsw.c | 154 - 1 file changed, 77 insertions(+), 77 deletions(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet

Re: [PATCH 0/5] cpsw: add per channel shaper configuration

2016-12-06 Thread Ivan Khoronzhuk
lue. > > On 11/29/2016 09:00 AM, Ivan Khoronzhuk wrote: > > This series is intended to allow user to set rate for per channel > > shapers at cpdma level. This patchset doesn't have impact on performance. > > The rate can be set with: > > > > echo 100 > /

[PATCH] net: ethernet: ti: davinci_cpdma: correct check on NULL in set rate

2017-01-17 Thread Ivan Khoronzhuk
Check "ch" on NULL first, then get ctlr. Signed-off-by: Ivan Khoronzhuk --- Based on net-next/master drivers/net/ethernet/ti/davinci_cpdma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c b/drivers/net/ethernet/ti/davin

Re: [PATCH 3/4] net: ethernet: ti: cpsw: don't duplicate ndev_running

2017-01-17 Thread Ivan Khoronzhuk
On Thu, Jan 12, 2017 at 11:34:47AM -0600, Grygorii Strashko wrote: Hi Grygorii, Sorry for late reply. > > > On 01/10/2017 07:56 PM, Ivan Khoronzhuk wrote: > > On Mon, Jan 09, 2017 at 11:25:38AM -0600, Grygorii Strashko wrote: > >> > >> > >> On

[PATCH v2 3/5] net: ethernet: ti: cpsw: don't duplicate ndev_running

2017-01-19 Thread Ivan Khoronzhuk
No need to create additional vars to identify if interface is running. So simplify code by removing redundant var and checking usage counter instead. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 31 +-- 1 file changed, 17 insertions(+), 14

[PATCH v2 0/5] net: ethernet: ti: cpsw: correct common res usage

2017-01-19 Thread Ivan Khoronzhuk
Based on net-next/master Ivan Khoronzhuk (5): net: ethernet: ti: cpsw: remove dual check from common res usage function net: ethernet: ti: cpsw: don't disable interrupts in ndo_open net: ethernet: ti: cpsw: don't duplicate ndev_running net: ethernet: ti: cpsw: don't dupli

[PATCH v2 2/5] net: ethernet: ti: cpsw: don't disable interrupts in ndo_open

2017-01-19 Thread Ivan Khoronzhuk
redundant check and interrupt disable. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 296ddf2..f798905 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b

[PATCH v2 5/5] net: ethernet: ti: cpsw: clarify ethtool ops changing num of descs

2017-01-19 Thread Ivan Khoronzhuk
After adding cpsw_set_ringparam ethtool op, better to carry out common parts of similar ops splitting descriptors in runtime. It allows to reuse these parts and shows what the ops actually do. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 132

[PATCH v2 1/5] net: ethernet: ti: cpsw: remove dual check from common res usage function

2017-01-19 Thread Ivan Khoronzhuk
dual emac, it will simplify code/understanding and will match the name it's called. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 02b03ee..296ddf2 1

[PATCH v2 4/5] net: ethernet: ti: cpsw: don't duplicate common res in rx handler

2017-01-19 Thread Ivan Khoronzhuk
No need to duplicate the same function in rx handler to get info if any interface is running. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 40 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/drivers/net/ethernet/ti

Re: [PATCH] net: ethernet: ti: cpsw: fix NULL pointer dereference in switch mode

2017-02-01 Thread Ivan Khoronzhuk
ter > dereference" exception when first ethernet interface is opening > cpsw_ndo_open(). This issue causes boot regression on AM335x EVM and > reproducible on am57xx-evm (switch mode). > Fix it by adding additional check for !cpsw->slaves[i].ndev in > cpsw_get_usage_count(). > &

[PATCH] net: ethernet: ti: cpsw: remove dual check from common res usage function

2017-01-08 Thread Ivan Khoronzhuk
dual emac, it will simplify code/understanding and will match the name it's called. Signed-off-by: Ivan Khoronzhuk --- Based on linux-next/master drivers/net/ethernet/ti/cpsw.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/c

Re: [PATCH] net: ethernet: ti: cpsw: remove dual check from common res usage function

2017-01-08 Thread Ivan Khoronzhuk
Please ignore it, I've included it in new series On Sun, Jan 08, 2017 at 03:56:27PM +0200, Ivan Khoronzhuk wrote: > Common res usage is possible only in case an interface is > running. In case of not dual emac here can be only one interface, > so while ndo_open and switch mode, only

[PATCH 4/4] net: ethernet: ti: cpsw: don't duplicate common res in rx handler

2017-01-08 Thread Ivan Khoronzhuk
No need to duplicate the same function in rx handler to get info if any interface is running. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 40 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/drivers/net/ethernet/ti

[PATCH 3/4] net: ethernet: ti: cpsw: don't duplicate ndev_running

2017-01-08 Thread Ivan Khoronzhuk
No need to create additional vars to identify if interface is running. So simplify code by removing redundant var and checking usage counter instead. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff

[PATCH 0/4] net: ethernet: ti: cpsw: correct common res usage

2017-01-08 Thread Ivan Khoronzhuk
This series is intended to remove unneeded redundancies connected with common resource usage function. Based on net-next/master Tested on am572x idk Ivan Khoronzhuk (4): net: ethernet: ti: cpsw: remove dual check from common res usage function net: ethernet: ti: cpsw: don't di

[PATCH 2/4] net: ethernet: ti: cpsw: don't disable interrupts in ndo_open

2017-01-08 Thread Ivan Khoronzhuk
If any interface is running the interrupts are disabled anyway. It make sense to disable interrupts if any of interfaces is running, but in this place, obviously, it didn't have any effect. So, no need in redundant check and interrupt disable. Signed-off-by: Ivan Khoronzhuk --- driver

[PATCH 1/4] net: ethernet: ti: cpsw: remove dual check from common res usage function

2017-01-08 Thread Ivan Khoronzhuk
dual emac, it will simplify code/understanding and will match the name it's called. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index f339268..d261024 1

[PATCH] net: ethernet: ti: cpsw: extend limits for cpsw_get/set_ringparam

2017-01-08 Thread Ivan Khoronzhuk
Allow to set number of descs close to possible values. In case of minimum limit it's equal to number of channels to be able to set at least one desc per channel. For maximum limit leave enough descs number for tx channels. Signed-off-by: Ivan Khoronzhuk --- Based on net-next/master dr

Re: [PATCH 2/4] net: ethernet: ti: cpsw: add multi queue support

2016-07-19 Thread Ivan Khoronzhuk
On 08.07.16 16:12, Grygorii Strashko wrote: On 06/30/2016 10:04 PM, Ivan Khoronzhuk wrote: The cpsw h/w supports up to 8 tx and 8 rx channels.This patch adds multi-queue support to the driver. An ability to configure h/w shaper will be added with separate patch. Default shaper mode, as before

Re: [PATCH 4/4] net: ethernet: ti: cpsw: add ethtool channels support

2016-07-19 Thread Ivan Khoronzhuk
On 08.07.16 16:33, Grygorii Strashko wrote: On 06/30/2016 10:04 PM, Ivan Khoronzhuk wrote: These ops allow to control number of channels driver is allowed to work with. The maximum number of channels is 8 for rx and 8 for tx. After this patch the following commands are possible: $ ethtool -l

Re: [PATCH] net: ethernet: ti: cpdma: switch to use genalloc

2016-06-23 Thread Ivan Khoronzhuk
genalloc and add desc_num property for each channel for limitation of max number of allowed descriptors for each CPDMA channel. This patch do not affect on net throuput. Cc: Ivan Khoronzhuk Signed-off-by: Grygorii Strashko --- Testing TCP window: 256K, bandwidth in Mbits/sec: host: iperf -s

Re: [PATCH v2 0/2] net: ethernet: ti: cpsw: delete rx_descs property

2016-06-08 Thread Ivan Khoronzhuk
Hi Schuyer, On 07.06.16 18:26, Schuyler Patton wrote: Hi, On 06/07/2016 08:59 AM, Ivan Khoronzhuk wrote: There is no reason in rx_descs property because davinici_cpdma driver splits pool of descriptors equally between tx and rx channels. So, this patch series makes driver to use available

Re: [PATCH v2 0/2] net: ethernet: ti: cpsw: delete rx_descs property

2016-06-08 Thread Ivan Khoronzhuk
On 08.06.16 17:01, Ivan Khoronzhuk wrote: Hi Schuyer, On 07.06.16 18:26, Schuyler Patton wrote: Hi, On 06/07/2016 08:59 AM, Ivan Khoronzhuk wrote: There is no reason in rx_descs property because davinici_cpdma driver splits pool of descriptors equally between tx and rx channels. So, this

Re: [PATCH v2 0/2] net: ethernet: ti: cpsw: delete rx_descs property

2016-06-08 Thread Ivan Khoronzhuk
On 09.06.16 02:11, Schuyler Patton wrote: On 06/08/2016 09:06 AM, Ivan Khoronzhuk wrote: On 08.06.16 17:01, Ivan Khoronzhuk wrote: Hi Schuyer, On 07.06.16 18:26, Schuyler Patton wrote: Hi, On 06/07/2016 08:59 AM, Ivan Khoronzhuk wrote: There is no reason in rx_descs property because

Re: [PATCH v2 0/2] net: ethernet: ti: cpsw: delete rx_descs property

2016-06-14 Thread Ivan Khoronzhuk
On 11.06.16 02:04, Schuyler Patton wrote: On 06/08/2016 07:03 PM, Ivan Khoronzhuk wrote: On 09.06.16 02:11, Schuyler Patton wrote: On 06/08/2016 09:06 AM, Ivan Khoronzhuk wrote: On 08.06.16 17:01, Ivan Khoronzhuk wrote: Hi Schuyer, On 07.06.16 18:26, Schuyler Patton wrote: Hi

Re: [PATCH v2 0/2] net: ethernet: ti: cpsw: delete rx_descs property

2016-06-14 Thread Ivan Khoronzhuk
On 13.06.16 11:22, Mugunthan V N wrote: On Saturday 11 June 2016 04:34 AM, Schuyler Patton wrote: On 06/08/2016 07:03 PM, Ivan Khoronzhuk wrote: On 09.06.16 02:11, Schuyler Patton wrote: On 06/08/2016 09:06 AM, Ivan Khoronzhuk wrote: On 08.06.16 17:01, Ivan Khoronzhuk wrote: Hi

Re: [PATCH v2 0/2] net: ethernet: ti: cpsw: delete rx_descs property

2016-06-14 Thread Ivan Khoronzhuk
On 13.06.16 18:19, Andrew F. Davis wrote: On 06/13/2016 03:22 AM, Mugunthan V N wrote: On Saturday 11 June 2016 04:34 AM, Schuyler Patton wrote: On 06/08/2016 07:03 PM, Ivan Khoronzhuk wrote: On 09.06.16 02:11, Schuyler Patton wrote: On 06/08/2016 09:06 AM, Ivan Khoronzhuk wrote

Re: [PATCH 1/4] net: ethernet: ti: davinci_cpdma: split descs num between all channels

2016-07-03 Thread Ivan Khoronzhuk
On 01.07.16 23:35, David Miller wrote: From: Ivan Khoronzhuk Date: Thu, 30 Jun 2016 22:04:35 +0300 @@ -720,7 +763,7 @@ unlock_ret: } EXPORT_SYMBOL_GPL(cpdma_chan_submit); -bool cpdma_check_free_tx_desc(struct cpdma_chan *chan) +inline bool cpdma_check_free_desc(struct cpdma_chan *chan

[PATCH] net: ethernet: ti: cpsw: fix rx-usecs interrupt pacing consistency

2016-06-02 Thread Ivan Khoronzhuk
ce: - set rx-usecs to be 100us - down/up interface - read new unexpected rx-usecs Signed-off-by: Ivan Khoronzhuk --- Based on ti-linux-4.4.y drivers/net/ethernet/ti/cpsw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti

Re: [PATCH] net: ethernet: ti: cpsw: fix rx-usecs interrupt pacing consistency

2016-06-02 Thread Ivan Khoronzhuk
On 02.06.16 16:14, Ivan Khoronzhuk wrote: The rx-usecs shouldn't be changed while interface down/up. Currently, for instance, if it's set to 100us, after interface down/up it's 500us. It's a hidden bug that can lead to lavish interrupt pacing time increasing while "

[PATCH] net: ethernet: ti: cpsw: remove unused priv lock

2016-06-02 Thread Ivan Khoronzhuk
There is no reason in this lock. At least for now. Signed-off-by: Ivan Khoronzhuk --- Based on master drivers/net/ethernet/ti/cpsw.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 9919cb3..8d1d373 100644 --- a

[PATCH] net: ethernet: ti: cpsw: remove rx_descs property

2016-06-02 Thread Ivan Khoronzhuk
rx pool can be used in full. It will not have any impact on performance, as anyway, the "redundant" descriptors were unused. Signed-off-by: Ivan Khoronzhuk --- Based on master Documentation/devicetree/bindings/net/cpsw.txt | 3 --- arch/arm/boot/dts/am33xx.dtsi | 1 -

[PATCH] net: ethernet: ti: davinci_cpdma: fix fixed prio cpdma ctlr configuration

2016-11-08 Thread Ivan Khoronzhuk
The dma ctlr is reseted to 0 while cpdma start, thus cpdma ctlr cannot be configured after cpdma is stopped. So, restore content of cpdma ctlr while off/on procedure. Based on net-next/master Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 6 +- drivers/net

<    1   2   3   4   5   6   7   8   >