From nobody@FreeBSD.org  Fri Aug 17 20:24:11 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 329151065670
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 17 Aug 2012 20:24:11 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 1BD058FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 17 Aug 2012 20:24:11 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q7HKOAlA078770
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 17 Aug 2012 20:24:10 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q7HKOAGC078769;
	Fri, 17 Aug 2012 20:24:10 GMT
	(envelope-from nobody)
Message-Id: <201208172024.q7HKOAGC078769@red.freebsd.org>
Date: Fri, 17 Aug 2012 20:24:10 GMT
From: Garrett Cooper <yaneurabeya@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [cxgb][vlan] Need to up parent cxgb interfaces in order for vlan interfaces to become active when interface set statically if netif not run at boot
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         170712
>Category:       kern
>Synopsis:       [cxgb][vlan] Need to up parent cxgb interfaces in order for vlan interfaces to become active when interface set statically if netif not run at boot
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 17 20:30:07 UTC 2012
>Closed-Date:    Sat Aug 18 20:41:20 UTC 2012
>Last-Modified:  Sun Feb 03 22:30:50 UTC 2013
>Originator:     Garrett Cooper
>Release:        7.3-RELEASE/7.4-RELEASE/9.0-RELEASE
>Organization:
EMC Isilon
>Environment:
FreeBSD  7.4-RELEASE-p10 FreeBSD 7.4-RELEASE-p10 #0: Fri Aug 17 07:15:01 UTC 2012     root@:/usr/obj/mnt/freebsd/releng/7.4/sys/ISI-GENERIC  amd64

FreeBSD wf048.west.isilon.com 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:46:30 UTC 2012     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
I've been running vlan interoperability tests and I noticed that in order for the interfaces to be up and functional I need to manually ifconfig up the interfaces (otherwise the interface status remains "no carrier").

Not really a big deal for me, but definitely an annoyance and probably an issue for other end-users of FreeBSD dealing with vlans with cxgb (there are other issues with the cxgb(4) driver that prevent it from being usable built into the kernel in 7.x and there are other things I suppose I could do to force things to function more rationally on 9.x).

Other details:

# cat /etc/rc.conf 
hostname="bf049.west.isilon.com"
vlans_cxgb0="190"
vlans_cxgb1="190"
ifconfig_cxgb0_190="inet 192.168.20.2/24"
ifconfig_cxgb1_190="inet 192.168.21.2/16"
ifconfig_em0="DHCP"
sshd_enable="YES"
# awk '! /^#/ && NF > 0' /etc/sysctl.conf
kern.ipc.nmbjumbo9=262144
kern.ipc.nmbjumbo16=262144
kern.ipc.nmbclusters=262144
kern.ipc.nmbjumbop=262144
kern.ipc.maxsockbuf=2097152
net.inet.tcp.recvspace=65536
net.inet.tcp.recvbuf_max=2097152
net.inet.tcp.recvbuf_max=2097152
net.inet.tcp.recvbuf_inc=16384
net.inet.tcp.recvspace_max=2097152
net.inet.tcp.recvspace_inc=16384
net.inet.tcp.sendspace=32768
net.inet.tcp.sendbuf_max=2097152
net.inet.tcp.sendbuf_inc=8192
net.inet.tcp.sendspace_max=2097152
net.inet.tcp.sendspace_inc=16384
# cat /boot/loader.conf 
#if_cxgb_load="YES"
#if_em_load="YES"

kern.ipc.nmbclusters="250000"

wf048# cat /etc/rc.conf 
hostname="wf048.west.isilon.com"
vlans_cxgb1="190"
ifconfig_cxgb1_190="inet 192.168.20.1/24"
ifconfig_em0="DHCP"
sshd_enable="YES"
ntpd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="NO"
wf048# awk '! /^#/ && NF > 0' /etc/sysctl.conf
kern.ipc.nmbjumbo9=262144
kern.ipc.nmbjumbo16=262144
kern.ipc.nmbclusters=262144
kern.ipc.nmbjumbop=262144
kern.ipc.maxsockbuf=2097152
net.inet.tcp.recvspace=65536
net.inet.tcp.recvbuf_max=2097152
net.inet.tcp.recvbuf_max=2097152
net.inet.tcp.recvbuf_inc=16384
net.inet.tcp.recvspace_max=2097152
net.inet.tcp.recvspace_inc=16384
net.inet.tcp.sendspace=32768
net.inet.tcp.sendbuf_max=2097152
net.inet.tcp.sendbuf_inc=8192
net.inet.tcp.sendspace_max=2097152
net.inet.tcp.sendspace_inc=16384
wf048# cat /boot/loader.conf 
kern.ipc.nmbclusters="250000"
if_cxgb_load="YES"
if_em_load="YES"

I would mark this PR as a low priority item/enhancement.
>How-To-Repeat:
1. Add above config to /etc/rc.conf .
2. Force loading cxgb(4) after boot like so: ifconfig cxgb0.
3. Wait for the NIC chips to settle after a few seconds and check interface state via ifconfig cxgb0.
>Fix:
An event handler / mechanism needs to be added between the interface and vlan layer in order for things to function, or a mechanism needs to be added to devd to force /etc/rc.d/netif restart cxgb0 to be kicked.

>Release-Note:
>Audit-Trail:

From: Garrett Cooper <yaneurabeya@gmail.com>
To: bug-followup@FreeBSD.org, yanegomi@gmail.com
Cc:  
Subject: Re: kern/170712: [cxgb][vlan] Need to up parent cxgb interfaces in
 order for vlan interfaces to become active when interface set statically if
 netif not run at boot
Date: Fri, 17 Aug 2012 13:36:34 -0700

     Correction: it happens regardless of netif being run.
 Thanks,
 -Garrett

From: Garrett Cooper <yaneurabeya@gmail.com>
To: bug-followup@freebsd.org, yanegomi@gmail.com
Cc:  
Subject: Re: kern/170712: [cxgb][vlan] Need to up parent cxgb interfaces in
 order for vlan interfaces to become active when interface set statically if
 netif not run at boot
Date: Fri, 17 Aug 2012 13:56:38 -0700

 On Fri, Aug 17, 2012 at 1:36 PM, Garrett Cooper <yaneurabeya@gmail.com> wrote:
 >     Correction: it happens regardless of netif being run.
 
     Ack. This is a dupe of kern/150023. Please handle accordingly.
 Thanks!
 -Garrett
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Sat Aug 18 20:41:06 UTC 2012 
State-Changed-Why:  
Duplicate of kern/150023. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=170712 
>Unformatted:
