[ovs-dev] [PATCH] bridge: Move tunnel_egress_iface to status column.

Ben Pfaff blp at nicira.com
Wed Jan 5 20:22:04 UTC 2011


On Wed, Jan 05, 2011 at 03:19:48PM -0500, Jesse Gross wrote:
> On Wed, Jan 5, 2011 at 2:59 PM, Ethan Jackson <ethan at nicira.com> wrote:
> > diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
> > index d505b53..b8420c0 100644
> > --- a/vswitchd/bridge.c
> > +++ b/vswitchd/bridge.c
> > @@ -1102,11 +1102,16 @@ dpid_from_hash(const void *data, size_t n)
> >  }
> >
> >  static void
> > -iface_refresh_tunnel_egress(struct iface *iface)
> > +iface_refresh_status(struct iface *iface)
> >  {
> > -    const char *name = netdev_get_tnl_iface(iface->netdev);
> > +    char *key   = "tunnel_egress_iface";
> > +    char *value = (char *)netdev_get_tnl_iface(iface->netdev);
> >
> > -    ovsrec_interface_set_tunnel_egress_iface(iface->cfg, name);
> > +    if (value) {
> > +        ovsrec_interface_set_status(iface->cfg, &key, &value, 1);
> > +    } else {
> > +        ovsrec_interface_set_status(iface->cfg, NULL, NULL, 0);
> > +    }
> >  }
> 
> I think all knowledge of the tunnel interface should be contained to
> netdev-vport.c and the things that it calls.

On second thought I agree with Jesse here.  I don't have a good
interface to suggest--maybe we need a new netdev_get_status() or some
such?




More information about the dev mailing list