net/e1000: implement new Rx checksum flag
authorXiao Wang <xiao.w.wang@intel.com>
Tue, 6 Sep 2016 01:27:30 +0000 (09:27 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 13 Oct 2016 23:41:31 +0000 (01:41 +0200)
Add CKSUM_GOOD flag to distinguish a good checksum from an unknown one.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
drivers/net/e1000/igb_rxtx.c

index e8f9933..dbd37ac 100644 (file)
@@ -747,7 +747,9 @@ rx_desc_error_to_pkt_flags(uint32_t rx_status)
         */
 
        static uint64_t error_to_pkt_flags_map[4] = {
-               0,  PKT_RX_L4_CKSUM_BAD, PKT_RX_IP_CKSUM_BAD,
+               PKT_RX_IP_CKSUM_GOOD | PKT_RX_L4_CKSUM_GOOD,
+               PKT_RX_IP_CKSUM_GOOD | PKT_RX_L4_CKSUM_BAD,
+               PKT_RX_IP_CKSUM_BAD | PKT_RX_L4_CKSUM_GOOD,
                PKT_RX_IP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD
        };
        return error_to_pkt_flags_map[(rx_status >>