[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAFcVECLwo64yduOQo21WQde_QLEw=H7iO+MWYvy2djAu=iT1fw@mail.gmail.com>
Date: Wed, 25 Sep 2019 15:35:43 +0530
From: Harini Katakam <harinik@...inx.com>
To: Claudiu Beznea <Claudiu.Beznea@...rochip.com>
Cc: schwab@...e.de, Nicolas Ferre <Nicolas.Ferre@...rochip.com>,
netdev@...r.kernel.org
Subject: Re: macb: inconsistent Rx descriptor chain after OOM
Hi Andreas,
On Mon, Sep 16, 2019 at 4:25 PM <Claudiu.Beznea@...rochip.com> wrote:
>
>
>
> On 16.09.2019 13:14, Andreas Schwab wrote:
> > External E-Mail
> >
> >
> > On Sep 16 2019, <Claudiu.Beznea@...rochip.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
Powered by blists - more mailing lists