Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 520373 Details for
Bug 733651
netfront MTU drops to 1500 after domain migration
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh90 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
forward port of the RHEL5 patch
xen-netfront-jumbo-frames.patch (text/plain), 6.72 KB, created by
Paolo Bonzini
on 2011-08-29 12:18:44 UTC
(
hide
)
Description:
forward port of the RHEL5 patch
Filename:
MIME Type:
Creator:
Paolo Bonzini
Created:
2011-08-29 12:18:44 UTC
Size:
6.72 KB
patch
obsolete
>From 00fb21e9435005a01fdda65bd689e675d81523f6 Mon Sep 17 00:00:00 2001 >From: Paolo Bonzini <pbonzini@redhat.com> >Date: Fri, 26 Aug 2011 14:04:58 +0200 >Subject: [RHEL6.3 PATCH 0/2] xen-netfront: fix MTU reset after migration > >Bugzilla: 733651 > >Upstream status: Upstream did the same using the hw_features field > (and ndo_fix_features/ndo_set_features) that is not in RHEL6, so > I'm instead forward porting the RHEL5 changes. See commits > fb50793 and later. > >Brew build: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=3585817 > >The networking backend patches enabled jumbo frame support in the Xen >networking backend. However, the front-end would still revert to a >1500-byte MTU after migration. > >The reason for this is that after migration the front-end has to >renegotiate offloading features with the back-end, and thus it >calls xennet_set_features. To ensure the feature set matches the >backend's, xennet_set_features will temporarily disable scatter/gather. >Unfortunately this drops the MTU to 1500. > >The patches fix the problem by removing the double flip. > >(The behavior actually occurs even on the first connection, but it is not >visible because the MTU is set to 9000 later in the networking scripts. >Migration however should be transparent to the upper layers, so nobody >bothers about resetting the MTU). > >Paolo Bonzini (2): > xen-netfront: force-disable offloading features unsupported by the backend > xen-netfront: do not temporarily disable s/g when negotiation features > > drivers/net/xen-netfront.c | 64 ++++++++++++++++++++++++++----------------- > 1 files changed, 39 insertions(+), 25 deletions(-) > >-- >1.7.6 > >From 2085842fbd3792de457d75c5de74789c427845d3 Mon Sep 17 00:00:00 2001 >From: Paolo Bonzini <pbonzini@redhat.com> >Date: Fri, 26 Aug 2011 13:49:16 +0200 >Subject: [RHEL6.3 PATCH 1/2] xen-netfront: force-disable offloading features unsupported by the backend > >Even though the Xen backend has support for jumbo frames, currently >the front-end will still revert to a 1500-byte MTU after migration. > >The reason for this is that after migration the front-end has >to renegotiate offloading features with the back-end, and thus it >calls xennet_set_features. To ensure the feature set matches >the backend's, xennet_set_features will temporarily disable >scatter/gather. Unfortunately this drops the MTU to 1500. > >As part of fixing this, this patch changes xennet_set_sg and >xennet_set_tso to always invoke the underlying ethtool_op_set_* >functions. If scatter/gather is not supported by the backend, for >example, xennet_set_sg will force-disable it even if it fails >with -ENOSYS. This is fine because it may only happen when >xennet_set_{sg,tso} are called internally by xennet_set_features. > >Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> >--- > drivers/net/xen-netfront.c | 35 +++++++++++++++++++++-------------- > 1 files changed, 21 insertions(+), 14 deletions(-) > >diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c >index 4d839e4..15d0f79 100644 >--- a/drivers/net/xen-netfront.c >+++ b/drivers/net/xen-netfront.c >@@ -1526,35 +1526,42 @@ again: > > static int xennet_set_sg(struct net_device *dev, u32 data) > { >+ int val, rc; >+ > if (data) { > struct netfront_info *np = netdev_priv(dev); >- int val; >- > if (xenbus_scanf(XBT_NIL, np->xbdev->otherend, "feature-sg", > "%d", &val) < 0) > val = 0; >- if (!val) >- return -ENOSYS; >- } else if (dev->mtu > ETH_DATA_LEN) >- dev->mtu = ETH_DATA_LEN; >- >- return ethtool_op_set_sg(dev, data); >+ } else >+ val = 0; >+ >+ rc = ethtool_op_set_sg(dev, val); >+ if (rc == 0 && !val) { >+ if (dev->mtu > ETH_DATA_LEN) >+ dev->mtu = ETH_DATA_LEN; >+ if (data) >+ rc = -ENOSYS; >+ } >+ return rc; > } > > static int xennet_set_tso(struct net_device *dev, u32 data) > { >+ int val, rc; >+ > if (data) { > struct netfront_info *np = netdev_priv(dev); >- int val; >- > if (xenbus_scanf(XBT_NIL, np->xbdev->otherend, > "feature-gso-tcpv4", "%d", &val) < 0) > val = 0; >- if (!val) >- return -ENOSYS; >- } >+ } else >+ val = 0; > >- return ethtool_op_set_tso(dev, data); >+ rc = ethtool_op_set_tso(dev, val); >+ if (rc == 0 && !val && data) >+ rc = -ENOSYS; >+ return rc; > } > > static void xennet_set_features(struct net_device *dev) >-- >1.7.6 > > >From 00fb21e9435005a01fdda65bd689e675d81523f6 Mon Sep 17 00:00:00 2001 >From: Paolo Bonzini <pbonzini@redhat.com> >Date: Fri, 26 Aug 2011 14:03:42 +0200 >Subject: [RHEL6.3 PATCH 2/2] xen-netfront: do not temporarily disable s/g when negotiating features > >Following up on the previous patch, this one actually fixes the problem >with jumbo frames after migration. Now that xennet_set_{sg,tso} will >force-disable unsupported offloading features, they can be called exactly >once in xennet_set_features, without disabling s/g temporarily. > >xennet_create_dev will presume that all features are there, and >if necessary, xennet_set_features will disable those that are absent. > >Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> >--- > drivers/net/xen-netfront.c | 29 ++++++++++++++++++----------- > 1 files changed, 18 insertions(+), 11 deletions(-) > >diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c >index 15d0f79..b534ba6 100644 >--- a/drivers/net/xen-netfront.c >+++ b/drivers/net/xen-netfront.c >@@ -1179,7 +1179,9 @@ static struct net_device * __devinit xennet_create_dev(struct xenbus_device *dev > netdev->netdev_ops = &xennet_netdev_ops; > > netif_napi_add(netdev, &np->napi, xennet_poll, 64); >- netdev->features = NETIF_F_IP_CSUM; >+ >+ /* Assume all features and let xennet_set_features fix up. */ >+ netdev->features = NETIF_F_IP_CSUM | NETIF_F_SG | NETIF_F_TSO; > > SET_ETHTOOL_OPS(netdev, &xennet_ethtool_ops); > SET_NETDEV_DEV(netdev, &dev->dev); >@@ -1566,17 +1568,22 @@ static int xennet_set_tso(struct net_device *dev, u32 data) > > static void xennet_set_features(struct net_device *dev) > { >- /* Turn off all GSO bits except ROBUST. */ >- dev->features &= ~NETIF_F_GSO_MASK; >- dev->features |= NETIF_F_GSO_ROBUST; >- xennet_set_sg(dev, 0); >- >- /* We need checksum offload to enable scatter/gather and TSO. */ >- if (!(dev->features & NETIF_F_IP_CSUM)) >- return; >+ /* Set ROBUST, turn off all other GSO bits except TSO. */ >+ dev->features = >+ (dev->features & NETIF_F_TSO) | >+ (dev->features & ~NETIF_F_GSO_MASK) | >+ NETIF_F_GSO_ROBUST; > >- if (!xennet_set_sg(dev, 1)) >- xennet_set_tso(dev, 1); >+ /* >+ * We need checksum offload to enable scatter/gather, and >+ * scatter/gather to enable TSO. Calling xennet_set_sg and >+ * xennet_set_tso ensures that Xenstore is probed for feature >+ * support in the backend. >+ */ >+ xennet_set_sg(dev, ((dev->features & (NETIF_F_IP_CSUM | NETIF_F_SG)) == >+ (NETIF_F_IP_CSUM | NETIF_F_SG))); >+ xennet_set_tso(dev, ((dev->features & (NETIF_F_SG | NETIF_F_TSO)) == >+ (NETIF_F_SG | NETIF_F_TSO))); > } > > static int xennet_connect(struct net_device *dev) >-- >1.7.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 733651
: 520373