netdev-dpdk: fix mbuf leaks
[cascardo/ovs.git] / lib / vconn-stream.c
index 027f48f..2858462 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 Nicira, Inc.
+ * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2016 Nicira, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -29,8 +29,8 @@
 #include "stream.h"
 #include "util.h"
 #include "vconn-provider.h"
-#include "vconn.h"
-#include "vlog.h"
+#include "openvswitch/vconn.h"
+#include "openvswitch/vlog.h"
 
 VLOG_DEFINE_THIS_MODULE(vconn_stream);
 
@@ -64,10 +64,6 @@ vconn_stream_new(struct stream *stream, int connect_status,
     s->txbuf = NULL;
     s->rxbuf = NULL;
     s->n_packets = 0;
-    s->vconn.remote_ip = stream_get_remote_ip(stream);
-    s->vconn.remote_port = stream_get_remote_port(stream);
-    s->vconn.local_ip = stream_get_local_ip(stream);
-    s->vconn.local_port = stream_get_local_port(stream);
     return &s->vconn;
 }
 
@@ -82,7 +78,7 @@ vconn_stream_open(const char *name, uint32_t allowed_versions,
     struct stream *stream;
     int error;
 
-    error = stream_open_with_default_port(name, OFP_OLD_PORT, &stream, dscp);
+    error = stream_open_with_default_port(name, OFP_PORT, &stream, dscp);
     if (!error) {
         error = stream_connect(stream);
         if (!error || error == EAGAIN) {
@@ -108,7 +104,7 @@ vconn_stream_close(struct vconn *vconn)
 
     if ((vconn->error == EPROTO || s->n_packets < 1) && s->rxbuf) {
         stream_report_content(s->rxbuf->data, s->rxbuf->size, STREAM_OPENFLOW,
-                              THIS_MODULE, vconn_get_name(vconn));
+                              &this_module, vconn_get_name(vconn));
     }
 
     stream_close(s->stream);
@@ -281,7 +277,7 @@ vconn_stream_wait(struct vconn *vconn, enum vconn_wait_type wait)
         break;
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 \f
@@ -315,8 +311,7 @@ pvconn_pstream_listen(const char *name, uint32_t allowed_versions,
     struct pstream *pstream;
     int error;
 
-    error = pstream_open_with_default_port(name, OFP_OLD_PORT,
-                                           &pstream, dscp);
+    error = pstream_open_with_default_port(name, OFP_PORT, &pstream, dscp);
     if (error) {
         return error;
     }