macb: inconsistent Rx descriptor chain after OOM
Subsystems (2)
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.
Signature · 3 lines
Andreas Schwab, SUSE Labs, [email protected] GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."
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
Quoted 10 lines · Andreas Schwab
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 chainAfter that, the interface is dead. Since this system is using NFS root, it then stalled as a whole.
Andreas.
Quoted 2 lines · On Sep 16 2019, <[email protected]> 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.
Signature · 3 lines
Andreas Schwab, SUSE Labs, [email protected] GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."
Quoted 9 lines · Andreas Schwab
External E-Mail
Quoted 2 lines · On Sep 16 2019, <[email protected]> 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!
Quoted 3 lines
Andreas.
Hi Andreas,
Quoted 7 lines · On Mon, Sep 16, 2019 at 4:25 PM <[email protected]> wrote:
Quoted 3 lines · Andreas Schwab
External E-Mail
Quoted 11 lines
Quoted 6 lines · On Sep 16 2019, <[email protected]> wrote:
Quoted 3 lines
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!
Quoted 2 lines
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