I think I'm OK with this version.  Does anyone have any objections to it?

On Tue, Feb 18, 2014 at 04:01:41PM -0800, Joe Stringer wrote:
> I asked Ethan and he suggested that Ben might have a better idea.
> 
> Ben, is this approach fine? I'm not entirely clear on what the relationship
> is between netdev types and datapath port types.
> 
> 
> On 18 February 2014 14:45, Alex Wang <al...@nicira.com> wrote:
> 
> > Acked-by: Alex Wang <al...@nicira.com>
> >
> > Ethan,
> >
> > Could you have a look of this patch?  Do you think get_vport_type() is
> > the right place?
> >
> > Thanks,
> > Alex Wang,
> >
> >
> >
> > On Tue, Feb 18, 2014 at 2:26 PM, Joe Stringer <joestrin...@nicira.com>wrote:
> >
> >> When creating tap ports in dpif-linux, the "tap" type is treated the
> >> same as "system", and the type is discarded. When dumping datapath
> >> port types, this would cause "tap" type to be reported as a "system"
> >> type.
> >>
> >> Each time we see a port of the wrong type in bridge_reconfigure(), we
> >> remove it and add a port with the correct configuration. This would
> >> always occur for tap ports, causing deletion and re-creation of all tap
> >> ports each time the bridge was reconfigured.
> >>
> >> This patch makes dpif-linux use netdev to look up port types if the
> >> datapath reports that they are of type OVS_VPORT_TYPE_NETDEV.
> >>
> >> Bug #1196289.
> >>
> >> Reported-by: James Schmidt <jschm...@vmware.com>
> >> Signed-off-by: Joe Stringer <joestrin...@nicira.com>
> >> ---
> >> v2: Fix the issue in dpif-linux instead of ofproto-dpif.
> >> ---
> >>  lib/dpif-linux.c |    7 +++++--
> >>  1 file changed, 5 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/lib/dpif-linux.c b/lib/dpif-linux.c
> >> index f7f5292..18de118 100644
> >> --- a/lib/dpif-linux.c
> >> +++ b/lib/dpif-linux.c
> >> @@ -439,8 +439,11 @@ get_vport_type(const struct dpif_linux_vport *vport)
> >>      static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 20);
> >>
> >>      switch (vport->type) {
> >> -    case OVS_VPORT_TYPE_NETDEV:
> >> -        return "system";
> >> +    case OVS_VPORT_TYPE_NETDEV: {
> >> +        const char *type = netdev_get_type_from_name(vport->name);
> >> +
> >> +        return type ? type : "system";
> >> +    }
> >>
> >>      case OVS_VPORT_TYPE_INTERNAL:
> >>          return "internal";
> >> --
> >> 1.7.9.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

Reply via email to