[ovs-dev] [PATCH] tunneling: Rely on protocol handles to parse ToS.
jesse at nicira.com
Thu Mar 10 11:52:04 PST 2011
On Thu, Mar 10, 2011 at 10:00 AM, Ben Pfaff <blp at nicira.com> wrote:
> On Wed, Mar 09, 2011 at 06:41:25PM -0800, Jesse Gross wrote:
>> Currently the generic tunneling code assumes that on receive the
>> outer IP header is present on the packet and the protocol pointers
>> are initialized to it. This knowledge is used in only one place,
>> which is to copy ECN bits from outer to inner IP packets. These
>> assumptions are difficult to keep track of because the receive code
>> generally uses the protocol pointers for the inner packet. A
>> number of bugs have resulted from incorrect assumptions, including
>> one fixed here about the location of a vlan header. This drops the
>> convention and instead uses the protocol handles to supply the ToS,
>> which is less error-prone.
>> Signed-off-by: Jesse Gross <jesse at nicira.com>
> Acked-by: Ben Pfaff <blp at nicira.com>
> Unrelated stuff I noticed anyway: I think that the "inline" on
> ecn_decapsulate() is no longer kernel style. I think that the big
> comment just inside tnl_rcv() would better be just outside it, since it
> is a usage note the caller as much as it is a description of
Both good points - I dropped the inline and added a docbook-style
comment and push this.
More information about the dev