netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	brouer@redhat.com, netdev <netdev@vger.kernel.org>
Subject: Re: Regression in mvneta with XDP patches
Date: Mon, 11 Nov 2019 17:14:36 +0200	[thread overview]
Message-ID: <20191111151436.GC4197@localhost.localdomain> (raw)
In-Reply-To: <20191111150553.GC1105@lunn.ch>

[-- Attachment #1: Type: text/plain, Size: 1971 bytes --]

On Nov 11, Andrew Lunn wrote:
> On Mon, Nov 11, 2019 at 04:33:52PM +0200, Ilias Apalodimas wrote:
> > Hi Andrew,
> > 
> > On Mon, Nov 11, 2019 at 02:46:15PM +0100, Andrew Lunn wrote:
> > > Hi Lorenzo, Jesper, Ilias
> > > 
> > > I just found that the XDP patches to mvneta have caused a regression.
> > > 
> > > This one breaks networking:
> > 
> > Thaks for the report.
> > Looking at the DTS i can see 'buffer-manager' in it. The changes we made were
> > for the driver path software buffer manager. 
> > Can you confirm which one your hardware uses?
> 
> Hi Ilias
> 
> Ah, interesting.
> 
> # CONFIG_MVNETA_BM_ENABLE is not set
> 
> So in fact it is not being compiled in, so should be falling back to
> software buffer manager.
> 
> If i do enable it, then it works. So we are in a corner cases you
> probably never tested. Requested by DT, but not actually available.
> 
> 	 Andrew

Maybe I got the issue. If mvneta_bm_port_init fails (e.g. if
CONFIG_MVNETA_BM_ENABLE is not set) rx_offset_correction will be set to a wrong
value. To bisect the issue, could you please test the following patch?

Regards,
Lorenzo

diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index 591d580c68b4..e476fb043379 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -4944,7 +4944,6 @@ static int mvneta_probe(struct platform_device *pdev)
 	SET_NETDEV_DEV(dev, &pdev->dev);
 
 	pp->id = global_port_id++;
-	pp->rx_offset_correction = MVNETA_SKB_HEADROOM;
 
 	/* Obtain access to BM resources if enabled and already initialized */
 	bm_node = of_parse_phandle(dn, "buffer-manager", 0);
@@ -4969,6 +4968,9 @@ static int mvneta_probe(struct platform_device *pdev)
 	}
 	of_node_put(bm_node);
 
+	if (!pp->bm_priv)
+		pp->rx_offset_correction = MVNETA_SKB_HEADROOM;
+
 	err = mvneta_init(&pdev->dev, pp);
 	if (err < 0)
 		goto err_netdev;


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2019-11-11 15:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-11 13:46 Regression in mvneta with XDP patches Andrew Lunn
2019-11-11 14:33 ` Ilias Apalodimas
2019-11-11 15:05   ` Andrew Lunn
2019-11-11 15:14     ` Lorenzo Bianconi [this message]
2019-11-11 15:45       ` Andrew Lunn
2019-11-11 15:15     ` Ilias Apalodimas
2019-11-11 14:37 ` Lorenzo Bianconi
2019-11-11 15:09   ` Andrew Lunn
2019-11-11 15:12     ` Ilias Apalodimas

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=20191111151436.GC4197@localhost.localdomain \
    --to=lorenzo@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=brouer@redhat.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=netdev@vger.kernel.org \
    /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).