devif: fixed solarflare test
authorRoni Häcki <roni.haecki@inf.ethz.ch>
Thu, 30 Mar 2017 12:21:34 +0000 (14:21 +0200)
committerRoni Häcki <roni.haecki@inf.ethz.ch>
Thu, 30 Mar 2017 12:21:34 +0000 (14:21 +0200)
Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

lib/devif/backends/net/solarflare/hw_queue.h
usr/tests/devif/queue_interface.c

index 0ef8dc0..ca7412f 100644 (file)
@@ -483,15 +483,12 @@ static inline errval_t sfn5122f_queue_handle_tx_ev_devif(sfn5122f_queue_t* q,
             q->last_deq = 0;
 
             // set descriptor to 0 
-            /*
             if (q->userspace){
                 memset(d_user, 0 , sfn5122f_q_tx_user_desc_size*q->num_left);
             } else {
                 memset(d, 0 , sfn5122f_q_tx_ker_desc_size*q->num_left);
             }
-            */
         } else { // Singe descriptor
-            /*
             if (q->userspace){
                 d_user = q->tx_ring.user[q->tx_head];  
                 memset(d_user, 0 , sfn5122f_q_tx_user_desc_size);
@@ -499,7 +496,6 @@ static inline errval_t sfn5122f_queue_handle_tx_ev_devif(sfn5122f_queue_t* q,
                 d = q->tx_ring.ker[q->tx_head];  
                 memset(d, 0 , sfn5122f_q_tx_ker_desc_size);
             }
-            */
         }
 
         // reset entry event in queue
index d082cf1..95fb4dd 100644 (file)
@@ -280,7 +280,8 @@ static void test_net_tx(void)
     
     printf("Write throughput %.2f [MB/s] for %.2f ms \n", bw, result_ms);
 
-    err = devq_control(q, 1, 1, NULL);
+    
+    err = devq_control(q, 1, 1, &sent_bytes);
     if (err_is_fail(err)){
         printf("%s \n", err_getstring(err));
         USER_PANIC("Devq control failed \n");