netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Hutchings <ben@decadent.org.uk>
To: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, olaf@aepfle.de,
	jasowang@redhat.com
Subject: Re: Drivers: net: Hyperv
Date: Tue, 22 Apr 2014 19:21:36 +0100	[thread overview]
Message-ID: <1398190896.7767.91.camel@deadeye.wl.decadent.org.uk> (raw)
In-Reply-To: <1398190933-8990-1-git-send-email-kys@microsoft.com>

[-- Attachment #1: Type: text/plain, Size: 1569 bytes --]

On Tue, 2014-04-22 at 11:22 -0700, K. Y. Srinivasan wrote:
> I am trying to port the various offloads (checksum, TSO etc.) that I recently 
> implemented for the Hyper-V network driver to a 2.6.32 kernel and while this
> code works on the upstream bits, TCP checksum offload does not seem to work
> on the 2.6.32 kernel. Would you know if there is a different way to turn on
> checksum offload on 2.6.32 kernels?  I am setting the relevant feature flags:
> 
> 
>         net->features =  NETIF_F_SG | NETIF_F_RXCSUM |
>                         NETIF_F_IP_CSUM | NETIF_F_TSO;

There is no NETIF_F_RXCSUM in 2.6.32, but otherwise this should work.

I notice that NETIF_F_HIGHDMA is not there, and it seems like you could
add it as netvsc_start_xmit() doesn't assume page fragments are in
lowmem.

> What I am observing is that when the skb is presented to the driver for transmission,
> The ip_summed field in the skb is set to 0.

Maybe you tested on a 32-bit system and the packet had to be copied to
lowmem?  The allocation behaviour may have changed since 2.6.32.

> On the kernel tip, I see this value set to CHECKSUM_PARTIAL and the offloads
> work correctly on the kernel tip. The other difference I see is that on entry into the driver,
> the eth_hdr state is not correctly set in the skb.
> I need to invoke skb_reset_mac_header() to get this state correctly set.
> Any help would be greatly appreciated.

I don't recall that problem.

Ben.

-- 
Ben Hutchings
Beware of programmers who carry screwdrivers. - Leonard Brandwein

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

  reply	other threads:[~2014-04-22 18:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-22 18:22 Drivers: net: Hyperv K. Y. Srinivasan
2014-04-22 18:21 ` Ben Hutchings [this message]
2014-04-22 19:07   ` KY Srinivasan

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=1398190896.7767.91.camel@deadeye.wl.decadent.org.uk \
    --to=ben@decadent.org.uk \
    --cc=davem@davemloft.net \
    --cc=jasowang@redhat.com \
    --cc=kys@microsoft.com \
    --cc=netdev@vger.kernel.org \
    --cc=olaf@aepfle.de \
    /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).