All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Eric Dumazet' <eric.dumazet@gmail.com>,
	Kegl Rohit <keglrohit@gmail.com>,
	Fabio Estevam <festevam@gmail.com>
Cc: netdev <netdev@vger.kernel.org>
Subject: RE: net: fec: rx descriptor ring out of order
Date: Thu, 12 Nov 2020 11:10:30 +0000	[thread overview]
Message-ID: <a3caa320811d4399808b6185dff79534@AcuMS.aculab.com> (raw)
In-Reply-To: <ba3b594f-bfdb-c8d6-ea1e-508040cf0414@gmail.com>

From: Eric Dumazet
> Sent: 12 November 2020 10:42
> 
> On 11/12/20 7:52 AM, Kegl Rohit wrote:
> > On Wed, Nov 11, 2020 at 11:18 PM Fabio Estevam <festevam@gmail.com> wrote:
> >>
> >> On Wed, Nov 11, 2020 at 11:27 AM Kegl Rohit <keglrohit@gmail.com> wrote:
> >>>
> >>> Hello!
> >>>
> >>> We are using a imx6q platform.
> >>> The fec interface is used to receive a continuous stream of custom /
> >>> raw ethernet packets. The packet size is fixed ~132 bytes and they get
> >>> sent every 250µs.
> >>>
> >>> While testing I observed spontaneous packet delays from time to time.
> >>> After digging down deeper I think that the fec peripheral does not
> >>> update the rx descriptor status correctly.
> >>
> >> What is the kernel version that you are using?
> >
> > Sadly stuck at 3.10.108.

If you build a newer kernel it should work with your
existing userspace.

> > https://github.com/gregkh/linux/blob/v3.10.108/drivers/net/ethernet/freescale/fec_main.c
> > The rx queue status handling did not change much compared to 5.x. Only
> > the NAPI handling / clearing IRQs was changed more than once.
> > I also backported the newer NAPI handling style / clearing irqs not in
> > the irq handler but in napi_poll() => same issue.
> > The issue is pretty rare => To reproduce i have to reboot the system
> > every 3 min. Sometimes after 1~2min on the first, sometimes on the
> > ~10th reboot it will happen.
> >
> 
> Is seems some rmb() & wmb() are missing.

They are unlikely to make any difference since the 'bad'
rx status persists between calls to the receive function.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

  reply	other threads:[~2020-11-12 11:11 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAMeyCbh8vSCnr-9-odi0kg3E8BGCiETOL-jJ650qYQdsY0wxeA@mail.gmail.com>
2020-11-11 14:27 ` Fwd: net: fec: rx descriptor ring out of order Kegl Rohit
2020-11-11 15:20   ` Eric Dumazet
2020-11-11 17:51     ` David Laight
2020-11-11 18:43       ` Fabio Estevam
2020-11-11 22:10       ` Kegl Rohit
2020-11-13  7:33       ` Kegl Rohit
2020-11-13 12:21         ` Kegl Rohit
2020-11-14  1:58           ` [EXT] " Andy Duan
2020-11-14 17:36             ` Kegl Rohit
2020-11-15  7:48               ` Andy Duan
2020-11-20  7:53                 ` Kegl Rohit
2020-11-11 22:18   ` Fabio Estevam
2020-11-12  6:52     ` Kegl Rohit
2020-11-12 10:42       ` Eric Dumazet
2020-11-12 11:10         ` David Laight [this message]
2020-11-12 11:56           ` Kegl Rohit
2020-11-12 14:46             ` Eric Dumazet
2020-11-12 16:00             ` Fabio Estevam
2020-11-12  1:29   ` [EXT] Fwd: " Andy Duan
2020-11-12  7:51     ` Kegl Rohit

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=a3caa320811d4399808b6185dff79534@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=eric.dumazet@gmail.com \
    --cc=festevam@gmail.com \
    --cc=keglrohit@gmail.com \
    --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 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.