[ovs-dev] [PATCH] datapath: Update inner offsets when expanding headroom.

Pravin Shelar pshelar at nicira.com
Tue Mar 31 23:34:55 UTC 2015


On Tue, Mar 31, 2015 at 1:18 PM, Jesse Gross <jesse at nicira.com> wrote:
> On Tue, Mar 31, 2015 at 1:12 PM, Pravin Shelar <pshelar at nicira.com> wrote:
>> On Tue, Mar 31, 2015 at 11:44 AM, Jesse Gross <jesse at nicira.com> wrote:
>>> On Tue, Mar 31, 2015 at 11:02 AM, Pravin Shelar <pshelar at nicira.com> wrote:
>>>> On Tue, Mar 31, 2015 at 9:34 AM, Jesse Gross <jesse at nicira.com> wrote:
>>>>> skb protocol offsets are relative to the beginning of the
>>>>> buffer and therefore must be updated if the buffer size is
>>>>> expanded. Kernel functions do this automatically for existing
>>>>> fields but obviously not for anything that we backport. This
>>>>> introduces a wrapper for pskb_expand_head() to update the
>>>>> inner protocol fields that we have backported.
>>>>>
>>>>> Without this, a kernel crash can be triggered with tunnel
>>>>> packets that do not have enough headroom and need to be
>>>>> segmented.
>>>>>
>>>> which pskb_expand head actually causes this issue for vxlan?
>>>
>>> This is the result of skb_cow_head() in vxlan_xmit_skb().
>>>
>>
>> Dont we also need to fix skb_cow_head()? otherwise OVS could use
>> kernel defined function to expand skb and could skip compat version
>> entirely.
>
> skb_cow_head (and its helpers) are inline functions in the kernel
> header files. So even when we use the kernel's version it should still
> pick up our backported pskb_expand_head() and by intercepting the
> calls there we should pick up a wider set of callers.

I do not see gso.h included in skbuff.h where skb_cow_head() is defined.



More information about the dev mailing list