I confirm that reverting the commit fixes the warning.
Shreyas, can you provide a proper fix for this bug (see
http://www.spinics.net/lists/netdev/msg189554.html for details).
As far as I understand it you can not claim a fake transport layer header
size for udp and blindly check the available buffer size through
pskb_may_pull later. With a 32 bits HIGHMEM guest config (yuck...) it ends
up enabling bh within a network device start_xmit context.
--
Ueimor
I confirm that reverting the commit fixes the warning.
Shreyas, can you provide a proper fix for this bug (see
http://www.spinics.net/lists/netdev/msg189554.html for details).
As far as I understand it you can not claim a fake transport layer header
size for udp and blindly check the available buffer size through
pskb_may_pull later. With a 32 bits HIGHMEM guest config (yuck...) it ends
up enabling bh within a network device start_xmit context.
Hmm, I am not sure we still need local_bh_disable()/local_bh_enable() in
kmap_skb_frag()/ kunmap_skb_frag() anymore after commit 3e4d3af501ccc
(mm: stack based kmap_atomic() )
From: Peter Zijlstra <peterz@infradead.org> Date: 2012-02-23 13:22:43
On Thu, 2012-02-23 at 12:53 +0100, Eric Dumazet wrote:
Hmm, I am not sure we still need local_bh_disable()/local_bh_enable() in
kmap_skb_frag()/ kunmap_skb_frag() anymore after commit 3e4d3af501ccc
(mm: stack based kmap_atomic() )
The only thing to consider is keeping the total stack size under
control, this is somewhat non-trivial since its non-obvious what all
nests.
That said, you're probably right, and we do have a WARN in there
(dependent on CONFIG_DEBUG_HIGHMEM) that yells if we exceed the
available stack size.
The more 'interesting' exercise is determining a better upper bound on
the stack size and updating kmap_types.h accordingly.
The nicer patch would of course be a patch that does:
s/kunmap_skb_frag/kunmap_atomic/
s/kmap_skb_frag(\([^)]*\))/kmap_atomic(skb_frag_page(\1))/
There is no need to retain the KM_* argument and the 'helper' functions
are quite pointless at that point.
From: Eric Dumazet <hidden> Date: 2012-02-23 14:21:15
Le jeudi 23 février 2012 à 14:22 +0100, Peter Zijlstra a écrit :
On Thu, 2012-02-23 at 12:53 +0100, Eric Dumazet wrote:
quoted
Hmm, I am not sure we still need local_bh_disable()/local_bh_enable() in
kmap_skb_frag()/ kunmap_skb_frag() anymore after commit 3e4d3af501ccc
(mm: stack based kmap_atomic() )
The only thing to consider is keeping the total stack size under
control, this is somewhat non-trivial since its non-obvious what all
nests.
That said, you're probably right, and we do have a WARN in there
(dependent on CONFIG_DEBUG_HIGHMEM) that yells if we exceed the
available stack size.
The more 'interesting' exercise is determining a better upper bound on
the stack size and updating kmap_types.h accordingly.
I would say its the same logic than crypto : We might use at most two
contexts for SKB frags : USER or SOFTIRQ
We probably can remove KM_SKB_DATA_SOFTIRQ slot and use fact that this
kmap user can reuse existing USER/SOFTIRQ slots
The nicer patch would of course be a patch that does:
s/kunmap_skb_frag/kunmap_atomic/
s/kmap_skb_frag(\([^)]*\))/kmap_atomic(skb_frag_page(\1))/
There is no need to retain the KM_* argument and the 'helper' functions
are quite pointless at that point.
Well, definitely a cleanup is possible, but probably not suitable for
3.3 and stable kernels ?
As far as I understand it you can not claim a fake transport layer header
size for udp and blindly check the available buffer size through
pskb_may_pull later. With a 32 bits HIGHMEM guest config (yuck...) it ends
up enabling bh within a network device start_xmit context.
Right, lying about the transport header size is going to give you nothing
but trouble, you absolutely cannot do this or networking breaks, and your
transmit handler doesn't run in a context where you can legally "fix"
things up.
We recently fixed even IPoIB in this regard.
I confirm that reverting the commit fixes the warning.
Shreyas, can you provide a proper fix for this bug (see
http://www.spinics.net/lists/netdev/msg189554.html for details).
As far as I understand it you can not claim a fake transport layer
header
size for udp and blindly check the available buffer size through
pskb_may_pull later. With a 32 bits HIGHMEM guest config (yuck...) it
ends
up enabling bh within a network device start_xmit context.
--
Ueimor
Just sent a patch to fix the transport header size.
Thanks.
Shreyas