[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CA+mtBx8b+Y3gZa0Z_9LONwAXFhCfXY1STj+kc_TtveCbAQAs2g@mail.gmail.com>
Date: Mon, 23 Jun 2014 09:37:29 -0700
From: Tom Herbert <therbert@...gle.com>
To: Or Gerlitz <or.gerlitz@...il.com>
Cc: David Miller <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH 5/5] udp: additional GRO support
On Sun, Jun 22, 2014 at 4:40 AM, Or Gerlitz <or.gerlitz@...il.com> wrote:
> On Sat, Jun 21, 2014 at 2:38 AM, Tom Herbert <therbert@...gle.com> wrote:
>> Implement GRO for UDPv6. Add UDP checksum verification in gro_receive
>> for both UDP4 and UDP6 calling skb_gro_checksum_validate_zero_check.
>> Also, remove check for CHECKSUM_COMPLETE in udp_gro_receive, any
>> checksum type should be handled now.
>
>
> [...]
>
>> diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c
>> index fb8e6ba..2ab9051 100644
>> --- a/net/ipv4/udp_offload.c
>> +++ b/net/ipv4/udp_offload.c
>
>> -static struct sk_buff **udp_gro_receive(struct sk_buff **head, struct sk_buff *skb)
>> +struct sk_buff **udp_gro_receive(struct sk_buff **head, struct sk_buff *skb,
>> + struct udphdr *uh)
>> {
>> struct udp_offload_priv *uo_priv;
>> struct sk_buff *p, **pp = NULL;
>> - struct udphdr *uh, *uh2;
>> - unsigned int hlen, off;
>> + struct udphdr *uh2;
>> + unsigned int off = skb_gro_offset(skb);
>> int flush = 1;
>>
>> - if (NAPI_GRO_CB(skb)->udp_mark ||
>> - (!skb->encapsulation && skb->ip_summed != CHECKSUM_COMPLETE))
>> + if (NAPI_GRO_CB(skb)->udp_mark)
>> goto out;
>
> Before this change we were practically requiring SKBs to carry their
> ->encapsulation mark set but not any more.
This allows computing checksum in GRO. This uses the same technique
that GRE does with a checksum.
btw, udp_mark's effect is to disallow multiple levels of encap which
is orthogonal from csum handling. It looks like the only protocol
encapsulation where we disallow nested encap. I think we can either
remove this or maybe generalize it to limit number of protocol layers
we are willing to parse in GRO path.
--
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