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>
This commit is contained in:

committed by
David S. Miller

parent
a946858768
commit
82cada22a0
@@ -577,15 +577,40 @@ static int connect_rings(struct backend_info *be)
|
||||
val = 0;
|
||||
vif->can_sg = !!val;
|
||||
|
||||
vif->gso_mask = 0;
|
||||
vif->gso_prefix_mask = 0;
|
||||
|
||||
if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-gso-tcpv4",
|
||||
"%d", &val) < 0)
|
||||
val = 0;
|
||||
vif->gso = !!val;
|
||||
if (val)
|
||||
vif->gso_mask |= GSO_BIT(TCPV4);
|
||||
|
||||
if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-gso-tcpv4-prefix",
|
||||
"%d", &val) < 0)
|
||||
val = 0;
|
||||
vif->gso_prefix = !!val;
|
||||
if (val)
|
||||
vif->gso_prefix_mask |= GSO_BIT(TCPV4);
|
||||
|
||||
if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-gso-tcpv6",
|
||||
"%d", &val) < 0)
|
||||
val = 0;
|
||||
if (val)
|
||||
vif->gso_mask |= GSO_BIT(TCPV6);
|
||||
|
||||
if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-gso-tcpv6-prefix",
|
||||
"%d", &val) < 0)
|
||||
val = 0;
|
||||
if (val)
|
||||
vif->gso_prefix_mask |= GSO_BIT(TCPV6);
|
||||
|
||||
if (vif->gso_mask & vif->gso_prefix_mask) {
|
||||
xenbus_dev_fatal(dev, err,
|
||||
"%s: gso and gso prefix flags are not "
|
||||
"mutually exclusive",
|
||||
dev->otherend);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-no-csum-offload",
|
||||
"%d", &val) < 0)
|
||||
|
Reference in New Issue
Block a user