From owner-freebsd-xen@freebsd.org Thu May 12 16:22:56 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 D5E92B379A8 for ; Thu, 12 May 2016 16:22:56 +0000 (UTC) (envelope-from prvs=93319c3d4=roger.pau@citrix.com) Received: from SMTP02.CITRIX.COM (smtp02.citrix.com [66.165.176.63]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "mail.citrix.com", Issuer "Verizon Public SureServer CA G14-SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7EA0B17AD for ; Thu, 12 May 2016 16:22:55 +0000 (UTC) (envelope-from prvs=93319c3d4=roger.pau@citrix.com) X-IronPort-AV: E=Sophos;i="5.24,610,1454976000"; d="scan'208";a="360287554" Date: Thu, 12 May 2016 18:22:47 +0200 From: 'Roger Pau =?iso-8859-1?B?TW9ubuknIChyb2dlci5wYXVAY2l0cml4LmNvbSk=?= To: Stephen Jones CC: "'freebsd-xen@freebsd.org'" , "Miguel C (miguelmclara@gmail.com)" , Wei Liu Subject: Re: xn ethernet issues as DOMU under NetBSD DOM0 FIXED! Message-ID: <20160512162247.64x5hyud5i2jfgqy@mac> References: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.0-neo (2016-04-07) X-DLP: MIA1 X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.22 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, 12 May 2016 16:22:56 -0000 On Thu, May 12, 2016 at 02:13:03PM +0000, Stephen Jones wrote: > Roger writes: > > > I think I have found what's causing the issue, but I don't have a NetBSD > > Dom0 in order to test the fix, could some of you please test the following patch and report back: > > > > > > https://people.freebsd.org/~royger/0001-xen-netfront-fix-feature-detection.patch > > > > It should apply cleanly against FreeBSD HEAD. > > --- a/sys/dev/xen/netfront/netfront.c > +++ b/sys/dev/xen/netfront/netfront.c > @@ -2016,7 +2016,7 @@ xn_query_features(struct netfront_info *np) > device_printf(np->xbdev, "backend features:"); > > if (xs_scanf(XST_NIL, xenbus_get_otherend_path(np->xbdev), > - "feature-sg", NULL, "%d", &val) < 0) > + "feature-sg", NULL, "%d", &val) != 0) > val = 0; > > np->maxfrags = 1; > @@ -2026,7 +2026,7 @@ xn_query_features(struct netfront_info *np) > } > > if (xs_scanf(XST_NIL, xenbus_get_otherend_path(np->xbdev), > - "feature-gso-tcpv4", NULL, "%d", &val) < 0) > + "feature-gso-tcpv4", NULL, "%d", &val) != 0) > val = 0; > > np->xn_ifp->if_capabilities &= ~(IFCAP_TSO4|IFCAP_LRO); > > FreeBSD freebsd 11.0-CURRENT FreeBSD 11.0-CURRENT #1: Thu May 12 13:48:47 UTC 2016 root@freebsd:/usr/src/sys/amd64/compile/SDF amd64 > > xn0: flags=8843 metric 0 mtu 1500 > options=3 > ether 00:16:3e:00:00:30 > inet 192.94.73.150 netmask 0xffffff00 broadcast 192.94.73.255 > nd6 options=29 > media: Ethernet manual > status: active > > xn0: at device/vif/0 on xenbusb_front0 > xn0: Ethernet address: 00:16:3e:00:00:30 > xn0: backend features: > xn0: link state changed to DOWN > xn0: link state changed to UP > > Indeed this does fix the issue. I am now able to ssh into a FreeBSD 11 DOMU running on a NetBSD DOM0. > I've done some basic in/out transfers over sftp and rates look good, no errors. > > Thank you for putting in an effort to get this working. I hope that your diff will be incorporated quickly into > FreeBSD 11 and backported where that can be done. Done, it's committed to HEAD: https://svnweb.freebsd.org/base?view=revision&revision=299542 And I plan to backport it to stable/10 in 3 days. Thanks for testing it! Roger.