[PATCH net-next] net: mvpp2: extend mib-fragments name to mib-fragments-err

2021-01-14 Thread stefanc
From: Stefan Chulski This patch doesn't change any functionality, but just extend MIB counter register and ethtool-statistic names with "err". The counter MVPP2_MIB_FRAGMENTS_RCVD in fact is Error counter. Extend REG name and appropriated ethtool statistic reg-name with the ERR/err. Change-Id:

[PATCH net 2/2] net: mvpp2: disable force link UP during port init procedure

2020-12-15 Thread stefanc
From: Stefan Chulski Force link UP can be enabled by bootloader during tftpboot and breaks NFS support. Force link UP disabled during port init procedure. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 14 +- 1 file changed, 13 insertions(+), 1

[PATCH net 1/2] net: mvpp2: Fix GoP port 3 Networking Complex Control configurations

2020-12-15 Thread stefanc
From: Stefan Chulski During GoP port 2 Networking Complex Control mode of operation configurations, also GoP port 3 mode of operation was wrongly set mode. Patch removes these configurations. GENCONF_CTRL0_PORTX naming also fixed. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/

[PATCH net v2 1/2] net: mvpp2: Fix GoP port 3 Networking Complex Control configurations

2020-12-17 Thread stefanc
From: Stefan Chulski During GoP port 2 Networking Complex Control mode of operation configurations, also GoP port 3 mode of operation was wrongly set. Patch removes these configurations. GENCONF_CTRL0_PORTX naming also fixed. Fixes: f84bf386f395 ("net: mvpp2: initialize the GoP") Signed-off-by:

[PATCH net v2 2/2] net: mvpp2: disable force link UP during port init procedure

2020-12-17 Thread stefanc
From: Stefan Chulski Force link UP can be enabled by bootloader during tftpboot and breaks NFS support. Force link UP disabled during port init procedure. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 14 +- 1 file changed, 13 insertions(+), 1

[PATCH net v3] net: mvpp2: Fix GoP port 3 Networking Complex Control configurations

2020-12-17 Thread stefanc
From: Stefan Chulski During GoP port 2 Networking Complex Control mode of operation configurations, also GoP port 3 mode of operation was wrongly set. Patch removes these configurations. GENCONF_CTRL0_PORTX naming also fixed. Cc: sta...@vger.kernel.org Fixes: f84bf386f395 ("net: mvpp2: initializ

[PATCH net v3] net: mvpp2: disable force link UP during port init procedure

2020-12-17 Thread stefanc
From: Stefan Chulski Force link UP can be enabled by bootloader during tftpboot and breaks NFS support. Force link UP disabled during port init procedure. Fixes: f84bf386f395 ("net: mvpp2: initialize the GoP") Signed-off-by: Stefan Chulski --- Changes in v3: - Added Fixes tag. Changes in v2: -

[PATCH net-next] net: mvpp2: prs: improve ipv4 parse flow

2020-12-17 Thread stefanc
From: Stefan Chulski Patch didn't fix any issue, just improve parse flow and align ipv4 parse flow with ipv6 parse flow. Currently ipv4 kenguru parser first check IP protocol(TCP/UDP) and then destination IP address. Patch introduce reverse ipv4 parse, first destination IP address parsed and onl

[PATCH net] net: mvpp2: prs: fix PPPoE with ipv6 packet parse

2020-12-17 Thread stefanc
From: Stefan Chulski Current PPPoE+IPv6 entry is jumping to 'next-hdr' field and not to 'DIP' field as done for IPv4. Fixes: db9d7d36eecc ("net: mvpp2: Split the PPv2 driver to a dedicated directory") Reported-by: Liron Himi Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp

[PATCH net] net: mvpp2: Add TCAM entry to drop flow control pause frames

2020-12-17 Thread stefanc
From: Stefan Chulski Issue: Flow control frame used to pause GoP(MAC) was delivered to the CPU and created a load on the CPU. Since XOFF/XON frames are used only by MAC, these frames should be dropped inside MAC. Fix: According to 802.3-2012 - IEEE Standard for Ethernet pause frame has unique de

[PATCH net v2] net: mvpp2: Add TCAM entry to drop flow control pause frames

2020-12-17 Thread stefanc
From: Stefan Chulski Issue: Flow control frame used to pause GoP(MAC) was delivered to the CPU and created a load on the CPU. Since XOFF/XON frames are used only by MAC, these frames should be dropped inside MAC. Fix: According to 802.3-2012 - IEEE Standard for Ethernet pause frame has unique de

[PATCH net v2] net: mvpp2: prs: fix PPPoE with ipv6 packet parse

2020-12-17 Thread stefanc
From: Stefan Chulski Current PPPoE+IPv6 entry is jumping to 'next-hdr' field and not to 'DIP' field as done for IPv4. Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit") Reported-by: Liron Himi Signed-off-by: Stefan Chulski --- Changes in v2: - Fix "fixes tag

[PATCH net v4] net: mvpp2: Fix GoP port 3 Networking Complex Control configurations

2020-12-20 Thread stefanc
From: Stefan Chulski During GoP port 2 Networking Complex Control mode of operation configurations, also GoP port 3 mode of operation was wrongly set. Patch removes these configurations. Fixes: f84bf386f395 ("net: mvpp2: initialize the GoP") Acked-by: Marcin Wojtas Signed-off-by: Stefan Chulski

[PATCH] net: mvpp2: divide fifo for dts-active ports only

2020-11-18 Thread stefanc
From: Stefan Chulski Tx/Rx FIFO is a HW resource limited by total size, but shared by all ports of same CP110 and impacting port-performance. Do not divide the FIFO for ports which are not enabled in DTS, so active ports could have more FIFO. The active port mapping should be done in probe befor

[PATCH v1] net: mvpp2: divide fifo for dts-active ports only

2020-11-23 Thread stefanc
From: Stefan Chulski Tx/Rx FIFO is a HW resource limited by total size, but shared by all ports of same CP110 and impacting port-performance. Do not divide the FIFO for ports which are not enabled in DTS, so active ports could have more FIFO. The active port mapping should be done in probe befor

[PATCH v2] net: mvpp2: divide fifo for dts-active ports only

2020-11-23 Thread stefanc
From: Stefan Chulski Tx/Rx FIFO is a HW resource limited by total size, but shared by all ports of same CP110 and impacting port-performance. Do not divide the FIFO for ports which are not enabled in DTS, so active ports could have more FIFO. No change in FIFO allocation if all 3 ports on the com

[PATCH net] net: mvpp2: fix pkt coalescing int-threshold configuration

2020-12-23 Thread stefanc
From: Stefan Chulski The packet coalescing interrupt threshold has separated registers for different aggregated/cpu (sw-thread). The required value should be loaded for every thread but not only for 1 current cpu. Fixes: 213f428f5056 ("net: mvpp2: add support for TX interrupts and RX queue dist

[PATCH net-next] net: mvpp2: prs: improve ipv4 parse flow

2021-01-10 Thread stefanc
From: Stefan Chulski Patch didn't fix any issue, just improve parse flow and align ipv4 parse flow with ipv6 parse flow. Currently ipv4 kenguru parser first check IP protocol(TCP/UDP) and then destination IP address. Patch introduce reverse ipv4 parse, first destination IP address parsed and onl

[PATCH RFC net-next 01/19] doc: marvell: add cm3-mem device tree bindings description

2021-01-10 Thread stefanc
From: Stefan Chulski Signed-off-by: Stefan Chulski --- Documentation/devicetree/bindings/net/marvell-pp2.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/net/marvell-pp2.txt b/Documentation/devicetree/bindings/net/marvell-pp2.txt index b783976..f9f8cc6

[PATCH RFC net-next 00/19] net: mvpp2: Add TX Flow Control support

2021-01-10 Thread stefanc
From: Stefan Chulski Armada hardware has a pause generation mechanism in GOP (MAC). GOP has to generate flow control frames based on an indication programmed in Ports Control 0 Register. There is a bit per port. However assertion of the PortX Pause bits in the ports control 0 register only sends

[PATCH RFC net-next 02/19] dts: marvell: add CM3 SRAM memory to cp115 ethernet device tree

2021-01-10 Thread stefanc
From: Konstantin Porotchkin CM3 SRAM address space would be used for Flow Control configuration. Signed-off-by: Stefan Chulski --- arch/arm64/boot/dts/marvell/armada-cp11x.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm64/boot/dts/marvell/armada-cp11x.dtsi b/arch

[PATCH RFC net-next 05/19] net: mvpp2: always compare hw-version vs MVPP21

2021-01-10 Thread stefanc
From: Stefan Chulski Currently we have PP2v1 and PP2v2 hw-versions, with some different handlers depending upon condition hw_version = MVPP21/MVPP22. In a future there will be also PP2v3. Let's use now the generic "if equal/notEqual MVPP21" for all cases instead of "if MVPP22". This patch does n

[PATCH RFC net-next 04/19] net: mvpp2: add PPv23 version definition

2021-01-10 Thread stefanc
From: Stefan Chulski This patch add PPv23 version definition. PPv23 is new packet processor in CP115. Everything that supported by PPv22, also supported by PPv23. No functional changes in this stage. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 24 +++

[PATCH RFC net-next 06/19] net: mvpp2: increase BM pool size to 2048 buffers

2021-01-10 Thread stefanc
From: Stefan Chulski BM pool size increased to support Firmware Flow Control. Minimum depletion thresholds to support FC is 1024 buffers. BM pool size increased to 2048 to have some 1024 buffers space between depletion thresholds and BM pool size. Signed-off-by: Stefan Chulski --- drivers/net/

[PATCH RFC net-next 03/19] net: mvpp2: add CM3 SRAM memory map

2021-01-10 Thread stefanc
From: Stefan Chulski This patch adds CM3 memory map and CM3 read/write callbacks. No functionality changes. Change-Id: Ibae3f5e6695f3454f799568308d349addc730f01 Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 7 +++ drivers/net/ethernet/marvell/mvpp2/mvpp2_

[PATCH RFC net-next 07/19] net: mvpp2: increase RXQ size to 1024 descriptors

2021-01-10 Thread stefanc
From: Stefan Chulski RXQ size increased to support Firmware Flow Control. Minimum depletion thresholds to support FC is 1024 buffers. Default set to 1024 descriptors and maximum size to 2048. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 4 ++-- 1 file changed,

[PATCH RFC net-next 09/19] net: mvpp2: add FCA RXQ non occupied descriptor threshold

2021-01-10 Thread stefanc
From: Stefan Chulski RXQ non occupied descriptor threshold would be used by Flow Control Firmware feature to move to the XOFF mode. RXQ non occupied threshold would change interrupt cause that polled by CM3 Firmware. Actual non occupied interrupt masked and won't trigger interrupt. Signed-off-by

[PATCH RFC net-next 14/19] net: mvpp2: add ethtool flow control configuration support

2021-01-10 Thread stefanc
From: Stefan Chulski This patch add ethtool flow control configuration support. Tx flow control retrieved correctly by ethtool get function. FW per port ethtool configuration capability added. Patch also takes care about mtu change procedure, if PPv2 switch BM pools during mtu change. Signed-o

[PATCH RFC net-next 16/19] net: mvpp2: add PPv23 RX FIFO flow control

2021-01-10 Thread stefanc
From: Stefan Chulski New FIFO flow control feature were added in PPv23. PPv2 FIFO polled by HW and trigger pause frame if FIFO fill level is below threshold. FIFO HW flow control enabled with CM3 RXQ&BM flow control with ethtool. Current FIFO thresholds is: 9KB for port with maximum speed 10Gb/s

[PATCH RFC net-next 19/19] net: mvpp2: add TX FC firmware check

2021-01-10 Thread stefanc
From: Stefan Chulski Patch check that TX FC firmware is running in CM3. If not, global TX FC would be disabled. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 1 + drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 39 2 files changed,

[PATCH RFC net-next 10/19] net: mvpp2: add spinlock for FW FCA configuration path

2021-01-10 Thread stefanc
From: Stefan Chulski Spinlock added to MSS shared memory configuration space. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 5 + drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/drivers/net/etherne

[PATCH RFC net-next 11/19] net: mvpp2: add flow control RXQ and BM pool config callbacks

2021-01-10 Thread stefanc
From: Stefan Chulski This patch did not change any functionality. Added flow control RXQ and BM pool config callbacks that would be used to configure RXQ and BM pool thresholds. APIs also will disable/enable RXQ and pool Flow Control polling. In this stage BM pool and RXQ has same stop/start thr

[PATCH RFC net-next 15/19] net: mvpp2: add BM protection underrun feature support

2021-01-10 Thread stefanc
From: Stefan Chulski Feature double size of BPPI by decreasing number of pools from 16 to 8. Increasing of BPPI size protect BM drop from BPPI underrun. Underrun could occurred due to stress on DDR and as result slow buffer transition from BPPE to BPPI. New BPPI threshold recommended by spec is:

[PATCH RFC net-next 08/19] net: mvpp2: add FCA periodic timer configurations

2021-01-10 Thread stefanc
From: Stefan Chulski Flow Control periodic timer would be used if port in XOFF to transmit periodic XOFF frames. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 13 +- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 45 2 files cha

[PATCH RFC net-next 13/19] net: mvpp2: add RXQ flow control configurations

2021-01-10 Thread stefanc
From: Stefan Chulski This patch add RXQ flow control configurations. Patch do not enable flow control itself, flow control disabled by default. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 3 +++ drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 7 +++

[PATCH RFC net-next 17/19] net: mvpp2: set 802.3x GoP Flow Control mode

2021-01-10 Thread stefanc
From: Stefan Chulski This patch fix GMAC TX flow control autoneg. Flow control autoneg wrongly were disabled with enabled TX flow control. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drive

[PATCH RFC net-next 18/19] net: mvpp2: add ring size validation before enabling FC

2021-01-10 Thread stefanc
From: Stefan Chulski This patch add ring size validation before enabling FC. 1. Flow control cannot be enabled if ring size is below start threshold. 2. Flow control disabled if ring size set below start threshold. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2_main

[PATCH RFC net-next 12/19] net: mvpp2: enable global flow control

2021-01-10 Thread stefanc
From: Stefan Chulski This patch enable global flow control in FW. Per port flow control is still disabled. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 3 +++ drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 15 ++- 2 files changed, 17 inser

[PATCH net ] net: mvpp2: Remove Pause and Asym_Pause support

2021-01-10 Thread stefanc
From: Stefan Chulski Packet Processor hardware not connected to MAC flow control unit and cannot support TX flow control. This patch disable flow control support. Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit") Signed-off-by: Stefan Chulski --- drivers/net

[net-next] net: mvpp2: fix interrupt mask/unmask skip condition

2021-02-11 Thread stefanc
From: Stefan Chulski The condition should be skipped if CPU ID equal to nthreads. The patch doesn't fix any actual issue since nthreads = min_t(unsigned int, num_present_cpus(), MVPP2_MAX_THREADS). On all current Armada platforms, the number of CPU's is less than MVPP2_MAX_THREADS. Fixes: e531f7

[net-next 0/4] net: mvpp2: Minor non functional driver code improvements

2021-02-14 Thread stefanc
From: Stefan Chulski The patch series contains minor code improvements and did not change any functionality. Stefan Chulski (4): net: mvpp2: simplify PPv2 version ID read net: mvpp2: improve Packet Processor version check net: mvpp2: improve mvpp2_get_sram return net: mvpp2: improve Net

[net-next 2/4] net: mvpp2: improve Packet Processor version check

2021-02-14 Thread stefanc
From: Stefan Chulski Use >= MVPP22 instead of != MVPP21. Non functional change. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_

[net-next 1/4] net: mvpp2: simplify PPv2 version ID read

2021-02-14 Thread stefanc
From: Stefan Chulski PPv2.1 contain 0 in Version ID register, priv->hw_version check can be removed. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvpp2/mv

[net-next 3/4] net: mvpp2: improve mvpp2_get_sram return

2021-02-14 Thread stefanc
From: Stefan Chulski Use PTR_ERR_OR_ZERO instead of IS_ERR and PTR_ERR. Non functional change. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.

[net-next 4/4] net: mvpp2: improve Networking Complex Control register naming

2021-02-14 Thread stefanc
From: Stefan Chulski GENCONF_CTRL0_PORTX naming improved. Non functional change. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 6 +++--- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 8 2 files changed, 7 insertions(+), 7 deletions(-) diff --

[net-next] net: mvpp2: reduce tx-fifo for loopback port

2021-02-14 Thread stefanc
From: Stefan Chulski 1KB is enough for loopback port, so 2KB can be distributed between other ports. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 4 ++-- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 10 +- 2 files changed, 7 insertions(+), 7

[net-next] net: mvpp2: Add TX flow control support for jumbo frames

2021-02-15 Thread stefanc
From: Stefan Chulski With MTU less than 1500B on all ports, the driver uses per CPU pool mode. If one of the ports set to jumbo frame MTU size, all ports move to shared pools mode. Here, buffer manager TX Flow Control reconfigured on all ports. Signed-off-by: Stefan Chulski --- drivers/net/eth

[net-next] net: mvpp2: skip RSS configurations on loopback port

2021-02-18 Thread stefanc
From: Stefan Chulski PPv2 loopback port doesn't support RSS, so we should skip RSS configurations for this port. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 25 +++- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/drivers/

[PATCH net-next] net: mvpp2: Add parsing support for different IPv4 IHL values

2021-04-13 Thread stefanc
From: Stefan Chulski Add parser entries for different IPv4 IHL values. Each entry will set the L4 header offset according to the IPv4 IHL field. L3 header offset will set during the parsing of the IPv4 protocol. Suggested-by: Dana Vardi Signed-off-by: Stefan Chulski --- drivers/net/ethernet/m

[PATCH V2 net-next] net: mvpp2: Add parsing support for different IPv4 IHL values

2021-04-16 Thread stefanc
From: Stefan Chulski Add parser entries for different IPv4 IHL values. Each entry will set the L4 header offset according to the IPv4 IHL field. L3 header offset will set during the parsing of the IPv4 protocol. Because of missed parser support for IP header length > 20, RX IPv4 checksum HW off

[PATCH v2 RFC net-next 01/18] doc: marvell: add cm3-mem device tree bindings description

2021-01-24 Thread stefanc
From: Stefan Chulski Signed-off-by: Stefan Chulski --- Documentation/devicetree/bindings/net/marvell-pp2.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/net/marvell-pp2.txt b/Documentation/devicetree/bindings/net/marvell-pp2.txt index b783976..f9f8cc6

[PATCH v2 RFC net-next 02/18] dts: marvell: add CM3 SRAM memory to cp115 ethernet device tree

2021-01-24 Thread stefanc
From: Konstantin Porotchkin CM3 SRAM address space would be used for Flow Control configuration. Signed-off-by: Stefan Chulski --- arch/arm64/boot/dts/marvell/armada-cp11x.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm64/boot/dts/marvell/armada-cp11x.dtsi b/arch

[PATCH v2 RFC net-next 04/18] net: mvpp2: add PPv23 version definition

2021-01-24 Thread stefanc
From: Stefan Chulski This patch add PPv23 version definition. PPv23 is new packet processor in CP115. Everything that supported by PPv22, also supported by PPv23. No functional changes in this stage. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 24 +++

[PATCH v2 RFC net-next 09/18] net: mvpp2: add FCA RXQ non occupied descriptor threshold

2021-01-24 Thread stefanc
From: Stefan Chulski RXQ non occupied descriptor threshold would be used by Flow Control Firmware feature to move to the XOFF mode. RXQ non occupied threshold would change interrupt cause that polled by CM3 Firmware. Actual non occupied interrupt masked and won't trigger interrupt. Signed-off-by

[PATCH v2 RFC net-next 18/18] net: mvpp2: add TX FC firmware check

2021-01-24 Thread stefanc
From: Stefan Chulski Patch check that TX FC firmware is running in CM3. If not, global TX FC would be disabled. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 1 + drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 41 2 files changed,

[PATCH v2 RFC net-next 17/18] net: mvpp2: limit minimum ring size to 1024 descriptors

2021-01-24 Thread stefanc
From: Stefan Chulski To support Flow Control ring size should be at least 1024 descriptors. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/eth

[PATCH v2 RFC net-next 16/18] net: mvpp2: set 802.3x GoP Flow Control mode

2021-01-24 Thread stefanc
From: Stefan Chulski This patch fix GMAC TX flow control autoneg. Flow control autoneg wrongly were disabled with enabled TX flow control. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drive

[PATCH v2 RFC net-next 15/18] net: mvpp2: add PPv23 RX FIFO flow control

2021-01-24 Thread stefanc
From: Stefan Chulski New FIFO flow control feature were added in PPv23. PPv2 FIFO polled by HW and trigger pause frame if FIFO fill level is below threshold. FIFO HW flow control enabled with CM3 RXQ&BM flow control with ethtool. Current FIFO thresholds is: 9KB for port with maximum speed 10Gb/s

[PATCH v2 RFC net-next 14/18] net: mvpp2: add BM protection underrun feature support

2021-01-24 Thread stefanc
From: Stefan Chulski Feature double size of BPPI by decreasing number of pools from 16 to 8. Increasing of BPPI size protect BM drop from BPPI underrun. Underrun could occurred due to stress on DDR and as result slow buffer transition from BPPE to BPPI. New BPPI threshold recommended by spec is:

[PATCH v2 RFC net-next 13/18] net: mvpp2: add ethtool flow control configuration support

2021-01-24 Thread stefanc
From: Stefan Chulski This patch add ethtool flow control configuration support. Tx flow control retrieved correctly by ethtool get function. FW per port ethtool configuration capability added. Patch also takes care about mtu change procedure, if PPv2 switch BM pools during mtu change. Signed-o

[PATCH v2 RFC net-next 12/18] net: mvpp2: add RXQ flow control configurations

2021-01-24 Thread stefanc
From: Stefan Chulski This patch add RXQ flow control configurations. Patch do not enable flow control itself, flow control disabled by default. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 40 ++- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 111

[PATCH v2 RFC net-next 11/18] net: mvpp2: enable global flow control

2021-01-24 Thread stefanc
From: Stefan Chulski This patch enables global flow control in FW and in the phylink validate mask. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 3 +++ drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 20 +++- 2 files changed, 22 inserti

[PATCH v2 RFC net-next 10/18] net: mvpp2: add spinlock for FW FCA configuration path

2021-01-24 Thread stefanc
From: Stefan Chulski Spinlock added to MSS shared memory configuration space. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 5 + drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/drivers/net/etherne

[PATCH v2 RFC net-next 07/18] net: mvpp2: increase RXQ size to 1024 descriptors

2021-01-24 Thread stefanc
From: Stefan Chulski RXQ size increased to support Firmware Flow Control. Minimum depletion thresholds to support FC is 1024 buffers. Default set to 1024 descriptors and maximum size to 2048. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 4 ++-- 1 file changed,

[PATCH v2 RFC net-next 06/18] net: mvpp2: increase BM pool size to 2048 buffers

2021-01-24 Thread stefanc
From: Stefan Chulski BM pool size increased to support Firmware Flow Control. Minimum depletion thresholds to support FC is 1024 buffers. BM pool size increased to 2048 to have some 1024 buffers space between depletion thresholds and BM pool size. Jumbo frames require a 9888B buffer, so memory r

[PATCH v2 RFC net-next 08/18] net: mvpp2: add FCA periodic timer configurations

2021-01-24 Thread stefanc
From: Stefan Chulski Flow Control periodic timer would be used if port in XOFF to transmit periodic XOFF frames. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 13 +- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 45 2 files cha

[PATCH v2 RFC net-next 05/18] net: mvpp2: always compare hw-version vs MVPP21

2021-01-24 Thread stefanc
From: Stefan Chulski Currently we have PP2v1 and PP2v2 hw-versions, with some different handlers depending upon condition hw_version = MVPP21/MVPP22. In a future there will be also PP2v3. Let's use now the generic "if equal/notEqual MVPP21" for all cases instead of "if MVPP22". This patch does n

[PATCH v2 RFC net-next 03/18] net: mvpp2: add CM3 SRAM memory map

2021-01-24 Thread stefanc
From: Stefan Chulski This patch adds CM3 memory map and CM3 read/write callbacks. No functionality changes. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 7 ++ drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 74 +++- 2 files changed, 78

[PATCH v2 RFC net-next 00/18] net: mvpp2: Add TX Flow Control support

2021-01-24 Thread stefanc
From: Stefan Chulski Armada hardware has a pause generation mechanism in GOP (MAC). The GOP generate flow control frames based on an indication programmed in Ports Control 0 Register. There is a bit per port. However assertion of the PortX Pause bits in the ports control 0 register only sends a

[PATCH v3 RFC net-next 19/19] net: mvpp2: add TX FC firmware check

2021-01-25 Thread stefanc
From: Stefan Chulski Patch check that TX FC firmware is running in CM3. If not, global TX FC would be disabled. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 1 + drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 41 2 files changed,

[PATCH v3 RFC net-next 18/19] net: mvpp2: limit minimum ring size to 1024 descriptors

2021-01-25 Thread stefanc
From: Stefan Chulski To support Flow Control ring size should be at least 1024 descriptors. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/eth

[PATCH v3 RFC net-next 17/19] net: mvpp2: set 802.3x GoP Flow Control mode

2021-01-25 Thread stefanc
From: Stefan Chulski This patch fix GMAC TX flow control autoneg. Flow control autoneg wrongly were disabled with enabled TX flow control. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drive

[PATCH v3 RFC net-next 09/19] net: mvpp2: add FCA periodic timer configurations

2021-01-25 Thread stefanc
From: Stefan Chulski Flow Control periodic timer would be used if port in XOFF to transmit periodic XOFF frames. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 13 +- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 45 2 files cha

[PATCH v3 RFC net-next 14/19] net: mvpp2: add ethtool flow control configuration support

2021-01-25 Thread stefanc
From: Stefan Chulski This patch add ethtool flow control configuration support. Tx flow control retrieved correctly by ethtool get function. FW per port ethtool configuration capability added. Patch also takes care about mtu change procedure, if PPv2 switch BM pools during mtu change. Signed-o

[PATCH v3 RFC net-next 12/19] net: mvpp2: enable global flow control

2021-01-25 Thread stefanc
From: Stefan Chulski This patch enables global flow control in FW and in the phylink validate mask. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 3 +++ drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 20 +++- 2 files changed, 22 inserti

[PATCH v3 RFC net-next 16/19] net: mvpp2: add PPv23 RX FIFO flow control

2021-01-25 Thread stefanc
From: Stefan Chulski New FIFO flow control feature were added in PPv23. PPv2 FIFO polled by HW and trigger pause frame if FIFO fill level is below threshold. FIFO HW flow control enabled with CM3 RXQ&BM flow control with ethtool. Current FIFO thresholds is: 9KB for port with maximum speed 10Gb/s

[PATCH v3 RFC net-next 15/19] net: mvpp2: add BM protection underrun feature support

2021-01-25 Thread stefanc
From: Stefan Chulski Feature double size of BPPI by decreasing number of pools from 16 to 8. Increasing of BPPI size protect BM drop from BPPI underrun. Underrun could occurred due to stress on DDR and as result slow buffer transition from BPPE to BPPI. New BPPI threshold recommended by spec is:

[PATCH v3 RFC net-next 11/19] net: mvpp2: add spinlock for FW FCA configuration path

2021-01-25 Thread stefanc
From: Stefan Chulski Spinlock added to MSS shared memory configuration space. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 5 + drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/drivers/net/etherne

[PATCH v3 RFC net-next 13/19] net: mvpp2: add RXQ flow control configurations

2021-01-25 Thread stefanc
From: Stefan Chulski This patch add RXQ flow control configurations. Patch do not enable flow control itself, flow control disabled by default. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 38 ++- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 111

[PATCH v3 RFC net-next 10/19] net: mvpp2: add FCA RXQ non occupied descriptor threshold

2021-01-25 Thread stefanc
From: Stefan Chulski RXQ non occupied descriptor threshold would be used by Flow Control Firmware feature to move to the XOFF mode. RXQ non occupied threshold would change interrupt cause that polled by CM3 Firmware. Actual non occupied interrupt masked and won't trigger interrupt. Signed-off-by

[PATCH v3 RFC net-next 08/19] net: mvpp2: increase RXQ size to 1024 descriptors

2021-01-25 Thread stefanc
From: Stefan Chulski RXQ size increased to support Firmware Flow Control. Minimum depletion thresholds to support FC is 1024 buffers. Default set to 1024 descriptors and maximum size to 2048. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 4 ++-- 1 file changed,

[PATCH v3 RFC net-next 07/19] net: mvpp2: increase BM pool size to 2048 buffers

2021-01-25 Thread stefanc
From: Stefan Chulski BM pool size increased to support Firmware Flow Control. Minimum depletion thresholds to support FC is 1024 buffers. BM pool size increased to 2048 to have some 1024 buffers space between depletion thresholds and BM pool size. Jumbo frames require a 9888B buffer, so memory r

[PATCH v3 RFC net-next 06/19] net: mvpp2: always compare hw-version vs MVPP21

2021-01-25 Thread stefanc
From: Stefan Chulski Currently we have PP2v1 and PP2v2 hw-versions, with some different handlers depending upon condition hw_version = MVPP21/MVPP22. In a future there will be also PP2v3. Let's use now the generic "if equal/notEqual MVPP21" for all cases instead of "if MVPP22". This patch does n

[PATCH v3 RFC net-next 03/19] net: mvpp2: add CM3 SRAM memory map

2021-01-25 Thread stefanc
From: Stefan Chulski This patch adds CM3 memory map and CM3 read/write callbacks. No functionality changes. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 7 ++ drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 73 +++- 2 files changed, 77

[PATCH v3 RFC net-next 05/19] net: mvpp2: add PPv23 version definition

2021-01-25 Thread stefanc
From: Stefan Chulski This patch add PPv23 version definition. PPv23 is new packet processor in CP115. Everything that supported by PPv22, also supported by PPv23. No functional changes in this stage. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 24 +++

[PATCH v3 RFC net-next 02/19] dts: marvell: add CM3 SRAM memory to cp115 ethernet device tree

2021-01-26 Thread stefanc
From: Konstantin Porotchkin CM3 SRAM address space would be used for Flow Control configuration. Signed-off-by: Stefan Chulski --- arch/arm64/boot/dts/marvell/armada-cp11x.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm64/boot/dts/marvell/armada-cp11x.dtsi b/arch

[PATCH v3 RFC net-next 04/19] doc: marvell: add PPv2.3 description to marvell-pp2.txt

2021-01-26 Thread stefanc
From: Stefan Chulski Signed-off-by: Stefan Chulski --- Documentation/devicetree/bindings/net/marvell-pp2.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/net/marvell-pp2.txt b/Documentation/devicetree/bindings/net/marvell-pp2.txt index

[PATCH v3 RFC net-next 00/19] net: mvpp2: Add TX Flow Control support

2021-01-26 Thread stefanc
From: Stefan Chulski Armada hardware has a pause generation mechanism in GOP (MAC). The GOP generate flow control frames based on an indication programmed in Ports Control 0 Register. There is a bit per port. However assertion of the PortX Pause bits in the ports control 0 register only sends a

[PATCH v3 RFC net-next 01/19] doc: marvell: add cm3-mem device tree bindings description

2021-01-26 Thread stefanc
From: Stefan Chulski Signed-off-by: Stefan Chulski --- Documentation/devicetree/bindings/net/marvell-pp2.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/net/marvell-pp2.txt b/Documentation/devicetree/bindings/net/marvell-pp2.txt index b783976..f9f8cc6

[PATCH v4 net-next 00/19] net: mvpp2: Add TX Flow Control support

2021-01-27 Thread stefanc
From: Stefan Chulski Armada hardware has a pause generation mechanism in GOP (MAC). The GOP generate flow control frames based on an indication programmed in Ports Control 0 Register. There is a bit per port. However assertion of the PortX Pause bits in the ports control 0 register only sends a

[PATCH v4 net-next 02/19] dts: marvell: add CM3 SRAM memory to cp115 ethernet device tree

2021-01-27 Thread stefanc
From: Konstantin Porotchkin CM3 SRAM address space would be used for Flow Control configuration. Signed-off-by: Stefan Chulski --- arch/arm64/boot/dts/marvell/armada-cp11x.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm64/boot/dts/marvell/armada-cp11x.dtsi b/arch

[PATCH v4 net-next 03/19] net: mvpp2: add CM3 SRAM memory map

2021-01-27 Thread stefanc
From: Stefan Chulski This patch adds CM3 memory map and CM3 read/write callbacks. No functionality changes. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 7 ++ drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 73 +++- 2 files changed, 77

[PATCH v4 net-next 06/19] net: mvpp2: always compare hw-version vs MVPP21

2021-01-27 Thread stefanc
From: Stefan Chulski Currently we have PP2v1 and PP2v2 hw-versions, with some different handlers depending upon condition hw_version = MVPP21/MVPP22. In a future there will be also PP2v3. Let's use now the generic "if equal/notEqual MVPP21" for all cases instead of "if MVPP22". This patch does n

[PATCH v4 net-next 07/19] net: mvpp2: increase BM pool size to 2048 buffers

2021-01-27 Thread stefanc
From: Stefan Chulski BM pool size increased to support Firmware Flow Control. Minimum depletion thresholds to support FC is 1024 buffers. BM pool size increased to 2048 to have some 1024 buffers space between depletion thresholds and BM pool size. Jumbo frames require a 9888B buffer, so memory r

[PATCH v4 net-next 01/19] doc: marvell: add cm3-mem device tree bindings description

2021-01-27 Thread stefanc
From: Stefan Chulski Signed-off-by: Stefan Chulski --- Documentation/devicetree/bindings/net/marvell-pp2.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/net/marvell-pp2.txt b/Documentation/devicetree/bindings/net/marvell-pp2.txt index b783976..f9f8cc6

[PATCH v4 net-next 04/19] doc: marvell: add PPv2.3 description to marvell-pp2.txt

2021-01-27 Thread stefanc
From: Stefan Chulski Signed-off-by: Stefan Chulski --- Documentation/devicetree/bindings/net/marvell-pp2.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/net/marvell-pp2.txt b/Documentation/devicetree/bindings/net/marvell-pp2.txt index

[PATCH v4 net-next 05/19] net: mvpp2: add PPv23 version definition

2021-01-27 Thread stefanc
From: Stefan Chulski This patch add PPv23 version definition. PPv23 is new packet processor in CP115. Everything that supported by PPv22, also supported by PPv23. No functional changes in this stage. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 24 +++

[PATCH v4 net-next 19/19] net: mvpp2: add TX FC firmware check

2021-01-27 Thread stefanc
From: Stefan Chulski Patch check that TX FC firmware is running in CM3. If not, global TX FC would be disabled. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 1 + drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 41 2 files changed,

[PATCH v4 net-next 18/19] net: mvpp2: limit minimum ring size to 1024 descriptors

2021-01-27 Thread stefanc
From: Stefan Chulski To support Flow Control ring size should be at least 1024 descriptors. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/eth

[PATCH v4 net-next 17/19] net: mvpp2: set 802.3x GoP Flow Control mode

2021-01-27 Thread stefanc
From: Stefan Chulski This patch fix GMAC TX flow control autoneg. Flow control autoneg wrongly were disabled with enabled TX flow control. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drive

  1   2   3   >