While create/destroy channel operation memory is not freed. It was
supposed that memory is freed while driver remove. But a channel
can be created and destroyed many times while changing number of
channels with ethtool.
Based on net-next/master
Signed-off-by: Ivan Khoronzhuk
---
drivers/net
On 09.11.16 23:09, Grygorii Strashko wrote:
On 11/08/2016 07:10 AM, Ivan Khoronzhuk wrote:
The dma ctlr is reseted to 0 while cpdma start, thus cpdma ctlr
I assume this is because cpdma_ctlr_start() does soft reset. Is it correct?
Probably not. I've seen this register doesn'
While create/destroy channel operation memory is not freed. It was
supposed that memory is freed while driver remove. But a channel
can be created and destroyed many times while changing number of
channels with ethtool.
Reviewed-by: Grygorii Strashko
Signed-off-by: Ivan Khoronzhuk
---
Based
ethtool. In order to not restore content in many
places, move it to cpdma_ctlr_start().
Signed-off-by: Ivan Khoronzhuk
---
Based on net-next/master
Since v1:
- don't use redundant parameters for cpdma, make prio fixed to be constant
drivers/net/ethernet/ti/cpsw.c | 4 --
driver
No need to stop ctlr if it was already stopped. It can cause timeout
warns. Steps:
- ifconfig eth0 down
- ethtool -l eth0 rx 8 tx 8
- ethtool -l eth0 rx 1 tx 1
Signed-off-by: Ivan Khoronzhuk
---
Based on net-next/master
drivers/net/ethernet/ti/davinci_cpdma.c | 2 +-
1 file changed, 1
On Wed, Dec 28, 2016 at 05:42:13PM -0600, Grygorii Strashko wrote:
Grygorii,
> Now below code sequence causes "Unable to handle kernel NULL pointer
> dereference.." exception and system crash during CPSW CPDMA initialization:
>
> cpsw_probe
> |-cpdma_chan_create (TX channel)
> |-cpdma_chan_spli
On Thu, Dec 01, 2016 at 05:34:27PM -0600, Grygorii Strashko wrote:
> The currently processing cpdma descriptor with EOQ flag set may
> contain two values in Next Descriptor Pointer field:
> - valid pointer: means CPDMA missed addition of new desc in queue;
It shouldn't happen in normal circumstance
On Thu, Dec 01, 2016 at 05:34:30PM -0600, Grygorii Strashko wrote:
> Add optional property "descs_pool_size" to specify buffer descriptor's
> pool size. The "descs_pool_size" should define total number of CPDMA
> CPPI descriptors to be used for both ingress/egress packets
> processing. If not speci
On Fri, Dec 02, 2016 at 10:45:07AM -0600, Grygorii Strashko wrote:
>
>
> On 12/02/2016 05:03 AM, Ivan Khoronzhuk wrote:
> > On Thu, Dec 01, 2016 at 05:34:27PM -0600, Grygorii Strashko wrote:
> >> The currently processing cpdma descriptor with EOQ flag set may
> &g
On Fri, Dec 02, 2016 at 11:22:28AM -0600, Grygorii Strashko wrote:
>
>
> On 12/02/2016 05:28 AM, Ivan Khoronzhuk wrote:
> > On Thu, Dec 01, 2016 at 05:34:30PM -0600, Grygorii Strashko wrote:
> >> Add optional property "descs_pool_size" to specify buffe
There is desc_read() macros to read desc fields, so no need to
use __raw_readl();
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
On Fri, Dec 16, 2016 at 10:19:58AM +0100, Arnd Bergmann wrote:
> The davinci_cpdma module is a helper library that is used by the
> actual device drivers and does nothing by itself, so all its API
> functions need to be exported.
>
> Four new functions were added recently without an export, so now
Split device budget between channels according to channel rate.
Signed-off-by: Ivan Khoronzhuk
---
drivers/net/ethernet/ti/cpsw.c | 159 +
1 file changed, 130 insertions(+), 29 deletions(-)
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net
Check budget fullness only after it's updated and update
channel mask only once to keep budget balance between channels.
It's also needed for farther changes.
Signed-off-by: Ivan Khoronzhuk
---
drivers/net/ethernet/ti/cpsw.c | 24 ++--
1 file changed, 6 inserti
channel priority is set in low-hi
direction already, so that when a new channel is added with ethtool
and it doesn't have rate yet, it cannot affect on rate limited
channels. It can be useful for TSN streams and just in cases when
h/w rate limited channels are needed.
Signed-off-by: Ivan Khoro
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 > /sys/class/net/ethX/queues/tx-0/tx_maxrate
Tested on am572xx
Based on net-next/master
Ivan Khoronzhuk (5
ocol ip prio 1 u32 match ip\
dport 5004 0x action skbedit queue_mapping 3
iperf -c 192.168.2.1 -b 110M -p 5001 -f m -t 60
iperf -c 192.168.2.1 -b 215M -p 5002 -f m -t 60
iperf -c 192.168.2.1 -b 55M -p 5003 -f m -t 60
iperf -c 192.168.2.1 -b 32M -p 5004 -f m -t 60
Signed-off-by: Iva
The weight of a channel is needed to split descriptors between
channels. The weight can depend on maximum rate of channels, maximum
rate of an interface or other reasons. The channel weight is in
percentage and is independent for rx and tx channels.
Signed-off-by: Ivan Khoronzhuk
---
drivers
- cpsw_ndo_open()
> |- netif_set_real_num_tx/rx_queues()
> |- ASSERT_RTNL();
>
> Hence, fix it by surrounding cpsw_ndo_open() by rtnl_lock/unlock() calls.
>
> Cc: Dave Gerlach
> Cc: Ivan Khoronzhuk
> Fixes: commit e05107e6b747 ("net: ethernet: ti: cpsw: add multi
Use the same, more convenient macros, to get active slave.
Signed-off-by: Ivan Khoronzhuk
---
drivers/net/ethernet/ti/cpsw.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index b62d958..c45f7d2 100644
The channels are common for both ndevs in dual emac mode. Hence, keep
in sync their rates.
Signed-off-by: Ivan Khoronzhuk
---
drivers/net/ethernet/ti/cpsw.c | 12 +++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti
s sum of "linked" phys, thus res are split taken
in account two interfaces, both for dual emac mode and for
switch mode.
Signed-off-by: Ivan Khoronzhuk
---
drivers/net/ethernet/ti/cpsw.c | 64 ++
1 file changed, 59 insertions(+), 5 deletions(-
Re-split weight along with budget. It simplify code a little
and update state after every rate change. Also it's necessarily
to move arguments checks to this combined function. Replace
maximum rate check for an interface on maximum possible rate.
Signed-off-by: Ivan Khoronzhuk
---
driver
net-next/master
Ivan Khoronzhuk (5):
net: ethernet: ti: cpsw: use same macros to get active slave
net: ethernet: ti: cpsw: don't start queue twice
net: ethernet: ti: cpsw: combine budget and weight split and check
net: ethernet: ti: cpsw: re-split res only when speed is changed
net
No need to start queues after cpsw is started as it will be done
while cpsw_adjust_link(), after phy connection.
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
, I'm going to add two additional ehttool ops
containing RPM sensitive part and not, better to split code on those,
if possible...and hiding put/get in begin op can call rpm when it's not
needed at all..
--
Regards,
Ivan Khoronzhuk
On 16.06.16 15:48, Ivan Khoronzhuk wrote:
On 15.06.16 19:45, Grygorii Strashko wrote:
On 06/15/2016 07:14 PM, Florian Fainelli wrote:
On 06/15/2016 04:55 AM, Grygorii Strashko wrote:
The CPSW might be suspended by RPM if all ethX interfaces are down,
but it still could be accesible
master
Since v2:
- add declaration of buf_num in correct order
Since v1:
- separate device tree and driver patches
- return number of rx buffers from cpdma driver
Ivan Khoronzhuk (2):
net: ethernet: ti: cpsw: remove rx_descs property
Documentation: DT: cpsw: remove rx_descs property
as anyway, the
"redundant" descriptors were unused.
Signed-off-by: Ivan Khoronzhuk
---
drivers/net/ethernet/ti/cpsw.c | 13 +++--
drivers/net/ethernet/ti/cpsw.h | 1 -
drivers/net/ethernet/ti/davinci_cpdma.c | 6 ++
drivers/net/ethernet/ti/davinci_cpdma.h |
There is no reason to hold s/w dependent parameter in device tree.
Even more, there is no reason in this parameter because davinici_cpdma
driver splits pool of descriptors equally between tx and rx channels
anyway.
Acked-by: Rob Herring
Signed-off-by: Ivan Khoronzhuk
---
Documentation
The ale is a property of cpsw, so change dev to cpsw->dev,
aka pdev->dev, to be consistent.
Signed-off-by: Ivan Khoronzhuk
---
Based on net-next/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/d
On Fri, Feb 10, 2017 at 02:45:21PM -0500, David Miller wrote:
> From: Ivan Khoronzhuk
> Date: Thu, 9 Feb 2017 16:24:14 +0200
>
> > @@ -1300,7 +1301,7 @@ static int netcp_ndo_start_xmit(struct sk_buff *skb,
> > struct net_device *ndev)
> > dev_war
On Fri, Feb 10, 2017 at 12:05:07PM -0600, Grygorii Strashko wrote:
>
>
> On 02/09/2017 07:45 PM, David Miller wrote:
> >From: Ivan Khoronzhuk
> >Date: Fri, 10 Feb 2017 00:54:24 +0200
> >
> >>On Thu, Feb 09, 2017 at 05:21:26PM -0500, David Miller wrote:
> &
If skb_padto failed the skb has been dropped already, so it was
consumed, but it doesn't mean it was sent, thus no need to update
queue tx time, etc. So, return NET_XMIT_DROP as more appropriate.
Signed-off-by: Ivan Khoronzhuk
---
Based on net-next/master
drivers/net/ethernet/ti/cpsw.
-by: Alexey Starikovskiy
Signed-off-by: Ivan Khoronzhuk
---
Based on net/master
v1:
https://patchwork.ozlabs.org/patch/725876/
Since v1:
- rebased 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
device count. So, replace
usage count function on var and inc and dec it in ndo_open/close.
Signed-off-by: Ivan Khoronzhuk
---
Based on net-next/master
drivers/net/ethernet/ti/cpsw.c | 42 --
1 file changed, 12 insertions(+), 30 deletions(-)
diff --git a
No need to update jiffies in txq->trans_start twice, it's supposed to be
done in netdev_start_xmit() and anyway is re-written. Also, no reason to
update trans time in case of an error.
Signed-off-by: Ivan Khoronzhuk
---
Based on net-next/master
drivers/net/ethernet/ti/cpsw.c | 2 --
-by: Alexey Starikovskiy
Signed-off-by: Ivan Khoronzhuk
---
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/cpsw.c
index 4d1c0c3..9714fab 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b
These two patches fix suspend/resume chain.
Ivan Khoronzhuk (2):
net: ethernet: ti: cpsw: fix cpsw assignment in resume
net: ethernet: ti: cpsw: fix resume because of usage count
drivers/net/ethernet/ti/cpsw.c | 44 +-
1 file changed, 13 insertions
only device count. So, replace
usage count function on var and inc and dec it in ndo_open/close.
Fixes: 03fd01ad0eead23eb79294b6fb4d71dcac493855
"net: ethernet: ti: cpsw: don't duplicate ndev_running"
Signed-off-by: Ivan Khoronzhuk
---
drivers/net/ethernet
No need to update jiffies in txq->trans_start twice and only for tx 0,
it's supposed to be done in netdev_start_xmit() and per tx queue.
Signed-off-by: Ivan Khoronzhuk
---
Based on net-next/master
drivers/net/ethernet/ti/netcp_core.c | 2 --
1 file changed, 2 deletions(-)
diff --git a
The _xmit function should return netdev_tx_t type.
Signed-off-by: Ivan Khoronzhuk
---
Based on net-next/master
drivers/net/ethernet/ti/netcp_core.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/ti/netcp_core.c
b/drivers/net/ethernet/ti
On Thu, Feb 09, 2017 at 05:21:26PM -0500, David Miller wrote:
> From: Ivan Khoronzhuk
> Date: Thu, 9 Feb 2017 02:07:34 +0200
>
> > These two patches fix suspend/resume chain.
>
> Patch 2 doesn't apply cleanly to the 'net' tree, please
> respin this series
On Mon, Jan 09, 2017 at 11:25:38AM -0600, Grygorii Strashko wrote:
>
>
> On 01/08/2017 10:41 AM, Ivan Khoronzhuk wrote:
> > No need to create additional vars to identify if interface is running.
> > So simplify code by removing redundant var and checking usag
On 09.08.16 14:34, Grygorii Strashko wrote:
On 08/06/2016 01:48 PM, Ivan Khoronzhuk wrote:
No need to check const slave num in runtime for every packet,
and ndev for slaves w/o ndev is anyway NULL. So remove redundant
check.
Signed-off-by: Ivan Khoronzhuk
---
drivers/net/ethernet/ti/cpsw.c
On 09.08.16 14:29, Grygorii Strashko wrote:
On 08/06/2016 01:48 PM, Ivan Khoronzhuk wrote:
No need to check number of handled packets, when in most cases (> 99%)
it's not 0. It can be 0 only in rare cases, even in this case
it's not bad to print just 0.
Signed-off-by: Iv
No need to hold pdev link when only dev is needed.
This allows to simplify a bunch of cpsw->pdev->dev now and farther.
Signed-off-by: Ivan Khoronzhuk
---
drivers/net/ethernet/ti/cpsw.c | 65 ++
1 file changed, 34 insertions(+), 31 deletions(-)
diff
No need to check const slave num in runtime for every packet,
and ndev for slaves w/o ndev is anyway NULL. So remove redundant
check and macro.
Reviewed-by: Mugunthan V N
Signed-off-by: Ivan Khoronzhuk
---
drivers/net/ethernet/ti/cpsw.c | 11 ---
1 file changed, 4 insertions(+), 7
ff-by: Ivan Khoronzhuk
---
drivers/net/ethernet/ti/cpsw.c | 65 +++---
1 file changed, 29 insertions(+), 36 deletions(-)
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 6d99d1e..b2482b6 100644
--- a/drivers/net/ethernet/ti/c
Every net device private struct holds links to shared cpdma resources.
No need to save and every time synchronize these resources per net dev.
So, move it to common driver struct.
Signed-off-by: Ivan Khoronzhuk
---
drivers/net/ethernet/ti/cpsw.c | 97
These data are common for net devs in dual_emac mode. No need to hold
it for every priv instance, so move them under cpsw_common.
Signed-off-by: Ivan Khoronzhuk
---
drivers/net/ethernet/ti/cpsw.c | 265 +
1 file changed, 137 insertions(+), 128 deletions
The ale, cpts, version, rx_packet_max, bus_freq, interrupt pacing
parameters are common per net device that uses the same h/w. So,
move them to common driver structure.
Signed-off-by: Ivan Khoronzhuk
---
drivers/net/ethernet/ti/cpsw.c | 235 +++--
1 file
The napi structs are common for both net devices in dual_emac
mode, In order to not hold duplicate links to them, move to
cpsw_common.
Signed-off-by: Ivan Khoronzhuk
---
drivers/net/ethernet/ti/cpsw.c | 52 ++
1 file changed, 22 insertions(+), 30
There is no need to hold link to clk, it's used only once
while probe.
Reviewed-by: Mugunthan V N
Reviewed-by: Grygorii Strashko
Signed-off-by: Ivan Khoronzhuk
---
drivers/net/ethernet/ti/cpsw.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/driver
, so drop it from poll handler.
Reviewed-by: Mugunthan V N
Signed-off-by: Ivan Khoronzhuk
---
drivers/net/ethernet/ti/cpsw.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 8972bf6..21cf367 100644
--- a/drivers/net
The pointers on h/w registers are common for every cpsw_private
instance, so no need to hold them for every ndev.
Signed-off-by: Ivan Khoronzhuk
---
drivers/net/ethernet/ti/cpsw.c | 97 +++---
1 file changed, 53 insertions(+), 44 deletions(-)
diff --git a
er cpsw_common
net: ethernet: ti: cpsw: move data platform data and slaves info to
cpsw_common
net: ethernet: ti: cpsw: fix int dbg message
net: ethernet: ti: cpsw: move napi struct to cpsw_common
net: ethernet: ti: cpsw: move ale, cpts and drivers params under
Based on net-next/master
I
There is no need in priv here.
Reviewed-by: Mugunthan V N
Reviewed-by: Grygorii Strashko
Signed-off-by: Ivan Khoronzhuk
---
drivers/net/ethernet/ti/cpsw.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti
This patch simply create holder for common data and as a start moves
pdev var to it.
Signed-off-by: Ivan Khoronzhuk
---
drivers/net/ethernet/ti/cpsw.c | 62 ++
1 file changed, 39 insertions(+), 23 deletions(-)
diff --git a/drivers/net/ethernet/ti/cpsw.c
As second net dev is created only in case of dual_emac mode, port
number can be figured out in simpler way. Also no need to pass
redundant ndev struct.
Reviewed-by: Mugunthan V N
Reviewed-by: Grygorii Strashko
Signed-off-by: Ivan Khoronzhuk
---
drivers/net/ethernet/ti/cpsw.c | 18
patches
- return number of rx buffers from cpdma driver
Ivan Khoronzhuk (2):
net: ethernet: ti: cpsw: remove rx_descs property
Documentation: DT: cpsw: remove rx_descs property
Documentation/devicetree/bindings/net/cpsw.txt | 1 -
arch/arm/boot/dts/am33xx.dtsi | 1 -
arch/arm
as anyway, the
"redundant" descriptors were unused.
Signed-off-by: Ivan Khoronzhuk
---
drivers/net/ethernet/ti/cpsw.c | 13 +++--
drivers/net/ethernet/ti/cpsw.h | 1 -
drivers/net/ethernet/ti/davinci_cpdma.c | 6 ++
drivers/net/ethernet/ti/davinci_cpdma.h |
There is no reason to hold s/w dependent parameter in device tree.
Even more, there is no reason in this parameter because davinici_cpdma
driver splits pool of descriptors equally between tx and rx channels
anyway.
Signed-off-by: Ivan Khoronzhuk
---
Documentation/devicetree/bindings/net
There is no reason to destroy channels that are destroyed while
cpdma_ctlr destroy. In this case no need to remember how much
channels where created and destroy them by one, as cpdma_ctlr
destroys all of them.
Signed-off-by: Ivan Khoronzhuk
---
Based on master
drivers/net/ethernet/ti/cpsw.c
On 11.06.16 04:17, David Miller wrote:
From: Ivan Khoronzhuk
Date: Sat, 11 Jun 2016 01:11:54 +0300
Based on master
master... of what?
master of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
but it's applicable on linux-next master also.
--
Regards,
Ivan Khoronzhuk
On 11.06.16 08:50, David Miller wrote:
From: Ivan Khoronzhuk
Date: Tue, 7 Jun 2016 16:59:35 +0300
if (!cpsw_common_res_usage_state(priv)) {
+ int buf_num;
struct cpsw_priv *priv_sl0 = cpsw_get_slave_priv(priv, 0);
Please always order local variable
On 11.06.16 12:24, Ivan Khoronzhuk wrote:
On 11.06.16 04:17, David Miller wrote:
From: Ivan Khoronzhuk
Date: Sat, 11 Jun 2016 01:11:54 +0300
Based on master
master... of what?
master of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
but it's applicable on
On 03.06.16 19:50, Grygorii Strashko wrote:
On 06/03/2016 01:43 AM, Ivan Khoronzhuk wrote:
There is no reason to hold s/w dependent parameter in device tree.
Even more, there is no reason in this parameter because davinici_cpdma
driver splits pool of descriptors equally between tx and rx
On 03.06.16 22:13, Grygorii Strashko wrote:
On 06/03/2016 09:25 PM, Ivan Khoronzhuk wrote:
On 03.06.16 19:50, Grygorii Strashko wrote:
On 06/03/2016 01:43 AM, Ivan Khoronzhuk wrote:
There is no reason to hold s/w dependent parameter in device tree.
Even more, there is no reason in this
.
Signed-off-by: Ivan Khoronzhuk
---
drivers/net/ethernet/ti/cpsw.c | 59 +
drivers/net/ethernet/ti/davinci_cpdma.c | 54 --
drivers/net/ethernet/ti/davinci_cpdma.h | 2 +-
3 files changed, 89 insertions(+), 26 deletions(-)
diff
2 \
action skbedit queue_mapping 5
#get statistic for active channels:
ethtool -S eth0
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: move cpdma channel struct mac
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 eth0
$ ethtool -L eth0 rx 6 tx 6
Signed-off-by: Ivan Khoronzhuk
---
drivers/net/ethernet/ti
Better to move functions that works with channel internals to 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:
, beginning from hi priority channel.
The statistic for every channel can be read with:
ethtool -S ethX
Signed-off-by: Ivan Khoronzhuk
---
drivers/net/ethernet/ti/cpsw.c | 334 +---
drivers/net/ethernet/ti/davinci_cpdma.c | 12 ++
drivers/net/ethernet/ti
be changed
in a way that `cbmem` still works.
If I should report this issue somewhere else, please tell me too, and
I’ll do my best to follow up there.
Thanks,
Paul
[1] https://www.coreboot.org
[2] https://ticket.coreboot.org/issues/33
[3] https://www.coreboot.org/pipermail/coreboot/2015-October/080568.html
--
Regards,
Ivan Khoronzhuk
atch,
so add it as a fix.
Fixes: 74a992b3598a ("net: phy: add phy_check_link_status")
Signed-off-by: Ivan Khoronzhuk
---
Based on net/master
drivers/net/ethernet/cavium/octeon/octeon_mgmt.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/ca
No need to set ndev for drvdata when mainly cpsw reference is needed,
so correct this legacy decision.
Reviewed-by: Grygorii Strashko
Signed-off-by: Ivan Khoronzhuk
---
drivers/net/ethernet/ti/cpsw.c | 16 +++-
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/drivers
net: page_pool: add helper function to unmap dma addresses
Ivan Khoronzhuk (5):
net: ethernet: ti: cpsw: use cpsw as drv data
net: ethernet: ti: cpsw_ethtool: simplify slave loops
net: ethernet: ti: davinci_cpdma: add dma mapped submit
net: ethernet: ti: davinci_cpdma: return handler
From: Ilias Apalodimas
On a previous patch dma addr was stored in 'struct page'.
Use that to retrieve DMA addresses used by network drivers
Signed-off-by: Ilias Apalodimas
Signed-off-by: Jesper Dangaard Brouer
Signed-off-by: Ivan Khoronzhuk
---
include/net/page_pool.h | 5 +++
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
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 marked with comments.
Signed-off-by: Ivan Khoronzhuk
---
drivers/net/ethernet/ti/Kconfig| 1 +
drivers/net/ethernet/ti
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 | 88 -
drivers/net/e
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
---
drivers/net/ethernet/ti/cpsw_ethtool.c | 40 ++
1 file changed, 21 insertions(+), 19 deletions(-)
diff --git a/drivers/net
From: Ilias Apalodimas
On a previous patch dma addr was stored in 'struct page'.
Use that to unmap DMA addresses used by network drivers
Signed-off-by: Ilias Apalodimas
Signed-off-by: Jesper Dangaard Brouer
Signed-off-by: Ivan Khoronzhuk
---
include/net/page_pool.h | 1 +
It's found while review and probably never happens, but real number
of queues is set per device, and error path should be per device.
Also correct label name for shared error path.
Signed-off-by: Ivan Khoronzhuk
---
drivers/net/ethernet/ti/cpsw.c | 5 +++--
1 file changed, 3 insertions(
It's found while review and probably never happens, but real number
of queues is set per device, and error path should be per device.
So split error path based on usage_count.
Signed-off-by: Ivan Khoronzhuk
---
drivers/net/ethernet/ti/cpsw.c | 7 +--
1 file changed, 5 insertions(
Please ignore this version, I've sent version 2 that do the same but is more
adjustable for later on changes and based on usage counter.
--
Regards,
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 = N
74fea58d28a51 ("ethtool: Ensure new
ring parameters are within bounds during SRINGPARAM")
Signed-off-by: Ivan Khoronzhuk
---
Based on net/master
drivers/net/ethernet/ti/cpsw_ethtool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/ti/cpsw_ethtool
n other places after stopping tx
queues.
Signed-off-by: Ivan Khoronzhuk
---
Based on net-next/master
drivers/net/ethernet/ti/cpsw.c | 15 ++---
drivers/net/ethernet/ti/cpsw_ethtool.c | 12 +---
drivers/net/ethernet/ti/davinci_cpdma.c | 85 +++--
drivers/n
addresses
Ivan Khoronzhuk (5):
net: ethernet: ti: cpsw: use cpsw as drv data
net: ethernet: ti: cpsw_ethtool: simplify slave loops
net: ethernet: ti: davinci_cpdma: add dma mapped submit
net: ethernet: ti: davinci_cpdma: return handler status
net: ethernet: ti: cpsw: add XDP support
infrastructure. Also, once page_pool recycling becomes part of
skb netstack some simplifications can be added marked with comments.
Signed-off-by: Ivan Khoronzhuk
---
drivers/net/ethernet/ti/Kconfig| 1 +
drivers/net/ethernet/ti/cpsw.c | 506 ++---
drivers
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
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
---
drivers/net/ethernet/ti/cpsw_ethtool.c | 40 ++
1 file changed, 21 insertions(+), 19 deletions(-)
diff --git a/drivers/net
No need to set ndev for drvdata when mainly cpsw reference is needed,
so correct this legacy decision.
Signed-off-by: Ivan Khoronzhuk
---
drivers/net/ethernet/ti/cpsw.c | 16 +++-
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers
From: Ilias Apalodimas
On a previous patch dma addr was stored in 'struct page'.
Use that to retrieve DMA addresses used by network drivers
Signed-off-by: Ilias Apalodimas
Signed-off-by: Jesper Dangaard Brouer
Signed-off-by: Ivan Khoronzhuk
---
include/net/page_pool.h | 5 +++
From: Ilias Apalodimas
On a previous patch dma addr was stored in 'struct page'.
Use that to unmap DMA addresses used by network drivers
Signed-off-by: Ilias Apalodimas
Signed-off-by: Jesper Dangaard Brouer
Signed-off-by: Ivan Khoronzhuk
---
include/net/page_pool.h | 1 +
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 | 88 -
drivers/net/e
RINGPARAM")
Signed-off-by: Ivan Khoronzhuk
---
Based on net/master
drivers/net/ethernet/ti/cpsw_ethtool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/ti/cpsw_ethtool.c
b/drivers/net/ethernet/ti/cpsw_ethtool.c
index a4a7ec0d2531..6d1c9ebae7cc 100644
ng?
To be clear, a page_pool object is needed per RX-queue, as it is
accessing a small RX page cache (which protected by NAPI/softirq).
There is one RX interrupt and one RX NAPI for all rx channels.
On Thu, 30 May 2019 21:20:39 +0300
Ivan Khoronzhuk wrote:
@@ -1404,6 +1711,14 @@ static int cps
601 - 700 of 744 matches
Mail list logo