]> git.baikalelectronics.ru Git - kernel.git/commit
slcan: rewrite of slc_bump and slc_encaps
authorAndre Naujoks <nautsch2@gmail.com>
Fri, 13 Sep 2013 17:37:13 +0000 (19:37 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 20 Sep 2013 19:38:27 +0000 (15:38 -0400)
commit4824420b483e3fa6e4b3033afb840cf0625db929
treeee22a221059741689822a79aece78a3788f63264
parent622d564445cfd43406f2f5da7c990ba918533f4f
slcan: rewrite of slc_bump and slc_encaps

The old implementation was heavy on str* functions and sprintf calls.
This version is more manual, but faster.

Profiling just the printing of a 3 char CAN-id resulted in 60 instructions
for the manual method and over 2000 for the sprintf method. Bear in
mind the profiling was done against libc and not the kernel sprintf.

Together with this rewrite an issue with sending and receiving of RTR frames
has been fixed by Oliver for the cases that the DLC is not zero.

Signed-off-by: Andre Naujoks <nautsch2@gmail.com>
Tested-by: Oliver Hartkopp <socketcan@hartkopp.net>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/can/slcan.c