From: Sabrina Dubroca <sd@queasysnail.net>
To: Madalin Bucur <madalin.bucur@freescale.com>
Cc: netdev@vger.kernel.org, vyasevich@gmail.com, davem@davemloft.net
Subject: Re: [PATCH] ipv6: address issue in __ip6_append_data
Date: Sat, 21 Feb 2015 19:33:59 +0100 [thread overview]
Message-ID: <20150221183359.GB16874@kria> (raw)
In-Reply-To: <1423841459-21880-1-git-send-email-madalin.bucur@freescale.com>
2015-02-13, 17:30:59 +0200, Madalin Bucur wrote:
> Hello,
>
> I think I've found a problem that allows generic IPv6 traffic to be
> sent by the stack with CHECKSUM_PARTIAL to a netdevice that declares
> NETIF_F_IPV6_CSUM. The NETIF_F_IPV6_CSUM flag is based on the
> NETIF_F_IPV6_CSUM_BIT that is described as referring only to TCP and
> UDP but in my test ICMPv6 frames with CHECKSUM_PARTIAL are seen:
This should be fixed by:
bf250a1fa769 ("ipv6: Partial checksum only UDP packets")
Have you tested it?
> NETIF_F_IPV6_CSUM_BIT, /* Can checksum TCP/UDP over IPV6 */
>
> I've traced the issue to a recent commit that includes this check:
>
> rt->dst.dev->features & NETIF_F_V6_CSUM
>
> The problem with this is that NETIF_F_V6_CSUM is more than one bit:
>
> #define NETIF_F_V6_CSUM (NETIF_F_GEN_CSUM | NETIF_F_IPV6_CSUM)
>
> Thus the above check should be either:
>
> (rt->dst.dev->features & NETIF_F_V6_CSUM) == NETIF_F_V6_CSUM
I think this disables HW checksumming that Vlad's patch enabled. As
Vlad pointed out in another similar thread [1], the two bits are
mutually exclusive, so you can't have
(dev->features & NETIF_F_V6_CSUM) == NETIF_F_V6_CSUM
[1] http://www.spinics.net/lists/netdev/msg316341.html
> or probably should use NETIF_F_HW_CSUM only:
>
> rt->dst.dev->features & NETIF_F_HW_CSUM
Maybe. But I just tried this, and it doesn't work with qemu's e1000
emulation (could be a driver/qemu problem, I can't check with other
devices).
Thanks,
--
Sabrina
next prev parent reply other threads:[~2015-02-21 18:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-13 15:30 [PATCH] ipv6: address issue in __ip6_append_data Madalin Bucur
2015-02-19 20:27 ` David Miller
2015-02-21 18:33 ` Sabrina Dubroca [this message]
2015-02-23 14:11 ` Madalin-Cristian Bucur
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=20150221183359.GB16874@kria \
--to=sd@queasysnail.net \
--cc=davem@davemloft.net \
--cc=madalin.bucur@freescale.com \
--cc=netdev@vger.kernel.org \
--cc=vyasevich@gmail.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).