On Tue, Mar 12, 2013 at 02:51:17PM -0700, Justin Pettit wrote:
> @@ -1735,6 +1737,16 @@ iface_refresh_status(struct iface *iface)
> else {
> ovsrec_interface_set_mtu(iface->cfg, NULL, 0);
> }
> +
> + error = netdev_get_etheraddr(iface->netdev, mac);
> + if (!error) {
> + char *mac_string = xasprintf(ETH_ADDR_FMT, ETH_ADDR_ARGS(mac));
Could we please use a local char[] buffer here and snprintf(), instead
of xasprintf()? We do too many malloc()s on our fast paths anyhow.
> + ovsrec_interface_set_mac_in_use(iface->cfg, mac_string);
> + free(mac_string);
> + } else {
> + ovsrec_interface_set_mac_in_use(iface->cfg, NULL);
> + }
> }
Otherwise, thanks, this looks good.
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev