Jarno Rajahalme wrote:
Another high-level thing is that in OVS we use the ‘ovs_beXX’ types to annotate
integers in network byte order, and the corresponding ‘uintXX_t’ types for the
host byte order equivalents. You would use ovs_beXX types to define the BPDUs,
and then convert each member to host byte order for internal representation.
OK.
Also, we have defined the type ‘stp_identifier’ in lib/stp.h. I’d like you to
use it (with the accompanying formatting tools) also for RSTP (maybe move them
to lib/util.h to use them both from STP and RSTP).
I would prefer to define a separate rstp_identifier as uint64_t. This is
because STP and RSTP identifier are encoded differently:
* In STP, there are 16 bits for the priority and 48 bits for the MAC address
* In RSTP, there are 4 bits for priority, 12 bits for private extension
(used in the Multiple Spanning Tree Protocol to identify the tree
instance) and 48 bits for the MAC address.
Thus, the formatting tools are not really compatible (and they will be
less compatible if someone try to implement the Multiple Spanning Tree
Protocol on top of our code).
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev