solarflare: fixed polling mode to not raise additional interrupts
authorRoni Häcki <roni.haecki@inf.ethz.ch>
Fri, 21 Apr 2017 07:56:02 +0000 (09:56 +0200)
committerRoni Häcki <roni.haecki@inf.ethz.ch>
Fri, 21 Apr 2017 07:56:02 +0000 (09:56 +0200)
Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

lib/devif/backends/net/solarflare/devif_backend_solarflare.c
usr/drivers/solarflare/sfn5122f_cdriver.c

index 84b85bb..172d37d 100644 (file)
@@ -563,10 +563,10 @@ errval_t sfn5122f_queue_create(struct sfn5122f_queue** q, sfn5122f_event_cb_t cb
     }
 
     if (!interrupts) {
-        printf("Solarflare queue used in polling mode \n");
+        printf("Solarflare queue used in polling mode (default %d) \n", qzero);
         err = queue->b->rpc_tx_vtbl.create_queue(queue->b, frame, userlevel,
-                                                 interrupts,
-                                                 0, 0, qzero, &queue->mac ,&queue->id, 
+                                                 interrupts, qzero,
+                                                 0, 0, &queue->mac ,&queue->id, 
                                                  &regs, &err2);
         if (err_is_fail(err) || err_is_fail(err2)) {
             err = err_is_fail(err) ? err: err2;
index 3e47d97..189fa73 100644 (file)
@@ -1632,6 +1632,7 @@ static void cd_main(void)
 
 int main(int argc, char** argv)
 {
+    
     //barrelfish_usleep(10*1000*1000);
     DEBUG("SFN5122F driver started \n");
     errval_t err;
@@ -1671,8 +1672,13 @@ int main(int argc, char** argv)
     }
     
     DEBUG("SFN5122F driver networking init \n");
-    err = networking_init("sfn5122f", NET_FLAGS_BLOCKING_INIT | NET_FLAGS_DO_DHCP |
-                          NET_FLAGS_DEFAULT_QUEUE);
+    if (use_interrupt) {
+        err = networking_init("sfn5122f", NET_FLAGS_DO_DHCP |
+                              NET_FLAGS_DEFAULT_QUEUE);
+    } else {
+        err = networking_init("sfn5122f", NET_FLAGS_DO_DHCP | NET_FLAGS_POLLING |
+                              NET_FLAGS_DEFAULT_QUEUE);
+    }
     assert(err_is_ok(err));
 
     DEBUG("SFN5122F driver networking init done\n");