[PATCH net-next v2 2/2] net: stmmac: Disable flow ctrl for RX AVB queues and really enable TX AVB queues

2017-10-13 Thread Jose Abreu
Flow control must be disabled for AVB enabled queues and TX AVB queues must be enabled by setting BIT(2) of TXQEN. Correct this by passing the queue mode to DMA callbacks and by checking in these functions wether we are in AVB performing the necessary adjustments. Signed-off-by: Jose Abreu <j

[PATCH net-next v2 1/2] net: stmmac: Use correct values in TQS/RQS fields

2017-10-13 Thread Jose Abreu
. Signed-off-by: Jose Abreu <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net> Cc: Joao Pinto <jpi...@synopsys.com> Cc: Giuseppe Cavallaro <peppe.cavall...@st.com> Cc: Alexandre Torgue <alexandre.tor...@st.com> --- drivers/net/ethernet/stmicro/stmmac/c

[PATCH net-next v2 0/2] net: stmmac: Improvements for multi-queuing and for AVB

2017-10-13 Thread Jose Abreu
pe Cavallaro <peppe.cavall...@st.com> Cc: Alexandre Torgue <alexandre.tor...@st.com> Changes from v1: - Fix typo in second patch Jose Abreu (2): net: stmmac: Use correct values in TQS/RQS fields net: stmmac: Disable flow ctrl for RX AVB queues and really enable TX AVB queues driv

[PATCH net-next 0/2] net: stmmac: Improvements for multi-queuing and for AVB

2017-10-12 Thread Jose Abreu
pe Cavallaro <peppe.cavall...@st.com> Cc: Alexandre Torgue <alexandre.tor...@st.com> Jose Abreu (2): net: stmmac: Use correct values in TQS/RQS fields net: stmmac: Disable flow ctrl for RX AVB queues and really enable TX AVB queues drivers/net/ethernet/stmicro/stmmac/common.h

[PATCH net-next 1/2] net: stmmac: Use correct values in TQS/RQS fields

2017-10-12 Thread Jose Abreu
. Signed-off-by: Jose Abreu <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net> Cc: Joao Pinto <jpi...@synopsys.com> Cc: Giuseppe Cavallaro <peppe.cavall...@st.com> Cc: Alexandre Torgue <alexandre.tor...@st.com> --- drivers/net/ethernet/stmicro/stmmac/c

[PATCH net-next 2/2] net: stmmac: Disable flow ctrl for RX AVB queues and really enable TX AVB queues

2017-10-12 Thread Jose Abreu
Flow control must be disabled for AVB enabled queues and TX AVB queues must be enabled by setting BIT(2) of TXQEN. Correct this by passing the queue mode to DMA callbacks and by checking in these functions wether we are in AVB performing the necessary adjustments. Signed-off-by: Jose Abreu <j

Commit 05cf0d1bf4 ("net: stmmac: free an skb first when there are no longer any descriptors using it") breaks stmmac?

2017-11-27 Thread Jose Abreu
Hi Niklas, I think your commit 05cf0d1bf4 ("net: stmmac: free an skb first when there are no longer any descriptors using it") is breaking stmmac driver in multi-queue configuration (this stacktrace may contain some extra characters as I was using serial port): ->8-

Re: Commit 05cf0d1bf4 ("net: stmmac: free an skb first when there are no longer any descriptors using it") breaks stmmac?

2017-11-30 Thread Jose Abreu
esc = priv->plat->enh_desc; > /* To program the descriptors according to the size of the frame */ > if (enh_desc) I confirm that applying 05cf0d1bf4 ("net: stmmac: free an skb first when there are no longer any descriptors using it") and this patch makes my setup

Re: [PATCH v2 net-next] net: stmmac: Add support for DWMAC5 with TSN features

2017-12-07 Thread Jose Abreu
Hi David, Florian, On 01-11-2017 11:48, David Miller wrote: > From: Jose Abreu <jose.ab...@synopsys.com> > Date: Fri, 27 Oct 2017 14:55:44 +0100 > >> This adds support for IP version 5 of DWMAC. The new introduced >> features are the Enhancements to Scheduled

