devif: fixing the initialization of descq
authorAdam Turowski <adam.turowski@inf.ethz.ch>
Tue, 21 Mar 2017 09:56:08 +0000 (10:56 +0100)
committerAdam Turowski <adam.turowski@inf.ethz.ch>
Tue, 21 Mar 2017 09:56:08 +0000 (10:56 +0100)
Signed-off-by: Adam Turowski <adam.turowski@inf.ethz.ch>

lib/devif/backends/idc/desc_queue.c
lib/net_queue_manager/queue_manager.c

index ff93257..792100c 100644 (file)
@@ -332,6 +332,8 @@ static errval_t mp_create(struct descq_binding* b, uint32_t slots,
     q->tx_descs++;
     q->rx_descs++;
     q->slots = slots-1;
+    q->rx_seq = 0;
+    q->tx_seq = 0;
 
     devq_init(&q->q, true);
 
@@ -564,10 +566,14 @@ errval_t descq_create(struct descq** q,
 
         tmp->tx_seq_ack = (void*)tmp->tx_descs;
         tmp->rx_seq_ack = (void*)tmp->rx_descs;
+        tmp->tx_seq_ack->value = 0;
+        tmp->rx_seq_ack->value = 0;
         tmp->tx_descs++;
         tmp->rx_descs++;
         tmp->slots = slots-1;
-
+        tmp->rx_seq = 0;
+        tmp->tx_seq = 0;
+        
         devq_init(&tmp->q, false);
 
         tmp->q.f.enq = descq_enqueue;
index d4515d2..981c02e 100755 (executable)
@@ -436,7 +436,6 @@ static errval_t send_raw_xmit_done(struct devq *queue,
     struct client_closure *cl = (struct client_closure *)devq_get_state(queue);
     errval_t err;
     err = devq_enqueue(queue, cl->region_id, offset, length, 0, 0, flags);
-    debug_printf("%s: %d %ld\n", __func__, cl->region_id, err);
     assert(err_is_ok(err));
     return err;
 } // end function: send_raw_xmit_done