Hi,

Ethan's change caused a merge conflict for bridge.c .. I have made some
more incremental changes to the existing patch.
Does it look good?

diff --cc vswitchd/bridge.c

index 2ea146c,56203b9..0000000

--- a/vswitchd/bridge.c

+++ b/vswitchd/bridge.c

@@@ -215,7 -219,15 +215,6 @@@ static void iface_refresh_cfm_stats(str

  static void iface_refresh_stats(struct iface *);

  static void iface_refresh_status(struct iface *);

  static bool iface_is_synthetic(const struct iface *);

-

 -static const char *get_interface_other_config(const struct
ovsrec_interface *,
 -                                              const char *key,

 -                                              const char *default_value);

 -static const char *controller_get_other_config(const struct
ovsrec_controller *,
 -                                               const char *key,

 -                                               const char
*default_value);
 -static void controller_configure_dscp(const struct ovsrec_controller *c,

 -                                      struct ofproto_controller *oc);

 -

  static void shash_from_ovs_idl_map(char **keys, char **values, size_t n,

                                     struct shash *);

  static void shash_to_ovs_idl_map(struct shash *,

@@@ -2337,6 -2345,6 +2336,8 @@@ static voi

  bridge_ofproto_controller_from_ovsrec(const struct ovsrec_controller *c,

                                        struct ofproto_controller *oc)

  {

++    const char *config_str;

++

      oc->target = c->target;

      oc->max_backoff = c->max_backoff ? *c->max_backoff / 1000 : 8;

      oc->probe_interval = c->inactivity_probe ? *c->inactivity_probe /
1000 : 5;
@@@ -2347,6 -2355,7 +2348,12 @@@

                         ? *c->controller_burst_limit : 0);

      oc->enable_async_msgs = (!c->enable_async_messages

                               || *c->enable_async_messages);

 -    controller_configure_dscp (c, oc);

++    config_str = ovsrec_controller_get_other_config_value(c, "dscp",
NULL);
++    if (config_str) {

++        oc->dscp = atoi(config_str);

++    } else {

++        oc->dscp = DSCP_DEFAULT;

++    }

  }



  /* Configures the IP stack for 'br''s local interface properly according
to the
@@@ -3273,6 -3267,34 +3280,7 @@@ iface_is_synthetic(const struct iface *

  {

      return ovsdb_idl_row_is_synthetic(&iface->cfg->header_);

  }

+

 -/* Returns the user configured "other_config:key" value for controller.
If no
 - * value is configured by the user, returns the default value. */

 -static const char *

 -controller_get_other_config(const struct ovsrec_controller *controller,

 -                            const char *key,

 -                            const char *default_value)

 -{

 -    const char *value;

 -    value = get_ovsrec_key_value(controller->key_other_config,

 -                                 controller->value_other_config,

 -                                 controller->n_other_config, key);

 -    return value ? value : default_value;

 -}

 -

 -/* Extracts the dscp values for the controller. */

 -static void

 -controller_configure_dscp(const struct ovsrec_controller *c,

 -                          struct ofproto_controller *oc)

 -{

 -    char default_value[5];

 -

 -    snprintf(default_value, sizeof(default_value), "%d", DSCP_DEFAULT);

 -    oc->dscp  = atoi(controller_get_other_config(c,

 -                                                 "dscp",

 -                                                 default_value));

 -}

 -

  ^L

  /* Port mirroring. */


thanx!
mehak

On Fri, Mar 23, 2012 at 3:54 PM, Ben Pfaff <b...@nicira.com> wrote:

> On Fri, Mar 23, 2012 at 03:49:44PM -0700, Mehak Mahajan wrote:
> > The changes allow the user to specify a separate dscp value for the
> > controller connection and the manager connection. The value will take
> > effect on resetting the connections. If no value is specified a default
> > value of 192 is chosen for each of the connections.
> >
> > Feature #10074
> > Requested-by: Rajiv Ramanathan <rramanat...@nicira.com>
> > Signed-off-by: Mehak Mahajan <mmaha...@nicira.com>
>
> Looks good to me.
>
> Thank you!
>
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to