[PATCH net-next 1/2] net: stmmac: Add support for DWMAC5 with TSN features

2017-10-25 Thread Jose Abreu
transmission in this time window/slot. FPE: The IEEE802.1Qbu defines a mechanism which breaks interfering frames into smaller fragments shuch that we have a more efficient use of network bandwidth. This needs EST enabled. Signed-off-by: Jose Abreu <joab...@synopsys.com> Cc: David S. Mill

[PATCH net-next 0/2] net: stmmac: Support DWMAC5 and TSN

2017-10-25 Thread Jose Abreu
Hi, This adds support for a new IP version (5) of dwmac and for TSN features as defined by IEEE802.1Qbv-2015 and IEEE802.1Qbu. Please review. Best regards, Jose Miguel Abreu Jose Abreu (2): net: stmmac: Add support for DWMAC5 with TSN features bindings: net: stmmac: Add documentation

[PATCH net-next 2/2] bindings: net: stmmac: Add documentation for TSN parameters

2017-10-25 Thread Jose Abreu
This adds the documentation for TSN feature EST and FP. Signed-off-by: Jose Abreu <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net> Cc: Joao Pinto <jpi...@synopsys.com> Cc: Giuseppe Cavallaro <peppe.cavall...@st.com> Cc: Alexandre Torgue <alexandre.tor

Re: [PATCH net-next 2/2] bindings: net: stmmac: Add documentation for TSN parameters

2017-10-26 Thread Jose Abreu
Hi Florian, On 25-10-2017 20:34, Florian Fainelli wrote: > On 10/25/2017 07:04 AM, Jose Abreu wrote: >> This adds the documentation for TSN feature EST and FP. >> >> Signed-off-by: Jose Abreu <joab...@synopsys.com> >> Cc: David S. Miller <da...@d

[PATCH net] net: stmmac: dwc-qos-eth: Fix typo in DT bindings parsing

2017-10-26 Thread Jose Abreu
According to DT bindings documentation we are expecting a property called "snps,read-requests" but we are parsing instead a property called "read,read-requests". This is clearly a typo. Fix it. Signed-off-by: Jose Abreu <joab...@synopsys.com> Cc: Joao Pinto <jpi

[PATCH net] net: stmmac: First Queue must always be in DCB mode

2017-10-26 Thread Jose Abreu
According to DWMAC databook the first queue operating mode must always be in DCB. As MTL_QUEUE_DCB = 1, we need to always set the first queue operating mode to DCB otherwise driver will think that queue is in AVB mode (because MTL_QUEUE_AVB = 0). Signed-off-by: Jose Abreu <joab...@synopsys.

Re: [PATCH net-next 2/2] bindings: net: stmmac: Add documentation for TSN parameters

2017-10-26 Thread Jose Abreu
Hi Andrew, On 26-10-2017 10:03, Andrew Lunn wrote: >> These parameters may also need to change in runtime depending on >> the scheduled traffic. Unfortunately, net subsystem does not yet >> support TSN so this will have to wait and for now we will use >> fixed parameters. > Hi Jose > > what you

Re: [PATCH net-next 2/2] bindings: net: stmmac: Add documentation for TSN parameters

2017-10-26 Thread Jose Abreu
Hi Andrew, On 26-10-2017 10:03, Andrew Lunn wrote: >> These parameters may also need to change in runtime depending on >> the scheduled traffic. Unfortunately, net subsystem does not yet >> support TSN so this will have to wait and for now we will use >> fixed parameters. > Hi Jose > > what you

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

[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 <j

tc: Using u32 filter

2018-04-27 Thread Jose Abreu
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 .ndo_setup_tc callback which always returns success and I set NETIF_F_HW_TC field in hw_features. Then I run tc, like this:

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

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]

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 stmm

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 <joab...@synopsys.

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 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 <jose.ab...@synopsys.com> > 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

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

