From owner-freebsd-xen@FreeBSD.ORG Mon Sep 12 11:07:17 2011 Return-Path: Delivered-To: freebsd-xen@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2A1E106567A for ; Mon, 12 Sep 2011 11:07:17 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A7A088FC1F for ; Mon, 12 Sep 2011 11:07:17 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p8CB7HJD005647 for ; Mon, 12 Sep 2011 11:07:17 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p8CB7HWq005645 for freebsd-xen@FreeBSD.org; Mon, 12 Sep 2011 11:07:17 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 12 Sep 2011 11:07:17 GMT Message-Id: <201109121107.p8CB7HWq005645@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-xen@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-xen@FreeBSD.org X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Sep 2011 11:07:17 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/155468 xen [xen] Xen PV i386 multi-kernel CPU system is not worki o kern/155353 xen [xen] [patch] put "nudging TOD" message under boot_ver o kern/154833 xen [xen]: xen 4.0 - DomU freebsd8.2RC3 i386, XEN kernel. o kern/154473 xen [xen] xen 4.0 - DomU freebsd8.1 i386, XEN kernel. Not o kern/154472 xen [xen] xen 4.0 - DomU freebsd8.1 i386 xen kernel reboot o kern/154428 xen [xen] xn0 network interface and PF - Massive performan o kern/154302 xen [xen] [panic] [patch] xn0: Error 2 parsing device/vif/ o kern/153789 xen [xen] [regression] FreeBSD 8.2-RC1 crashes under Solar o kern/153674 xen [xen] i386/XEN idle thread shows wrong percentages o kern/153672 xen [xen] [panic] i386/XEN panics under heavy fork load o kern/153620 xen [xen] Xen guest system clock drifts in AWS EC2 (FreeBS o kern/153477 xen [xen] XEN pmap code abuses vm page queue lock o kern/153150 xen [xen] xen/ec2: disable checksum offloading on interfac o kern/152228 xen [xen] [panic] Xen/PV panic with machdep.idle_mwait=1 o kern/144629 xen [xen] FreeBSD 8-RELEASE XEN pvm networking doesn't wor o kern/143398 xen [xen] FreeBSD 8-RELEASE XEN pvm networking doesn't wor o kern/143340 xen [xen] FreeBSD 8-RELEASE XEN pvm networking doesn't wor f kern/143069 xen [xen] [panic] Xen Kernel Panic - Memory modified after f kern/135667 xen ufs filesystem corruption on XEN DomU system f kern/135421 xen [xen] FreeBSD Xen PVM DomU network failure - netfronc. f kern/135178 xen [xen] Xen domU outgoing data transfer stall when TSO i p kern/135069 xen [xen] FreeBSD-current/Xen SMP doesn't function at all f i386/124516 xen [xen] FreeBSD-CURRENT Xen Kernel Segfaults when config o kern/118734 xen [xen] FreeBSD 6.3-RC1 and FreeBSD 7.0-BETA 4 fail to b 24 problems total. From owner-freebsd-xen@FreeBSD.ORG Mon Sep 12 23:37:03 2011 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D62B41065673 for ; Mon, 12 Sep 2011 23:37:03 +0000 (UTC) (envelope-from gibbs@scsiguy.com) Received: from aslan.scsiguy.com (www.scsiguy.com [70.89.174.89]) by mx1.freebsd.org (Postfix) with ESMTP id A8DC88FC08 for ; Mon, 12 Sep 2011 23:37:03 +0000 (UTC) Received: from Justins-MacBook-Pro.local (207-225-98-3.dia.static.qwest.net [207.225.98.3]) (authenticated bits=0) by aslan.scsiguy.com (8.14.4/8.14.4) with ESMTP id p8CNcJHW037161 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 12 Sep 2011 17:38:19 -0600 (MDT) (envelope-from gibbs@scsiguy.com) Message-ID: <4E6E978C.5060608@scsiguy.com> Date: Mon, 12 Sep 2011 17:36:44 -0600 From: "Justin T. Gibbs" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 MIME-Version: 1.0 To: "freebsd-xen@freebsd.org" Content-Type: multipart/mixed; boundary="------------030606050402080907060207" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (aslan.scsiguy.com [70.89.174.89]); Mon, 12 Sep 2011 17:38:19 -0600 (MDT) Cc: Subject: [CFT][PATCH] Netfront fixes for FreeBSD-head X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Sep 2011 23:37:03 -0000 This is a multi-part message in MIME format. --------------030606050402080907060207 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Folks, I'm planning to ask RE for permission to merge the following netfront fixes (listed below) into 9.0/head. Before I do so, I'd appreciate some community testing on the proposed patch set (attached). The main areas of concern are: o TSO/LRO and performance o Compatibility with NetBSD and other Dom0s that lack sg or TSO/LRO support. o Compatibility with configurations enabling ioemu on an interface. Thanks, Justin Change 504547 on 2011/09/12 by justing@justing-ns1 Update netfront so that it queries and honors published back-end features. Reported by: Hugo Silva (fix inspired by patch provided) sys/dev/xen/netfront/netfront.c: o Add xn_query_features() which reads the XenStore and records the TSO, LRO, and chained ring-request support of the backend. o Rename xn_configure_lro() to xn_configure_features() and use this routine to manage the setup of TSO, LRO, and checksum offload. o In create_netdev(), initialize if_capabilities and if_hwassist to the capabilities found on all backends. Delegate configuration of if_capenable and the TSO flag if if_hwassist to xn_configure_features(). Change 504474 on 2011/09/12 by justing@justing-ns1 Modify the netfront driver so it can successfully attach to PV devices with the ioemu attribute set. Reported by: Janne Snabb (fix inspired by patch provided) PR: kern/154302 sys/dev/xen/netfront/netfront.c: o If a mac address for the interface cannot be found in the front-side XenStore tree, look for an entry in the back-side tree. With ioemu devices, the emulator does not populate the front side tree and neither does Xend. o Return an error rather than panic when an attach attempt fails. Change 503342 on 2011/09/01 by justing@justing-ns1 Correct suspend/resume support in the Netfront driver. sys/dev/xen/netfront/netfront.c: o Implement netfront_suspend(), a specialized suspend handler for the netfront driver. This routine simply disables the carrier so the driver is idle during system suspend processing. o Fix a leak when re-initializing LRO during a link reset. o In netif_release_tx_bufs(), when cleaning up the grant references for our TX ring, use gnttab_end_foreign_access_ref instead of attempting to grant the page again. o In netif_release_tx_bufs(), we do not track mbufs associated with mbuf chains, but instead just free each mbuf directly. Use m_free(), not m_freem(), to avoid double frees of mbufs. o Refactor some code to enhance clarity. --------------030606050402080907060207 Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0"; name="netfront.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="netfront.diff" --- //depot/vendor/FreeBSD/head/sys/dev/xen/netfront/netfront.c 2011-06-11 05:00:28.000000000 -0600 +++ //depot/SpectraBSD/head/sys/dev/xen/netfront/netfront.c 2011-09-12 23:13:27.000000000 -0600 @@ -92,7 +92,8 @@ #include "xenbus_if.h" -#define XN_CSUM_FEATURES (CSUM_TCP | CSUM_UDP | CSUM_TSO) +/* Features supported by all backends. TSO and LRO can be negotiated */ +#define XN_CSUM_FEATURES (CSUM_TCP | CSUM_UDP) #define NET_TX_RING_SIZE __RING_SIZE((netif_tx_sring_t *)0, PAGE_SIZE) #define NET_RX_RING_SIZE __RING_SIZE((netif_rx_sring_t *)0, PAGE_SIZE) @@ -159,6 +160,8 @@ static void xn_ifinit_locked(struct netfront_info *); static void xn_ifinit(void *); static void xn_stop(struct netfront_info *); +static void xn_query_features(struct netfront_info *np); +static int xn_configure_features(struct netfront_info *np); #ifdef notyet static void xn_watchdog(struct ifnet *); #endif @@ -174,7 +177,7 @@ static int create_netdev(device_t dev); static void netif_disconnect_backend(struct netfront_info *info); static int setup_device(device_t dev, struct netfront_info *info); -static void end_access(int ref, void *page); +static void free_ring(int *ref, void *ring_ptr_ref); static int xn_ifmedia_upd(struct ifnet *ifp); static void xn_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr); @@ -261,6 +264,7 @@ u_int irq; u_int copying_receiver; u_int carrier; + u_int maxfrags; /* Receive-ring batched refills. */ #define RX_MIN_TARGET 32 @@ -405,11 +409,33 @@ { int error, i; char *s, *e, *macstr; + const char *path; - error = xs_read(XST_NIL, xenbus_get_node(dev), "mac", NULL, - (void **) &macstr); - if (error) + path = xenbus_get_node(dev); + error = xs_read(XST_NIL, path, "mac", NULL, (void **) &macstr); + if (error == ENOENT) { + /* + * Deal with missing mac XenStore nodes on devices with + * HVM emulation (the 'ioemu' configuration attribute) + * enabled. + * + * The HVM emulator may execute in a stub device model + * domain which lacks the permission, only given to Dom0, + * to update the guest's XenStore tree. For this reason, + * the HVM emulator doesn't even attempt to write the + * front-side mac node, even when operating in Dom0. + * However, there should always be a mac listed in the + * backend tree. Fallback to this version if our query + * of the front side XenStore location doesn't find + * anything. + */ + path = xenbus_get_otherend_path(dev); + error = xs_read(XST_NIL, path, "mac", NULL, (void **) &macstr); + } + if (error != 0) { + xenbus_dev_fatal(dev, error, "parsing %s/mac", path); return (error); + } s = macstr; for (i = 0; i < ETHER_ADDR_LEN; i++) { @@ -450,7 +476,7 @@ err = create_netdev(dev); if (err) { xenbus_dev_fatal(dev, err, "creating netdev"); - return err; + return (err); } #if __FreeBSD_version >= 700000 @@ -460,10 +486,22 @@ &xn_enable_lro, 0, "Large Receive Offload"); #endif - return 0; + return (0); } +static int +netfront_suspend(device_t dev) +{ + struct netfront_info *info = device_get_softc(dev); + XN_RX_LOCK(info); + XN_TX_LOCK(info); + netfront_carrier_off(info); + XN_TX_UNLOCK(info); + XN_RX_UNLOCK(info); + return (0); +} + /** * We are reconnecting to the backend, due to a suspend/resume, or a backend * driver restart. We tear down our netif structure and recreate it, but @@ -749,10 +787,7 @@ */ if (((uintptr_t)m) <= NET_TX_RING_SIZE) continue; - gnttab_grant_foreign_access_ref(np->grant_tx_ref[i], - xenbus_get_otherend_id(np->xbdev), - virt_to_mfn(mtod(m, vm_offset_t)), - GNTMAP_readonly); + gnttab_end_foreign_access_ref(np->grant_tx_ref[i]); gnttab_release_grant_reference(&np->gref_tx_head, np->grant_tx_ref[i]); np->grant_tx_ref[i] = GRANT_REF_INVALID; @@ -761,7 +796,7 @@ if (np->xn_cdata.xn_tx_chain_cnt < 0) { panic("netif_release_tx_bufs: tx_chain_cnt must be >= 0"); } - m_freem(m); + m_free(m); } } @@ -1494,7 +1529,7 @@ * deal with nfrags > MAX_TX_REQ_FRAGS, which is a quirk of * the Linux network stack. */ - if (nfrags > MAX_TX_REQ_FRAGS) { + if (nfrags > sc->maxfrags) { m = m_defrag(m_head, M_DONTWAIT); if (!m) { /* @@ -1911,6 +1946,8 @@ return (error); /* Step 1: Reinitialise variables. */ + xn_query_features(np); + xn_configure_features(np); netif_release_tx_bufs(np); /* Step 2: Rebuild the RX buffer freelist and the RX ring itself. */ @@ -1978,6 +2015,67 @@ #endif } +static void +xn_query_features(struct netfront_info *np) +{ + int val; + + device_printf(np->xbdev, "backend features:"); + + if (xs_scanf(XST_NIL, xenbus_get_otherend_path(np->xbdev), + "feature-sg", NULL, "%d", &val) < 0) + val = 0; + + np->maxfrags = 1; + if (val) { + np->maxfrags = MAX_TX_REQ_FRAGS; + printf(" feature-sg"); + } + + if (xs_scanf(XST_NIL, xenbus_get_otherend_path(np->xbdev), + "feature-gso-tcpv4", NULL, "%d", &val) < 0) + val = 0; + + np->xn_ifp->if_capabilities &= ~(IFCAP_TSO4|IFCAP_LRO); + if (val) { + np->xn_ifp->if_capabilities |= IFCAP_TSO4|IFCAP_LRO; + printf(" feature-gso-tcp4"); + } + + printf("\n"); +} + +static int +xn_configure_features(struct netfront_info *np) +{ + int err; + + err = 0; +#if __FreeBSD_version >= 700000 + if ((np->xn_ifp->if_capenable & IFCAP_LRO) != 0) + tcp_lro_free(&np->xn_lro); +#endif + np->xn_ifp->if_capenable = + np->xn_ifp->if_capabilities & ~(IFCAP_LRO|IFCAP_TSO4); + np->xn_ifp->if_hwassist &= ~CSUM_TSO; +#if __FreeBSD_version >= 700000 + if (xn_enable_lro && (np->xn_ifp->if_capabilities & IFCAP_LRO) != 0) { + err = tcp_lro_init(&np->xn_lro); + if (err) { + device_printf(np->xbdev, "LRO initialization failed\n"); + } else { + np->xn_lro.ifp = np->xn_ifp; + np->xn_ifp->if_capenable |= IFCAP_LRO; + } + } + if ((np->xn_ifp->if_capabilities & IFCAP_TSO4) != 0) { + np->xn_ifp->if_capenable |= IFCAP_TSO4; + np->xn_ifp->if_hwassist |= CSUM_TSO; + } +#endif + return (err); +} + /** Create a network device. * @param handle device handle */ @@ -2002,7 +2100,7 @@ np->rx_target = RX_MIN_TARGET; np->rx_min_target = RX_MIN_TARGET; np->rx_max_target = RX_MAX_TARGET; - + /* Initialise {tx,rx}_skbs to be a free chain containing every entry. */ for (i = 0; i <= NET_TX_RING_SIZE; i++) { np->tx_mbufs[i] = (void *) ((u_long) i+1); @@ -2032,11 +2130,8 @@ } err = xen_net_read_mac(dev, np->mac); - if (err) { - xenbus_dev_fatal(dev, err, "parsing %s/mac", - xenbus_get_node(dev)); + if (err) goto out; - } /* Set up ifnet structure */ ifp = np->xn_ifp = if_alloc(IFT_ETHER); @@ -2055,19 +2150,6 @@ ifp->if_hwassist = XN_CSUM_FEATURES; ifp->if_capabilities = IFCAP_HWCSUM; -#if __FreeBSD_version >= 700000 - ifp->if_capabilities |= IFCAP_TSO4; - if (xn_enable_lro) { - int err = tcp_lro_init(&np->xn_lro); - if (err) { - device_printf(dev, "LRO initialization failed\n"); - goto exit; - } - np->xn_lro.ifp = ifp; - ifp->if_capabilities |= IFCAP_LRO; - } -#endif - ifp->if_capenable = ifp->if_capabilities; ether_ifattach(ifp, np->mac); callout_init(&np->xn_stat_ch, CALLOUT_MPSAFE); @@ -2078,8 +2160,7 @@ exit: gnttab_free_grant_references(np->gref_tx_head); out: - panic("do something smart"); - + return (err); } /** @@ -2133,12 +2214,8 @@ XN_TX_UNLOCK(info); XN_RX_UNLOCK(info); - end_access(info->tx_ring_ref, info->tx.sring); - end_access(info->rx_ring_ref, info->rx.sring); - info->tx_ring_ref = GRANT_REF_INVALID; - info->rx_ring_ref = GRANT_REF_INVALID; - info->tx.sring = NULL; - info->rx.sring = NULL; + free_ring(&info->tx_ring_ref, &info->tx.sring); + free_ring(&info->rx_ring_ref, &info->rx.sring); if (info->irq) unbind_from_irqhandler(info->irq); @@ -2146,12 +2223,17 @@ info->irq = 0; } - static void -end_access(int ref, void *page) +free_ring(int *ref, void *ring_ptr_ref) { - if (ref != GRANT_REF_INVALID) - gnttab_end_foreign_access(ref, page); + void **ring_ptr_ptr = ring_ptr_ref; + + if (*ref != GRANT_REF_INVALID) { + /* This API frees the associated storage. */ + gnttab_end_foreign_access(*ref, *ring_ptr_ptr); + *ref = GRANT_REF_INVALID; + } + *ring_ptr_ptr = NULL; } static int @@ -2174,7 +2256,7 @@ DEVMETHOD(device_attach, netfront_attach), DEVMETHOD(device_detach, netfront_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_suspend, netfront_suspend), DEVMETHOD(device_resume, netfront_resume), /* Xenbus interface */ --------------030606050402080907060207-- From owner-freebsd-xen@FreeBSD.ORG Tue Sep 13 17:02:01 2011 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00E98106564A for ; Tue, 13 Sep 2011 17:02:01 +0000 (UTC) (envelope-from seanbru@yahoo-inc.com) Received: from mrout1-b.corp.bf1.yahoo.com (mrout1-b.corp.bf1.yahoo.com [98.139.253.104]) by mx1.freebsd.org (Postfix) with ESMTP id B3A9B8FC1B for ; Tue, 13 Sep 2011 17:02:00 +0000 (UTC) Received: from [127.0.0.1] (rideseveral.corp.yahoo.com [10.73.160.231]) by mrout1-b.corp.bf1.yahoo.com (8.14.4/8.14.4/y.out) with ESMTP id p8DGpacv046422; Tue, 13 Sep 2011 09:51:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yahoo-inc.com; s=cobra; t=1315932696; bh=y3rONkerixkDp55i7LbHtn+5hA5l8jNuV7BU1QkK+lY=; h=Subject:From:To:Cc:In-Reply-To:References:Content-Type:Date: Message-ID:Mime-Version:Content-Transfer-Encoding; b=Os8str133W4+DUHND9i9G8VPb+FLXtyxBC4X3tgTs8yVTie7Ip1ZpZFgJA+CmV9Eh Cw37j1kq5ZfSNFj9plMffRPIYyazm/oSGfQIyGfkJL4ZQSYmiWYxnraNpNIDhaYbq2 Me33XwVtGZJ90KH/qwJsCNjB71FMnL0Cs+1IdHBg= From: Sean Bruno To: "Justin T. Gibbs" In-Reply-To: <4E6E978C.5060608@scsiguy.com> References: <4E6E978C.5060608@scsiguy.com> Content-Type: text/plain; charset="UTF-8" Date: Tue, 13 Sep 2011 09:51:35 -0700 Message-ID: <1315932695.3217.0.camel@hitfishpass-lx.corp.yahoo.com> Mime-Version: 1.0 X-Mailer: Evolution 2.32.3 (2.32.3-1.fc14) Content-Transfer-Encoding: 7bit Cc: "freebsd-xen@freebsd.org" Subject: Re: [CFT][PATCH] Netfront fixes for FreeBSD-head X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Sep 2011 17:02:01 -0000 On Mon, 2011-09-12 at 16:36 -0700, Justin T. Gibbs wrote: > Folks, > > I'm planning to ask RE for permission to merge the following netfront > fixes (listed below) into 9.0/head. Before I do so, I'd appreciate some > community testing on the proposed patch set (attached). The main areas > of concern are: > > o TSO/LRO and performance > o Compatibility with NetBSD and other Dom0s that lack sg or TSO/LRO > support. > o Compatibility with configurations enabling ioemu on an interface. > > Thanks, > Justin Should these be applied with the suspend/resume enhancements? Sean From owner-freebsd-xen@FreeBSD.ORG Tue Sep 13 17:03:28 2011 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 542A5106564A for ; Tue, 13 Sep 2011 17:03:28 +0000 (UTC) (envelope-from gibbs@scsiguy.com) Received: from aslan.scsiguy.com (ns1.scsiguy.com [70.89.174.89]) by mx1.freebsd.org (Postfix) with ESMTP id 250028FC15 for ; Tue, 13 Sep 2011 17:03:27 +0000 (UTC) Received: from Justins-MacBook-Pro.local (207-225-98-3.dia.static.qwest.net [207.225.98.3]) (authenticated bits=0) by aslan.scsiguy.com (8.14.4/8.14.4) with ESMTP id p8DH4u3V042446 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 13 Sep 2011 11:04:56 -0600 (MDT) (envelope-from gibbs@scsiguy.com) Message-ID: <4E6F8CDB.7070708@scsiguy.com> Date: Tue, 13 Sep 2011 11:03:23 -0600 From: "Justin T. Gibbs" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 MIME-Version: 1.0 To: Sean Bruno References: <4E6E978C.5060608@scsiguy.com> <1315932695.3217.0.camel@hitfishpass-lx.corp.yahoo.com> In-Reply-To: <1315932695.3217.0.camel@hitfishpass-lx.corp.yahoo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (aslan.scsiguy.com [70.89.174.89]); Tue, 13 Sep 2011 11:04:56 -0600 (MDT) Cc: "freebsd-xen@freebsd.org" Subject: Re: [CFT][PATCH] Netfront fixes for FreeBSD-head X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Sep 2011 17:03:28 -0000 On 9/13/11 10:51 AM, Sean Bruno wrote: > > On Mon, 2011-09-12 at 16:36 -0700, Justin T. Gibbs wrote: >> Folks, >> >> I'm planning to ask RE for permission to merge the following netfront >> fixes (listed below) into 9.0/head. Before I do so, I'd appreciate some >> community testing on the proposed patch set (attached). The main areas >> of concern are: >> >> o TSO/LRO and performance >> o Compatibility with NetBSD and other Dom0s that lack sg or TSO/LRO >> support. >> o Compatibility with configurations enabling ioemu on an interface. >> >> Thanks, >> Justin > Should these be applied with the suspend/resume enhancements? > > Sean They include the suspend resume fixes for netfront, but you shouldn't need to other patches for this to work. If you have installed those patches, you'll want to start with a "FreeBSD/head" version of netfront.c before applying this patch. -- Justin From owner-freebsd-xen@FreeBSD.ORG Thu Sep 15 04:43:21 2011 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9F4E106564A for ; Thu, 15 Sep 2011 04:43:21 +0000 (UTC) (envelope-from snabb@epipe.com) Received: from tiktik.epipe.com (tiktik.epipe.com [IPv6:2001:1828:0:3::2]) by mx1.freebsd.org (Postfix) with ESMTP id 76A2D8FC08 for ; Thu, 15 Sep 2011 04:43:21 +0000 (UTC) Received: from tiktik.epipe.com (tiktik.epipe.com [IPv6:2001:1828:0:3::2]) by tiktik.epipe.com (8.14.4/8.14.4) with ESMTP id p8F4hK3K058428 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 15 Sep 2011 04:43:20 GMT (envelope-from snabb@epipe.com) X-DKIM: Sendmail DKIM Filter v2.8.3 tiktik.epipe.com p8F4hK3K058428 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=epipe.com; s=default; t=1316061800; x=1316666600; bh=v2Lhb5NwZ05Fvp+SDmU+f2Dz6wqXk5TtSW3Tvr4I4Jk=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=Og+XDRFwBge4+GzcGbFcP4gmPbxYSkxOQMNLCKdiNqIYJ9rBW3RmUu6VXDRndv5FI xOfshjNYpZx3butWjyu/LmvOVGVcMwODxf/bfu4Ub4/ryA0iyQAi9m989YDRPD87YS XIhB6W0R2cL562nAWh+nrL3IdYb44YXJCup0Frqs= Date: Thu, 15 Sep 2011 04:43:20 +0000 (UTC) From: Janne Snabb To: "Justin T. Gibbs" In-Reply-To: <4E6E978C.5060608@scsiguy.com> Message-ID: References: <4E6E978C.5060608@scsiguy.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (tiktik.epipe.com [IPv6:2001:1828:0:3::2]); Thu, 15 Sep 2011 04:43:20 +0000 (UTC) Cc: "freebsd-xen@freebsd.org" Subject: Re: [CFT][PATCH] Netfront fixes for FreeBSD-head X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Sep 2011 04:43:21 -0000 On Mon, 12 Sep 2011, Justin T. Gibbs wrote: > I'm planning to ask RE for permission to merge the following netfront > fixes (listed below) into 9.0/head. Excellent! I was already assuming that 9.0 is going to be as broken with Xen as 8.2. > Before I do so, I'd appreciate some > community testing on the proposed patch set (attached). The main areas > of concern are: [..] > o Compatibility with configurations enabling ioemu on an interface. Unfortunately I do not have the previous Xen setup available any more. I had it temporarily for evaluating virtualized FreeBSD and that evaluation ended with a conclusion that something else is a better solution in that particular case. However, after reading your patch, the MAC/ioemu/"do something smart" part of the patch looks good to me. Please go ahead. The other parts look sensible as well but I am not familiar enough with the code to really say so. -- Janne Snabb / EPIPE Communications snabb@epipe.com - http://epipe.com/ From owner-freebsd-xen@FreeBSD.ORG Thu Sep 15 10:35:51 2011 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D378106575A for ; Thu, 15 Sep 2011 10:35:51 +0000 (UTC) (envelope-from hugo@barafranca.com) Received: from mail.barafranca.com (mail.barafranca.com [67.213.67.47]) by mx1.freebsd.org (Postfix) with ESMTP id D1E028FC14 for ; Thu, 15 Sep 2011 10:35:50 +0000 (UTC) Received: from localhost (unknown [172.16.100.24]) by mail.barafranca.com (Postfix) with ESMTP id A3461B6C; Thu, 15 Sep 2011 10:35:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at barafranca.com Received: from mail.barafranca.com ([172.16.100.24]) by localhost (mail.barafranca.com [172.16.100.24]) (amavisd-new, port 10024) with ESMTP id gBCF4FiZaii9; Thu, 15 Sep 2011 10:35:10 +0000 (UTC) Received: from [192.168.1.1] (static-b4-252-232.telepac.pt [81.193.252.232]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.barafranca.com (Postfix) with ESMTPSA id E12BCB62; Thu, 15 Sep 2011 10:35:09 +0000 (UTC) Message-ID: <4E71D4E5.1020009@barafranca.com> Date: Thu, 15 Sep 2011 11:35:17 +0100 From: Hugo Silva User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 MIME-Version: 1.0 To: Janne Snabb References: <4E6E978C.5060608@scsiguy.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "freebsd-xen@freebsd.org" Subject: Re: [CFT][PATCH] Netfront fixes for FreeBSD-head [and an OT issue] X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Sep 2011 10:35:51 -0000 On 09/15/11 05:43, Janne Snabb wrote: > On Mon, 12 Sep 2011, Justin T. Gibbs wrote: > >> I'm planning to ask RE for permission to merge the following netfront >> fixes (listed below) into 9.0/head. > Assuming this is the same patch that I posted on the list after someone sent it to me, it seems to solve the problem (xn* works). I have several VMs running with it for around 3 weeks now, no problem whatsoever in that area. > Excellent! I was already assuming that 9.0 is going to be as broken > with Xen as 8.2. A major problem (and after the netdiff fix, the only one that comes to mind in FreeBSD/Xen, from a SA PoV) right now is the VMs losing massive amounts of time (just the other day I manually ran ntpdate, for a 1h adjustment); started a thread last week or so, but it died down. It may not happen 100% of the time (calcru: runtime went backwards + losing system time), as I remember that a couple of years ago several people on the list had this problem while I wasn't experiencing it. Perhaps it depends on the dom0 OS, some system hardware.. I really have no idea.. If someone else is running amd64 HVM+PV, let us know if you see the same? Regards, Hugo From owner-freebsd-xen@FreeBSD.ORG Thu Sep 15 13:01:46 2011 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 234D9106566C for ; Thu, 15 Sep 2011 13:01:46 +0000 (UTC) (envelope-from gibbs@scsiguy.com) Received: from aslan.scsiguy.com (mail.scsiguy.com [70.89.174.89]) by mx1.freebsd.org (Postfix) with ESMTP id E85848FC19 for ; Thu, 15 Sep 2011 13:01:45 +0000 (UTC) Received: from macbook.scsiguy.com (macbook.scsiguy.com [192.168.0.99]) (authenticated bits=0) by aslan.scsiguy.com (8.14.4/8.14.4) with ESMTP id p8FD32rE052962 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Thu, 15 Sep 2011 07:03:03 -0600 (MDT) (envelope-from gibbs@scsiguy.com) Message-ID: <4E71F72E.4060401@scsiguy.com> Date: Thu, 15 Sep 2011 07:01:34 -0600 From: "Justin T. Gibbs" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 MIME-Version: 1.0 To: Hugo Silva References: <4E6E978C.5060608@scsiguy.com> <4E71D4E5.1020009@barafranca.com> In-Reply-To: <4E71D4E5.1020009@barafranca.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (aslan.scsiguy.com [192.168.0.4]); Thu, 15 Sep 2011 07:03:03 -0600 (MDT) Cc: "freebsd-xen@freebsd.org" Subject: Re: [CFT][PATCH] Netfront fixes for FreeBSD-head [and an OT issue] X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Sep 2011 13:01:46 -0000 On 9/15/11 4:35 AM, Hugo Silva wrote: > On 09/15/11 05:43, Janne Snabb wrote: >> On Mon, 12 Sep 2011, Justin T. Gibbs wrote: >> >>> I'm planning to ask RE for permission to merge the following netfront >>> fixes (listed below) into 9.0/head. > Assuming this is the same patch that I posted on the list after someone > sent it to me, it seems to solve the problem (xn* works). It is similar, but not identical. If you have the resources to test my patch, I would appreciate it. > A major problem (and after the netdiff fix, the only one that comes to > mind in FreeBSD/Xen, from a SA PoV) right now is the VMs losing massive > amounts of time (just the other day I manually ran ntpdate, for a 1h > adjustment); started a thread last week or so, but it died down. > > It may not happen 100% of the time (calcru: runtime went backwards + > losing system time), as I remember that a couple of years ago several > people on the list had this problem while I wasn't experiencing it. > > Perhaps it depends on the dom0 OS, some system hardware.. I really have > no idea.. > > If someone else is running amd64 HVM+PV, let us know if you see the same? We run it at Spectra Logic. I can replicate the "calcru: runtime went backwards" issue if I do not pin our FreeBSD VM such that it exclusively owns the CPUs it uses. I have not had time to dig into this yet, since it is not a blocking bug for our product. I hope to have some time to work on this in a few weeks. -- Justin From owner-freebsd-xen@FreeBSD.ORG Thu Sep 15 14:52:42 2011 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F6D81065674 for ; Thu, 15 Sep 2011 14:52:42 +0000 (UTC) (envelope-from hugo@barafranca.com) Received: from mail.barafranca.com (mail.barafranca.com [67.213.67.47]) by mx1.freebsd.org (Postfix) with ESMTP id 6191C8FC13 for ; Thu, 15 Sep 2011 14:52:42 +0000 (UTC) Received: from localhost (unknown [172.16.100.24]) by mail.barafranca.com (Postfix) with ESMTP id AB5C1EB5; Thu, 15 Sep 2011 14:52:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at barafranca.com Received: from mail.barafranca.com ([172.16.100.24]) by localhost (mail.barafranca.com [172.16.100.24]) (amavisd-new, port 10024) with ESMTP id 5erVC-MRboYt; Thu, 15 Sep 2011 14:51:57 +0000 (UTC) Received: from [192.168.1.1] (static-b4-252-232.telepac.pt [81.193.252.232]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.barafranca.com (Postfix) with ESMTPSA id DECBDEB1; Thu, 15 Sep 2011 14:51:56 +0000 (UTC) Message-ID: <4E721114.7000600@barafranca.com> Date: Thu, 15 Sep 2011 15:52:04 +0100 From: Hugo Silva User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 MIME-Version: 1.0 To: "Justin T. Gibbs" References: <4E6E978C.5060608@scsiguy.com> <4E71D4E5.1020009@barafranca.com> <4E71F72E.4060401@scsiguy.com> In-Reply-To: <4E71F72E.4060401@scsiguy.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "freebsd-xen@freebsd.org" Subject: Re: [CFT][PATCH] Netfront fixes for FreeBSD-head [and an OT issue] X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Sep 2011 14:52:42 -0000 On 09/15/11 14:01, Justin T. Gibbs wrote: > On 9/15/11 4:35 AM, Hugo Silva wrote: >> On 09/15/11 05:43, Janne Snabb wrote: >>> On Mon, 12 Sep 2011, Justin T. Gibbs wrote: >>> >>>> I'm planning to ask RE for permission to merge the following netfront >>>> fixes (listed below) into 9.0/head. >> Assuming this is the same patch that I posted on the list after someone >> sent it to me, it seems to solve the problem (xn* works). > > It is similar, but not identical. If you have the resources to test my > patch, > I would appreciate it. I'll be travelling for the weekend, next week I'll give it a shot. Will it apply on 9.0-BETA2 sources? Regards, Hugo From owner-freebsd-xen@FreeBSD.ORG Fri Sep 16 20:20:21 2011 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09BDA106564A for ; Fri, 16 Sep 2011 20:20:21 +0000 (UTC) (envelope-from seanbru@yahoo-inc.com) Received: from mrout1-b.corp.bf1.yahoo.com (mrout1-b.corp.bf1.yahoo.com [98.139.253.104]) by mx1.freebsd.org (Postfix) with ESMTP id BC9328FC0A for ; Fri, 16 Sep 2011 20:20:20 +0000 (UTC) Received: from [127.0.0.1] (rideseveral.corp.yahoo.com [10.73.160.231]) by mrout1-b.corp.bf1.yahoo.com (8.14.4/8.14.4/y.out) with ESMTP id p8GKJlWZ045689; Fri, 16 Sep 2011 13:19:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yahoo-inc.com; s=cobra; t=1316204387; bh=t6vfRIwdiNh1O5gQcFc5VaZzmgQ8N22Cm4N5yfNwPMk=; h=Subject:From:To:Cc:In-Reply-To:References:Content-Type:Date: Message-ID:Mime-Version:Content-Transfer-Encoding; b=g/tPmcv3CJtw1KFbChJKUD9PdEyvxmqxEDDunnnlMOkec1VQv/MYexvLqPh9C0OjJ ruydZgSzRG+ZNkyXzRdJ8tPOyoS4ag3o414sESTdNNz0xixzhfshiiZSXvXuGwwlfJ OCNNQIJO1wE72+BoJe7qle2ZfDFbMqSOTCbm+uHE= From: Sean Bruno To: "Justin T. Gibbs" In-Reply-To: <4E6E978C.5060608@scsiguy.com> References: <4E6E978C.5060608@scsiguy.com> Content-Type: text/plain; charset="UTF-8" Date: Fri, 16 Sep 2011 13:19:46 -0700 Message-ID: <1316204386.2551.6.camel@hitfishpass-lx.corp.yahoo.com> Mime-Version: 1.0 X-Mailer: Evolution 2.32.3 (2.32.3-1.fc14) Content-Transfer-Encoding: 7bit Cc: "freebsd-xen@freebsd.org" Subject: Re: [CFT][PATCH] Netfront fixes for FreeBSD-head X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Sep 2011 20:20:21 -0000 On Mon, 2011-09-12 at 16:36 -0700, Justin T. Gibbs wrote: > Folks, > > I'm planning to ask RE for permission to merge the following netfront > fixes (listed below) into 9.0/head. Before I do so, I'd appreciate some > community testing on the proposed patch set (attached). The main areas > of concern are: > > o TSO/LRO and performance > o Compatibility with NetBSD and other Dom0s that lack sg or TSO/LRO > support. > o Compatibility with configurations enabling ioemu on an interface. > > Thanks, > Justin Ok, I've got ref9-xen64 and ref9-xen32 up and running and it looks good for a smoke test. I need to come up with a regression suite that will update these images and boot up to do "stuff and things" at some point. If project committer's want access here, you should be able to log in and poke around. "root" access via kerberos is totally available, but has to be cleared by clusteradm@ first. FreeBSD ref9-xen64.freebsd.org 9.0-BETA2 FreeBSD 9.0-BETA2 #2 r225561M: Wed Sep 14 14:37:48 PDT 2011 sbruno@ref9-xen64.freebsd.org:/dumpster/scratch/sbruno-scratch/test/sys/amd64/compile/XENHVM amd64 FreeBSD ref9-xen32.freebsd.org 9.0-BETA2 FreeBSD 9.0-BETA2 #0 r225561M: Wed Sep 14 15:41:40 PDT 2011 sbruno@ref9-xen32.freebsd.org:/dumpster/scratch/sbruno-scratch/test/sys/i386/compile/XEN i386