netdev-linux: Handle flags for 10G and 40G speeds
[cascardo/ovs.git] / lib / rstp.c
index 9573fe4..c1d5e7e 100644 (file)
 #include "connectivity.h"
 #include "ofpbuf.h"
 #include "ofproto/ofproto.h"
+#include "dp-packet.h"
 #include "packets.h"
 #include "seq.h"
 #include "unixctl.h"
 #include "util.h"
-#include "vlog.h"
+#include "openvswitch/vlog.h"
 
 VLOG_DEFINE_THIS_MODULE(rstp);
 
 struct ovs_mutex rstp_mutex = OVS_MUTEX_INITIALIZER;
 
-static struct list all_rstps__ = LIST_INITIALIZER(&all_rstps__);
-static struct list *const all_rstps OVS_GUARDED_BY(rstp_mutex) = &all_rstps__;
+static struct ovs_list all_rstps__ = OVS_LIST_INITIALIZER(&all_rstps__);
+static struct ovs_list *const all_rstps OVS_GUARDED_BY(rstp_mutex) = &all_rstps__;
 
 /* Internal use only. */
 static void rstp_set_bridge_address__(struct rstp *, rstp_identifier)
@@ -243,7 +244,7 @@ rstp_init(void)
 /* Creates and returns a new RSTP instance that initially has no ports. */
 struct rstp *
 rstp_create(const char *name, rstp_identifier bridge_address,
-            void (*send_bpdu)(struct ofpbuf *bpdu, void *port_aux,
+            void (*send_bpdu)(struct dp_packet *bpdu, void *port_aux,
                               void *rstp_aux),
             void *aux)
     OVS_EXCLUDED(rstp_mutex)
@@ -279,6 +280,8 @@ rstp_create(const char *name, rstp_identifier bridge_address,
     rstp->aux = aux;
     rstp->changes = false;
     rstp->begin = true;
+    rstp->old_root_aux = NULL;
+    rstp->new_root_aux = NULL;
 
     ovs_refcount_init(&rstp->ref_cnt);