[PATCH v2 net-next 8/9] net: stmmac: Add the bindings parsing for XGMAC2

2018-08-03 Thread Jose Abreu
Add the bindings parsing for XGMAC2 IP block. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c | 2 ++ drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 6 ++ 2 files

[PATCH v2 net-next 0/9] Add support for XGMAC2 in stmmac

2018-08-03 Thread Jose Abreu
1.09 GBytes 940 Mbits/sec0 sender [ 4] 0.00-10.00 sec 1.09 GBytes 938 Mbits/sec receiver --- Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Andrew Lunn Jose Abreu (9): net: stmmac: Add XGMAC 2.10 HWIF entry net

[PATCH v2 net-next 3/9] net: stmmac: Add DMA related callbacks for XGMAC2

2018-08-03 Thread Jose Abreu
Add the DMA related callbacks for the new IP block XGMAC2. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/Makefile | 2 +- drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h | 56

[PATCH v2 net-next 2/9] net: stmmac: Add MAC related callbacks for XGMAC2

2018-08-03 Thread Jose Abreu
Add the MAC related callbacks for the new IP block XGMAC2. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/Makefile | 2 +- drivers/net/ethernet/stmicro/stmmac/common.h | 3

[PATCH v2 net-next 6/9] net: stmmac: Add PTP support for XGMAC2

2018-08-03 Thread Jose Abreu
XGMAC2 uses the same engine of timestamping as GMAC4. Let's use the same callbacks. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/hwif.c | 4 ++-- drivers/net/ethernet/stmicro/s

Re: [PATCH net-next 7/9] net: stmmac: Integrate XGMAC into main driver flow

2018-08-02 Thread Jose Abreu
On 02-08-2018 15:36, Andrew Lunn wrote: >> Sorry, I made a mistake. Where it reads SGMII in my reply I was >> referring to XGMII. > So you have XGMII between the MAC and the PHY. That should support > 2.5G, 5G and 10G. What i don't know is if you can also do 10/100/1000 > over XGMII? Acording to d

Re: [PATCH net-next 7/9] net: stmmac: Integrate XGMAC into main driver flow

2018-08-02 Thread Jose Abreu
Hi Andrew, On 02-08-2018 15:03, Andrew Lunn wrote: > On Thu, Aug 02, 2018 at 09:26:28AM +0100, Jose Abreu wrote: >> Hi Andrew, >> >> Thanks for the review! >> >> On 01-08-2018 16:23, Andrew Lunn wrote: >>>> @@ -842,6 +863,12 @@ static v

Re: [PATCH net-next 5/9] net: stmmac: Add MDIO related functions for XGMAC2

2018-08-02 Thread Jose Abreu
Hi Andrew, On 01-08-2018 16:08, Andrew Lunn wrote: > Hi Jose > >> +static int stmmac_xgmac2_mdio_read(struct stmmac_priv *priv, int phyaddr, >> + int phyreg) >> +{ >> +unsigned int mii_address = priv->hw->mii.addr; >> +unsigned int mii_data = priv->hw->mii.dat

Re: [PATCH net-next 7/9] net: stmmac: Integrate XGMAC into main driver flow

2018-08-02 Thread Jose Abreu
Hi Andrew, Thanks for the review! On 01-08-2018 16:23, Andrew Lunn wrote: >> @@ -842,6 +863,12 @@ static void stmmac_adjust_link(struct net_device *dev) >> new_state = true; >> ctrl &= ~priv->hw->link.speed_mask; >> switch (phydev->sp

[PATCH net-next 6/9] net: stmmac: Add PTP support for XGMAC2

2018-08-01 Thread Jose Abreu
XGMAC2 uses the same engine of timestamping as GMAC4. Let's use the same callbacks. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/hwif.c | 4 ++-- drivers/net/ethernet/stmicro/s

[PATCH net-next 7/9] net: stmmac: Integrate XGMAC into main driver flow

2018-08-01 Thread Jose Abreu
Now that we have all the XGMAC related callbacks, lets start integrating this IP block into main driver. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 55

[PATCH net-next 9/9] bindings: net: stmmac: Add the bindings documentation for XGMAC2.

2018-08-01 Thread Jose Abreu
Adds the documentation for XGMAC2 DT bindings. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- Documentation/devicetree/bindings/net/stmmac.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation

[PATCH net-next 8/9] net: stmmac: Add the bindings parsing for XGMAC2

2018-08-01 Thread Jose Abreu
Add the bindings parsing for XGMAC2 IP block. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c | 2 ++ drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 6 ++ 2 files

[PATCH net-next 3/9] net: stmmac: Add DMA related callbacks for XGMAC2

2018-08-01 Thread Jose Abreu
Add the DMA related callbacks for the new IP block XGMAC2. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/Makefile | 2 +- drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h | 56

[PATCH net-next 5/9] net: stmmac: Add MDIO related functions for XGMAC2

2018-08-01 Thread Jose Abreu
Add the MDIO related funcionalities for the new IP block XGMAC2. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 88 +++ 1 file changed, 88 insertions

[PATCH net-next 4/9] net: stmmac: Add descriptor related callbacks for XGMAC2

2018-08-01 Thread Jose Abreu
Add the descriptor related callbacks for the new IP block XGMAC2. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/Makefile | 3 +- drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h

[PATCH net-next 2/9] net: stmmac: Add MAC related callbacks for XGMAC2

2018-08-01 Thread Jose Abreu
Add the MAC related callbacks for the new IP block XGMAC2. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/Makefile | 2 +- drivers/net/ethernet/stmicro/stmmac/common.h | 3

[PATCH net-next 0/9] Add 10GbE support in stmmac using XGMAC2

2018-08-01 Thread Jose Abreu
Torgue Jose Abreu (9): net: stmmac: Add XGMAC 2.10 HWIF entry net: stmmac: Add MAC related callbacks for XGMAC2 net: stmmac: Add DMA related callbacks for XGMAC2 net: stmmac: Add descriptor related callbacks for XGMAC2 net: stmmac: Add MDIO related functions for XGMAC2 net: stmmac: Add

[PATCH net-next 1/9] net: stmmac: Add XGMAC 2.10 HWIF entry

2018-08-01 Thread Jose Abreu
Add a new entry to HWIF table for XGMAC 2.10. For now we fill it with empty callbacks which will be added in posterior patches. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/common.h | 14

[PATCH net] net: stmmac: Fix WoL for PCI-based setups

2018-07-31 Thread Jose Abreu
WoL won't work in PCI-based setups because we are not saving the PCI EP state before entering suspend state and not allowing D3 wake. Fix this by using a wrapper around stmmac_{suspend/resume} which correctly sets the PCI EP state. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao

[PATCH net-next v2] net: stmmac: Add support for CBS QDISC

2018-06-27 Thread Jose Abreu
This adds support for CBS reconfiguration using the TC application. A new callback was added to TC ops struct and another one to DMA ops to reconfigure the channel mode. Tested in GMAC5.10. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro

Re: [PATCH net-next] net: stmmac: Add support for CBS QDISC

2018-06-27 Thread Jose Abreu
Hi Geert, On 27-06-2018 15:36, Geert Uytterhoeven wrote: > Hi Jose, > > On Wed, Jun 27, 2018 at 4:32 PM Jose Abreu wrote: >> ++ SH Maintainers >> ++ SH ML >> >> Hi SH Maintainers, >> >> On 27-06-2018 15:15, kbuild test robot wrote: >>> Hi

Re: [PATCH net-next] net: stmmac: Add support for CBS QDISC

2018-06-27 Thread Jose Abreu
++ LKML because I just noticed this is using generic headers. On 27-06-2018 15:32, Jose Abreu wrote: > ++ SH Maintainers > ++ SH ML > > Hi SH Maintainers, > > On 27-06-2018 15:15, kbuild test robot wrote: >> Hi Jose, >> >> I love your patch! Perhaps somethin

Re: [PATCH net-next] net: stmmac: Add support for CBS QDISC

2018-06-27 Thread Jose Abreu
++ SH Maintainers ++ SH ML Hi SH Maintainers, On 27-06-2018 15:15, kbuild test robot wrote: > Hi Jose, > > I love your patch! Perhaps something to improve: > > [auto build test WARNING on net-next/master] > > url: > https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_0day-2Dci_lin

Re: [PATCH net] net: stmmac: Set DMA buffer size in HW

2018-06-27 Thread Jose Abreu
David, On 27-06-2018 15:03, Jose Abreu wrote: > This is clearly a bug. You will probably have an hard time backporting this because of the way the callbacks are handled now. I can send you a patch based on some -stable branch if you prefer. Thanks and Best Regards, Jose Miguel Abreu

[PATCH net] net: stmmac: Set DMA buffer size in HW

2018-06-27 Thread Jose Abreu
: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c | 12 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h | 2 ++ drivers/net/ethernet/stmicro/stmmac/hwif.h

[PATCH net-next] net: stmmac: Add support for CBS QDISC

2018-06-27 Thread Jose Abreu
This adds support for CBS reconfiguration using the TC application. A new callback was added to TC ops struct and another one to DMA ops to reconfigure the channel mode. Tested in GMAC5.10. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro

[PATCH net] net: stmmac: Run HWIF Quirks after getting HW caps

2018-06-15 Thread Jose Abreu
Currently we were running HWIF quirks before getting HW capabilities. This is not right because some HWIF callbacks depend on HW caps. Lets save the quirks callback and use it in a later stage. This fixes Altera socfpga. Signed-off-by: Jose Abreu Fixes: 5f0456b43140 ("net: stmmac: Impl

Re: [BUG] net: stmmac: socfpga ethernet no longer working on linux-next

2018-06-15 Thread Jose Abreu
On 14-06-2018 17:18, Dinh Nguyen wrote: > On Thu, Jun 14, 2018 at 10:23 AM Jose Abreu wrote: >> On 14-06-2018 15:21, Dinh Nguyen wrote: >>> [0.835537] socfpga-dwmac ff702000.ethernet: PTP uses main clock >>> [0.841794] socfpga-dwmac ff702000.etherne

Re: [BUG] net: stmmac: socfpga ethernet no longer working on linux-next

2018-06-14 Thread Jose Abreu
On 14-06-2018 15:21, Dinh Nguyen wrote: > > [0.835537] socfpga-dwmac ff702000.ethernet: PTP uses main clock > [0.841794] socfpga-dwmac ff702000.ethernet: Version ID not available > [0.848223] socfpga-dwmac ff702000.ethernet: DWMAC1000 > [0.853454] socfpga-dwmac ff702000.ethe

Re: [BUG] net: stmmac: socfpga ethernet no longer working on linux-next

2018-06-14 Thread Jose Abreu
On 14-06-2018 08:38, Jose Abreu wrote: > Hello, > > On 13-06-2018 21:46, Dinh Nguyen wrote: >> Hi, >> >> The stmmac ethernet has stopped working in linux-next and linus/master >> branch(v4.17-11782-gbe779f03d563) >> >> It appears that the stmm

Re: [BUG] net: stmmac: socfpga ethernet no longer working on linux-next

2018-06-14 Thread Jose Abreu
Hello, On 13-06-2018 21:46, Dinh Nguyen wrote: > Hi, > > The stmmac ethernet has stopped working in linux-next and linus/master > branch(v4.17-11782-gbe779f03d563) > > It appears that the stmmac ethernet has stopped working after these 2 commits: > > 4dbbe8dde848 net: stmmac: Add support for U32 T

[PATCH v3 net-next] net: stmmac: Add Flexible PPS support

2018-05-31 Thread Jose Abreu
/period Where, ts/tns is start time and ps/pns is period time, and ptpX is ptp of eth0. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Richard Cochran --- Changes from v2: - Remove PPS support as we can'

Re: STMMAC driver with TSO enabled issue

2018-05-28 Thread Jose Abreu
Hi Bhadram, On 28-05-2018 10:15, Bhadram Varka wrote: > Hi Jose, > > On 5/25/2018 8:02 PM, Jose Abreu wrote: >> On 25-05-2018 15:25, Bhadram Varka wrote: >>> Hi Jose, >>> >>> On 5/25/2018 7:35 PM, Jose Abreu wrote: >>>> Hi Bhadram, >>>

[PATCH v2 net-next] net: stmmac: Add PPS and Flexible PPS support

2018-05-25 Thread Jose Abreu
tp/ptpX/period Where, ts/tns is start time and ps/pns is period time, and ptpX is ptp of eth0. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Richard Cochran --- Changes from v1: - Correct kbuild errors in som

Re: STMMAC driver with TSO enabled issue

2018-05-25 Thread Jose Abreu
On 25-05-2018 15:25, Bhadram Varka wrote: > Hi Jose, > > On 5/25/2018 7:35 PM, Jose Abreu wrote: >> Hi Bhadram, >> >> On 25-05-2018 05:41, Bhadram Varka wrote: >>> Hi Jose, >>> >>> On 5/24/2018 3:01 PM, Jose Abreu wrote: >>>&

Re: STMMAC driver with TSO enabled issue

2018-05-25 Thread Jose Abreu
Hi Bhadram, On 25-05-2018 05:41, Bhadram Varka wrote: > Hi Jose, > > On 5/24/2018 3:01 PM, Jose Abreu wrote: >> Hi Bhadram, >> >> On 24-05-2018 06:58, Bhadram Varka wrote: >>> >>> After some time if check Tx descriptor status - then I see only

Re: [PATCH v2 net] stmmac: strip vlan tag on reception only for 8021q tagged frames

2018-05-24 Thread Jose Abreu
example AXI clock glitch) which caused sampling of the VLAN > tag in the descriptors to be unstable, and since I have no access to such > hardware for regression I risk breaking stmmac for such old SOCs in case they > decide to jump kernel versions to the latest. Your approach seems o

Re: STMMAC driver with TSO enabled issue

2018-05-24 Thread Jose Abreu
Hi Bhadram, On 24-05-2018 06:58, Bhadram Varka wrote: > > After some time if check Tx descriptor status - then I see only > below > > [..] > [85788.286730] 027 [0x827951b0]: 0xf854f000 0x0 0x16d8 0x9000 > > index 025 and 026 descriptors processed but not index 027. > > At this stage Tx DMA is

Re: [PATCH net-next] net: stmmac: Add PPS and Flexible PPS support

2018-05-22 Thread Jose Abreu
On 22-05-2018 16:14, Andrew Lunn wrote: > On Tue, May 22, 2018 at 01:58:40PM +0100, Jose Abreu wrote: >> This adds support for PPS output and Flexible PPS (which is equivalent >> to per_out output of PTP subsystem). > You forgot to Cc: the PTP maintainer, Richard Cochran

[PATCH net-next] net: stmmac: Add PPS and Flexible PPS support

2018-05-22 Thread Jose Abreu
tp/ptpX/period Where, ts/tns is start time and ps/pns is period time, and ptpX is ptp of eth0. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/common.h |2 + drivers/net/e

Re: [PATCH v2 net] stmmac: strip vlan tag on reception only for 8021q tagged frames

2018-05-22 Thread Jose Abreu
On 21-05-2018 17:42, Florian Fainelli wrote: > On 05/21/2018 08:48 AM, David Miller wrote: >> From: David Miller >> Date: Thu, 17 May 2018 12:43:56 -0400 (EDT) >> >>> Giuseppe and Alexandre, please review this patch. >> If nobody thinks this patch is important enough to actually >> review, I'm tos

[PATCH v2 net-next] net: stmmac: Populate missing callbacks in HWIF initialization

2018-05-18 Thread Jose Abreu
Some HW specific setups, like sun8i, do not populate all the necessary callbacks, which is what HWIF helpers were expecting. Fix this by always trying to get the generic helpers and populate them if they were not previously populated by HW specific setup. Signed-off-by: Jose Abreu Fixes

Re: [PATCH v3 net-next 00/12] net: stmmac: Clean-up and tune-up

2018-05-18 Thread Jose Abreu
Hi Corentin, On 18-05-2018 15:12, Corentin Labbe wrote: > On Fri, May 18, 2018 at 02:55:57PM +0100, Jose Abreu wrote: >> This targets to uniformize the handling of the different GMAC versions in >> stmmac_main.c file and also tune-up the HW. >> >> Currently there are

[PATCH v3 net-next 03/12] net: stmmac: Let descriptor code set skbuff address

2018-05-18 Thread Jose Abreu
Stop using if conditions depending on the GMAC version for setting the the descriptor skbuff address and use instead a helper implemented in the descriptor files. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc: Alexandre Torgue

[PATCH v3 net-next 02/12] net: stmmac: Do not keep rearming the coalesce timer in stmmac_xmit

2018-05-18 Thread Jose Abreu
This is cutting down performance. Once the timer is armed it should run after the time expires for the first packet sent and not the last one. After this change, running iperf, the performance gain is +/- 24%. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc

[PATCH v3 net-next 05/12] net: stmmac: Uniformize the use of dma_{rx/tx}_mode callbacks

2018-05-18 Thread Jose Abreu
Instead of relying on the GMAC version for choosing if we need to use dma_{rx/tx}_mode or just dma_mode callback lets uniformize this and always use the dma_{rx/tx}_mode callbacks. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc

[PATCH v3 net-next 04/12] net: stmmac: Let descriptor code clear the descriptor

2018-05-18 Thread Jose Abreu
Stop using if conditions depending on the GMAC version for clearing the descriptor and use instead a helper implemented in the descriptor files. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net

[PATCH v3 net-next 07/12] net: stmmac: Move PTP and MMC base address calculation to hwif.c

2018-05-18 Thread Jose Abreu
: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/hwif.c| 34 + drivers/net/ethernet/stmicro/stmmac/hwif.h|5 +++ drivers/net/ethernet/stmicro/stmmac

[PATCH v3 net-next 10/12] net: stmmac: Uniformize set_rx_owner()

2018-05-18 Thread Jose Abreu
Currently an if condition is used to select the correct callback to set rx_onwer in descriptor. Lets keep this simple and always use the same callback. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net

[PATCH v3 net-next 12/12] net: stmmac: Remove if condition by taking advantage of hwif return code

2018-05-18 Thread Jose Abreu
We can remove the if condition and check if return code is different than -EINVAL, meaning callback is present. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

[PATCH v3 net-next 11/12] net: stmmac: Let descriptor code get skbuff address

2018-05-18 Thread Jose Abreu
Stop using if conditions depending on the GMAC version for getting the descriptor skbuff address and use instead a helper implemented in the descriptor files. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc: Alexandre Torgue

[PATCH v3 net-next 09/12] net: stmmac: Remove uneeded check for GMAC version in stmmac_xmit

2018-05-18 Thread Jose Abreu
We either have .enable_dma_transmission or .set_tx_tail_ptr in the HW table callbacks, we can never have both so there is no need to check for GMAC version. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers

[PATCH v3 net-next 08/12] net: stmmac: Uniformize the use of dma_init_* callbacks

2018-05-18 Thread Jose Abreu
rx/tx channels. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 25 ++-- .../net/ethernet/stmicro/stmmac/dwmac1000_dma.c| 25 ++-- drivers/net

[PATCH v3 net-next 01/12] net: stmmac: Enable OSP for GMAC4

2018-05-18 Thread Jose Abreu
This enables OSP (Operate on Second Packet) for GMAC4. The feature allows DMA to fetch second descriptor while its still processing the first one. Running iperf, the performance gain is +/- 38%. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe

[PATCH v3 net-next 06/12] net: stmmac: Remove uneeded checks for GMAC version

2018-05-18 Thread Jose Abreu
With the introducion of callbacks check in hwif.h we only call the callback if HW supports it so there is no longer need to check for GMAC version. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net

[PATCH v3 net-next 00/12] net: stmmac: Clean-up and tune-up

2018-05-18 Thread Jose Abreu
k.ozlabs.org/patch/915286/ Jose Abreu (12): net: stmmac: Enable OSP for GMAC4 net: stmmac: Do not keep rearming the coalesce timer in stmmac_xmit net: stmmac: Let descriptor code set skbuff address net: stmmac: Let descriptor code clear the descriptor net: stmmac: Uniformize the use o

Re: [PATCH v2 net-next 00/12] net: stmmac: Clean-up and tune-up

2018-05-18 Thread Jose Abreu
Hi David, On 17-05-2018 19:47, David Miller wrote: > From: David Miller > Date: Thu, 17 May 2018 14:41:17 -0400 (EDT) > >> From: Jose Abreu >> Date: Thu, 17 May 2018 14:24:42 +0100 >> >>> Given that the difference between better/worst is < 1%, I think

Re: STMMAC driver with TSO enabled issue

2018-05-17 Thread Jose Abreu
Hi Bhadram, On 15-05-2018 07:44, Bhadram Varka wrote: > Hi Jose, > > On 5/10/2018 9:15 PM, Jose Abreu wrote: >> >> >> On 10-05-2018 16:08, Bhadram Varka wrote: >>> Hi Jose, >>> >>> On 5/10/2018 7:59 PM, Jose Abreu wrote: >>&g

Re: [PATCH v2 net-next 00/12] net: stmmac: Clean-up and tune-up

2018-05-17 Thread Jose Abreu
Hi David, Florian, Results of slowing down CPU follows bellow. On 16-05-2018 20:01, Florian Fainelli wrote: > On 05/16/2018 11:56 AM, David Miller wrote: >> From: Jose Abreu >> Date: Wed, 16 May 2018 13:50:42 +0100 >> >>> David raised some rightfull constr

[PATCH net-next] net: stmmac: Populate missing callbacks in HWIF initialization

2018-05-17 Thread Jose Abreu
Some HW specific setusp, like sun8i, do not populate all the necessary callbacks, which is what HWIF helpers were expecting. Fix this by always trying to get the generic helpers and populate them if they were not previously populated by HW specific setup. Signed-off-by: Jose Abreu Fixes

Re: [BUG] net: stmmac: dwmac-sun8i broken in linux-next

2018-05-17 Thread Jose Abreu
Hi Corentin, On 16-05-2018 19:32, Corentin Labbe wrote: > Hello > > The dwmac-sun8i driver is broken in next-20180515, symptom are no RX and TX > errors as shown by ifconfig: > eth0: flags=4163 mtu 1500 > inet 192.168.1.204 netmask 255.255.255.0 broadcast 192.168.1.255 > ether

[PATCH v2 net-next 01/12] net: stmmac: Enable OSP for GMAC4

2018-05-16 Thread Jose Abreu
This enables OSP (Operate on Second Packet) for GMAC4. The feature allows DMA to fetch second descriptor while its still processing the first one. Running iperf, the performance gain is +/- 38%. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe

[PATCH v2 net-next 02/12] net: stmmac: Do not keep rearming the coalesce timer in stmmac_xmit

2018-05-16 Thread Jose Abreu
This is cutting down performance. Once the timer is armed it should run after the time expires for the first packet sent and not the last one. After this change, running iperf, the performance gain is +/- 24%. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc

[PATCH v2 net-next 06/12] net: stmmac: Remove uneeded checks for GMAC version

2018-05-16 Thread Jose Abreu
With the introducion of callbacks check in hwif.h we only call the callback if HW supports it so there is no longer need to check for GMAC version. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net

[PATCH v2 net-next 05/12] net: stmmac: Uniformize the use of dma_{rx/tx}_mode callbacks

2018-05-16 Thread Jose Abreu
Instead of relying on the GMAC version for choosing if we need to use dma_{rx/tx}_mode or just dma_mode callback lets uniformize this and always use the dma_{rx/tx}_mode callbacks. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc

[PATCH v2 net-next 03/12] net: stmmac: Let descriptor code set skbuff address

2018-05-16 Thread Jose Abreu
Stop using if conditions depending on the GMAC version for setting the the descriptor skbuff address and use instead a helper implemented in the descriptor files. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc: Alexandre Torgue

[PATCH v2 net-next 09/12] net: stmmac: Remove uneeded check for GMAC version in stmmac_xmit

2018-05-16 Thread Jose Abreu
We either have .enable_dma_transmission or .set_tx_tail_ptr in the HW table callbacks, we can never have both so there is no need to check for GMAC version. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers

[PATCH v2 net-next 10/12] net: stmmac: Uniformize set_rx_owner()

2018-05-16 Thread Jose Abreu
Currently an if condition is used to select the correct callback to set rx_onwer in descriptor. Lets keep this simple and always use the same callback. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net

[PATCH v2 net-next 12/12] net: stmmac: Remove if condition by taking advantage of hwif return code

2018-05-16 Thread Jose Abreu
We can remove the if condition and check if return code is different than -EINVAL, meaning callback is present. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

[PATCH v2 net-next 11/12] net: stmmac: Let descriptor code get skbuff address

2018-05-16 Thread Jose Abreu
Stop using if conditions depending on the GMAC version for getting the descriptor skbuff address and use instead a helper implemented in the descriptor files. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc: Alexandre Torgue

[PATCH v2 net-next 08/12] net: stmmac: Uniformize the use of dma_init_* callbacks

2018-05-16 Thread Jose Abreu
rx/tx channels. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- .../net/ethernet/stmicro/stmmac/dwmac1000_dma.c| 25 ++-- drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c | 25 ++-- drivers/net

[PATCH v2 net-next 07/12] net: stmmac: Move PTP and MMC base address calculation to hwif.c

2018-05-16 Thread Jose Abreu
: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/hwif.c| 34 + drivers/net/ethernet/stmicro/stmmac/hwif.h|5 +++ drivers/net/ethernet/stmicro/stmmac

[PATCH v2 net-next 00/12] net: stmmac: Clean-up and tune-up

2018-05-16 Thread Jose Abreu
cause my setup has a powerfull processor these patches don't affect the performance. Perhaps someone using a SoC with a slow CPU could test this? Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Jose Abreu (12): net: stmmac: Enable OSP

[PATCH v2 net-next 04/12] net: stmmac: Let descriptor code clear the descriptor

2018-05-16 Thread Jose Abreu
Stop using if conditions depending on the GMAC version for clearing the descriptor and use instead a helper implemented in the descriptor files. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net

Re: [PATCH net-next v2 2/2] drivers: net: Remove device_node checks with of_mdiobus_register()

2018-05-16 Thread Jose Abreu
> drivers/net/ethernet/freescale/fec_main.c | 8 ++-- > drivers/net/ethernet/marvell/mvmdio.c | 5 + > drivers/net/ethernet/renesas/sh_eth.c | 11 +++ > drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 5 + For stmmac: Reviewed-by

[PATCH net-next] net: stmmac: Add Jose Abreu as co-maintainer

2018-05-14 Thread Jose Abreu
I'm offering to be a co-maintainer for stmmac driver. As per discussion with Alexandre, I will arranje to get STM32 boards to test patches in GMAC version 3.x and 4.1. I also have HW to test GMAC version 5. Looking forward to contribute to net-dev! Signed-off-by: Jose Abreu Cc: David S. M

Re: [PATCH net-next 01/10] net: stmmac: Let descriptor code set skbuff address

2018-05-11 Thread Jose Abreu
On 10-05-2018 20:06, David Miller wrote: > From: Jose Abreu > Date: Tue, 8 May 2018 15:45:24 +0100 > >> Stop using if conditions depending on the GMAC version for setting the >> the descriptor skbuff address and use instead a helper implemented in >> the descriptor

Re: STMMAC driver with TSO enabled issue

2018-05-10 Thread Jose Abreu
On 10-05-2018 16:08, Bhadram Varka wrote: > Hi Jose, > > On 5/10/2018 7:59 PM, Jose Abreu wrote: >> Hi Bhadram, >> >> On 10-05-2018 09:55, Jose Abreu wrote: >>> ++net-dev >>> >>> Hi Bhadram, >>> >>> On 09-05-2

Re: [PATCH net-next 08/10] net: stmmac: Do not initialize the RX Descriptor twice

2018-05-10 Thread Jose Abreu
On 08-05-2018 15:45, Jose Abreu wrote: > The RX Descriptor is already initialized in at setup phase so there is > no need to set the values again, we just need to set the owner. This > allow us to remove another if condition. > > Signed-off-by: Jose Abreu > Cc: David S. Miller

Re: STMMAC driver with TSO enabled issue

2018-05-10 Thread Jose Abreu
Hi Bhadram, On 10-05-2018 09:55, Jose Abreu wrote: > ++net-dev > > Hi Bhadram, > > On 09-05-2018 12:03, Bhadram Varka wrote: >> Hi, >> >> Thanks for responding. >> >> Tried below suggested way. Still observing the issue - > It seems stmmac

Re: STMMAC driver with TSO enabled issue

2018-05-10 Thread Jose Abreu
ec0 > 1.41 KBytes > [ 5] 1.00-2.00 sec 0.00 Bytes 0.00 bits/sec0 1.41 > KBytes > [ 5] 2.00-3.00 sec 0.00 Bytes 0.00 bits/sec0 1.41 > KBytes > [ 5] 3.00-4.00 sec 0.00 Bytes 0.00 bits/sec0 1.41 > KBytes > [ 5]

[PATCH net-next 01/10] net: stmmac: Let descriptor code set skbuff address

2018-05-08 Thread Jose Abreu
Stop using if conditions depending on the GMAC version for setting the the descriptor skbuff address and use instead a helper implemented in the descriptor files. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc: Alexandre Torgue

[PATCH net-next 03/10] net: stmmac: Uniformize the use of dma_{rx/tx}_mode callbacks

2018-05-08 Thread Jose Abreu
Instead of relying on the GMAC version for choosing if we need to use dma_{rx/tx}_mode or just dma_mode callback lets uniformize this and always use the dma_{rx/tx}_mode callbacks. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc

[PATCH net-next 06/10] net: stmmac: Uniformize the use of dma_init_* callbacks

2018-05-08 Thread Jose Abreu
rx/tx channels. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- .../net/ethernet/stmicro/stmmac/dwmac1000_dma.c| 25 ++-- drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c | 25 ++-- drivers/net

[PATCH net-next 07/10] net: stmmac: Remove uneeded check for GMAC version in stmmac_xmit

2018-05-08 Thread Jose Abreu
We either have .enable_dma_transmission or .set_tx_tail_ptr in the HW table callbacks, we can never have both so there is no need to check for GMAC version. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers

[PATCH net-next 10/10] net: stmmac: Remove if condition by taking advantage of hwif return code

2018-05-08 Thread Jose Abreu
We can remove the if condition and check if return code is different than -EINVAL, meaning callback is present. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

[PATCH net-next 09/10] net: stmmac: Let descriptor code get skbuff address

2018-05-08 Thread Jose Abreu
Stop using if conditions depending on the GMAC version for getting the descriptor skbuff address and use instead a helper implemented in the descriptor files. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc: Alexandre Torgue

[PATCH net-next 05/10] net: stmmac: Move PTP and MMC base address calculation to hwif.c

2018-05-08 Thread Jose Abreu
: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/hwif.c| 34 + drivers/net/ethernet/stmicro/stmmac/hwif.h|5 +++ drivers/net/ethernet/stmicro/stmmac

[PATCH net-next 08/10] net: stmmac: Do not initialize the RX Descriptor twice

2018-05-08 Thread Jose Abreu
The RX Descriptor is already initialized in at setup phase so there is no need to set the values again, we just need to set the owner. This allow us to remove another if condition. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc

[PATCH net-next 04/10] net: stmmac: Remove uneeded checks for GMAC version

2018-05-08 Thread Jose Abreu
With the introducion of callbacks check in hwif.h we only call the callback if HW supports it so there is no longer need to check for GMAC version. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net

[PATCH net-next 02/10] net: stmmac: Let descriptor code clear the descriptor

2018-05-08 Thread Jose Abreu
Stop using if conditions depending on the GMAC version for clearing the descriptor and use instead a helper implemented in the descriptor files. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net

[PATCH net-next 00/10] net: stmmac: Be less dependent on Synopsys ID

2018-05-08 Thread Jose Abreu
r Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Jose Abreu (10): net: stmmac: Let descriptor code set skbuff address net: stmmac: Let descriptor code clear the descriptor net: stmmac: Uniformize the use of dma_{rx/tx}_mode callbacks net: stmmac: Remove un

Re: [PATCH v2 net-next] net: stmmac: Add support for U32 TC filter using Flexible RX Parser

2018-05-07 Thread Jose Abreu
Hi Jakub, David, On 05-05-2018 02:33, Jakub Kicinski wrote: > On Fri, 4 May 2018 10:01:38 +0100, Jose Abreu wrote: >> This adds support for U32 filter by using an HW only feature called >> Flexible RX Parser. This allow us to match any given packet field with a >> pattern

[PATCH v2 net-next] net: stmmac: Add support for U32 TC filter using Flexible RX Parser

2018-05-04 Thread Jose Abreu
s involved. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Jakub Kicinski --- Changes from v1: - Follow Linux network coding style (David) - Use tc_cls_can_offload_and_chain0() (Jakub) --- drivers/ne

[PATCH net-next] net: stmmac: Add support for U32 TC filter using Flexible RX Parser

2018-05-03 Thread Jose Abreu
s involved. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/Makefile |2 +- drivers/net/ethernet/stmicro/stmmac/common.h |5 + drivers/net/ethernet/stmicro/stmma

Re: [PATCH V2 6/8] net: stmmac: add dwmac-4.20a compatible

2018-05-02 Thread Jose Abreu
Hi Christophe, On 02-05-2018 15:18, Christophe Roullier wrote: > Manage dwmac-4.20a version from synopsys > > Just being curious: Can you tell me which HW features do you have on your NIC? Thanks and Best Regards, Jose Miguel Abreu

Re: [PATCH] net: stmmac: Avoid VLA usage

2018-05-02 Thread Jose Abreu
On 02-05-2018 13:36, Kees Cook wrote: > On Wed, May 2, 2018 at 1:54 AM, Jose Abreu wrote: >> Hi Kees, >> >> On 01-05-2018 22:01, Kees Cook wrote: >>> In the quest to remove all stack VLAs from the kernel[1], this switches >>> the "status" stack

Re: [PATCH] net: stmmac: Avoid VLA usage

2018-05-02 Thread Jose Abreu
;r=WHDsc6kcWAl4i96Vm5hJ_19IJiuxx_p_Rzo2g-uHDKw&m=TBD6a7UY2VbpPmV9LOW_eHAyg8uPq1ZPDhq93VROTVE&s=4fvOST1HhWmZ4lThQe-dHCJYEXNOwey00BCXOWm8tKo&e= > > Signed-off-by: Kees Cook > I rather prefer the variables declaration in reverse-tree order, but thats just a minor pick. Reviewed-by: Jose Abreu Thanks

Re: tc: Using u32 filter

2018-04-27 Thread Jose Abreu
On 27-04-2018 16:04, Jiri Pirko wrote: > Fri, Apr 27, 2018 at 04:15:46PM CEST, jose.ab...@synopsys.com wrote: >> Hi, >> >> I'm trying to use u32 filter to filter specific fields of packets >> by HW *only* but I'm having a hard time in trying to run tc to >> configure it. >> I implemented a dummy .n

<    1   2   3   4   >