From 27267e4388dce268c8b03ce8e4c4ec3b0800b234 Mon Sep 17 00:00:00 2001 From: Chuck Short Date: Mon, 21 Apr 2008 10:50:53 -0400 Subject: [PATCH] UBUNTU: Xen: Fix networking between dom0 and domU Bug: #218126 Signed-off-by: Chuck Short --- .../xen/patchset/004-xen-net-fix.patch | 38 ++++++++++++++++++++ 1 files changed, 38 insertions(+), 0 deletions(-) create mode 100644 debian/binary-custom.d/xen/patchset/004-xen-net-fix.patch diff --git a/debian/binary-custom.d/xen/patchset/004-xen-net-fix.patch b/debian/binary-custom.d/xen/patchset/004-xen-net-fix.patch new file mode 100644 index 0000000..996991b --- /dev/null +++ b/debian/binary-custom.d/xen/patchset/004-xen-net-fix.patch @@ -0,0 +1,38 @@ +diff -Naur ubuntu-hardy-xen/drivers/xen/netfront/netfront.c ubuntu-hardy-xen-new/drivers/xen/netfront/netfront.c +--- ubuntu-hardy-xen/drivers/xen/netfront/netfront.c 2008-04-21 09:16:12.000000000 -0400 ++++ ubuntu-hardy-xen-new/drivers/xen/netfront/netfront.c 2008-04-21 09:37:02.000000000 -0400 +@@ -622,6 +622,7 @@ + struct netfront_info *np = netdev_priv(dev); + + memset(&np->stats, 0, sizeof(np->stats)); ++ napi_enable(&np->napi); + + spin_lock_bh(&np->rx_lock); + if (netfront_carrier_ok(np)) { +@@ -830,6 +831,8 @@ + reservation.domid = DOMID_SELF; + + if (!xen_feature(XENFEAT_auto_translated_physmap)) { ++ int j; ++ + /* After all PTEs have been zapped, flush the TLB. */ + np->rx_mcl[i-1].args[MULTI_UVMFLAGS_INDEX] = + UVMF_TLB_FLUSH|UVMF_ALL; +@@ -847,7 +850,8 @@ + /* Check return status of HYPERVISOR_memory_op(). */ + if (unlikely(np->rx_mcl[i].result != i)) + panic("Unable to reduce memory reservation\n"); +- while (i--) ++ j = i; ++ while (j--) + BUG_ON(np->rx_mcl[i].result); + } else { + if (HYPERVISOR_memory_op(XENMEM_decrease_reservation, +@@ -1671,6 +1675,7 @@ + static int network_close(struct net_device *dev) + { + struct netfront_info *np = netdev_priv(dev); ++ napi_disable(&np->napi); + netif_stop_queue(np->netdev); + return 0; + } -- 1.5.4.3