Re: [PATCHv4 1/1] net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-11-07 Thread David Miller
From: Fabio Estevam Date: Fri, 7 Nov 2014 10:26:15 -0200 > On Fri, Nov 7, 2014 at 7:02 AM, Lothar Waßmann > wrote: >> commit 1b7bde6d659d ("net: fec: implement rx_copybreak to improve rx >> performance") >> introduced a regression for i.MX28. The swap_buffer() function doing >> the endian conv

Re: [PATCHv4 1/1] net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-11-07 Thread Fabio Estevam
On Fri, Nov 7, 2014 at 7:02 AM, Lothar Waßmann wrote: > commit 1b7bde6d659d ("net: fec: implement rx_copybreak to improve rx > performance") > introduced a regression for i.MX28. The swap_buffer() function doing > the endian conversion of the received data on i.MX28 may access memory > beyond the

[PATCHv4 1/1] net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-11-07 Thread Lothar Waßmann
commit 1b7bde6d659d ("net: fec: implement rx_copybreak to improve rx performance") introduced a regression for i.MX28. The swap_buffer() function doing the endian conversion of the received data on i.MX28 may access memory beyond the actual packet size in the DMA buffer. fec_enet_copybreak() does

[PATCHv4 0/1] net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-11-07 Thread Lothar Waßmann
Changes wrt. v1: - added some cleanup patches - simplify handling of 'quirks' flags as suggested by Russell King. - remove DIV_ROUND_UP() from byte swapping loop as suggested by Eric Dumazet Changes wrt. v2: - rebased against next-20141028 - added some more cleanups in fec.h - removed unused ret

Re: net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-11-05 Thread David Miller
From: Lothar Waßmann Date: Wed, 5 Nov 2014 06:21:48 +0100 > David Miller wrote: >> Because it goes "(n + (d - 1)) / d" >> >> Which for 'd' of 4 gives: >> >> 1 --> 4 >> 2 --> 4 >> 3 --> 4 >> 4 --> 4 >> > '1', not '4'. > The loop has to be done once for each (probably partial) WORD of input > dat

Re: net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-11-04 Thread Lothar Waßmann
Hi, David Miller wrote: > From: Lothar Waßmann > Date: Tue, 4 Nov 2014 11:29:12 +0100 > > > Hi David, > > > > Lothar Waßmann wrote: > >> David Miller wrote: > >> > From: Lothar Waßmann > >> > Date: Thu, 30 Oct 2014 07:51:04 +0100 > >> > > >> > >> Also, I don't thnk your DIV_ROUND_UP() elimina

Re: net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-11-04 Thread David Miller
From: Lothar Waßmann Date: Tue, 4 Nov 2014 11:29:12 +0100 > Hi David, > > Lothar Waßmann wrote: >> David Miller wrote: >> > From: Lothar Waßmann >> > Date: Thu, 30 Oct 2014 07:51:04 +0100 >> > >> > >> Also, I don't thnk your DIV_ROUND_UP() eliminate for the loop >> > >> in swap_buffer() is val

Re: net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-11-04 Thread Lothar Waßmann
Hi David, Lothar Waßmann wrote: > David Miller wrote: > > From: Lothar Waßmann > > Date: Thu, 30 Oct 2014 07:51:04 +0100 > > > > >> Also, I don't thnk your DIV_ROUND_UP() eliminate for the loop > > >> in swap_buffer() is valid. The whole point is that the current > > >> code handles buffers whi

Re: [PATCHv3 9/9] net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-11-03 Thread Stefan Wahren
Hi Lothar, > Lothar Waßmann hat am 28. Oktober 2014 um 14:23 > geschrieben: > > > commit 1b7bde6d659d ("net: fec: implement rx_copybreak to improve rx > performance") > introduced a regression for i.MX28. The swap_buffer() function doing > the endian conversion of the received data on i.MX28 may

