From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 14 06:16:54 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 068AF106566C for ; Tue, 14 Aug 2012 06:16:54 +0000 (UTC) (envelope-from egrosbein@rdtc.ru) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13::5]) by mx1.freebsd.org (Postfix) with ESMTP id 60BD48FC0A for ; Tue, 14 Aug 2012 06:16:53 +0000 (UTC) Received: from eg.sd.rdtc.ru (localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.14.5/8.14.5) with ESMTP id q7E6Gnh8010270; Tue, 14 Aug 2012 13:16:50 +0700 (NOVT) (envelope-from egrosbein@rdtc.ru) Message-ID: <5029ED51.9000600@rdtc.ru> Date: Tue, 14 Aug 2012 13:16:49 +0700 From: Eugene Grosbein User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; ru-RU; rv:1.9.2.13) Gecko/20110112 Thunderbird/3.1.7 MIME-Version: 1.0 To: David Duchscher References: In-Reply-To: Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Tue, 14 Aug 2012 11:18:40 +0000 Cc: hackers@freebsd.org Subject: Re: Disabling ethernet link on an Intel nic? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2012 06:16:54 -0000 11.08.2012 20:35, David Duchscher пишет: > Greetings, > > I have a need to turn off the link of an ethernet port on a Intel nic. The issue is not a big deal but one we would like to solve. we have no way of signaling an upstream router that a path is down but via turning off the link of the ethernet port. This would only be used when something goes wrong. The hope is that we could automate some problems and handle other situations remotely avoiding having to visit the system in person. > > Any thoughts? We can modify the system so if it means modifying the driver or some other code, I am willing to try. Just need a little direction. > > Thanks for your time, I made such patch a couple of years ago and run it in production with copper-based em(4) and igb(4) NICs. The patch introduces new sysctls like dev.em.X.down_disables_link and dev.igb.X.down.disables_link with default zero values. Setting sysctl dev.em.0.down_disables_link=1 makes "ifconfig em0 down" bring link down. http://www.grosbein.net/freebsd/patches/em_sysctl-8.3.diff.gz http://www.grosbein.net/freebsd/patches/igb_sysctl-8.3.diff.gz