Release Open vSwitch 1.0.2
[sliver-openvswitch.git] / lib / dpif-netdev.c
index ade658d..323f364 100644 (file)
@@ -1082,7 +1082,7 @@ dp_netdev_wait(void)
 
 
 /* Modify the TCI field of 'packet'.  If a VLAN tag is not present, one
- * is added with the TCI field set to 'tci'.  If a VLAN tag is present, 
+ * is added with the TCI field set to 'tci'.  If a VLAN tag is present,
  * then 'mask' bits are cleared before 'tci' is logically OR'd into the
  * TCI field.
  *
@@ -1262,8 +1262,7 @@ dp_netdev_output_control(struct dp_netdev *dp, const struct ofpbuf *packet,
     }
 
     msg_size = sizeof *header + packet->size;
-    msg = ofpbuf_new(msg_size + DPIF_RECV_MSG_PADDING);
-    ofpbuf_reserve(msg, DPIF_RECV_MSG_PADDING);
+    msg = ofpbuf_new_with_headroom(msg_size, DPIF_RECV_MSG_PADDING);
     header = ofpbuf_put_uninit(msg, sizeof *header);
     header->type = queue_no;
     header->length = msg_size;