All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jose Abreu <Jose.Abreu@synopsys.com>
To: netdev@vger.kernel.org
Cc: Jose Abreu <Jose.Abreu@synopsys.com>,
	"David S. Miller" <davem@davemloft.net>,
	Joao Pinto <Joao.Pinto@synopsys.com>,
	Vitor Soares <Vitor.Soares@synopsys.com>,
	Giuseppe Cavallaro <peppe.cavallaro@st.com>,
	Alexandre Torgue <alexandre.torgue@st.com>
Subject: [PATCH v3 net-next 01/12] net: stmmac: Enable OSP for GMAC4
Date: Fri, 18 May 2018 14:55:58 +0100	[thread overview]
Message-ID: <1dfd166fdfad67542e5e2ace11ee1983fe2ddf60.1526651009.git.joabreu@synopsys.com> (raw)
In-Reply-To: <cover.1526651009.git.joabreu@synopsys.com>
In-Reply-To: <cover.1526651009.git.joabreu@synopsys.com>

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 <joabreu@synopsys.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Joao Pinto <jpinto@synopsys.com>
Cc: Vitor Soares <soares@synopsys.com>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
index 117c3a5..9aab5b3 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
@@ -94,6 +94,10 @@ static void dwmac4_dma_init_tx_chan(void __iomem *ioaddr,
 
 	value = readl(ioaddr + DMA_CHAN_TX_CONTROL(chan));
 	value = value | (txpbl << DMA_BUS_MODE_PBL_SHIFT);
+
+	/* Enable OSP to get best performance */
+	value |= DMA_CONTROL_OSP;
+
 	writel(value, ioaddr + DMA_CHAN_TX_CONTROL(chan));
 
 	writel(dma_tx_phy, ioaddr + DMA_CHAN_TX_BASE_ADDR(chan));
-- 
1.7.1

  reply	other threads:[~2018-05-18 13:56 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-18 13:55 [PATCH v3 net-next 00/12] net: stmmac: Clean-up and tune-up Jose Abreu
2018-05-18 13:55 ` Jose Abreu [this message]
2018-05-18 13:55 ` [PATCH v3 net-next 02/12] net: stmmac: Do not keep rearming the coalesce timer in stmmac_xmit Jose Abreu
2018-08-17  7:32   ` [v3, net-next, " Jerome Brunet
2018-08-17  7:32     ` Jerome Brunet
2018-08-23 18:42     ` Martin Blumenstingl
2018-08-23 18:42       ` Martin Blumenstingl
2018-05-18 13:56 ` [PATCH v3 net-next 03/12] net: stmmac: Let descriptor code set skbuff address Jose Abreu
2018-05-18 13:56 ` [PATCH v3 net-next 04/12] net: stmmac: Let descriptor code clear the descriptor Jose Abreu
2018-05-18 13:56 ` [PATCH v3 net-next 05/12] net: stmmac: Uniformize the use of dma_{rx/tx}_mode callbacks Jose Abreu
2018-05-18 13:56 ` [PATCH v3 net-next 06/12] net: stmmac: Remove uneeded checks for GMAC version Jose Abreu
2018-05-18 13:56 ` [PATCH v3 net-next 07/12] net: stmmac: Move PTP and MMC base address calculation to hwif.c Jose Abreu
2018-05-18 13:56 ` [PATCH v3 net-next 08/12] net: stmmac: Uniformize the use of dma_init_* callbacks Jose Abreu
2018-05-18 13:56 ` [PATCH v3 net-next 09/12] net: stmmac: Remove uneeded check for GMAC version in stmmac_xmit Jose Abreu
2018-05-18 13:56 ` [PATCH v3 net-next 10/12] net: stmmac: Uniformize set_rx_owner() Jose Abreu
2018-05-18 13:56 ` [PATCH v3 net-next 11/12] net: stmmac: Let descriptor code get skbuff address Jose Abreu
2018-05-18 13:56 ` [PATCH v3 net-next 12/12] net: stmmac: Remove if condition by taking advantage of hwif return code Jose Abreu
2018-05-18 14:12 ` [PATCH v3 net-next 00/12] net: stmmac: Clean-up and tune-up Corentin Labbe
2018-05-18 14:23   ` Jose Abreu
2018-05-18 14:28     ` Corentin Labbe
2018-05-18 15:09 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1dfd166fdfad67542e5e2ace11ee1983fe2ddf60.1526651009.git.joabreu@synopsys.com \
    --to=jose.abreu@synopsys.com \
    --cc=Joao.Pinto@synopsys.com \
    --cc=Vitor.Soares@synopsys.com \
    --cc=alexandre.torgue@st.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.