Added '-d' option to support the receive packet drop counting introduced in

http://git.kernel.org/?p=linux/kernel/git/davem/net-next-2.6.git;a=commitdiff;h=3b885787ea4112eaa80945999ea0901bf742707f

This is done by using recvmsg() instead of recvfrom() to allow the timestamp
and the dropcounter to be received within one syscall.

When the application (here 'candump') ist not fast enough to process the
incomming CAN frames the frames are dropped in the socket receive queue.
When this happens and '-d' is set, we get this info now:
DROPCOUNT: dropped 1 CAN frame on 'xxx' socket (total drops 1)
This commit is contained in:
Oliver Hartkopp
2010-01-15 18:35:37 +00:00
parent c11220e9c9
commit 3c019ea611
2 changed files with 85 additions and 11 deletions
+1
View File
@@ -46,6 +46,7 @@ MAKEFLAGS = -k
CFLAGS = -O2 -Wall -Wno-parentheses -I$(KERNELDIR)/include \
-fno-strict-aliasing \
-DSO_RXQ_OVFL=40 \
-DPF_CAN=29 \
-DAF_CAN=PF_CAN