2018-05-08 Thread Jose Abreu
-by: Jose Abreu <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net> Cc: Joao Pinto <jpi...@synopsys.com> Cc: Vitor Soares <soa...@synopsys.com> Cc: Giuseppe Cavallaro <peppe.cavall...@st.com> Cc: Alexandre Torgue <alexandre.tor...@st.com> --- driver

[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 <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net> Cc: Joa

[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 <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net> Cc: Joao Pinto <jpi...@synopsys.com> Cc:

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

2018-05-08 Thread Jose Abreu
of rx/tx channels. Signed-off-by: Jose Abreu <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net> Cc: Joao Pinto <jpi...@synopsys.com> Cc: Vitor Soares <soa...@synopsys.com> Cc: Giuseppe Cavallaro <peppe.cavall...@st.com> Cc: Alexandre Torgue <alexandre.tor

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

2018-05-08 Thread Jose Abreu
;da...@davemloft.net> Cc: Joao Pinto <jpi...@synopsys.com> Cc: Vitor Soares <soa...@synopsys.com> Cc: Giuseppe Cavallaro <peppe.cavall...@st.com> Cc: Alexandre Torgue <alexandre.tor...@st.com> Jose Abreu (10): net: stmmac: Let descriptor code set skbuff address net: stm

[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 <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net> Cc: Joao Pinto <jpi...@synopsys.com> Cc:

[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 <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net> Cc: Joao Pinto <jpi...@synopsys.com> Cc: Vitor Soares <soa...@synop

[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 <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net> Cc: Joao Pinto <jpi...@synopsys

[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 <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net> Cc: Joao Pinto <jpi...@synopsys

[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 <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net> Cc: Joao Pinto <jpi...@s

[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 <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net> Cc: Joa

[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 <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net> Cc: Joao Pinto <jpi...@synopsys.com> Cc: Vitor Soares <soa...@synopsys.com> Cc: Giuseppe Cavallaro <peppe.cavall...@st.com> Cc: Alexandre Torgue <alexandre.tor...

[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 <j

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

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 <da...@davemloft.net> > Date: Thu, 17 May 2018 14:41:17 -0400 (EDT) > >> From: Jose Abreu <jose.ab...@synopsys.com> >> Date: Thu, 17 May 2018 14:24:42 +0100 >> >>> Given tha

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 <jose.ab...@synopsys.com> >> Date: Wed, 16 May 2018 13:50:42 +0100 >> >>> David ra

[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 <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net> Cc: Joao Pinto <jpi...@synopsys.com>

[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 <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net> Cc: Joa

[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 <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net> Cc: Joao Pinto <jpi...@s

[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 <joab...@synopsys.com> Cc: David S. Mill

[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 <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net> Cc: Joao Pinto <jpi...@synopsys.com> Cc:

[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 <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net> Cc: Joao Pinto <jpi...@synopsys

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

2018-05-16 Thread Jose Abreu
| 12 +++- > 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 +-

[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 <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net&

[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 <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net> Cc: Joao Pinto <jpi...@synopsys

[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 <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net> Cc: Joao Pinto <jpi...@synopsys.com> Cc: Vitor Soares <soa...@synop

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

2018-05-16 Thread Jose Abreu
of rx/tx channels. Signed-off-by: Jose Abreu <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net> Cc: Joao Pinto <jpi...@synopsys.com> Cc: Vitor Soares <soa...@synopsys.com> Cc: Giuseppe Cavallaro <peppe.cavall...@st.com> Cc: Alexandre Torgue <alexandre.tor

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

2018-05-16 Thread Jose Abreu
-by: Jose Abreu <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net> Cc: Joao Pinto <jpi...@synopsys.com> Cc: Vitor Soares <soa...@synopsys.com> Cc: Giuseppe Cavallaro <peppe.cavall...@st.com> Cc: Alexandre Torgue <alexandre.tor...@st.com> --- driver

[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 <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net> Cc: Joao Pinto <jpi...@synopsys.com> Cc:

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

2018-05-16 Thread Jose Abreu
laro <peppe.cavall...@st.com> Cc: Alexandre Torgue <alexandre.tor...@st.com> 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 c

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

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 Cochr

[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 <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net> Cc: Joao Pinto <jpi...@synopsys.com> Cc: Vitor Soares <soa...@synopsys.com> Cc: Giuseppe Ca

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: 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: 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: >>>&

[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 <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net> Cc: Joao Pinto <jpi...@synopsys.com> Cc: Vitor Soares <soa...@synopsys.com> Cc: Giuseppe Ca

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

2018-05-24 Thread Jose Abreu
ock 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 okay by me. Plea

[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 <j

[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 <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net> Cc: Joao Pinto <jpi...@synopsys.com> Cc: Vitor Soares <soa...@synop

[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 <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net> Cc: Joao Pinto <jpi...@synopsys

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

2018-05-18 Thread Jose Abreu
of rx/tx channels. Signed-off-by: Jose Abreu <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net> Cc: Joao Pinto <jpi...@synopsys.com> Cc: Vitor Soares <soa...@synopsys.com> Cc: Giuseppe Cavallaro <peppe.cavall...@st.com> Cc: Alexandre Torgue <alexandr

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

2018-05-18 Thread Jose Abreu
re Torgue <alexandre.tor...@st.com> [1] https://marc.info/?l=linux-netdev=152656352607905=2 [2] https://patchwork.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

[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 <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net&

[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 <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net> Cc: Joao Pinto <jpi...@synopsys.com> Cc:

[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 <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net> Cc: Joao Pinto <jpi...@synopsys.com>

[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 <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net> Cc: Joao Pinto <jpi...@s

[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 <joab...@synopsys.com> Cc: David S. Mill

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

2018-05-18 Thread Jose Abreu
-by: Jose Abreu <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net> Cc: Joao Pinto <jpi...@synopsys.com> Cc: Vitor Soares <soa...@synopsys.com> Cc: Giuseppe Cavallaro <peppe.cavall...@st.com> Cc: Alexandre Torgue <alexandre.tor...@st.com> --- driver

[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 <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net> Cc: Joao Pinto <jpi...@synopsys.com> 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 <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net> Cc: Joa

[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 <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net> Cc: Joao Pinto <jpi...@synopsys

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

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

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

[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 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: Set DMA buffer size in HW

2018-06-27 Thread Jose Abreu
-by: 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

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

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

[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: >>>

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: stmmac: Avoid VLA usage

2018-05-02 Thread Jose Abreu
i96Vm5hJ_19IJiuxx_p_Rzo2g-uHDKw=TBD6a7UY2VbpPmV9LOW_eHAyg8uPq1ZPDhq93VROTVE=4fvOST1HhWmZ4lThQe-dHCJYEXNOwey00BCXOWm8tKo= > > Signed-off-by: Kees Cook <keesc...@chromium.org> > I rather prefer the variables declaration in reverse-tree order, but thats just a minor pick. Reviewed-by: Jose Abreu <joab...@synopsys.com

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 <jose.ab...@synopsys.com> 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

Re: [PATCH] net: dwc-xlgmac: fix xlgmac_xmit()'s return type

2018-04-26 Thread Jose Abreu
On 24-04-2018 14:17, Luc Van Oostenryck wrote: > The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', > which is a typedef for an enum type, but the implementation in this > driver returns an 'int'. > > Fix this by returning 'netdev_tx_t' in this driver too. > > Signed-off-by: Luc

[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 <joab...@synopsys.com> Cc: David S. Miller <da...@davemloft.net> Cc: Joao Pinto <jpi...@synopsys.com> Cc: Vitor Soares <soa...@synopsys.com> Cc: Giuseppe Cavallaro <peppe.cavall...@st.com> Cc: Alexandre Torgue <alexandre.tor..

Re: [PATCH net] net: stmmac: First Queue must always be in DCB mode

2017-10-26 Thread Jose Abreu
Hi Bhadram, On 26-10-2017 11:51, Bhadram Varka wrote: > Hi Jose, > >> -Original Message- >> From: netdev-ow...@vger.kernel.org [mailto:netdev- >> ow...@vger.kernel.org] On Behalf Of Jose Abreu >> Sent: Thursday, October 26, 2017 2:37 PM >> T

  1   2   3   >