[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20120301072023.GB7152@elgon.mountain>
Date: Thu, 1 Mar 2012 10:20:23 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Christian Benvenuti <benve@...co.com>
Cc: Roopa Prabhu <roprabhu@...co.com>, Neel Patel <neepatel@...co.com>,
Nishank Trivedi <nistrive@...co.com>, netdev@...r.kernel.org
Subject: enic: endian bug in enic_queue_wq_skb_csum_l4()
Sparse warns about an endian issue in the enic driver:
drivers/net/ethernet/cisco/enic/enic_main.c:1305:35: warning: incorrect type in assignment (different base types)
drivers/net/ethernet/cisco/enic/enic_main.c:1305:35: expected restricted __wsum [usertype] csum
drivers/net/ethernet/cisco/enic/enic_main.c:1305:35: got restricted __be16 [usertype] <noident>
Here is the code:
drivers/net/ethernet/cisco/enic/enic_main.c
1304 if ((netdev->features & NETIF_F_RXCSUM) && !csum_not_calc) {
1305 skb->csum = htons(checksum);
1306 skb->ip_summed = CHECKSUM_COMPLETE;
1307 }
skb->csum is 32bit we're storing a network endian short in it. I don't
know networking well enough to know how to fix this.
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists