[ovs-dev] [PATCH] tunneling: Simplify path MTU discovery logic.
Ben Pfaff
blp at nicira.com
Tue Feb 1 19:41:35 UTC 2011
On Thu, Jan 27, 2011 at 06:38:27PM -0800, Jesse Gross wrote:
> Previously, if path MTU discovery was disabled we would use the
> tunnel MTU instead of the underlying route's path MTU but otherwise
> still do PMTUD. This doesn't make much sense because turning off
> PMTUD really means to not check the size of the encapsulated packets
> at all. This removes the disconnect and simplifies the logic.
>
> Signed-off-by: Jesse Gross <jesse at nicira.com>
This code is very subtle. I think it is OK now.
My compiler complains:
datapath/linux-2.6/tunnel.c: In function 'tnl_send':
datapath/linux-2.6/tunnel.c:1156: warning: 'frag_off' may be used uninitialized in this function
The compiler is wrong, but it could be made happy by changing frag_off
to be the return value and using a special value like -1 to indicate an
error. That might be more readable anyway.
frag_off has only two possible values in check_mtu() now, as far as I
can tell: 0 or htons(IP_DF). A boolean 'df' variable might be more
readable (or might not).
Acked-by: Ben Pfaff <blp at nicira.com>
More information about the dev
mailing list