Introduced "starved" datagrams.
authorFlorian Pose <fp@igh-essen.com>
Tue, 21 Nov 2006 15:13:48 +0000
changeset 492 9c58efb2c72d
parent 491 07a7c5951ebc
child 493 b17c95eac6b2
Introduced "starved" datagrams.
master/master.c
master/master.h
--- a/master/master.c	Tue Nov 07 13:49:04 2006 +0000
+++ b/master/master.c	Tue Nov 21 15:13:48 2006 +0000
@@ -129,6 +129,7 @@
     master->debug_level = 0;
 
     master->stats.timeouts = 0;
+    master->stats.starved = 0;
     master->stats.corrupted = 0;
     master->stats.skipped = 0;
     master->stats.unmatched = 0;
@@ -710,6 +711,11 @@
                     master->stats.timeouts == 1 ? "" : "s");
             master->stats.timeouts = 0;
         }
+        if (master->stats.starved) {
+            EC_WARN("%i datagram%s STARVED!\n", master->stats.starved,
+                    master->stats.starved == 1 ? "" : "s");
+            master->stats.starved = 0;
+        }
         if (master->stats.corrupted) {
             EC_WARN("%i frame%s CORRUPTED!\n", master->stats.corrupted,
                     master->stats.corrupted == 1 ? "" : "s");
@@ -1438,7 +1444,7 @@
                     - datagram->cycles_queued > cycles_timeout) {
                     list_del_init(&datagram->queue);
                     datagram->state = EC_DATAGRAM_TIMED_OUT;
-                    master->stats.timeouts++;
+                    master->stats.starved++;
                     ec_master_output_stats(master);
                 }
                 break;
--- a/master/master.h	Tue Nov 07 13:49:04 2006 +0000
+++ b/master/master.h	Tue Nov 21 15:13:48 2006 +0000
@@ -75,6 +75,7 @@
 typedef struct
 {
     unsigned int timeouts; /**< datagram timeouts */
+    unsigned int starved; /**< starved datagrams (not even sent) */
     unsigned int corrupted; /**< corrupted frames */
     unsigned int skipped; /**< skipped datagrams (the ones that were
                              requeued when not yet received) */