lkml.org 
[lkml]   [2014]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH V1 net-next 1/1] hyperv: Properly handle checksum offload
Date


> -----Original Message-----
> From: David Miller [mailto:davem@davemloft.net]
> Sent: Monday, April 28, 2014 10:24 AM
> To: KY Srinivasan
> Cc: netdev@vger.kernel.org; linux-kernel@vger.kernel.org;
> devel@linuxdriverproject.org; olaf@aepfle.de; apw@canonical.com;
> jasowang@redhat.com; stable@kernel.org
> Subject: Re: [PATCH V1 net-next 1/1] hyperv: Properly handle checksum
> offload
>
> From: "K. Y. Srinivasan" <kys@microsoft.com>
> Date: Fri, 25 Apr 2014 20:55:23 -0700
>
> > @@ -467,6 +467,9 @@ static int netvsc_start_xmit(struct sk_buff *skb,
> struct net_device *net)
> > if (skb_is_gso(skb))
> > goto do_lso;
> >
> > + if (skb->ip_summed != CHECKSUM_PARTIAL)
> > + goto do_send;
> > +
>
> There are many possible values of ip_summed, why would you go to
> do_send if for example it was set to CHECKSUM_COMPLETE?
>
> I think you are just rushing this change, take your time and implement the fix
> properly.
>
> For example, if you only expect two possible values here
> (CHECKSUM_PARTIAL and something else), design your test so that it only
> allows those two values and therefore you'll be documenting this invariant.

David,

I based this check on the check I see in tcp_v4_send_check() (and tcp_v6_send_check).
Looking at the code some more, it looks like if ip_summed is set to CHECKSUM_NONE, the
software has computed the checksum and we can bypass the code for offloading the checksum.

Regards,

K. Y


\
 
 \ /
  Last update: 2014-04-28 23:21    [W:0.131 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site