# HG changeset patch # User ssmith@weybridge.uk.xensource.com # Date 1157384304 -3600 # Node ID b219ea61a357385af107bc7261237f4bcfd35ae5 # Parent 5fa9b746d24fa2b427d9676cc5e27642bfd79137 Add support for netif frontends which don't support checksum offload. Signed-off-by: Steven Smith diff -r 5fa9b746d24f -r b219ea61a357 linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c --- a/linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c Sat Sep 02 12:11:54 2006 +0100 +++ b/linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c Mon Sep 04 16:38:24 2006 +0100 @@ -427,6 +427,14 @@ static int connect_rings(struct backend_ be->netif->dev->features |= NETIF_F_TSO; } + if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-no-csum-offload", + "%d", &val) < 0) + val = 0; + if (val) { + be->netif->features &= ~NETIF_F_IP_CSUM; + be->netif->dev->features &= ~NETIF_F_IP_CSUM; + } + /* Map the shared frame, irq etc. */ err = netif_map(be->netif, tx_ring_ref, rx_ring_ref, evtchn); if (err) {