From owner-freebsd-xen@freebsd.org Fri May 13 01:59:41 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 AA618B37BDC for ; Fri, 13 May 2016 01:59:41 +0000 (UTC) (envelope-from miguelmclara@gmail.com) Received: from mail-lf0-x233.google.com (mail-lf0-x233.google.com [IPv6:2a00:1450:4010:c07::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 186161EEC for ; Fri, 13 May 2016 01:59:41 +0000 (UTC) (envelope-from miguelmclara@gmail.com) Received: by mail-lf0-x233.google.com with SMTP id u64so81383696lff.3 for ; Thu, 12 May 2016 18:59:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=GOXkjdbD6dNzOjOpItsweH9xfrYNUo4tLNvtB/2WWD8=; b=E8zFpAjlHMxQIWDLy/mEIj/kQj7jfyYX+tmHV518IsiYAcbRpU/iU1CvNc3gnCaT7v K1WqsUzJouJvv+lBgU150QZKkUMHVIwCxDDcGxlvIJvmwVfNyjw+6FgmQC366Y3qpkDq YOLlVOnXXMp62gqWIwtH7we+0JO+dwxYEhcHnKhrtL3uaVfeh6kY4EODKco0G1nCqA1+ M0SmBSiQLfqj9FsaHq9zMKo6D7omDP1SN+QMmiKLbAx+otQYZn/qFDNnfCw8FVEYRKkS TuxeJVJVLrlP8ju5rnaDGCsXoIo2d/XEveh04ZsKfqxg7HpGDzIv2HGTVMiGdQXac1OF U0tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=GOXkjdbD6dNzOjOpItsweH9xfrYNUo4tLNvtB/2WWD8=; b=WPeuAlbyUwNeXTMpaIX0spt+AJOWAOn10kQYgoqM/BThgTHD/9IRguBZEf1EM8uhpA SDog9v7e61FZ6OrqoSaTtIH5YdphLCdBV9gmN8DcvO3gl8/hlymGzn4GqCGZOOPJvw/I dgblxCI2Di9WZcKJWrFI2bfDlV1wgd3MfY/mqk9yawdU+9SYo+IrYNij0R3fOlFcuMxj Lwjl6j1HJjbrnIeSXDZdagJKcDXdZc36PQZOliflKoO+Ser8HptPf0iQWLPl/gZUBR8u /a4bIIGbt+eZ5kAU0pFr+Rz/rVs/u+6P9c+iyVKQ94VP0Q0dbJmD9Uxq0uAqmrCC34BR 7hmw== X-Gm-Message-State: AOPr4FUQgpTxsDdWa02pkgPpgF2rno3+pQUtgSBzgvBDXT4//MNw4Plno58zKM875GUsJxGkqGK5TL6FFkD+kg== X-Received: by 10.25.83.10 with SMTP id h10mr4772757lfb.39.1463104778752; Thu, 12 May 2016 18:59:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.15.213 with HTTP; Thu, 12 May 2016 18:58:59 -0700 (PDT) In-Reply-To: <20160512162247.64x5hyud5i2jfgqy@mac> References: <20160512162247.64x5hyud5i2jfgqy@mac> From: Miguel C Date: Fri, 13 May 2016 02:58:59 +0100 Message-ID: Subject: Re: xn ethernet issues as DOMU under NetBSD DOM0 FIXED! To: =?UTF-8?B?J1JvZ2VyIFBhdSBNb25uw6knIChyb2dlci5wYXVAY2l0cml4LmNvbSk=?= Cc: Stephen Jones , "freebsd-xen@freebsd.org" , Wei Liu Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.22 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: Fri, 13 May 2016 01:59:41 -0000 On Thu, May 12, 2016 at 5:22 PM, 'Roger Pau Monn=C3=A9' (roger.pau@citrix.c= om) < roger.pau@citrix.com> wrote: > 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-detectio= n.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) !=3D 0) > > val =3D 0; > > > > np->maxfrags =3D 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) !=3D 0) > > val =3D 0; > > > > np->xn_ifp->if_capabilities &=3D ~(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=3D8843 metric 0 mtu = 1500 > > options=3D3 > > ether 00:16:3e:00:00:30 > > inet 192.94.73.150 netmask 0xffffff00 broadcast 192.94.73.255 > > nd6 options=3D29 > > 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=3Drevision&revision=3D299542 > > And I plan to backport it to stable/10 in 3 days. > > Thanks for testing it! > > FYI I patch local 10.3 system and works fine as expected, with better network performance then 9.3 At least according to iperf3 Connecting to host 10.x.x.x, port 5201 [ 4] local 10.x.x.67 port 54607 connected to 10.x.x.x port 5201 [ ID] Interval Transfer Bandwidth Retr Cwnd [ 4] 0.00-1.00 sec 177 MBytes 1.48 Gbits/sec 0 94.0 MBytes [ 4] 1.00-2.00 sec 192 MBytes 1.61 Gbits/sec 0 138 MBytes [ 4] 2.00-3.00 sec 200 MBytes 1.68 Gbits/sec 0 186 MBytes [ 4] 3.00-4.00 sec 222 MBytes 1.86 Gbits/sec 0 230 MBytes [ 4] 4.00-5.00 sec 227 MBytes 1.91 Gbits/sec 0 274 MBytes [ 4] 5.00-6.00 sec 209 MBytes 1.75 Gbits/sec 0 318 MBytes [ 4] 6.00-7.00 sec 212 MBytes 1.78 Gbits/sec 0 366 MBytes [ 4] 7.00-8.00 sec 215 MBytes 1.81 Gbits/sec 0 389 MBytes [ 4] 8.00-9.00 sec 220 MBytes 1.85 Gbits/sec 0 452 MBytes [ 4] 9.00-10.00 sec 235 MBytes 1.97 Gbits/sec 0 489 MBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bandwidth Retr [ 4] 0.00-10.00 sec 2.06 GBytes 1.77 Gbits/sec 0 sende= r [ 4] 0.00-10.00 sec 2.06 GBytes 1.77 Gbits/sec receiver On 9 the max I could get was 700Mb/sec (host to guest) so this is pretty nice :) Many thanks for the fix Roger Roger. >