On Fri, Mar 30, 2012 at 2:06 PM, Ben Pfaff <b...@nicira.com> wrote:

> On Fri, Mar 23, 2012 at 06:04:50PM -0700, Ansis Atteka wrote:
> > This patch removes port from datapath before vswitchd sets ofport column
> > to -1 (e.g. if user-space attempted to create a duplicate tunnel then
> > kernel would reject config changes and leave the old tunnel with its old
> > config. Hence the user-space have to remove it)
> >
> > Signed-off-by: Ansis Atteka <aatt...@nicira.com>
>
> I don't yet understand the problem.  Can you explain, step-by-step,
> how this comes into play and what difference it makes?
>
By the way, this patch must be applied together with the other patch I sent
out previously: http://openvswitch.org/pipermail/dev/2012-March/016053.html.
Otherwise user-space would not set ofport column to -1 at all after
executing
following commands:

> ovs-vsctl add-br ovsbr
> ovs-vsctl add-port ovsbr port1
> ovs-vsctl add-port ovsbr port2
> ovs-vsctl set Interface port1 options:remote_ip=2.1.1.1 options:key=123
> type=gre
> ovs-vsctl set Interface port2 options:remote_ip=1.1.1.1 options:key=123
> type=gre
> ovs-vsctl set Interface port2 options:remote_ip=2.1.1.1 options:key=123
> type=gre
>
After you would apply that datapath patch, ofport column would
get set to -1 correctly for port2. But the datapath would still have
the port2 hanging there with the old config:

> root@aatteka-MacBookPro:~# ovs-dpctl show
> system@ovsbr:
>     lookups: hit:0 missed:0 lost:0
>     flows: 0
>     port 0: ovsbr (internal)
>     port 5: port1 (gre: key=123, remote_ip=2.1.1.1)
> *     port 6: port2 (gre: key=123, remote_ip=1.1.1.1)*
> root@aatteka-MacBookPro:~# ovs-vsctl show
> b3e2d947-529c-4bf3-80e0-d3e360a8ab55
>     Bridge ovsbr
>         Port "port2"
>             Interface "port2"
>                 type: gre
> *                 options: {key="123", remote_ip="2.1.1.1"}*
>         Port "port1"
>             Interface "port1"
>                 type: gre
>                 options: {key="123", remote_ip="2.1.1.1"}
>         Port ovsbr
>             Interface ovsbr
>                 type: internal
>     ovs_version: "1.6.90"
>
Assuming that interface is considered non-operational, when ofport
column gets set to -1. I thought that more correct behavior would be to
make user-space remove the old port2 from datapath (because it is
out of sync from OVS DB anyway).


> Thanks,
>
> Ben.
>
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to