[ovs-dev] [netdevs 1/4] bridge: Add port to datapath before trying to retrieve device stats.
Ethan Jackson
ethan at nicira.com
Sat Aug 6 01:25:46 UTC 2011
Ah, I had noticed this problem earlier today. Thanks for fixing it.
Looks good,
Ethan
On Fri, Aug 5, 2011 at 14:42, Ben Pfaff <blp at nicira.com> wrote:
> Virtual ports such as GRE tunnels don't exist until after the port is
> added to the datapath, so without this change adding such a port yields
> a warning like the following:
>
> netdev|WARN|failed to retrieve MTU for network device gre0: No such device
> ---
> vswitchd/bridge.c | 12 ++++++------
> 1 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
> index 6a4ebe5..9b30791 100644
> --- a/vswitchd/bridge.c
> +++ b/vswitchd/bridge.c
> @@ -871,12 +871,6 @@ bridge_add_ofproto_ports(struct bridge *br)
> iface->name, strerror(error));
> }
>
> - /* Populate stats columns in new Interface rows. */
> - if (iface->netdev && !iface->cfg->mtu) {
> - iface_refresh_stats(iface);
> - iface_refresh_status(iface);
> - }
> -
> /* Add the port, if necessary. */
> if (iface->netdev && iface->ofp_port < 0) {
> uint16_t ofp_port;
> @@ -892,6 +886,12 @@ bridge_add_ofproto_ports(struct bridge *br)
> }
> }
>
> + /* Populate stats columns in new Interface rows. */
> + if (iface->netdev && !iface->cfg->mtu) {
> + iface_refresh_stats(iface);
> + iface_refresh_status(iface);
> + }
> +
> /* Delete the iface if */
> if (iface->netdev && iface->ofp_port >= 0) {
> VLOG_DBG("bridge %s: interface %s is on port %d",
> --
> 1.7.4.4
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
>
More information about the dev
mailing list