[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 25 Mar 2011 09:03:53 -0400
From: Andrew Gallatin <gallatin@...i.com>
To: Stanislaw Gruszka <sgruszka@...hat.com>
CC: netdev@...r.kernel.org, Brice Goglin <brice@...i.com>,
Stephen Hemminger <shemminger@...tta.com>,
David Howells <dhowells@...hat.com>,
Ben Hutchings <bhutchings@...arflare.com>
Subject: Re: [PATCH] myri10ge: small rx_done refactoring
On 03/25/11 07:21, Stanislaw Gruszka wrote:
> Avoid theoretical race condition regarding accessing dev->features
> NETIF_F_LRO flag, which is illustrated below.
>
> CPU1 CPU2
>
> myri10ge_clean_rx_done(): myri10ge_set_flags():
> or
> myri10ge_set_rx_csum():
>
> if (dev->features& NETIF_F_LRO)
> setup lro
> dev->features |= NETIF_F_LRO
> or
> dev->features&= ~NETIF_F_LRO;
> if (dev->features& NETIF_F_LRO)
> flush lro
>
> On the way reduce myri10ge_rx_done() number of arguments and calls by
> moving mgp->small_bytes check into that function. That reduce code size
>
> from:
> text data bss dec hex filename
> 36644 248 100 36992 9080 drivers/net/myri10ge/myri10ge.o
>
> to:
> text data bss dec hex filename
> 36037 247 100 36384 8e20 drivers/net/myri10ge/myri10ge.o
>
> on my i686 system, what should also make myri10ge_clean_rx_done()
> being faster.
>
> Signed-off-by: Stanislaw Gruszka<sgruszka@...hat.com>
Thank you very much!
Acked by: Andrew Gallatin <gallatin@...i.com>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists