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 s

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> wro

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

[PATCH] net: ethernet: ti: netcp_core: remove unused compl queue mapping

2017-04-24 Thread Ivan Khoronzhuk
This code is unused and probably was unintentionally left while moving completion queue mapping in submit function. Signed-off-by: Ivan Khoronzhuk --- Based on net-next/master drivers/net/ethernet/ti/netcp_core.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/net/ethernet/ti

[PATCH net-next 0/3] fix sw timestamping for non PTP packets

2017-06-27 Thread Ivan Khoronzhuk
This series contains several corrections connected with timestamping for cpsw and netcp drivers based on same cpts module. Based on net/next Ivan Khoronzhuk (3): net: ethernet: ti: cpsw: move skb timestamp to packet_submit net: ethernet: ti: cpsw: fix sw timestamping for non PTP packets

[PATCH net-next 3/3] net: ethernet: ti: netcp_ethss: use cpts to check if packet needs timestamping

2017-06-27 Thread Ivan Khoronzhuk
There is cpts function to check if packet can be timstamped with cpts. Seems that ptp_classify_raw cover all cases listed with "case". Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/netcp_ethss.c | 18 +- 1 file changed, 1 insertion(+), 17 deletions(-) di

[PATCH net-next 2/3] net: ethernet: ti: cpsw: fix sw timestamping for non PTP packets

2017-06-27 Thread Ivan Khoronzhuk
stamped at all if it's not PTP and h/w timestamping is enabled. So, fix it by setting SKBTX_IN_PROGRESS only for PTP packets. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 3 ++- drivers/net/ethernet/ti/cpts.h | 16 2 files changed, 18 insertions

[PATCH net-next 1/3] net: ethernet: ti: cpsw: move skb timestamp to packet_submit

2017-06-27 Thread Ivan Khoronzhuk
Move sw timestamp function close to channel submit function. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index b7a0f5e..422994e 100644

Re: [RFC/RFT PATCH 2/4] net: ethernat: ti: cpts: enable irq

2017-06-30 Thread Ivan Khoronzhuk
On Tue, Jun 13, 2017 at 06:16:21PM -0500, Grygorii Strashko wrote: > There are two reasons for this change: > 1) enabling of HW_TS_PUSH events as suggested by Richard Cochran and > discussed in [1] > 2) fixing an TX timestamping miss issue which happens with low speed > ethernet connections and was

Re: [PATCH] net: ethernet: ti: cpsw: fix net watchdog timeout

2018-02-07 Thread Ivan Khoronzhuk
On Wed, Feb 07, 2018 at 12:19:11PM -0600, Grygorii Strashko wrote: On 02/07/2018 07:31 AM, Ivan Khoronzhuk wrote: On Wed, Feb 07, 2018 at 05:03:19AM +0200, Ivan Khoronzhuk wrote: On Tue, Feb 06, 2018 at 07:17:06PM -0600, Grygorii Strashko wrote: It was discovered that simple program which

Re: [PATCH] net: ethernet: ti: cpsw: fix net watchdog timeout

2018-02-07 Thread Ivan Khoronzhuk
Rechecked once again, seems it covers every case, at this moment, so Reviewed-by: Ivan Khoronzhuk -- Regards, Ivan Khoronzhuk

Re: [PATCH] net: ethernet: ti: cpsw: fix net watchdog timeout

2018-02-06 Thread Ivan Khoronzhuk
eue(ndev, skb_get_queue_mapping(skb)); > netif_tx_stop_queue(txq); > + > + /* Barrier, so that stop_queue visible to other cpus */ > + smp_mb__after_atomic(); > + > + if (cpdma_check_free_tx_desc(txch)) > + netif_tx_wake_queue(txq); > + > return NETDEV_TX_BUSY; > } > > -- > 2.10.5 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-omap" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Regards, Ivan Khoronzhuk

Re: [PATCH] net: ethernet: ti: cpsw: fix net watchdog timeout

2018-02-07 Thread Ivan Khoronzhuk
On Wed, Feb 07, 2018 at 05:03:19AM +0200, Ivan Khoronzhuk wrote: > On Tue, Feb 06, 2018 at 07:17:06PM -0600, Grygorii Strashko wrote: > > It was discovered that simple program which indefinitely sends 200b UDP > > packets and runs on TI AM574x SoC (SMP) under RT Kernel t

