lkml.org 
[lkml]   [2007]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: expected behavior of PF_PACKET on NETIF_F_HW_VLAN_RX device?
>>The code in AF_PACKET should fix the skb before passing to user
>>space so that there is no difference between accel and non-accel
>>hardware. Internal choices shouldn't leak to user space. Ditto,
>>the receive checksum offload should be fixed up as well.
>
>
> yep. bad csum on tx packets as reported by tcpdump is also an issue.

With TX CKO enabled, there isn't any checksum to fixup when a tx packet is
sniffed, so I'm not sure what can be done in the kernel apart from an
unpalatable "disable CKO and all which depend upon it when entering promiscuous
mode." Having the tap calculate a checksum would be equally bad for
performance, and would frankly be incorrect anyway because it would give the
user the false impression that was the checksum which went-out onto the wire.

One could I suppose try to ammend the information passed to allow tcpdump to say
"oh, this was a tx packet on the same machine on which I am tracing so don't
worry about checksum mismatch" but I have to wonder if it is _really_ worth it.
Already someone has to deal with seeing TCP segments >> the MSS thanks to TSO.
(Actually tcpdump got rather confused about that too since the IP length of
those was 0, but IIRC we got that patched to use the length of zero as a "ah,
this was TSO so wing it" heuristic.)

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

\
 
 \ /
  Last update: 2007-11-01 22:53    [W:2.019 / U:0.736 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site