Hi, Ben Sorry I replied too late. Because I'm busy for other jobs during these weeks.
I use openvswitch 2.1.2, so no netdev_change_seq_changed() API to be used. Could I use seq_change() instead of netdev_change_seq_changed()? BR. Brandon 2017-02-01 7:14 GMT+08:00 Ben Pfaff <[email protected]>: > On Fri, Jan 13, 2017 at 01:03:32PM -0800, Ben Pfaff wrote: > > On Wed, Jan 11, 2017 at 04:05:51PM +0800, Brandon Cheng wrote: > > > After all statements of netdev_linux_update_flags() executed > successfully, > > > it also executes seq_change() to tell ofproto_run() something changed > to > > > update ovsdb. > > > > > > And in order to config port to linkup can update ovsdb. > > > it needs to use "a->config == b->config" instead of "&& !((a->config ^ > > > b->config) & OFPUTIL_PC_PORT_DOWN)" in the ofport_equal() of ofproto.c. > > > > > > For example: > > > step1: # ovs-ofctl mod-port br0 14 down -O openflow13 ---->although > port 16 > > > is actually down, it doesn't update ovsdb, so config of port 16 is > still up > > > in the ovsdb. > > > step2: # ovs-ofctl mod-port br0 14 up -O openflow13 ----> because > config > > > of port 16 in the ovsdb is still up, this up action will not be > executed. > > > So that this port can't be up forever. > > > > > > Is this a bug? > > > > Please test this patch. > > > > diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c > > index a5a9ec1..1eadbbd 100644 > > --- a/lib/netdev-linux.c > > +++ b/lib/netdev-linux.c > > @@ -2742,6 +2742,7 @@ update_flags(struct netdev_linux *netdev, enum > netdev_flags off, > > if (new_flags != old_flags) { > > error = set_flags(netdev_get_name(&netdev->up), new_flags); > > get_flags(&netdev->up, &netdev->ifi_flags); > > + netdev_change_seq_changed(&netdev->up); > > } > > > > return error; > > Brandon, does this fix the problem? > > Thanks, > > Ben. >
_______________________________________________ discuss mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
