netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
To: "Marek Behún" <marek.behun@nic.cz>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
	"Andrew Lunn" <andrew@lunn.ch>
Cc: linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org,
	Gregory CLEMENT <gregory.clement@bootlin.com>,
	Tomas Hlavacek <tomas.hlavacek@nic.cz>,
	Russell King - ARM Linux <linux@armlinux.org.uk>,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH v1 6/7] net: mvneta: Don't use GRO on Armada 3720
Date: Thu, 9 Aug 2018 19:27:55 +0800	[thread overview]
Message-ID: <20180809192755.24e57782@xhacker.debian> (raw)
In-Reply-To: <20180809124022.790f1784@xhacker.debian>

Hi,

On Thu, 9 Aug 2018 12:40:41 +0800 Jisheng Zhang wrote:

> + more people
> 
> On Wed,  8 Aug 2018 17:27:05 +0200 Marek Behún wrote:
> 
> > For some reason on Armada 3720 boards (EspressoBin and Turris Mox) the
> > networking driver behaves weirdly when using napi_gro_receive.
> > 
> > For example downloading a big file from a local network (low ping) is
> > fast, but when downloading from a remote server (higher ping), the
> > download speed is at first high but drops rapidly to almost nothing or
> > absolutely nothing.  
> 
> We also met this issue on some berlin platforms. I tried to fix the bug,
> but no clue so far.
> 
> > 
> > This is fixed when using netif_receive_skb instead of napi_gro_receive.  
> 
> This is a workaround. The good news is this workaround also fixes the issue
> we saw on berlin.
> 
> > 
> > Signed-off-by: Marek Behun <marek.behun@nic.cz>
> > Cc: Russell King - ARM Linux <linux@armlinux.org.uk>
> > Cc: netdev@vger.kernel.org
> > 
> > diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
> > index 0ad2f3f7da85..27f3017d94c5 100644
> > --- a/drivers/net/ethernet/marvell/mvneta.c
> > +++ b/drivers/net/ethernet/marvell/mvneta.c
> > @@ -1959,7 +1959,10 @@ static int mvneta_rx_swbm(struct mvneta_port *pp, int rx_todo,
> >  
> >  			skb->protocol = eth_type_trans(skb, dev);
> >  			mvneta_rx_csum(pp, rx_status, skb);
> > -			napi_gro_receive(&port->napi, skb);
> > +			if (pp->neta_armada3700)
> > +				netif_receive_skb(skb);
> > +			else
> > +				napi_gro_receive(&port->napi, skb);

I think I found the root cause, if neta_armada3700 is true, the port got from
this_cpu_ptr(pp->ports) is invalid, this is bug... I'll cook a patch for this

Thanks

> >  
> >  			rcvd_pkts++;
> >  			rcvd_bytes += rx_bytes;
> > @@ -2001,7 +2004,10 @@ static int mvneta_rx_swbm(struct mvneta_port *pp, int rx_todo,
> >  
> >  		mvneta_rx_csum(pp, rx_status, skb);
> >  
> > -		napi_gro_receive(&port->napi, skb);
> > +		if (pp->neta_armada3700)
> > +			netif_receive_skb(skb);
> > +		else
> > +			napi_gro_receive(&port->napi, skb);
> >  	}
> >  
> >  	if (rcvd_pkts) {  
> 

  reply	other threads:[~2018-08-09 13:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20180808152706.21727-1-marek.behun@nic.cz>
2018-08-08 15:27 ` [PATCH v1 6/7] net: mvneta: Don't use GRO on Armada 3720 Marek Behún
2018-08-08 16:58   ` Andrew Lunn
2018-08-08 17:57     ` Dave Taht
2018-08-09  4:40   ` Jisheng Zhang
2018-08-09 11:27     ` Jisheng Zhang [this message]
2018-08-09 12:08       ` Jisheng Zhang
2018-08-21 10:07         ` Marek Behún

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=20180809192755.24e57782@xhacker.debian \
    --to=jisheng.zhang@synaptics.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=gregory.clement@bootlin.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=marek.behun@nic.cz \
    --cc=netdev@vger.kernel.org \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=tomas.hlavacek@nic.cz \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).