From owner-freebsd-net@freebsd.org Tue Oct 17 14:36:40 2017 Return-Path: Delivered-To: freebsd-net@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 1DBA5E3BBDE for ; Tue, 17 Oct 2017 14:36:40 +0000 (UTC) (envelope-from lew@perftech.com) Received: from smtp-gw.pt.net (smtp-gw.pt.net [206.210.194.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp-gw.pt.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E76DD6F03C for ; Tue, 17 Oct 2017 14:36:39 +0000 (UTC) (envelope-from lew@perftech.com) X-ASG-Debug-ID: 1508250963-09411a0f9b33b730001-QdxwpM Received: from mail.pt.net (mail.pt.net [206.210.194.11]) by smtp-gw.pt.net with ESMTP id Pv1AHiZHwa8eVHen (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Tue, 17 Oct 2017 09:36:03 -0500 (CDT) X-Barracuda-Envelope-From: lew@perftech.com X-Barracuda-Effective-Source-IP: mail.pt.net[206.210.194.11] X-Barracuda-Apparent-Source-IP: 206.210.194.11 Received: from localhost (localhost [IPv6:::1]) by mail.pt.net (Postfix) with ESMTP id 9C1C384268E for ; Tue, 17 Oct 2017 09:36:03 -0500 (CDT) Received: from mail.pt.net ([IPv6:::1]) by localhost (mail.pt.net [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id 8fvNqJQfdA3Q for ; Tue, 17 Oct 2017 09:36:03 -0500 (CDT) Received: from localhost (localhost [IPv6:::1]) by mail.pt.net (Postfix) with ESMTP id 66A30842687 for ; Tue, 17 Oct 2017 09:36:03 -0500 (CDT) X-Virus-Scanned: amavisd-new at pt.net Received: from mail.pt.net ([IPv6:::1]) by localhost (mail.pt.net [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id 3v0Br-rT7Mvs for ; Tue, 17 Oct 2017 09:36:03 -0500 (CDT) Received: from dhcp-221-110.perftech.com (dhcp-221-110.perftech.com [206.210.221.110]) (Authenticated sender: lew@pt.net) by mail.pt.net (Postfix) with ESMTPSA id 5714A84268E for ; Tue, 17 Oct 2017 09:36:03 -0500 (CDT) From: Lewis Donzis Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: vmxnet3 driver bug? Message-Id: <0536294F-3709-4E38-AD7C-1A809AAD13A6@perftech.com> X-ASG-Orig-Subj: vmxnet3 driver bug? References: <398971232.399523.1508250252244.JavaMail.zimbra@perftech.com> To: freebsd-net@freebsd.org Date: Tue, 17 Oct 2017 09:36:02 -0500 X-Mailer: Apple Mail (2.3273) X-Barracuda-Connect: mail.pt.net[206.210.194.11] X-Barracuda-Start-Time: 1508250963 X-Barracuda-Encrypted: ECDHE-RSA-AES256-GCM-SHA384 X-Barracuda-URL: https://smtp-gw.pt.net:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at pt.net X-Barracuda-Scan-Msg-Size: 698 X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.43969 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Oct 2017 14:36:40 -0000 The VMXNET3 driver appears to have a bug that prevents it from correctly = reporting when the link goes down. There are two lines of code that should be deleted in = /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c: @@ -3619,8 +3619,6 @@ vmxnet3_media_status(struct ifnet *ifp, struct = ifmediareq *ifmr) VMXNET3_CORE_LOCK(sc); if (vmxnet3_link_is_up(sc) !=3D 0) ifmr->ifm_status |=3D IFM_ACTIVE; - else - ifmr->ifm_status |=3D IFM_NONE; VMXNET3_CORE_UNLOCK(sc); } IFM_NONE doesn=E2=80=99t belong in the status flags and, coincidentally, = is defined with an identical value as IFM_ACTIVE, so it indicates that = link is always active. Thanks, lew=