devif: solarflare backend IP_FRAG error should not be treated as an
authorRoni Häcki <roni.haecki@inf.ethz.ch>
Fri, 22 Sep 2017 12:58:38 +0000 (14:58 +0200)
committerRoni Häcki <roni.haecki@inf.ethz.ch>
Fri, 22 Sep 2017 12:58:38 +0000 (14:58 +0200)
error ...

In the RX event if the bit for IP_FRAG is set, the packet should still
be forwareded to the network stack. It seems that this is not really an
error since it is also not handeled in the Linux driver.

Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

lib/devif/backends/net/solarflare/hw_queue.h

index 46a09ac..7186bbd 100644 (file)
@@ -400,8 +400,13 @@ static inline errval_t sfn5122f_queue_handle_rx_ev_devif(sfn5122f_queue_t* q,
             printf("Card error while parsing \n");
             err = NIC_ERR_RX_PKT;
         } else if (sfn5122f_q_rx_ev_rx_ev_ip_frag_err_extract(ev)) {
-            printf("IP header ckecksum error (Fragment)\n");
-            err = NIC_ERR_RX_PKT;
+            /*
+             * Seems like this should not really be handeled as an error even
+             * if the event itself seems to suggest so. Not even handeled in linux. 
+             * (pkt_ok()) is not even read out ...
+             */ 
+            err = SYS_ERR_OK;
+            *valid_length = sfn5122f_q_rx_ev_rx_ev_byte_ctn_extract(ev);
         } else if (sfn5122f_q_rx_ev_rx_ev_ip_hdr_chksum_err_extract(ev)) {
             printf("IP header ckecksum error \n");
             err = NIC_ERR_RX_PKT;
@@ -416,7 +421,6 @@ static inline errval_t sfn5122f_queue_handle_rx_ev_devif(sfn5122f_queue_t* q,
             *valid_length = 16384;
         }
     }
-
     /*
     if (q->userspace){
         d_user = q->tx_ring.user[q->tx_head];