* macb: inconsistent Rx descriptor chain after OOM
@ 2019-09-16 7:41 Andreas Schwab
2019-09-16 10:00 ` Claudiu.Beznea
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Schwab @ 2019-09-16 7:41 UTC (permalink / raw)
To: Nicolas Ferre; +Cc: netdev
When there is an OOM situation, the macb driver cannot recover from it:
[245622.872993] macb 10090000.ethernet eth0: Unable to allocate sk_buff
[245622.891438] macb 10090000.ethernet eth0: inconsistent Rx descriptor chain
After that, the interface is dead. Since this system is using NFS root,
it then stalled as a whole.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: macb: inconsistent Rx descriptor chain after OOM
2019-09-16 7:41 macb: inconsistent Rx descriptor chain after OOM Andreas Schwab
@ 2019-09-16 10:00 ` Claudiu.Beznea
2019-09-16 10:14 ` Andreas Schwab
0 siblings, 1 reply; 5+ messages in thread
From: Claudiu.Beznea @ 2019-09-16 10:00 UTC (permalink / raw)
To: schwab, Nicolas.Ferre; +Cc: netdev
Hi Andreas,
I will have a look on it. It would be good if you could give me some
details about the steps to reproduce it.
Thank you,
Claudiu Beznea
On 16.09.2019 10:41, Andreas Schwab wrote:
> When there is an OOM situation, the macb driver cannot recover from it:
>
> [245622.872993] macb 10090000.ethernet eth0: Unable to allocate sk_buff
> [245622.891438] macb 10090000.ethernet eth0: inconsistent Rx descriptor chain
>
> After that, the interface is dead. Since this system is using NFS root,
> it then stalled as a whole.
>
> Andreas.
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: macb: inconsistent Rx descriptor chain after OOM
2019-09-16 10:00 ` Claudiu.Beznea
@ 2019-09-16 10:14 ` Andreas Schwab
2019-09-16 10:16 ` Claudiu.Beznea
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Schwab @ 2019-09-16 10:14 UTC (permalink / raw)
To: Claudiu.Beznea; +Cc: Nicolas.Ferre, netdev
On Sep 16 2019, <Claudiu.Beznea@microchip.com> wrote:
> I will have a look on it. It would be good if you could give me some
> details about the steps to reproduce it.
You need to trigger OOM.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: macb: inconsistent Rx descriptor chain after OOM
2019-09-16 10:14 ` Andreas Schwab
@ 2019-09-16 10:16 ` Claudiu.Beznea
2019-09-25 10:05 ` Harini Katakam
0 siblings, 1 reply; 5+ messages in thread
From: Claudiu.Beznea @ 2019-09-16 10:16 UTC (permalink / raw)
To: schwab; +Cc: Nicolas.Ferre, netdev
On 16.09.2019 13:14, Andreas Schwab wrote:
> External E-Mail
>
>
> On Sep 16 2019, <Claudiu.Beznea@microchip.com> wrote:
>
>> I will have a look on it. It would be good if you could give me some
>> details about the steps to reproduce it.
>
> You need to trigger OOM.
Ok, thank you!
>
> Andreas.
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: macb: inconsistent Rx descriptor chain after OOM
2019-09-16 10:16 ` Claudiu.Beznea
@ 2019-09-25 10:05 ` Harini Katakam
0 siblings, 0 replies; 5+ messages in thread
From: Harini Katakam @ 2019-09-25 10:05 UTC (permalink / raw)
To: Claudiu Beznea; +Cc: schwab, Nicolas Ferre, netdev
Hi Andreas,
On Mon, Sep 16, 2019 at 4:25 PM <Claudiu.Beznea@microchip.com> wrote:
>
>
>
> On 16.09.2019 13:14, Andreas Schwab wrote:
> > External E-Mail
> >
> >
> > On Sep 16 2019, <Claudiu.Beznea@microchip.com> wrote:
> >
> >> I will have a look on it. It would be good if you could give me some
> >> details about the steps to reproduce it.
> >
> > You need to trigger OOM.
>
> Ok, thank you!
>
> >
> > Andreas.
Can you please try incrementing the rx_prepared_head after skb
allocation as follows?
@@ -920,7 +920,6 @@ static void gem_rx_refill(struct macb_queue *queue)
/* Make hw descriptor updates visible to CPU */
rmb();
- queue->rx_prepared_head++;
desc = macb_rx_desc(queue, entry);
if (!queue->rx_skbuff[entry]) {
@@ -959,6 +958,7 @@ static void gem_rx_refill(struct macb_queue *queue)
dma_wmb();
desc->addr &= ~MACB_BIT(RX_USED);
}
+ queue->rx_prepared_head++;
}
/* Make descriptor updates visible to hardware */
Without this, head will increase even when skb allocation fails. It is a valid
fix anyway and I'll patch it. But I recall a *similar* issue with inconsistent
RX BD chain that was solved by this.
Regards,
Harini
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-09-25 10:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-16 7:41 macb: inconsistent Rx descriptor chain after OOM Andreas Schwab
2019-09-16 10:00 ` Claudiu.Beznea
2019-09-16 10:14 ` Andreas Schwab
2019-09-16 10:16 ` Claudiu.Beznea
2019-09-25 10:05 ` Harini Katakam
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).