]> git.baikalelectronics.ru Git - kernel.git/commit
ravb: minimize TX data copying
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Sat, 25 Jul 2015 20:42:01 +0000 (23:42 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Jul 2015 08:22:38 +0000 (01:22 -0700)
commitf1a378b6d0ef8fc8eff2db0632a571dad39f6eac
tree5d65107c25abf0912aacc61ea3ecb97796a2f464
parent41de73fe5e387cca94caf1f9a097ea58d195a47e
ravb: minimize TX data copying

Renesas Ethernet AVB controller requires that all data are aligned on 4-byte
boundary.  While it's  easily achievable for  the RX  data with  the help of
skb_reserve() (we even align on 128-byte boundary as recommended by the manual),
we  can't  do the same with the TX data, and it always comes  unaligned from
the networking core. Originally we solved it an easy way, copying all packet
to  a  preallocated  aligned buffer; however, it's enough to copy only up to
3 first bytes from each packet, doing the transfer using 2 TX descriptors
instead of just 1. Here's an implementation of the new  TX algorithm that
significantly reduces the driver's memory requirements.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/renesas/ravb.h
drivers/net/ethernet/renesas/ravb_main.c