Re: [U-Boot] [PATCH v2 2/2] net: davinci_emac: Invalidate only the received portion of a buffer
On Monday 15 August 2016 10:53 PM, Karl Beldan wrote: > ATM when receiving a packet the whole buffer is invalidated, this change > optimizes this behaviour. > > Signed-off-by: Karl BeldanReviewed-by: Mugunthan V N Regards Mugunthan V N ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/2] net: davinci_emac: Invalidate only the received portion of a buffer
On Mon, Aug 15, 2016 at 05:23:01PM +, Karl Beldan wrote: > ATM when receiving a packet the whole buffer is invalidated, this change > optimizes this behaviour. > > Signed-off-by: Karl BeldanReviewed-by: Tom Rini -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/2] net: davinci_emac: Invalidate only the received portion of a buffer
On Mon, Aug 15, 2016 at 12:23 PM, Karl Beldanwrote: > ATM when receiving a packet the whole buffer is invalidated, this change > optimizes this behaviour. > > Signed-off-by: Karl Beldan Acked-by: Joe Hershberger ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 2/2] net: davinci_emac: Invalidate only the received portion of a buffer
ATM when receiving a packet the whole buffer is invalidated, this change optimizes this behaviour. Signed-off-by: Karl Beldan--- drivers/net/davinci_emac.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c index 62b7a1d..f43130a 100644 --- a/drivers/net/davinci_emac.c +++ b/drivers/net/davinci_emac.c @@ -676,12 +676,12 @@ static int davinci_eth_rcv_packet (struct eth_device *dev) printf ("WARN: emac_rcv_pkt: Error in packet\n"); } else { unsigned long tmp = (unsigned long)rx_curr_desc->buffer; + unsigned short len = + rx_curr_desc->buff_off_len & 0x; - invalidate_dcache_range(tmp, tmp + EMAC_RXBUF_SIZE); - net_process_received_packet( - rx_curr_desc->buffer, - rx_curr_desc->buff_off_len & 0x); - ret = rx_curr_desc->buff_off_len & 0x; + invalidate_dcache_range(tmp, tmp + ALIGN(len, PKTALIGN)); + net_process_received_packet(rx_curr_desc->buffer, len); + ret = len; } /* Ack received packet descriptor */ -- 2.9.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot