Thanks, applied to master, branch-1.11, branch-1.10.
On Thu, Jun 06, 2013 at 11:34:32AM -0700, Ethan Jackson wrote: > Acked-by: Ethan Jackson <et...@nicira.com> > > On Wed, Jun 5, 2013 at 1:05 PM, Ben Pfaff <b...@nicira.com> wrote: > > The ports that exist within a dpif have already been translated through > > netdev_vport_get_dpif_port(), so there is no value to translating them > > again in the interfaces that query or dump ports (and possibly a drawback > > if somehow the translation could change). > > > > After this change, dpif-netdev translates port names in just one place, > > the port_add path, which makes dpif-netdev act the same way as dpif-linux > > in this respect. > > > > Signed-off-by: Ben Pfaff <b...@nicira.com> > > --- > > lib/dpif-netdev.c | 9 ++++----- > > 1 files changed, 4 insertions(+), 5 deletions(-) > > > > diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c > > index bd00f18..9ea8d24 100644 > > --- a/lib/dpif-netdev.c > > +++ b/lib/dpif-netdev.c > > @@ -489,7 +489,7 @@ get_port_by_name(struct dp_netdev *dp, > > struct dp_netdev_port *port; > > > > LIST_FOR_EACH (port, node, &dp->port_list) { > > - if (!strcmp(netdev_vport_get_dpif_port(port->netdev), devname)) { > > + if (!strcmp(netdev_get_name(port->netdev), devname)) { > > *portp = port; > > return 0; > > } > > @@ -525,7 +525,7 @@ static void > > answer_port_query(const struct dp_netdev_port *port, > > struct dpif_port *dpif_port) > > { > > - dpif_port->name = xstrdup(netdev_vport_get_dpif_port(port->netdev)); > > + dpif_port->name = xstrdup(netdev_get_name(port->netdev)); > > dpif_port->type = xstrdup(port->type); > > dpif_port->port_no = port->port_no; > > } > > @@ -616,7 +616,7 @@ dpif_netdev_port_dump_next(const struct dpif *dpif, > > void *state_, > > struct dp_netdev_port *port = dp->ports[port_no]; > > if (port) { > > free(state->name); > > - state->name = > > xstrdup(netdev_vport_get_dpif_port(port->netdev)); > > + state->name = xstrdup(netdev_get_name(port->netdev)); > > dpif_port->name = state->name; > > dpif_port->type = port->type; > > dpif_port->port_no = port->port_no; > > @@ -1075,8 +1075,7 @@ dpif_netdev_run(struct dpif *dpif) > > } else if (error != EAGAIN && error != EOPNOTSUPP) { > > static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5); > > VLOG_ERR_RL(&rl, "error receiving data from %s: %s", > > - netdev_vport_get_dpif_port(port->netdev), > > - strerror(error)); > > + netdev_get_name(port->netdev), strerror(error)); > > } > > } > > ofpbuf_uninit(&packet); > > -- > > 1.7.2.5 > > > > _______________________________________________ > > dev mailing list > > dev@openvswitch.org > > http://openvswitch.org/mailman/listinfo/dev _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev