summaryrefslogtreecommitdiffstats
path: root/include/net/mip6.h
diff options
context:
space:
mode:
authorJonathan Davies <jonathan.davies@citrix.com>2015-03-31 12:05:15 +0200
committerDavid S. Miller <davem@davemloft.net>2015-04-02 22:18:58 +0200
commit0c36820e2ab7d943ab1188230fdf2149826d33c0 (patch)
treedc79ac9e4a9580ab0a258563a6ef701de415375a /include/net/mip6.h
parentMerge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma (diff)
downloadlinux-0c36820e2ab7d943ab1188230fdf2149826d33c0.tar.xz
linux-0c36820e2ab7d943ab1188230fdf2149826d33c0.zip
xen-netfront: transmit fully GSO-sized packets
xen-netfront limits transmitted skbs to be at most 44 segments in size. However, GSO permits up to 65536 bytes, which means a maximum of 45 segments of 1448 bytes each. This slight reduction in the size of packets means a slight loss in efficiency. Since c/s 9ecd1a75d, xen-netfront sets gso_max_size to XEN_NETIF_MAX_TX_SIZE - MAX_TCP_HEADER, where XEN_NETIF_MAX_TX_SIZE is 65535 bytes. The calculation used by tcp_tso_autosize (and also tcp_xmit_size_goal since c/s 6c09fa09d) in determining when to split an skb into two is sk->sk_gso_max_size - 1 - MAX_TCP_HEADER. So the maximum permitted size of an skb is calculated to be (XEN_NETIF_MAX_TX_SIZE - MAX_TCP_HEADER) - 1 - MAX_TCP_HEADER. Intuitively, this looks like the wrong formula -- we don't need two TCP headers. Instead, there is no need to deviate from the default gso_max_size of 65536 as this already accommodates the size of the header. Currently, the largest skb transmitted by netfront is 63712 bytes (44 segments of 1448 bytes each), as observed via tcpdump. This patch makes netfront send skbs of up to 65160 bytes (45 segments of 1448 bytes each). Similarly, the maximum allowable mtu does not need to subtract MAX_TCP_HEADER as it relates to the size of the whole packet, including the header. Fixes: 9ecd1a75d977 ("xen-netfront: reduce gso_max_size to account for max TCP header") Signed-off-by: Jonathan Davies <jonathan.davies@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/mip6.h')
0 files changed, 0 insertions, 0 deletions