kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: j.vimal@gmail.com (Vimal)
To: kernelnewbies@lists.kernelnewbies.org
Subject: TSO support for veth
Date: Sat, 26 Nov 2011 08:21:54 -0800	[thread overview]
Message-ID: <CAK3Ji11WkDfFWiBvnaUcoGJu=MLZ2EqFTdv0P9Hud5CcnWEOzQ@mail.gmail.com> (raw)

Hi all,

It seems like OpenVZ has had TCP Segmentation Support for veth for
quite a while[1], but the mainline kernel doesn't have it.   I checked
what it takes to add TSO support, and it looks like OpenVZ's veth.c
(call it vzeth) has the following:

1. When initialising a virtual net_device "dev", vzeth declares
dev->hw_features = ... (other features) | NETIF_F_TSO.
2. The ethtool_ops structure contains two additional handlers: get_tso
and set_tso.
3. get_tso points to ethtool_op_get_tso
4. set_tso points to a special function, that invokes
ethtool_op_set_tso on both the ends of the vzeth.

I took a copy of the mainline veth.c, repeated the above steps and
introduced a printk to make sure that the set_tso function gets
invoked.

Here's the diff:  http://pastie.org/2924399 (space indent, sorry)

But I see the following:
1. The modified veth driver loads. (good)
2. When I do: ethtool -K <iface> tso on, I don't see an error message. (good)
3. When I query: ethtool -k <iface>, I don't see TSO set on (bad)
4. When I check dmesg, I don't see that the "set_tso" function has not
been invoked. (bad)

Am I doing something wrong?

[1] http://wiki.openvz.org/TSO

-- 
Vimal

                 reply	other threads:[~2011-11-26 16:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='CAK3Ji11WkDfFWiBvnaUcoGJu=MLZ2EqFTdv0P9Hud5CcnWEOzQ@mail.gmail.com' \
    --to=j.vimal@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /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).