Ethan pointed out that this wasn't very useful.

Signed-off-by: Ben Pfaff <b...@nicira.com>
---
 lib/netdev-dummy.c    |   16 +++-------------
 tests/ofproto-dpif.at |    6 ++----
 2 files changed, 5 insertions(+), 17 deletions(-)

diff --git a/lib/netdev-dummy.c b/lib/netdev-dummy.c
index 215e1a2..2884a80 100644
--- a/lib/netdev-dummy.c
+++ b/lib/netdev-dummy.c
@@ -425,24 +425,19 @@ eth_from_packet_or_flow(const char *s)
     return packet;
 }
 
-static int
+static void
 netdev_dummy_queue_packet(struct netdev_dev_dummy *dummy_dev,
                           const void *data, size_t size)
 {
     struct netdev_dummy *dev;
-    int n_listeners;
 
-    n_listeners = 0;
     LIST_FOR_EACH (dev, node, &dummy_dev->devs) {
         if (dev->listening && dev->recv_queue_len < NETDEV_DUMMY_MAX_QUEUE) {
             struct ofpbuf *packet = ofpbuf_clone_data(data, size);
             list_push_back(&dev->recv_queue, &packet->list_node);
             dev->recv_queue_len++;
-            n_listeners++;
         }
     }
-
-    return n_listeners;
 }
 
 static void
@@ -469,16 +464,11 @@ netdev_dummy_receive(struct unixctl_conn *conn,
             return;
         }
 
-        n_listeners += netdev_dummy_queue_packet(dummy_dev,
-                                                 packet->data, packet->size);
+        netdev_dummy_queue_packet(dummy_dev, packet->data, packet->size);
         ofpbuf_delete(packet);
     }
 
-    if (!n_listeners) {
-        unixctl_command_reply(conn, "packets queued but nobody listened");
-    } else {
-        unixctl_command_reply(conn, "success");
-    }
+    unixctl_command_reply(conn, NULL);
 }
 
 static void
diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at
index 3eec947..f45ed59 100644
--- a/tests/ofproto-dpif.at
+++ b/tests/ofproto-dpif.at
@@ -1184,8 +1184,7 @@ AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
 # flow stats updates are mainly what implements the fin_timeout
 # feature, we warp forward a couple of times to ensure that flow stats
 # run before re-checking the flow table.)
-AT_CHECK([ovs-appctl netdev-dummy/receive br0 
0021853763af0026b98cb0f908004500003c2e2440004006465dac11370dac11370b828b0016751e267b00000000a00216d017360000020405b40402080a2d25085f0000000001030307],
 [0], [success
-])
+AT_CHECK([ovs-appctl netdev-dummy/receive br0 
0021853763af0026b98cb0f908004500003c2e2440004006465dac11370dac11370b828b0016751e267b00000000a00216d017360000020405b40402080a2d25085f0000000001030307])
 AT_CHECK([ovs-appctl time/warp 1000 && ovs-appctl time/warp 1000], [0], [warped
 warped
 ])
@@ -1194,8 +1193,7 @@ AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
  n_packets=1, n_bytes=74, idle_timeout=60, actions=fin_timeout(idle_timeout=5)
 ])
 # Check that a TCP FIN packet does change the timeout.
-AT_CHECK([ovs-appctl netdev-dummy/receive br0 
0021853763af0026b98cb0f90800451000342e3e40004006463bac11370dac11370b828b0016751e319dfc96399b801100717ae800000101080a2d250a9408579588],
 [0], [success
-])
+AT_CHECK([ovs-appctl netdev-dummy/receive br0 
0021853763af0026b98cb0f90800451000342e3e40004006463bac11370dac11370b828b0016751e319dfc96399b801100717ae800000101080a2d250a9408579588])
 AT_CHECK([ovs-appctl time/warp 1000 && ovs-appctl time/warp 1000], [0], [warped
 warped
 ])
-- 
1.7.2.5

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to