Re: [PATCH net-next 19/20] net: plip: slight optimization of addr compare

2013-12-29 Thread Joe Perches
On Sun, 2013-12-29 at 23:05 +0100, Julia Lawall wrote: > After some work on getting more include files to be taken into account, I > get the following list of cases where both arguments have the form of a > field reference, the field has array type, and the field is not at the end > of the

Re: [PATCH net-next 19/20] net: plip: slight optimization of addr compare

2013-12-29 Thread Julia Lawall
> Hi Julia. > > Maybe this explanation is helpful? > > ethernet addresses are u8[6] (48 bits) > > ether_addr_equal_64bits gets passed a pointer to u8[8] > and is more efficient on 64 bit architectures than > ether_addr_equal because the test can be done with a > single compare and shift. > >

Re: [PATCH net-next 19/20] net: plip: slight optimization of addr compare

2013-12-29 Thread Julia Lawall
Hi Julia. Maybe this explanation is helpful? ethernet addresses are u8[6] (48 bits) ether_addr_equal_64bits gets passed a pointer to u8[8] and is more efficient on 64 bit architectures than ether_addr_equal because the test can be done with a single compare and shift. The idea is

Re: [PATCH net-next 19/20] net: plip: slight optimization of addr compare

2013-12-29 Thread Joe Perches
On Sun, 2013-12-29 at 23:05 +0100, Julia Lawall wrote: After some work on getting more include files to be taken into account, I get the following list of cases where both arguments have the form of a field reference, the field has array type, and the field is not at the end of the

Re: [PATCH net-next 19/20] net: plip: slight optimization of addr compare

2013-12-27 Thread Ding Tianhong
On 2013/12/28 13:11, Joe Perches wrote: > On Sat, 2013-12-28 at 13:07 +0800, Ding Tianhong wrote: >> On 2013/12/28 1:06, Joe Perches wrote: >>> On Fri, 2013-12-27 at 07:48 -0800, Eric Dumazet wrote: On Fri, 2013-12-27 at 14:49 +0800, Ding Tianhong wrote: > Use possibly more efficient

Re: [PATCH net-next 19/20] net: plip: slight optimization of addr compare

2013-12-27 Thread Joe Perches
On Sat, 2013-12-28 at 13:07 +0800, Ding Tianhong wrote: > On 2013/12/28 1:06, Joe Perches wrote: > > On Fri, 2013-12-27 at 07:48 -0800, Eric Dumazet wrote: > >> On Fri, 2013-12-27 at 14:49 +0800, Ding Tianhong wrote: > >>> Use possibly more efficient ether_addr_equal > >>> to instead of memcmp. >

Re: [PATCH net-next 19/20] net: plip: slight optimization of addr compare

2013-12-27 Thread Ding Tianhong
On 2013/12/28 1:06, Joe Perches wrote: > On Fri, 2013-12-27 at 07:48 -0800, Eric Dumazet wrote: >> On Fri, 2013-12-27 at 14:49 +0800, Ding Tianhong wrote: >>> Use possibly more efficient ether_addr_equal >>> to instead of memcmp. > [] >>> diff --git a/drivers/net/plip/plip.c

Re: [PATCH net-next 19/20] net: plip: slight optimization of addr compare

2013-12-27 Thread Ding Tianhong
On 2013/12/27 23:48, Eric Dumazet wrote: > On Fri, 2013-12-27 at 14:49 +0800, Ding Tianhong wrote: >> Use possibly more efficient ether_addr_equal >> to instead of memcmp. >> >> Cc: "David S. Miller" >> Signed-off-by: Ding Tianhong >> --- >> drivers/net/plip/plip.c | 2 +- >> 1 file changed, 1

Re: [PATCH net-next 19/20] net: plip: slight optimization of addr compare

2013-12-27 Thread Julia Lawall
> Hi Julia. > > Maybe this explanation is helpful? > > ethernet addresses are u8[6] (48 bits) > > ether_addr_equal_64bits gets passed a pointer to u8[8] > and is more efficient on 64 bit architectures than > ether_addr_equal because the test can be done with a > single compare and shift. > >

Re: [PATCH net-next 19/20] net: plip: slight optimization of addr compare

2013-12-27 Thread Joe Perches
On Fri, 2013-12-27 at 21:12 +0100, Julia Lawall wrote: > On Fri, 27 Dec 2013, Joe Perches wrote: > > > On Fri, 2013-12-27 at 07:48 -0800, Eric Dumazet wrote: > > > On Fri, 2013-12-27 at 14:49 +0800, Ding Tianhong wrote: > > > > Use possibly more efficient ether_addr_equal > > > > to instead of

Re: [PATCH net-next 19/20] net: plip: slight optimization of addr compare

2013-12-27 Thread Julia Lawall
On Fri, 27 Dec 2013, Joe Perches wrote: > On Fri, 2013-12-27 at 07:48 -0800, Eric Dumazet wrote: > > On Fri, 2013-12-27 at 14:49 +0800, Ding Tianhong wrote: > > > Use possibly more efficient ether_addr_equal > > > to instead of memcmp. > [] > > > diff --git a/drivers/net/plip/plip.c

Re: [PATCH net-next 19/20] net: plip: slight optimization of addr compare

2013-12-27 Thread Joe Perches
On Fri, 2013-12-27 at 07:48 -0800, Eric Dumazet wrote: > On Fri, 2013-12-27 at 14:49 +0800, Ding Tianhong wrote: > > Use possibly more efficient ether_addr_equal > > to instead of memcmp. [] > > diff --git a/drivers/net/plip/plip.c b/drivers/net/plip/plip.c [] > > @@ -549,7 +549,7 @@ static __be16

