On Mon, 2008-05-05 at 17:08 -0700, David Miller wrote: > From: Johannes Berg > Date: Tue, 06 May 2008 02:01:16 +0200 > > > Right. I just checked, and realised I remembered wrongly, wpa_supplicant > > actually binds the socket to the ethertype it wants so > > dev_queue_xmit_nit() shouldn't be called. I'll have to check why I got > > so many cloned packets, best see if it still happens with the > > header_cloned() change. > > skb_cloned() is fine, that's what every TCP packet is. > > skb_header_cloned() is what we expect to be false > > I look forward to the results of your investigation :-) This is indeed the case. With that patch of yours (plus changes to make it print out things) I occasionally see header-cloned SKBs [1] and due to my spacing patch haven't yet seen one that didn't have enough headroom. So this will optimise TCP a lot. I haven't tried bridging yet as AP mode is rather unstable at the moment. johannes [1] those coming from ipv6, udp (possibly zeroconf stuff): [34805.481404] MAC80211: got header cloned skb [34805.481422] [] __copy_skb_header+0x1bc/0x20c [34805.481449] [] __skb_clone+0x2c/0xf4 [34805.481459] [] dev_hard_start_xmit+0xf0/0x2f0 [34805.481473] [] __qdisc_run+0x248/0x27c [34805.481488] [] dev_queue_xmit+0x300/0x3cc [34805.481498] [] ip6_output_finish+0xac/0x12c [34805.481515] [] ip6_output+0x56c/0xe64 [34805.481524] [] ip6_local_out+0x34/0x48 [34805.481533] [] ip6_push_pending_frames+0x3c4/0x524 [34805.481542] [] udp_v6_push_pending_frames+0x1e0/0x340 [34805.481559] [] udpv6_sendmsg+0x744/0xa24 [34805.481569] [] inet_sendmsg+0x4c/0x78 [34805.481580] [] sock_sendmsg+0xac/0xe4 [34805.481589] [] sys_sendmsg+0x1e4/0x2a0 [34805.481599] [] sys_socketcall+0xcc/0x1dc [34805.481608] [] ret_from_syscall+0x0/0x38 [34789.711392] MAC80211: got header cloned skb [34789.711411] [] __copy_skb_header+0x1bc/0x20c [34789.711438] [] __skb_clone+0x2c/0xf4 [34789.711448] [] dev_hard_start_xmit+0xf0/0x2f0 [34789.711462] [] __qdisc_run+0x248/0x27c [34789.711478] [] dev_queue_xmit+0x300/0x3cc [34789.711487] [] ip_finish_output+0x1e8/0x354 [34789.711504] [] ip_local_out+0x34/0x48 [34789.711514] [] ip_push_pending_frames+0x2a4/0x3d8 [34789.711525] [] udp_push_pending_frames+0x128/0x39c [34789.711543] [] udp_sendmsg+0x348/0x660 [34789.711553] [] inet_sendmsg+0x4c/0x78 [34789.711564] [] sock_sendmsg+0xac/0xe4 [34789.711574] [] sys_sendmsg+0x1e4/0x2a0 [34789.711583] [] sys_socketcall+0xcc/0x1dc [34789.711593] [] ret_from_syscall+0x0/0x38