From owner-freebsd-bugs@freebsd.org Wed Dec 9 12:29:37 2015 Return-Path: Delivered-To: freebsd-bugs@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 14C7E9D4A48 for ; Wed, 9 Dec 2015 12:29:37 +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 ECD1119F2 for ; Wed, 9 Dec 2015 12:29:36 +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 tB9CTawm029348 for ; Wed, 9 Dec 2015 12:29:36 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 205156] [Hyper-V] NICs' (hn0, hn1) MAC addresses can appear in an uncertain way across reboot Date: Wed, 09 Dec 2015 12:29:37 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: decui@microsoft.com X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2015 12:29:37 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205156 Bug ID: 205156 Summary: [Hyper-V] NICs' (hn0, hn1) MAC addresses can appear in an uncertain way across reboot Product: Base System Version: 11.0-CURRENT Hardware: amd64 OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: decui@microsoft.com FreeBSD VMs of 10.2 and the head with multiple NICs (e.g., 2 NICs) have such an issue: occasionally hn0 and hn1 can swap their MAC address! e.g., normally we have this [root@decui-bsd102 ~/bsd.git/sys]# ifconfig lo0: flags=8049 metric 0 mtu 16384 options=600003 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 inet 127.0.0.1 netmask 0xff000000 nd6 options=21 hn0: flags=8843 metric 0 mtu 1500 options=31b ether 00:15:5d:4c:a1:06 inet6 fe80::215:5dff:fe4c:a106%hn0 prefixlen 64 scopeid 0x2 inet 10.156.76.89 netmask 0xfffffc00 broadcast 10.156.79.255 nd6 options=23 hn1: flags=8802 metric 0 mtu 1500 options=31b ether 00:15:5d:4c:a1:0f nd6 options=29 But sometimes, after a VM reboot, hn0's MAC can become 00:15:5d:4c:a1:0f and hn1's can become 00:15:5d:4c:a1:06. This causes confusion to users. This issue was discussed in http://www.cluster21.comdex.phpw.opensubscriber.com/message/freebsd-net@freebsd.org/17554434.html I thought the host could enumerate the NIC devices to the VM in an unpredictable way, but I was wrong: the fact is that: if the VM's devices in the Hyper-V Manager's Setting remain the same, the order in which the host enumerates the devices should be the same. Later I found a race condition in the VM's VMBus driver code and as a result, the "second" NIC device can be firstly registered, as hn0. I'm making a patch for this. -- You are receiving this mail because: You are the assignee for the bug.