[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.03.1402131600120.8285@intel.com>
Date: Thu, 13 Feb 2014 16:04:02 -0800 (PST)
From: Joseph Gasparakis <joseph.gasparakis@...el.com>
To: Or Gerlitz <or.gerlitz@...il.com>
cc: Tom Herbert <therbert@...gle.com>,
Joseph Gasparakis <joseph.gasparakis@...el.com>,
Or Gerlitz <ogerlitz@...lanox.com>,
David Miller <davem@...emloft.net>,
Linux Netdev List <netdev@...r.kernel.org>,
Jerry Chu <hkchu@...gle.com>,
Eric Dumazet <edumazet@...gle.com>
Subject: Re: [PATCH 2/3] net: UDP gro_receive accept csum=0
On Thu, 13 Feb 2014, Or Gerlitz wrote:
> On Fri, Feb 14, 2014 at 12:27 AM, Tom Herbert <therbert@...gle.com> wrote:
>
> >> [...] this is according to the conventions set by
> >> 0afb166 vxlan: Add capability of Rx checksum offload for inner packet
> >> 6a674e9 net: Add support for hardware-offloaded encapsulation
> >> B/c after finalizing the GRO work and decapsulating, skb injected up into
> >> the TCP stack with ip_summed equals to CHECKSUM_NONE are rejected. If >> this assumption is wrong, maybe we can remove testing the ip_summed field
> >> here altogether?
>
> > If I'm interpreting the semantics correctly, when skb->encapsulation
> > is set the ip_summed is valid for both the inner and outer header
> > (e.g. CHECKSUM_COMPLETE is always assumed okay for both layers). If
> > skb->encapsulation is not set then ip_summed is only valid for outer header.
>
> Yep, I think this would be correct interpertation, Joseph, agree?
Agreed.
>
> > So then the patch is broken in the case that encap is not set,
> > ip_summed is CHECKSUM_UNNECESSARY, csum == 0, and we need to
> > validate the inner checksum.
>
> Just to make sure, by "the patch" you refer to your patch or the current code?
>
> > But even worse, is there a fundamental issue where udp4_csum_init is able
> > to change ip_summed to be CHECKSUM_UNNECESSARY (either check == 0
> > or ip_summed == CHECKSUM_UNNECESSARY) regardless of
> > skb->encapsulation, sending the packet into encap_rcv which could
> > ultimately incorrectly apply ip_summed on the inner TCP/UDP packet?
>
> By fundamental you mean performance issue or functionality issue (bug) or both?
>
I would expect the check to be for ip_summed == CHECKSUM_UNNECESSARY. This
was the original thought behind commit:
0afb166 vxlan: Add capability of Rx checksum offload for inner packet
--
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