[PATCH v2 net-next] net: ethernet: ti: cpdma: correct error handling for chan create

2017-12-12 Thread Ivan Khoronzhuk
s. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 12 +--- drivers/net/ethernet/ti/davinci_cpdma.c | 2 +- drivers/net/ethernet/ti/davinci_emac.c | 9 +++-- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b/d

Re: [PATCH v2 net-next] net: ethernet: ti: cpdma: correct error handling for chan create

2017-12-12 Thread Ivan Khoronzhuk
On Tue, Dec 12, 2017 at 11:08:51AM -0600, Grygorii Strashko wrote: > > > On 12/12/2017 10:35 AM, Ivan Khoronzhuk wrote: > > It's not correct to return NULL when that is actually an error and > > function returns errors in any other wrong case. In the same time, >

[PATCH v3 net-next] net: ethernet: ti: cpdma: correct error handling for chan create

2017-12-12 Thread Ivan Khoronzhuk
v_err msgs. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 12 +--- drivers/net/ethernet/ti/davinci_cpdma.c | 2 +- drivers/net/ethernet/ti/davinci_emac.c | 11 +-- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/t

[PATCH] net: ethernet: ti: netcp_core: no need in netif_napi_del

2017-09-07 Thread Ivan Khoronzhuk
Don't remove rx_napi specifically just before free_netdev(), it's supposed to be done in it and is confusing w/o tx_napi deletion. Signed-off-by: Ivan Khoronzhuk --- Based on net-next/master drivers/net/ethernet/ti/netcp_core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/d

[PATCH] net: ethernet: ti: netcp_core: return error while dma channel open issue

2017-05-10 Thread Ivan Khoronzhuk
Fix error path while dma open channel issue. Also, no need to check output on NULL if it's never returned. Signed-off-by: Ivan Khoronzhuk --- Based on net-next drivers/net/ethernet/ti/netcp_core.c | 6 -- drivers/soc/ti/knav_dma.c| 2 +- 2 files changed, 5 insertions(

Re: [PATCH v3 3/3] net: ethernet: ti: cpts: fix tx timestamping timeout

2017-07-28 Thread Ivan Khoronzhuk
On Wed, Jul 26, 2017 at 05:11:38PM -0500, Grygorii Strashko wrote: > With the low speed Ethernet connection CPDMA notification about packet > processing can be received before CPTS TX timestamp event, which is set > when packet actually left CPSW while cpdma notification is sent when packet > pushe

Re: [RFC/RFT PATCH 2/4] net: ethernat: ti: cpts: enable irq

2017-07-03 Thread Ivan Khoronzhuk
On Mon, Jul 03, 2017 at 02:31:06PM -0500, Grygorii Strashko wrote: > > > On 06/30/2017 08:31 PM, Ivan Khoronzhuk wrote: > > On Tue, Jun 13, 2017 at 06:16:21PM -0500, Grygorii Strashko wrote: > >> There are two reasons for this change: > >> 1) enabling of HW_TS_PU

[PATCH net-next] net: ethernet: ti: cpdma: rate is not changed - correct case

2017-12-06 Thread Ivan Khoronzhuk
If rate is the same as set it's correct case. Signed-off-by: Ivan Khoronzhuk --- Based on net-next/master drivers/net/ethernet/ti/davinci_cpdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c b/drivers/net/ethern

[PATCH net-next] net: ethernet: ti: cpdma: correct error handling for chan create

2017-12-06 Thread Ivan Khoronzhuk
It's not correct to return NULL when that is actually an error and function returns errors in any other wrong case. In the same time, the cpsw driver and davinci emac doesn't check error case while creating channel and it can miss actual error. Correct this mess. Signed-off-by: Ivan

Re: [PATCH net-next] net: ethernet: ti: cpdma: rate is not changed - correct case

2017-12-07 Thread Ivan Khoronzhuk
On Wed, Dec 06, 2017 at 04:35:45PM -0500, David Miller wrote: > From: Ivan Khoronzhuk > Date: Wed, 6 Dec 2017 16:41:18 +0200 > > > If rate is the same as set it's correct case. > > > > Signed-off-by: Ivan Khoronzhuk > > --- > > Based on net-n

