No subject


Fri Jun 29 21:31:54 UTC 2012


* Start openvswitch and create a few internal interfaces.
* Stop openvswitch, remove kernel module, re-insmod it and start ovsdb-server.
* Start ovs-vswitchd in gdb.

* Code stores the value of ofport  in the "struct if_cfg -> ofport"
datastructure for each interface.
* Go through each interface, and through iface_clear_db_record make
its ofport as -1. Commit it to DB. Values can actually be seen in the
database at this point and all are -1 for ofport column (with
ovs-vsctl get).

* Call "iface_create" for each interface.
 - For the first interface, if_cfg->cfg->ofport is -1. And when
iface_set_ofp_port() is called with a +ve
value (ofport value), ovsdb_idl_txn_write is called and row->new is
set because the 2 values of ofport is different(one is -1 and the
other +ve).

 - ovsdb_idl_txn_commit is called which commits this +ve value to DB.

 - In ovsdb_idl_txn_commit, ovsdb_idl_txn_disassemble is called which
changes all the rows associated with "all other" interfaces to their
"old" values (the old values have ofport as +ve) in the memory.

  -iface_create is called for second interface. Now,
if_cfg->cfg->ofport is +ve and we are setting the same value with
iface_set_ofp_port(). Since values are same, DB is not updated.

- So this creates a situation where except for one interface, all
interfaces have their ofport set as "-1".


More information about the dev mailing list