Re: [patch] fixed af_packet to not lose frames and made us crazy in

Andi Kleen (ak@muc.de)
14 Mar 1999 09:29:38 +0100


andrea@e-mind.com (Andrea Arcangeli) writes:

> On Sat, 13 Mar 1999, Pavel Machek wrote:
>
> >What about kernel telling tcpdump [lost 5 frames here]? It is better
> >than silently loosing your frames. It will not go OOM. What do you
> >think?
>
> I thought about that infact. The only thing I can accpet here is to printk
> a warning every time a sock packet is losing a frame. So doing the check
> by hand and if it's ok recalling force_ and if it's not ok rejecting the
> packet kprinting something.

No. You add a counter to /proc/net/netstat. For faster accessing (reading
/proc is slow) you could also add a special getsockopt to af packet, or if
you want to get fancy a new ancillary message type that passes socket
statistics. Note that only intrumenting af_packet is not enough, you have
to cover all the OOM cases in net/core/dev.c as well.

-Andi

-- 
This is like TV. I don't like TV.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/