Re: [PATCH net-next] net: ethernet: ti: cpdma: correct error handling for chan create

2017-12-07 Thread Ivan Khoronzhuk
On Wed, Dec 06, 2017 at 04:38:14PM -0500, David Miller wrote: > From: Ivan Khoronzhuk > Date: Wed, 6 Dec 2017 16:54:09 +0200 > > > @@ -3065,10 +3065,16 @@ static int cpsw_probe(struct platform_device *pdev) > > } > > > > cpsw->txv[0]

Re: [PATCH net-next] net: ethernet: ti: cpdma: rate is not changed - correct case

2017-12-07 Thread Ivan Khoronzhuk
On Thu, Dec 07, 2017 at 02:50:24PM -0500, David Miller wrote: > From: Ivan Khoronzhuk > Date: Thu, 7 Dec 2017 21:48:56 +0200 > > > On Wed, Dec 06, 2017 at 04:35:45PM -0500, David Miller wrote: > >> From: Ivan Khoronzhuk > >> Date: Wed, 6 Dec 2017 16:41:18 +0200

Re: [PATCH net-next] net: ethernet: ti: cpdma: rate is not changed - correct case

2017-12-07 Thread Ivan Khoronzhuk
On Thu, Dec 07, 2017 at 03:13:15PM -0500, David Miller wrote: > From: Ivan Khoronzhuk > Date: Thu, 7 Dec 2017 22:10:06 +0200 > > > On Thu, Dec 07, 2017 at 02:50:24PM -0500, David Miller wrote: > >> From: Ivan Khoronzhuk > >> Date: Thu, 7 Dec 2017 21:48:56 +0200

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

2016-08-15 Thread Ivan Khoronzhuk
d-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 301 +--- drivers/net/ethernet/ti/davinci_cpdma.c | 12 ++ drivers/net/ethernet/ti/davinci_cpdma.h | 2 + 3 files changed, 211 insertions(+), 104 deletions(-) diff --git a/drivers/net/ethern

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

2016-08-15 Thread Ivan Khoronzhuk
. How many channels are supported and enabled: $ ethtool -l ethX Change number of channels (up to 8) $ ethtool -L ethX rx 6 tx 6 Per-channel statistic: $ ethtool -S ethX Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 177 - 1 file changed

[PATCH v2 0/4] net: ethernet: ti: cpsw: add cpdma multi-queue support

2016-08-15 Thread Ivan Khoronzhuk
- removed change of driver version. it can be done later - corrected setup of channels for dual_emac mode with ethtool Ivan Khoronzhuk (4): net: ethernet: ti: davinci_cpdma: split descs num between all channels net: ethernet: ti: cpsw: add multi queue support net: ethernet: ti: davinci_cpdma

[PATCH v2 3/4] net: ethernet: ti: davinci_cpdma: move cpdma channel struct macroses to internals

2016-08-15 Thread Ivan Khoronzhuk
Keep the driver internals in C file. Currently it's not required for drivers to know rx or tx a channel is, except create function. So correct "channel create" function, and use all channel struct macroses only for internal use. Signed-off-by: Ivan Khoronzhuk --- drivers/net/eth

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

2016-08-15 Thread Ivan Khoronzhuk
-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 61 - drivers/net/ethernet/ti/davinci_cpdma.c | 47 +++-- drivers/net/ethernet/ti/davinci_cpdma.h | 2 +- 3 files changed, 84 insertions(+), 26 deletions(-) diff --git a

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

2016-08-15 Thread Ivan Khoronzhuk
there's some route where the channel can be NULL, You're splitting the value incorrectly. If chan == NULL it's not active and pool->chan_num doesn't include it. The descriptors are split between active channels only. -- Regards, Ivan Khoronzhuk

[PATCH v3 5/5] net: ethernet: ti: cpsw: add ethtool channels support

2016-08-15 Thread Ivan Khoronzhuk
. How many channels are supported and enabled: $ ethtool -l ethX Change number of channels (up to 8) $ ethtool -L ethX rx 6 tx 6 Per-channel statistic: $ ethtool -S ethX Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 180 - 1 file changed

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

