Thread (131 messages) 131 messages, 7 authors, 2010-01-21

Re: [PATCH] af_packet: Don't use skb after dev_queue_xmit()

From: Jarek Poplawski <hidden>
Date: 2010-01-05 23:29:29
Also in: lkml

On Tue, Jan 05, 2010 at 06:16:58PM -0500, Michael Breuer wrote:
On 1/5/2010 6:07 PM, Jarek Poplawski wrote:
quoted
David Miller wrote, On 12/27/2009 05:11 AM:
quoted
From: David Miller<davem@davemloft.net>
Date: Sat, 26 Dec 2009 19:44:18 -0800 (PST)
quoted
From: Stephen Hemminger<redacted>
Date: Sat, 26 Dec 2009 14:05:44 -0800
quoted
Other drivers may have same problem, I really think this ought
to be done at higher level.
I tend to agree with you, and I thought we had handled all
cases.  Let's simply make AF_PACKET linearize the link
level header before sending things out to the transmit path.

I can work on this if you want.
Actually Stephen, I took a look and I can't see how AF_PACKET
can create this situation.

It always copies into the linear area of the SKB it allocates
for sendmsg() processing.  Whether the data comes from sendmsg
data or the mmap() ring buffer.
Actually, I think there is a bug in this place, but of course this
might be unconnected. Anyway, Michael, could you try this patch?
BTW, did you try with CONFIG_PACKET_MMAP disabled?
I did not try with CONFIG_PACKET_MMAP disabled.

Please let me know which permutations of the following would be most
valuable to test:
Davids patch in/out
The attached patch in/out
CONFIG_PACKET_MMAP on/off

I'm thinking your patch in, david's out, with and without
CONFIG_PACKET_MMAP.
I'm not sure about David's (except do it first ;-), but try my patch
with CONFIG_PACKET_MMAP on; if there is no change, CONFIG_PACKET_MMAP
off, without any patches.

Thanks,
Jarek P.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help