Re: [PATCH net-next 19/20] net: plip: slight optimization of addr compare

2013-12-27 Thread Eric Dumazet
On Fri, 2013-12-27 at 14:49 +0800, Ding Tianhong wrote: > Use possibly more efficient ether_addr_equal > to instead of memcmp. > > Cc: "David S. Miller" > Signed-off-by: Ding Tianhong > --- > drivers/net/plip/plip.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [PATCH net-next 19/20] net: plip: slight optimization of addr compare

2013-12-27 Thread Eric Dumazet
On Fri, 2013-12-27 at 14:49 +0800, Ding Tianhong wrote: Use possibly more efficient ether_addr_equal to instead of memcmp. Cc: David S. Miller da...@davemloft.net Signed-off-by: Ding Tianhong dingtianh...@huawei.com --- drivers/net/plip/plip.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH net-next 19/20] net: plip: slight optimization of addr compare

2013-12-27 Thread Joe Perches
On Fri, 2013-12-27 at 07:48 -0800, Eric Dumazet wrote: On Fri, 2013-12-27 at 14:49 +0800, Ding Tianhong wrote: Use possibly more efficient ether_addr_equal to instead of memcmp. [] diff --git a/drivers/net/plip/plip.c b/drivers/net/plip/plip.c [] @@ -549,7 +549,7 @@ static __be16

Re: [PATCH net-next 19/20] net: plip: slight optimization of addr compare

2013-12-27 Thread Julia Lawall
On Fri, 27 Dec 2013, Joe Perches wrote: On Fri, 2013-12-27 at 07:48 -0800, Eric Dumazet wrote: On Fri, 2013-12-27 at 14:49 +0800, Ding Tianhong wrote: Use possibly more efficient ether_addr_equal to instead of memcmp. [] diff --git a/drivers/net/plip/plip.c b/drivers/net/plip/plip.c

Re: [PATCH net-next 19/20] net: plip: slight optimization of addr compare

2013-12-27 Thread Joe Perches
On Fri, 2013-12-27 at 21:12 +0100, Julia Lawall wrote: On Fri, 27 Dec 2013, Joe Perches wrote: On Fri, 2013-12-27 at 07:48 -0800, Eric Dumazet wrote: On Fri, 2013-12-27 at 14:49 +0800, Ding Tianhong wrote: Use possibly more efficient ether_addr_equal to instead of memcmp. []

Re: [PATCH net-next 19/20] net: plip: slight optimization of addr compare

2013-12-27 Thread Julia Lawall
Hi Julia. Maybe this explanation is helpful? ethernet addresses are u8[6] (48 bits) ether_addr_equal_64bits gets passed a pointer to u8[8] and is more efficient on 64 bit architectures than ether_addr_equal because the test can be done with a single compare and shift. The idea is

Re: [PATCH net-next 19/20] net: plip: slight optimization of addr compare

2013-12-27 Thread Ding Tianhong
On 2013/12/27 23:48, Eric Dumazet wrote: On Fri, 2013-12-27 at 14:49 +0800, Ding Tianhong wrote: Use possibly more efficient ether_addr_equal to instead of memcmp. Cc: David S. Miller da...@davemloft.net Signed-off-by: Ding Tianhong dingtianh...@huawei.com --- drivers/net/plip/plip.c | 2

Re: [PATCH net-next 19/20] net: plip: slight optimization of addr compare

2013-12-27 Thread Ding Tianhong
On 2013/12/28 1:06, Joe Perches wrote: On Fri, 2013-12-27 at 07:48 -0800, Eric Dumazet wrote: On Fri, 2013-12-27 at 14:49 +0800, Ding Tianhong wrote: Use possibly more efficient ether_addr_equal to instead of memcmp. [] diff --git a/drivers/net/plip/plip.c b/drivers/net/plip/plip.c [] @@

Re: [PATCH net-next 19/20] net: plip: slight optimization of addr compare

2013-12-27 Thread Joe Perches
On Sat, 2013-12-28 at 13:07 +0800, Ding Tianhong wrote: On 2013/12/28 1:06, Joe Perches wrote: On Fri, 2013-12-27 at 07:48 -0800, Eric Dumazet wrote: On Fri, 2013-12-27 at 14:49 +0800, Ding Tianhong wrote: Use possibly more efficient ether_addr_equal to instead of memcmp. [] diff

Re: [PATCH net-next 19/20] net: plip: slight optimization of addr compare

2013-12-27 Thread Ding Tianhong
On 2013/12/28 13:11, Joe Perches wrote: On Sat, 2013-12-28 at 13:07 +0800, Ding Tianhong wrote: On 2013/12/28 1:06, Joe Perches wrote: On Fri, 2013-12-27 at 07:48 -0800, Eric Dumazet wrote: On Fri, 2013-12-27 at 14:49 +0800, Ding Tianhong wrote: Use possibly more efficient ether_addr_equal

[PATCH net-next 19/20] net: plip: slight optimization of addr compare

2013-12-26 Thread Ding Tianhong
Use possibly more efficient ether_addr_equal to instead of memcmp. Cc: "David S. Miller" Signed-off-by: Ding Tianhong --- drivers/net/plip/plip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/plip/plip.c b/drivers/net/plip/plip.c index 7b4ff35..26614df 100644

[PATCH net-next 19/20] net: plip: slight optimization of addr compare

2013-12-26 Thread Ding Tianhong
Use possibly more efficient ether_addr_equal to instead of memcmp. Cc: David S. Miller da...@davemloft.net Signed-off-by: Ding Tianhong dingtianh...@huawei.com --- drivers/net/plip/plip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/plip/plip.c