2016-08-15 Thread Ivan Khoronzhuk
Tx channels share same pool of descriptors. Thus one channel can block another if pool is emptied by one. But, the shaper should decide which channel is allowed to send packets. To avoid such impact of one channel on another, let every channel to have its own piece of pool. Signed-off-by: Ivan

[PATCH v3 0/5] net: ethernet: ti: cpsw: add cpdma multi-queue support

2016-08-15 Thread Ivan Khoronzhuk
e ctrl in case at least one interface is running Since v1: - removed cpdam_check_free_desc function - remove pm_runtime calls as they are used in begin/complete ethtool calls now - removed change of driver version. it can be done later - corrected setup of channels for dual_emac mode with ethtool Ivan Khor

[PATCH v3 4/5] net: ethernet: ti: davinci_cpdma: move cpdma channel struct macroses to internals

2016-08-15 Thread Ivan Khoronzhuk
Keep the driver internals in C file. Currently it's not required for drivers to know rx or tx a channel is, except create function. So correct "channel create" function, and use all channel struct macroses only for internal use. Signed-off-by: Ivan Khoronzhuk --- drivers/net/eth

[PATCH v3 3/5] net: ethernet: ti: cpsw: add multi queue support

2016-08-15 Thread Ivan Khoronzhuk
d-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 302 +--- drivers/net/ethernet/ti/davinci_cpdma.c | 12 ++ drivers/net/ethernet/ti/davinci_cpdma.h | 2 + 3 files changed, 211 insertions(+), 105 deletions(-) diff --git a/drivers/net/ethern

[PATCH v3 2/5] net: ethernet: ti: davinci_cpdma: fix locking while ctrl_stop

2016-08-15 Thread Ivan Khoronzhuk
ndler netif_receive_skb So, split locking while ctrl stop thus interrupts are still enabled while skbs handling. It can cause WARN_ONCE in rare cases when ctrl is stopping while not all packets were handled with NAPIs. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/davinci_cp

[PATCH v4 0/5] net: ethernet: ti: cpsw: add cpdma multi-queue support

2016-08-22 Thread Ivan Khoronzhuk
are used in begin/complete ethtool calls now - removed change of driver version. it can be done later - corrected setup of channels for dual_emac mode with ethtool Ivan Khoronzhuk (5): net: ethernet: ti: davinci_cpdma: split descs num between all channels net: ethernet: ti: davinci_cpdma: fix lo

[PATCH v4 5/5] net: ethernet: ti: cpsw: add ethtool channels support

2016-08-22 Thread Ivan Khoronzhuk
. How many channels are supported and enabled: $ ethtool -l ethX Change number of channels (up to 8) $ ethtool -L ethX rx 6 tx 6 Per-channel statistic: $ ethtool -S ethX Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 180 + 1 file changed

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

2016-08-22 Thread Ivan Khoronzhuk
Tx channels share same pool of descriptors. Thus one channel can block another if pool is emptied by one. But, the shaper should decide which channel is allowed to send packets. To avoid such impact of one channel on another, let every channel to have its own piece of pool. Signed-off-by: Ivan

[PATCH v4 2/5] net: ethernet: ti: davinci_cpdma: fix locking while ctrl_stop

2016-08-22 Thread Ivan Khoronzhuk
ndled with NAPIs. Reviewed-by: Mugunthan V N Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/davinci_cpdma.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c b/drivers/net/ethernet/ti/davinci_cpdma.c index 167fd65..ffb32af 100644 --- a/dr

[PATCH v4 4/5] net: ethernet: ti: davinci_cpdma: move cpdma channel struct macroses to internals

2016-08-22 Thread Ivan Khoronzhuk
Keep the driver internals in C file. Currently it's not required for drivers to know rx or tx a channel is, except create function. So correct "channel create" function, and use all channel struct macroses only for internal use. Reviewed-by: Mugunthan V N Signed-off-by:

[PATCH v4 3/5] net: ethernet: ti: cpsw: add multi queue support

2016-08-22 Thread Ivan Khoronzhuk
d-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 301 +--- drivers/net/ethernet/ti/davinci_cpdma.c | 12 ++ drivers/net/ethernet/ti/davinci_cpdma.h | 2 + 3 files changed, 210 insertions(+), 105 deletions(-) diff --git a/drivers/net/ethern

<    3   4   5   6   7   8