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

Ethan Jackson ethan at nicira.com
Wed Jan 5 20:27:40 UTC 2011


Alright,  I'll go ahead and remove get_tnl_egress_iface and replace it
with a new netdev_get_stats function.

On Wed, Jan 5, 2011 at 2:23 PM, Jesse Gross <jesse at nicira.com> wrote:
> On Wed, Jan 5, 2011 at 3:22 PM, Ben Pfaff <blp at nicira.com> wrote:
>> 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?
>
> Yeah, I was thinking of something along those lines.
>




More information about the dev mailing list