Re: net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-10-30 Thread Lothar Waßmann
Hi, David Miller wrote: > From: Lothar Waßmann > Date: Thu, 30 Oct 2014 07:51:04 +0100 > > >> Also, I don't thnk your DIV_ROUND_UP() eliminate for the loop > >> in swap_buffer() is valid. The whole point is that the current > >> code handles buffers which have a length which is not a multiple >

Re: net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-10-30 Thread David Miller
From: Lothar Waßmann Date: Thu, 30 Oct 2014 07:51:04 +0100 >> Also, I don't thnk your DIV_ROUND_UP() eliminate for the loop >> in swap_buffer() is valid. The whole point is that the current >> code handles buffers which have a length which is not a multiple >> of 4 properly, after your change it

Re: net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-10-29 Thread Lothar Waßmann
Hi, David Miller wrote: > From: Lothar Waßmann > Date: Tue, 28 Oct 2014 14:22:55 +0100 > > > Changes wrt. v1: > > - added some cleanup patches > > - simplify handling of 'quirks' flags as suggested by Russell King. > > - remove DIV_ROUND_UP() from byte swapping loop as suggested by > > Eric Du

Re: net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-10-29 Thread David Miller
From: Lothar Waßmann Date: Tue, 28 Oct 2014 14:22:55 +0100 > Changes wrt. v1: > - added some cleanup patches > - simplify handling of 'quirks' flags as suggested by Russell King. > - remove DIV_ROUND_UP() from byte swapping loop as suggested by > Eric Dumazet > > Changes wrt. v2: > - rebased a

Re: [PATCHv2 6/6] net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-10-28 Thread Lothar Waßmann
Hi, David Laight wrote: > From: Lothar Waßmann > > David Laight wrote: > > > From: Lothar Waßmann > > > > commit 1b7bde6d659d ("net: fec: implement rx_copybreak to improve rx > > > > performance") > > > > introduced a regression for i.MX28. The swap_buffer() function doing > > > > the endian conv

[PATCHv3 9/9] net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-10-28 Thread Lothar Waßmann
commit 1b7bde6d659d ("net: fec: implement rx_copybreak to improve rx performance") introduced a regression for i.MX28. The swap_buffer() function doing the endian conversion of the received data on i.MX28 may access memory beyond the actual packet size in the DMA buffer. fec_enet_copybreak() does

net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-10-28 Thread Lothar Waßmann
Changes wrt. v1: - added some cleanup patches - simplify handling of 'quirks' flags as suggested by Russell King. - remove DIV_ROUND_UP() from byte swapping loop as suggested by Eric Dumazet Changes wrt. v2: - rebased against next-20141028 - added some more cleanups in fec.h - removed unused ret

RE: [PATCHv2 6/6] net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-10-28 Thread David Laight
From: Lothar Waßmann > David Laight wrote: > > From: Lothar Waßmann > > > commit 1b7bde6d659d ("net: fec: implement rx_copybreak to improve rx > > > performance") > > > introduced a regression for i.MX28. The swap_buffer() function doing > > > the endian conversion of the received data on i.MX28 m

Re: [PATCHv2 6/6] net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-10-28 Thread Lothar Waßmann
Hi, David Laight wrote: > From: Lothar Waßmann > > commit 1b7bde6d659d ("net: fec: implement rx_copybreak to improve rx > > performance") > > introduced a regression for i.MX28. The swap_buffer() function doing > > the endian conversion of the received data on i.MX28 may access memory > > beyond

Re: [PATCHv2 6/6] net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-10-28 Thread Lothar Waßmann
Hi, David Laight wrote: > From: Lothar Waßmann > > commit 1b7bde6d659d ("net: fec: implement rx_copybreak to improve rx > > performance") > > introduced a regression for i.MX28. The swap_buffer() function doing > > the endian conversion of the received data on i.MX28 may access memory > > beyond

RE: [PATCHv2 6/6] net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-10-28 Thread David Laight
From: Lothar Waßmann > commit 1b7bde6d659d ("net: fec: implement rx_copybreak to improve rx > performance") > introduced a regression for i.MX28. The swap_buffer() function doing > the endian conversion of the received data on i.MX28 may access memory > beyond the actual packet size in the DMA bu

RE: [PATCHv2 6/6] net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-10-28 Thread David Laight
From: Lothar Waßmann > commit 1b7bde6d659d ("net: fec: implement rx_copybreak to improve rx > performance") > introduced a regression for i.MX28. The swap_buffer() function doing > the endian conversion of the received data on i.MX28 may access memory > beyond the actual packet size in the DMA buf

[PATCHv2 0/6] net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-10-28 Thread Lothar Waßmann
Changes wrt. v1: - added some cleanup patches - simplify handling of 'quirks' flags as suggested by Russell King. - remove DIV_ROUND_UP() from byte swapping loop as suggested by Eric Dumazet Subject: In-Reply-To: -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in th

[PATCHv2 6/6] net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-10-28 Thread Lothar Waßmann
commit 1b7bde6d659d ("net: fec: implement rx_copybreak to improve rx performance") introduced a regression for i.MX28. The swap_buffer() function doing the endian conversion of the received data on i.MX28 may access memory beyond the actual packet size in the DMA buffer. fec_enet_copybreak() does

Re: [PATCH] net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-10-08 Thread Russell King - ARM Linux
On Wed, Oct 08, 2014 at 08:54:58AM +, David Laight wrote: > Hmmm... in that case you may not want the compiler to convert the bit value > to a 'bool' at all. > > Passing 'id_entry->driver_data' through (that doesn't look like a field name > for > 'quirk flags) would generate better code. > >

Re: [PATCH] net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-10-08 Thread Lothar Waßmann
Hi, David Laight wrote: > From: Lothar Waßmann > > David Laight wrote: > > > From: Eric Dumazet > > > > On Tue, 2014-10-07 at 15:19 +0200, Lothar Wamann wrote: > > > > > commit 1b7bde6d659d ("net: fec: implement rx_copybreak to improve rx > > > > > performance") > > > > > introduced a regression

RE: [PATCH] net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-10-08 Thread David Laight
From: Sergei Shtylyov > On 10/07/2014 05:19 PM, Lothar Wamann wrote: > > > commit 1b7bde6d659d ("net: fec: implement rx_copybreak to improve rx > > performance") > > introduced a regression for i.MX28. The swap_buffer() function doing > > the endian conversion of the received data on i.MX28 may a

RE: [PATCH] net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-10-08 Thread David Laight
From: Lothar Waßmann > David Laight wrote: > > From: Eric Dumazet > > > On Tue, 2014-10-07 at 15:19 +0200, Lothar Wamann wrote: > > > > commit 1b7bde6d659d ("net: fec: implement rx_copybreak to improve rx > > > > performance") > > > > introduced a regression for i.MX28. The swap_buffer() function

Re: [PATCH] net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-10-07 Thread Lothar Waßmann
Hi, David Laight wrote: > From: Eric Dumazet > > On Tue, 2014-10-07 at 15:19 +0200, Lothar Wamann wrote: > > > commit 1b7bde6d659d ("net: fec: implement rx_copybreak to improve rx > > > performance") > > > introduced a regression for i.MX28. The swap_buffer() function doing > > > the endian conve

Re: [PATCH] net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-10-07 Thread Lothar Waßmann
Hi, David Laight wrote: > From: Lothar > > David Laight wrote: > > > From: Lothar Waßmann > > > > commit 1b7bde6d659d ("net: fec: implement rx_copybreak to improve rx > > > > performance") > > > > introduced a regression for i.MX28. The swap_buffer() function doing > > > > the endian conversion o

Re: [PATCH] net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-10-07 Thread Lothar Waßmann
Hi, David Miller wrote: > From: Lothar Waßmann > Date: Tue, 7 Oct 2014 15:19:37 +0200 > > > commit 1b7bde6d659d ("net: fec: implement rx_copybreak to improve rx > > performance") > > introduced a regression for i.MX28. The swap_buffer() function doing > > the endian conversion of the received

