public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Christian Benvenuti <benve@cisco.com>
Cc: Roopa Prabhu <roprabhu@cisco.com>,
	Neel Patel <neepatel@cisco.com>,
	Nishank Trivedi <nistrive@cisco.com>,
	netdev@vger.kernel.org
Subject: enic: endian bug in enic_queue_wq_skb_csum_l4()
Date: Thu, 1 Mar 2012 10:20:23 +0300	[thread overview]
Message-ID: <20120301072023.GB7152@elgon.mountain> (raw)

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

                 reply	other threads:[~2012-03-01  9:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120301072023.GB7152@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=benve@cisco.com \
    --cc=neepatel@cisco.com \
    --cc=netdev@vger.kernel.org \
    --cc=nistrive@cisco.com \
    --cc=roprabhu@cisco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox