[ovs-dev] [PATCH] datapath: Consider tunnels to have no MTU, fixing jumbo frame support.

Jesse Gross jesse at nicira.com
Fri Feb 4 01:36:42 UTC 2011


On Tue, Feb 1, 2011 at 11:32 AM, Ben Pfaff <blp at nicira.com> wrote:
> On Mon, Jan 31, 2011 at 11:53:06AM -0800, Jesse Gross wrote:
>> On Thu, Jan 13, 2011 at 3:58 PM, Ben Pfaff <blp at nicira.com> wrote:
>> > diff --git a/datapath/tunnel.c b/datapath/tunnel.c
>> > index 46f966b..08d2552 100644
>> > --- a/datapath/tunnel.c
>> > +++ b/datapath/tunnel.c
>> > @@ -720,13 +719,9 @@ static bool check_mtu(struct sk_buff *skb,
>> > ? ? ? ?__be16 frag_off;
>> >
>> > ? ? ? ?frag_off = (mutable->port_config.flags & TNL_F_PMTUD) ? htons(IP_DF) : 0;
>> > - ? ? ? if (frag_off)
>> > - ? ? ? ? ? ? ? mtu = dst_mtu(&rt_dst(rt))
>> > - ? ? ? ? ? ? ? ? ? ? ? - ETH_HLEN
>> > - ? ? ? ? ? ? ? ? ? ? ? - mutable->tunnel_hlen
>> > - ? ? ? ? ? ? ? ? ? ? ? - (eth_hdr(skb)->h_proto == htons(ETH_P_8021Q) ? VLAN_HLEN : 0);
>> > - ? ? ? else
>> > - ? ? ? ? ? ? ? mtu = mutable->mtu;
>> > + ? ? ? mtu = dst_mtu(&rt_dst(rt)) - ETH_HLEN - mutable->tunnel_hlen;
>> > + ? ? ? if (eth_hdr(skb)->h_proto)
>> > + ? ? ? ? ? ? ? mtu -= VLAN_HLEN;
>> >
>> > ? ? ? ?if (skb->protocol == htons(ETH_P_IP)) {
>> > ? ? ? ? ? ? ? ?struct iphdr *old_iph = ip_hdr(skb);
>>
>> I don't think this section is right because it will effectively always
>> force PMTUD on inside tunnels.  However, I believe that the patch that
>> I sent out that touches this area will avoid the problem, as it drops
>> usage of mutable->mtu here.
>
> Thanks.  I verified that stacking my patch on top of yours, dropping my
> changes to check_mtu(), worked OK.
>
>> Also, I think that this was added after the patch was written but just
>> so it doesn't get lost: bridge.c now calls netdev_get_mtu() to put the
>> MTU in the database.  This should probably now check that we have an
>> MTU.
>
> Thanks, I made that update.
>
>> Otherwise looks good.
>
> There were lots of conflicts on the rebase, and I can't usefully push
> this until you push your change, so here's the new version.

Acked-by: Jesse Gross <jesse at nicira.com>

I've pushed my patch now, so we should be good to go.




More information about the dev mailing list