From owner-freebsd-xen@freebsd.org Mon Oct 31 11:31:51 2016 Return-Path: Delivered-To: freebsd-xen@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94169C284EB for ; Mon, 31 Oct 2016 11:31:51 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83A6F1FD0 for ; Mon, 31 Oct 2016 11:31:51 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u9VBVpaG078478 for ; Mon, 31 Oct 2016 11:31:51 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-xen@FreeBSD.org Subject: [Bug 213439] ifOutOctets are always zero for Xen xn interfaces Date: Mon, 31 Oct 2016 11:31:51 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.0-STABLE X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@freebsd.org X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-xen@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.23 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, 31 Oct 2016 11:31:51 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D213439 --- Comment #8 from commit-hook@freebsd.org --- A commit references this bug: Author: royger Date: Mon Oct 31 11:31:11 UTC 2016 New revision: 308126 URL: https://svnweb.freebsd.org/changeset/base/308126 Log: xen/netfront: fix statistics Fix the statistics used by netfront. Reported by: Trond.Endrestol@ximalas.info Submitted by: ae Reviewed by: royger, Wei Liu MFC after: 4 weeks PR: 213439 Changes: head/sys/dev/xen/netfront/netfront.c --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-xen@freebsd.org Tue Nov 1 02:27:43 2016 Return-Path: Delivered-To: freebsd-xen@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A770BC29131 for ; Tue, 1 Nov 2016 02:27:43 +0000 (UTC) (envelope-from 010001581db696d1-e8172b98-d878-4f1e-9ac3-cd80b627ffbc-000000@amazonses.com) Received: from a8-60.smtp-out.amazonses.com (a8-60.smtp-out.amazonses.com [54.240.8.60]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D1FF1922 for ; Tue, 1 Nov 2016 02:27:43 +0000 (UTC) (envelope-from 010001581db696d1-e8172b98-d878-4f1e-9ac3-cd80b627ffbc-000000@amazonses.com) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=vnqrkfnvu6csdl6mwgk5t6ix3nnepx57; d=tarsnap.com; t=1477967255; h=Subject:To:References:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=nw107w+8+IE4O60QwEfwSezUwEaXOd1bcVeJUIFgo7s=; b=QvhIRZ4AlME0RmsGqXJ280IsQx/O6JaT1XrWx4kcF6ChUH3raJFwoQ3mY4jMWCco IO57HcqpL5+sjvpvRFYA5Er/VbqkODF3S8kGVOEAoLXLTIX9XjafHIMFPD1T1wI44sk cygOciNdoj1EqETblrgMlb9chk955NQhmhW0hD1o= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw; d=amazonses.com; t=1477967255; h=Subject:To:References:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding:Feedback-ID; bh=nw107w+8+IE4O60QwEfwSezUwEaXOd1bcVeJUIFgo7s=; b=iwBOQuoF0VTZ47GVAc14CZasFG4rfPhL/47Oov/ND1/iUx2cUafVQCFHKLIKJI9F sFgLrq8KE9IgDAFJSxoae5gw2ttl8UcbjWoyWVbJ4Ck4BE9XW8rV8F7EU2EgdCxhYQM aSPXmWhAeO4SxuZHeEXk0R0+XdSQC5Yj6mfoojfQ= Subject: Re: xn0 systat no egress data? To: Pete Wright , freebsd-cloud@freebsd.org, freebsd-xen@freebsd.org References: <8be5174c-fcd5-0e5b-921f-5cfc31e99c4f@nomadlogic.org> <010001581c9246a1-331188e9-2263-4600-abb3-09efc7ea3026-000000@email.amazonses.com> From: Colin Percival Message-ID: <010001581db696d1-e8172b98-d878-4f1e-9ac3-cd80b627ffbc-000000@email.amazonses.com> Date: Tue, 1 Nov 2016 02:27:35 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SES-Outgoing: 2016.11.01-54.240.8.60 Feedback-ID: 1.us-east-1.Lv9FVjaNvvR5llaqfLoOVbo2VxOELl7cjN0AOyXnPlk=:AmazonSES X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.23 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, 01 Nov 2016 02:27:43 -0000 On 10/31/16 14:57, Pete Wright wrote: > On 10/31/16 2:08 PM, Colin Percival wrote: >> On 10/31/16 13:44, Pete Wright wrote: >>> hey all - this is regarding the following bug i've opened: >>> >>> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213814 >>> >>> tl;dr version is that on 11.0-RELEASE on EC2 when i invoke "systat -ifstat" >>> the egress data flows for the xn0 device do not update. verified it works as >>> expected on 10.3-RELEASE. tried reading through code but am pretty confused >>> as to how xn0 is created and what code is used to update the sysctl MIBs. >> >> I think this might be fixed by r308126. Can you try applying that patch and >> report back? > > hrm doesn't look like it has changed anything on my end. > > i applied this patch against the 11.0.1 svn source: > https://svnweb.freebsd.org/base/head/sys/dev/xen/netfront/netfront.c?view=patch&r1=308126&r2=308125&pathrev=308126 > > then built/installed a kernel after applying this patch with no change. I > don't think i need to rebuild world for this, right? Hmm, that should have worked. (Assuming you rebooted into the new kernel, of course.) I'm out of ideas... maybe someone on the -xen list will know more... -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From owner-freebsd-xen@freebsd.org Tue Nov 1 05:08:50 2016 Return-Path: Delivered-To: freebsd-xen@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 014B3C2C09D; Tue, 1 Nov 2016 05:08:50 +0000 (UTC) (envelope-from pete@nomadlogic.org) Received: from vps-mail.nomadlogic.org (unknown [IPv6:2607:f2f8:a098::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D964811BE; Tue, 1 Nov 2016 05:08:49 +0000 (UTC) (envelope-from pete@nomadlogic.org) Received: from LA-DGT-31327.local (cpe-23-242-83-219.socal.res.rr.com [23.242.83.219]) by vps-mail.nomadlogic.org (OpenSMTPD) with ESMTPSA id b8fa0cec TLS version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO; Mon, 31 Oct 2016 22:08:48 -0700 (PDT) Subject: Re: xn0 systat no egress data? To: Colin Percival , freebsd-cloud@freebsd.org, freebsd-xen@freebsd.org References: <8be5174c-fcd5-0e5b-921f-5cfc31e99c4f@nomadlogic.org> <010001581c9246a1-331188e9-2263-4600-abb3-09efc7ea3026-000000@email.amazonses.com> <010001581db69ef4-f72357af-3af3-4a9f-89f4-58da717d63aa-000000@email.amazonses.com> From: Pete Wright Message-ID: <733457ca-98b5-3645-073d-68ac71eb9efa@nomadlogic.org> Date: Mon, 31 Oct 2016 22:08:47 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <010001581db69ef4-f72357af-3af3-4a9f-89f4-58da717d63aa-000000@email.amazonses.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.23 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, 01 Nov 2016 05:08:50 -0000 On 10/31/16 7:27 PM, Colin Percival wrote: > On 10/31/16 14:57, Pete Wright wrote: >> On 10/31/16 2:08 PM, Colin Percival wrote: >>> On 10/31/16 13:44, Pete Wright wrote: >>>> hey all - this is regarding the following bug i've opened: >>>> >>>> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213814 >>>> >>>> tl;dr version is that on 11.0-RELEASE on EC2 when i invoke "systat -ifstat" >>>> the egress data flows for the xn0 device do not update. verified it works as >>>> expected on 10.3-RELEASE. tried reading through code but am pretty confused >>>> as to how xn0 is created and what code is used to update the sysctl MIBs. >>> >>> I think this might be fixed by r308126. Can you try applying that patch and >>> report back? >> >> hrm doesn't look like it has changed anything on my end. >> >> i applied this patch against the 11.0.1 svn source: >> https://svnweb.freebsd.org/base/head/sys/dev/xen/netfront/netfront.c?view=patch&r1=308126&r2=308125&pathrev=308126 >> >> then built/installed a kernel after applying this patch with no change. I >> don't think i need to rebuild world for this, right? > > Hmm, that should have worked. (Assuming you rebooted into the new kernel, > of course.) > > I'm out of ideas... maybe someone on the -xen list will know more... thanks Colin - I'll double check my work tomorrow morning and ping -xen if i'm still having issues. cheers, -pete -- Pete Wright pete@nomadlogic.org nomadlogicLA From owner-freebsd-xen@freebsd.org Tue Nov 1 16:57:14 2016 Return-Path: Delivered-To: freebsd-xen@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85BFEC2AC5A for ; Tue, 1 Nov 2016 16:57:14 +0000 (UTC) (envelope-from pete@nomadlogic.org) Received: from vps-mail.nomadlogic.org (unknown [IPv6:2607:f2f8:a098::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 523801586 for ; Tue, 1 Nov 2016 16:57:14 +0000 (UTC) (envelope-from pete@nomadlogic.org) Received: from la-dgt-31327.usa.tribune.com (nat-192-187-90-113.nat.tribpub.com [192.187.90.113]) by vps-mail.nomadlogic.org (OpenSMTPD) with ESMTPSA id 539df902 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO for ; Tue, 1 Nov 2016 09:57:13 -0700 (PDT) To: freebsd-xen@freebsd.org From: Pete Wright Subject: PR 213814: systat -ifstat does not update egress throughput Message-ID: <43ee3ed3-f725-1d46-1314-f711c2c9ad22@nomadlogic.org> Date: Tue, 1 Nov 2016 09:57:12 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.23 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, 01 Nov 2016 16:57:14 -0000 hello - I've filed the following PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213814 tl;dr version is that when i run "systat -ifstat" on AWS EC2 instances running 11.0-RELEASE I am not seeing metrics updates for egress network flows. I've observed this with with "en" and "ixv" NIC's. 10.3-RELEASE is not effected as far as I can tell. After a discussion on freebsd-cloud@ I also tested out r308126 with no success. Please let me know additional debug info or testing of patches is needed to help address this. Cheers, -pete -- Pete Wright pete@nomadlogic.org nomadlogicLA From owner-freebsd-xen@freebsd.org Fri Nov 4 07:54:58 2016 Return-Path: Delivered-To: freebsd-xen@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E50CDC2F687 for ; Fri, 4 Nov 2016 07:54:58 +0000 (UTC) (envelope-from liuyingdong@huawei.com) Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [119.145.14.66]) by mx1.freebsd.org (Postfix) with ESMTP id 74A4F1EC1 for ; Fri, 4 Nov 2016 07:54:54 +0000 (UTC) (envelope-from liuyingdong@huawei.com) Received: from 172.24.1.60 (EHLO SZXEMA417-HUB.china.huawei.com) ([172.24.1.60]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id CKU72020; Fri, 04 Nov 2016 15:43:50 +0800 (CST) Received: from SZXEMA506-MBS.china.huawei.com ([169.254.4.3]) by SZXEMA417-HUB.china.huawei.com ([10.82.72.34]) with mapi id 14.03.0235.001; Fri, 4 Nov 2016 15:43:42 +0800 From: Liuyingdong To: "roger.pau@citrix.com" CC: "freebsd-xen@freebsd.org" , "Zhaojun (Euler)" , Suoben Subject: [PATCH]netfront: need release all resources after adding and removing NICs time and again Thread-Topic: [PATCH]netfront: need release all resources after adding and removing NICs time and again Thread-Index: AdI2bwZCMPRaycDjRRazBkm6EMcXXQ== Date: Fri, 4 Nov 2016 07:43:41 +0000 Message-ID: <3655E9A8B903724782E1F75DCFD74E6BF966FF5A@szxema506-mbs.china.huawei.com> Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.177.20.238] MIME-Version: 1.0 X-CFilter-Loop: Reflected Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.23 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, 04 Nov 2016 07:54:59 -0000 On xen,freebsd 10.2 virtual machines hang after adding and removing NICs ti= me and again(more than 30 times). I found error log is as follows: "netfront can't alloc tx grant refs" Signed-off-by: Liudong Liu diff --git a/dev/xen/netfront/netfront.c b/dev/xen/netfront/netfront.c index 5497139..e96bbba 100644 --- a/dev/xen/netfront/netfront.c +++ b/dev/xen/netfront/netfront.c @@ -790,6 +790,44 @@ netif_release_tx_bufs(struct netfront_info *np) } } +static void netif_release_rx_bufs_copy(struct netfront_info *np) +{ + struct mbuf *m; + int i, ref; + int busy =3D 0, inuse =3D 0; + + XN_RX_LOCK(np); + + for (i =3D 0; i < NET_RX_RING_SIZE; i++) { + ref =3D np->grant_rx_ref[i]; + + if (ref =3D=3D GRANT_REF_INVALID) + continue; + + inuse++; + + m =3D np->rx_mbufs[i]; + + if (!gnttab_end_foreign_access_ref(ref)) + { + busy++; + continue; + } + + gnttab_release_grant_reference(&np->gref_rx_head, ref); + np->grant_rx_ref[i] =3D GRANT_REF_INVALID; + add_id_to_freelist(np->rx_mbufs, i); + + m_freem(m); + } + + if (busy) + DPRINTK("%s: Unable to release %d of %d inuse grant refere= nces out of %ld total.\n", + __FUNCTION__, busy, inuse, NET_RX_RING_SIZE); + + XN_RX_UNLOCK(np); +} + static void network_alloc_rx_buffers(struct netfront_info *sc) { @@ -2185,6 +2223,13 @@ netif_free(struct netfront_info *info) info->xn_ifp =3D NULL; } ifmedia_removeall(&info->sc_media); + + netif_release_tx_bufs(info); + if (info->copying_receiver) + netif_release_rx_bufs_copy(info); + gnttab_free_grant_references(info->gref_tx_head); + gnttab_free_grant_references(info->gref_rx_head); + } static void From owner-freebsd-xen@freebsd.org Sat Nov 5 08:40:16 2016 Return-Path: Delivered-To: freebsd-xen@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8CFF1C31A67 for ; Sat, 5 Nov 2016 08:40:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7CE65369 for ; Sat, 5 Nov 2016 08:40:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id uA58eFa9074217 for ; Sat, 5 Nov 2016 08:40:16 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-xen@FreeBSD.org Subject: [Bug 213541] xen unable to load Date: Sat, 05 Nov 2016 08:40:16 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: misc X-Bugzilla-Version: 11.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: terence26@yahoo.com X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-xen@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: resolution bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.23 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: Sat, 05 Nov 2016 08:40:16 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D213541 terence26@yahoo.com changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|Works As Intended |--- Status|Closed |Open --- Comment #17 from terence26@yahoo.com --- I have not answered in a while as I have been testing. I have done as suggested, which is install (many times) as MBR, but a new i= ssue occurs which still leads to xen not working - boot folder is missing apparently from what I can understand, the bootloader pool is not created a= nd not mounted What next? --=20 You are receiving this mail because: You are the assignee for the bug.=