xn ethernet issues as DOMU under NetBSD DOM0 FIXED!

Stephen Jones StephenJo at LivingComputerMuseum.org
Thu May 12 14:14:29 UTC 2016


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 at freebsd:/usr/src/sys/amd64/compile/SDF  amd64

xn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=3<RXCSUM,TXCSUM>
	ether 00:16:3e:00:00:30
	inet 192.94.73.150 netmask 0xffffff00 broadcast 192.94.73.255 
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
	media: Ethernet manual
	status: active

xn0: <Virtual Network Interface> 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.
 


More information about the freebsd-xen mailing list