Re: [PATCH] net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-10-07 Thread David Miller
From: Lothar Waßmann Date: Tue, 7 Oct 2014 15:19:37 +0200 > commit 1b7bde6d659d ("net: fec: implement rx_copybreak to improve rx > performance") > introduced a regression for i.MX28. The swap_buffer() function doing > the endian conversion of the received data on i.MX28 may access memory > beyo

Re: [PATCH] net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-10-07 Thread Sergei Shtylyov
Hello. On 10/07/2014 05:19 PM, Lothar Waßmann wrote: commit 1b7bde6d659d ("net: fec: implement rx_copybreak to improve rx performance") introduced a regression for i.MX28. The swap_buffer() function doing the endian conversion of the received data on i.MX28 may access memory beyond the actual

RE: [PATCH] net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-10-07 Thread David Laight
From: Eric Dumazet > On Tue, 2014-10-07 at 15:19 +0200, Lothar Wamann wrote: > > commit 1b7bde6d659d ("net: fec: implement rx_copybreak to improve rx > > performance") > > introduced a regression for i.MX28. The swap_buffer() function doing > > the endian conversion of the received data on i.MX28

RE: [PATCH] net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-10-07 Thread Eric Dumazet
On Tue, 2014-10-07 at 14:23 +, David Laight wrote: > The point I was making is that if you have to do a read-write of the received > data (to byteswap it) then you might as well always copy it into a new skb > that > is just big enough for the actual receive frame. +1 -- To unsubscribe fro

Re: [PATCH] net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-10-07 Thread Eric Dumazet
On Tue, 2014-10-07 at 15:19 +0200, Lothar Waßmann wrote: > commit 1b7bde6d659d ("net: fec: implement rx_copybreak to improve rx > performance") > introduced a regression for i.MX28. The swap_buffer() function doing > the endian conversion of the received data on i.MX28 may access memory > beyond t

RE: [PATCH] net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-10-07 Thread David Laight
From: Lothar > David Laight wrote: > > From: Lothar Waßmann > > > commit 1b7bde6d659d ("net: fec: implement rx_copybreak to improve rx > > > performance") > > > introduced a regression for i.MX28. The swap_buffer() function doing > > > the endian conversion of the received data on i.MX28 may acces

Re: [PATCH] net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-10-07 Thread Lothar Waßmann
Hi, David Laight wrote: > From: Lothar Waßmann > > commit 1b7bde6d659d ("net: fec: implement rx_copybreak to improve rx > > performance") > > introduced a regression for i.MX28. The swap_buffer() function doing > > the endian conversion of the received data on i.MX28 may access memory > > beyond

Re: [PATCH] net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-10-07 Thread Fabio Estevam
Hi Lothar, On Tue, Oct 7, 2014 at 10:19 AM, Lothar Waßmann wrote: > commit 1b7bde6d659d ("net: fec: implement rx_copybreak to improve rx > performance") > introduced a regression for i.MX28. The swap_buffer() function doing > the endian conversion of the received data on i.MX28 may access memor

RE: [PATCH] net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-10-07 Thread David Laight
From: Lothar Waßmann > commit 1b7bde6d659d ("net: fec: implement rx_copybreak to improve rx > performance") > introduced a regression for i.MX28. The swap_buffer() function doing > the endian conversion of the received data on i.MX28 may access memory > beyond the actual packet size in the DMA buf

[PATCH] net: fec: fix regression on i.MX28 introduced by rx_copybreak support

2014-10-07 Thread Lothar Waßmann
commit 1b7bde6d659d ("net: fec: implement rx_copybreak to improve rx performance") introduced a regression for i.MX28. The swap_buffer() function doing the endian conversion of the received data on i.MX28 may access memory beyond the actual packet size in the DMA buffer. fec_enet_copybreak() does