On Mon, May 30, 2016 at 11:41:22PM +0200, Lino Sanfilippo wrote:
>
> Did you see the same issues with the patch before (the one that, as you wrote,
> survived a whole night of stress testing)?
>
> Lino
Hi Lino,
Sorry for my late reply. I retested the previous patch, it did have
the same issue. H
On Wed, May 25, 2016 at 01:56:20AM +0200, Lino Sanfilippo wrote:
> Francois, Shuyu,
>
> this is the patch with the discussed changes.
>
> Shuyu it would be great if you could test this one. If it passes
> and there are no further objections I will resend it as a regular patch
> (including commit
On Sun, May 22, 2016 at 01:30:27PM +0200, Lino Sanfilippo wrote:
>
> Thanks for testing. However that extra check for skb not being NULL should
> not be
> necessary if the code were correct. The changes I suggested were all about
> having
> skb and info consistent with txbd_curr.
> But I just re
On Sun, May 22, 2016 at 12:58:55AM +0200, Lino Sanfilippo wrote:
> --- a/drivers/net/ethernet/arc/emac_main.c
> +++ b/drivers/net/ethernet/arc/emac_main.c
> @@ -162,7 +162,13 @@ static void arc_emac_tx_clean(struct net_device *ndev)
> struct sk_buff *skb = tx_buff->skb;
>
Looks like I got it wrong in the first place.
priv->tx_buff is not for the device, so there's no need to move it.
The race has been fixed by commit c278c253f3d9, I forgot to check
it out. That's my fault.
I do find another problem. We need to use a barrier to make sure
skb_tx_timestamp() is calle
On Thu, May 19, 2016 at 11:15:56PM +0200, Lino Sanfilippo wrote:
> drivers/net/ethernet/arc/emac_main.c | 33 +
> 1 file changed, 17 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/net/ethernet/arc/emac_main.c
> b/drivers/net/ethernet/arc/emac_main.c
> ind
Setting the FOR_EMAC flag should be the last step of modifying the buffer
descriptor, or possible racing will occur.
The loop counter i in tx_clean() is not needed, and we need to make sure
it does not clear the finished txbds.
Signed-off-by: Shuyu Wei
---
Changes in v2:
- Remove loop counter
On Sun, May 15, 2016 at 11:19:53AM +0200, Francois Romieu wrote:
>
> static void arc_emac_tx_clean(struct net_device *ndev)
> {
> [...]
> for (i = 0; i < TX_BD_NUM; i++) {
> unsigned int *txbd_dirty = &priv->txbd_dirty;
> struct arc_emac_bd *txbd = &priv->tx
Sorry, the last two lines is wrong, ignore it.
I mean I intended to ignore one or two packets.
It's just a trade-off for performance, but it
doesn't cause any memory leak.
On Sat, May 14, 2016 at 10:03:56PM +0200, Francois Romieu wrote:
> Shuyu Wei :
> > The tail of the ring buffer(txbd_dirty) should never go ahead of the
> > head(txbd_curr) or the ring buffer will corrupt.
> >
> > This is the root cause of racing.
>
> No (se
: Shuyu Wei
---
diff --git a/drivers/net/ethernet/arc/emac_main.c
b/drivers/net/ethernet/arc/emac_main.c
index a3a9392..5ece05b 100644
--- a/drivers/net/ethernet/arc/emac_main.c
+++ b/drivers/net/ethernet/arc/emac_main.c
@@ -155,7 +155,7 @@ static void arc_emac_tx_clean(struct net_device *ndev
11 matches
Mail list logo