diff options
author | Paul Durrant <Paul.Durrant@citrix.com> | 2013-10-16 12:50:32 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-10-17 15:35:17 -0400 |
commit | 82cada22a0bbec6a7afb573ef5fb6c512aaa2739 (patch) | |
tree | 509d5a4bea1dc636885572a4c5d85e9e7bbce32b /drivers/net/xen-netback/interface.c | |
parent | a94685876859be30446357db6d6c4a9c951305b4 (diff) |
xen-netback: enable IPv6 TCP GSO to the guest
This patch adds code to handle SKB_GSO_TCPV6 skbs and construct appropriate
extra or prefix segments to pass the large packet to the frontend. New
xenstore flags, feature-gso-tcpv6 and feature-gso-tcpv6-prefix, are sampled
to determine if the frontend is capable of handling such packets.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/xen-netback/interface.c')
-rw-r--r-- | drivers/net/xen-netback/interface.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c index cb0d8ea3d9f2..e4aa26748f80 100644 --- a/drivers/net/xen-netback/interface.c +++ b/drivers/net/xen-netback/interface.c | |||
@@ -214,8 +214,10 @@ static netdev_features_t xenvif_fix_features(struct net_device *dev, | |||
214 | 214 | ||
215 | if (!vif->can_sg) | 215 | if (!vif->can_sg) |
216 | features &= ~NETIF_F_SG; | 216 | features &= ~NETIF_F_SG; |
217 | if (!vif->gso && !vif->gso_prefix) | 217 | if (~(vif->gso_mask | vif->gso_prefix_mask) & GSO_BIT(TCPV4)) |
218 | features &= ~NETIF_F_TSO; | 218 | features &= ~NETIF_F_TSO; |
219 | if (~(vif->gso_mask | vif->gso_prefix_mask) & GSO_BIT(TCPV6)) | ||
220 | features &= ~NETIF_F_TSO6; | ||
219 | if (!vif->ip_csum) | 221 | if (!vif->ip_csum) |
220 | features &= ~NETIF_F_IP_CSUM; | 222 | features &= ~NETIF_F_IP_CSUM; |
221 | if (!vif->ipv6_csum) | 223 | if (!vif->ipv6_csum) |
@@ -320,7 +322,7 @@ struct xenvif *xenvif_alloc(struct device *parent, domid_t domid, | |||
320 | dev->netdev_ops = &xenvif_netdev_ops; | 322 | dev->netdev_ops = &xenvif_netdev_ops; |
321 | dev->hw_features = NETIF_F_SG | | 323 | dev->hw_features = NETIF_F_SG | |
322 | NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | | 324 | NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | |
323 | NETIF_F_TSO; | 325 | NETIF_F_TSO | NETIF_F_TSO6; |
324 | dev->features = dev->hw_features | NETIF_F_RXCSUM; | 326 | dev->features = dev->hw_features | NETIF_F_RXCSUM; |
325 | SET_ETHTOOL_OPS(dev, &xenvif_ethtool_ops); | 327 | SET_ETHTOOL_OPS(dev, &xenvif_ethtool_ops); |
326 | 328 | ||