* enic: endian bug in enic_queue_wq_skb_csum_l4()
@ 2012-03-01 7:20 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2012-03-01 7:20 UTC (permalink / raw)
To: Christian Benvenuti; +Cc: Roopa Prabhu, Neel Patel, Nishank Trivedi, netdev
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-03-01 9:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-01 7:20 enic: endian bug in enic_queue_wq_skb_csum_l4() Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox