From owner-freebsd-net@FreeBSD.ORG Tue May 14 20:03:33 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 11737C84 for ; Tue, 14 May 2013 20:03:33 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wg0-x236.google.com (mail-wg0-x236.google.com [IPv6:2a00:1450:400c:c00::236]) by mx1.freebsd.org (Postfix) with ESMTP id 9BF61886 for ; Tue, 14 May 2013 20:03:32 +0000 (UTC) Received: by mail-wg0-f54.google.com with SMTP id x12so842366wgg.21 for ; Tue, 14 May 2013 13:03:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=BjRKpvPIlxIoBMeBL/vkC+YjdgMwHhKLHa8lV7vdHLo=; b=kzUGpiIgavDN948BHNwcXW9oYz6P1mfVcz5REmocUglRKB813y7I6+I78UoVCLJZVC im8ipziO5kGYQMYHdkD2jE97ScldkqNFEuhcanUnC7bjaJkBsgFkEK8pUAefzW4Am7iE UuZhkpJOPF/vu0sW41Cj7YCFD+XfDdISE91OHEAsu4eIlkhB3BoQadiHhIHNP/4ZxgsX VG5fxF6XaoZ8slSRFmka7lYQ5g9xxaVEsUJXXb807cyN7S4P4RDOdzMTkhi5vsr37/MD VSw3FGfAox0RnSpmdOQ0S4Ktd4c/QAO1iVjWb5FUsPXPHdk7/nqR5oTijBJzO9BmSOmc OzOg== MIME-Version: 1.0 X-Received: by 10.181.13.42 with SMTP id ev10mr2877383wid.1.1368561811667; Tue, 14 May 2013 13:03:31 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.58.138 with HTTP; Tue, 14 May 2013 13:03:31 -0700 (PDT) In-Reply-To: References: <20130124195056.GB1410@funkthat.com> <519227E2.2090801@rdtc.ru> Date: Tue, 14 May 2013 13:03:31 -0700 X-Google-Sender-Auth: 6CWbaBaJJS7hEd0WzrvfDwb6hGU Message-ID: Subject: Re: how to completely makes an interface down? From: Adrian Chadd To: =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: h bagade , "freebsd-net@freebsd.org" , John-Mark Gurney , Eugene Grosbein , Jack Vogel X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 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, 14 May 2013 20:03:33 -0000 ... we have flow-control in ifconfig, don't we? On 14 May 2013 11:42, Olivier Cochard-Labb=E9 wrote: > On Tue, May 14, 2013 at 2:02 PM, Eugene Grosbein wrot= e: >> >> I've needed this feature several years ago so I made a patch for igb(4) = and em(4) drivers. >> The patch introduces new per-interface sysctls with default zero values: >> >> dev.em.X.down_disables_link >> dev.igb.X.down.disables_link >> >> With this patch, sysctl dev.em.0.down_disables_link=3D1 makes "ifconfig = em0 down" bring link down. >> For LACP mode this feature is very useful as it makes LACP peer reconfig= ure itself quickly. >> > > Great ! > > but what about adding a generic ifconfig mediaopt option in place of > adding another new sysctl ? > Something like "poweroff", "linkdown" or your "disablelink" as example. > > Because with this kind of sysctl values we can imagine a > non-homogeneous future: We have already this problem with flow-control > on em(4). > The sysctl option for configuring flowcontrol on em(4) (no idea how to > configure it with other drivers) are: > - dev.em.0.fc (if chipset depends of if_em.c) > - dev.em.0.flow_control (if chipset depends of if_lem.c) > > =3D> By using ifconfig like "ifconfig INTERFACE mediaopt flowcontrol > off|rx|tx|full" we could prevent different sysctl names between all > NIC drivers. > > Regards, > > Olivier > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"