The attachment contains an UNTESTED patch (though a similar patch was tested with a 3.10 kernel).
We've been chasing a bug where packet corruption is seen on a tap device. We have a PACKET_MMAP socket which is bound to a tap interface. When throughput goes above a threshold, we begin to see that packets received on the tap device are truncated, or otherwise corrupted. We found that when packets are enqueued to the tap device, they are fine, but by the time they are read, they can be corrupted. And we found that simply deferring the call to skb_orphan() (where the destructor, tpacket_destruct_skb() marks the frame as TP_STATUS_AVAILABLE) fixes the problem. Maybe there's a better fix, but this worked for us. Thoughts? (Please CC me on replies - I'm not subscribed.) -- Arthur
tun_defer_skb_orphan.patch
Description: tun_defer_skb_orphan.patch