[ovs-dev] [PATCH] ofproto: Fix code that keeps track of MTU.

Ben Pfaff blp at nicira.com
Mon Mar 12 20:25:03 UTC 2012


Thanks, I pushed this.

On Mon, Mar 12, 2012 at 01:11:13PM -0700, Ethan Jackson wrote:
> Looks good, thanks.
> 
> Ethan
> 
> On Mon, Mar 12, 2012 at 12:59, Ben Pfaff <blp at nicira.com> wrote:
> > ofport_install() should set the MTU that it finds into the ofport
> > before calling set_internal_devs_mtu(), because the latter function might
> > change the MTU and update ofport->mtu and the caller should not incorrectly
> > overwrite its changes.
> >
> > Signed-off-by: Ben Pfaff <blp at nicira.com>
> > ---
> > Not tested.
> >
> >  ofproto/ofproto.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
> > index d03bd9b..b660a1b 100644
> > --- a/ofproto/ofproto.c
> > +++ b/ofproto/ofproto.c
> > @@ -1477,8 +1477,8 @@ ofport_install(struct ofproto *p,
> >     shash_add(&p->port_by_name, netdev_name, ofport);
> >
> >     if (!netdev_get_mtu(netdev, &dev_mtu)) {
> > -        set_internal_devs_mtu(p);
> >         ofport->mtu = dev_mtu;
> > +        set_internal_devs_mtu(p);
> >     } else {
> >         ofport->mtu = 0;
> >     }
> > --
> > 1.7.2.5
> >
> > _______________________________________________
> > dev mailing list
> > dev at openvswitch.org
> > http://openvswitch.org/mailman/listinfo/dev



More information about the dev mailing list