Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: wm devices don't work under current amd64



Tom Ivar Helbekkmo <tih%hamartun.priv.no@localhost> writes:

> Masanobu SAITOH <msaitoh%execsw.org@localhost> writes:
>
>>  Please test the latest -current. knakahara found a problem:
>
> That worked fine!  No longer any need for the tcpdump hack.  :)
>
> (I didn't get the latest -current; I just added those patches to 7.99.39.)

Correction: it works *almost* fine.  Turns out that those patches alone
let my main amd64 system boot without the tcpdump hack, and work well
as, among other things, an NFS server.  However, another amd64 system
that doesn't use VLANs, and is an NFS client, is unable to write to NFS
file systems if it runs a kernel with the patch applied.

Patch on NFS server, not on client: no problem.
Patch on NFS server and client: writing to NFS hangs.
Patch on NFS client, not on server: writing to NFS hangs.

I guess the patch depends on other changes after 7.99.39...

Just to be sure we agree what we're discussing, this is the patch:

--- sys/net/if_ethersubr.c	10 Jan 2017 05:42:34 -0000	1.234
+++ sys/net/if_ethersubr.c	13 Jan 2017 06:11:56 -0000	1.235
@@ -1475,10 +1475,6 @@
 	int error;
 	struct ethercom *ec = (void *)ifp;
 
-	/* Already have VLAN's do nothing. */
-	if (ec->ec_nvlans != 0)
-		return 0;
-
 	/* Parent does not support VLAN's */
 	if ((ec->ec_capabilities & ETHERCAP_VLAN_MTU) == 0)
 		return -1;
--- sys/net/if_vlan.c	15 Dec 2016 09:28:06 -0000	1.93
+++ sys/net/if_vlan.c	13 Jan 2017 06:11:56 -0000	1.94
@@ -313,10 +313,12 @@
 		ifv->ifv_encaplen = ETHER_VLAN_ENCAP_LEN;
 		ifv->ifv_mintu = ETHERMIN;
 
-		if (ec->ec_nvlans == 0) {
+		if (ec->ec_nvlans++ == 0) {
 			if ((error = ether_enable_vlan_mtu(p)) >= 0) {
-				if (error)
+				if (error) {
+					ec->ec_nvlans--;
 					return error;
+				}
 				ifv->ifv_mtufudge = 0;
 			} else {
 				/*
@@ -329,7 +331,6 @@
 				ifv->ifv_mtufudge = ifv->ifv_encaplen;
 			}
 		}
-		ec->ec_nvlans++;
 
 		/*
 		 * If the parent interface can do hardware-assisted

-tih
-- 
Most people who graduate with CS degrees don't understand the significance
of Lisp.  Lisp is the most important idea in computer science.  --Alan Kay


Home | Main Index | Thread Index | Old Index