netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sabrina Dubroca <sd@queasysnail.net>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Tom Herbert <therbert@google.com>,
	David Miller <davem@davemloft.net>,
	Linux Netdev List <netdev@vger.kernel.org>,
	Thomas Graf <tgraf@suug.ch>
Subject: Re: [PATCH net] pktgen: fix UDP checksum computation
Date: Fri, 6 Feb 2015 14:46:46 +0100	[thread overview]
Message-ID: <20150206134646.GA30471@kria> (raw)
In-Reply-To: <1423182482.31870.99.camel@edumazet-glaptop2.roam.corp.google.com>

2015-02-05, 16:28:02 -0800, Eric Dumazet wrote:
> On Thu, 2015-02-05 at 15:57 -0800, Tom Herbert wrote:
> 
> > Would it be possible to use udp_set_csum to handle all of this?

I will look.


> This reminds me we have following sparse errors with checksum code,
> could you take a look Tom ?
> 
> make C=2 CF=-D__CHECK_ENDIAN__  ...
> 
> include/linux/skbuff.h:3022:24: warning: incorrect type in return expression (different base types)
> include/linux/skbuff.h:3022:24:    expected restricted __sum16
> include/linux/skbuff.h:3022:24:    got int
> 
> net/ipv6/ip6_checksum.c:83:16: warning: incorrect type in return expression (different base types)
> net/ipv6/ip6_checksum.c:83:16:    expected int
> net/ipv6/ip6_checksum.c:83:16:    got restricted __sum16 [assigned] [usertype] __ret
> 
>   CHECK   net/ipv4/tcp_offload.c
> net/ipv4/tcp_offload.c:139:60: warning: incorrect type in argument 2 (different base types)
> net/ipv4/tcp_offload.c:139:60:    expected restricted __wsum [usertype] res
> net/ipv4/tcp_offload.c:139:60:    got fouled restricted __sum16
> include/linux/skbuff.h:3317:14: warning: incorrect type in assignment (different base types)
> include/linux/skbuff.h:3317:14:    expected unsigned short [unsigned] [usertype] csum
> include/linux/skbuff.h:3317:14:    got restricted __sum16
> include/linux/skbuff.h:3322:16: warning: incorrect type in return expression (different base types)
> include/linux/skbuff.h:3322:16:    expected restricted __sum16
> include/linux/skbuff.h:3322:16:    got unsigned short [unsigned] [usertype] csum
> net/ipv4/tcp_offload.c:173:52: warning: incorrect type in argument 2 (different base types)
> net/ipv4/tcp_offload.c:173:52:    expected restricted __wsum [usertype] res
> net/ipv4/tcp_offload.c:173:52:    got fouled restricted __sum16
> include/linux/skbuff.h:3317:14: warning: incorrect type in assignment (different base types)
> include/linux/skbuff.h:3317:14:    expected unsigned short [unsigned] [usertype] csum
> include/linux/skbuff.h:3317:14:    got restricted __sum16
> include/linux/skbuff.h:3322:16: warning: incorrect type in return expression (different base types)
> include/linux/skbuff.h:3322:16:    expected restricted __sum16
> include/linux/skbuff.h:3322:16:    got unsigned short [unsigned] [usertype] csum

I have patches ready for that and other sparse warnings, I just need
to check and send them.


Thanks

-- 
Sabrina

      reply	other threads:[~2015-02-06 13:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-04 22:08 [PATCH net] pktgen: fix UDP checksum computation Sabrina Dubroca
2015-02-05 10:52 ` Thomas Graf
2015-02-05 23:42 ` David Miller
2015-02-05 23:57 ` Tom Herbert
2015-02-06  0:28   ` Eric Dumazet
2015-02-06 13:46     ` Sabrina Dubroca [this message]

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=20150206134646.GA30471@kria \
    --to=sd@queasysnail.net \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=tgraf@suug.ch \
    --cc=therbert@google.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;
as well as URLs for NNTP newsgroup(s).