csum: Avoid misaligned data access.
[openvswitch] / lib / learning-switch.c
index 1e5d25bc2c037ee82966d35c597b335239537d97..63edc0fb8c1bacefe859253d4d399cef0b1d3377 100644 (file)
@@ -23,6 +23,7 @@
 #include <stdlib.h>
 #include <time.h>
 
+#include "byte-order.h"
 #include "flow.h"
 #include "hmap.h"
 #include "mac-learning.h"
@@ -38,9 +39,8 @@
 #include "timeval.h"
 #include "vconn.h"
 #include "vlog.h"
-#include "xtoxll.h"
 
-VLOG_DEFINE_THIS_MODULE(learning_switch)
+VLOG_DEFINE_THIS_MODULE(learning_switch);
 
 struct lswitch_port {
     struct hmap_node hmap_node; /* Hash node for port number. */
@@ -305,7 +305,7 @@ process_switch_features(struct lswitch *sw, struct rconn *rconn OVS_UNUSED,
 }
 
 static uint16_t
-lswitch_choose_destination(struct lswitch *sw, const flow_t *flow)
+lswitch_choose_destination(struct lswitch *sw, const struct flow *flow)
 {
     uint16_t out_port;
 
@@ -372,7 +372,7 @@ process_packet_in(struct lswitch *sw, struct rconn *rconn, void *opi_)
 
     size_t pkt_ofs, pkt_len;
     struct ofpbuf pkt;
-    flow_t flow;
+    struct flow flow;
 
     /* Ignore packets sent via output to OFPP_CONTROLLER.  This library never
      * uses such an action.  You never know what experiments might be going on,