TSO support for veth
Vimal
j.vimal at gmail.com
Sat Nov 26 11:21:54 EST 2011
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
More information about the Kernelnewbies
mailing list