From owner-freebsd-amd64@FreeBSD.ORG Thu Jul 2 16:40:05 2009 Return-Path: Delivered-To: freebsd-amd64@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26AD8106567C for ; Thu, 2 Jul 2009 16:40:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 034748FC12 for ; Thu, 2 Jul 2009 16:40:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n62Ge49H063558 for ; Thu, 2 Jul 2009 16:40:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n62Ge4ug063557; Thu, 2 Jul 2009 16:40:04 GMT (envelope-from gnats) Resent-Date: Thu, 2 Jul 2009 16:40:04 GMT Resent-Message-Id: <200907021640.n62Ge4ug063557@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-amd64@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Tim Bishop Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C70881065670 for ; Thu, 2 Jul 2009 16:30:03 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id B19238FC15 for ; Thu, 2 Jul 2009 16:30:03 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n62GU3Q6099712 for ; Thu, 2 Jul 2009 16:30:03 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n62GU32G099711; Thu, 2 Jul 2009 16:30:03 GMT (envelope-from nobody) Message-Id: <200907021630.n62GU32G099711@www.freebsd.org> Date: Thu, 2 Jul 2009 16:30:03 GMT From: Tim Bishop To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 X-Mailman-Approved-At: Thu, 02 Jul 2009 16:51:34 +0000 Cc: Subject: amd64/136251: xn0 doesn't DHCP X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2009 16:40:05 -0000 >Number: 136251 >Category: amd64 >Synopsis: xn0 doesn't DHCP >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-amd64 >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jul 02 16:40:04 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Tim Bishop >Release: FreeBSD 8.0-CURRENT amd64 >Organization: >Environment: FreeBSD xenserver.kent.ac.uk 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Wed Jul 1 22:55:53 BST 2009 tdb@xenserver.kent.ac.uk:/usr/obj/usr/src/sys/XENHVM amd64 Running 8.0-CURRENT as of yesterday on Citrix XenServer 5.5.0. >Description: When using the amd64 XENHVM kernel (which has the xenpci device) the machine has a network device called xn0: xenpci0: port 0xc000-0xc0ff mem 0xf2000000-0xf2ffffff irq 30 at device 3.0 on pci0 xenbus0: on xenpci0 xn0: at device/vif/0 on xenbus0 xn0: Ethernet address: 36:ab:02:63:a3:ff However, this device doesn't behave like a normal network device, so adding the following to rc.conf doesn't do DHCP: ifconfig_xn0="DHCP" After some poking around I realised dhclient was launched by devd. However, the xn0 device has properties which don't match the existing rules: setting system=IFNET setting subsystem=xn0 setting type=ATTACH >How-To-Repeat: See above: 8.0-CURRENT, amd64 XENHVM kernel, Citrix XenServer. >Fix: I've worked around this problem by adding the following entry to /etc/devd.conf at line 77 (after the IFNET/LINK_UP/802.11 section): notify 0 { match "system" "IFNET"; match "subsystem" "xn[0-9]+"; match "type" "ATTACH"; action "/etc/rc.d/dhclient quietstart $subsystem"; }; This is my first look at devd, so apologies if this fix isn't appropriate. It'd be great if this fix could make it in to 8.0. >Release-Note: >Audit-Trail: >Unformatted: