From owner-freebsd-net@FreeBSD.ORG Wed Oct 12 21:17:10 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 533E216A41F; Wed, 12 Oct 2005 21:17:10 +0000 (GMT) (envelope-from jura@networks.ru) Received: from networks.ru (orange.networks.ru [80.249.138.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 74FDD43D45; Wed, 12 Oct 2005 21:17:08 +0000 (GMT) (envelope-from jura@networks.ru) X-Spam-Status: No, hits=0.0 required=2.0 Received: from [83.237.16.183] (HELO notebook) by networks.ru (CommuniGate Pro SMTP 4.3.8) with ESMTPS id 2004255; Thu, 13 Oct 2005 01:17:03 +0400 Message-ID: <002c01c5cf72$54901fc0$0701010a@notebook> From: "Yuriy N. Shkandybin" To: "John Baldwin" References: <092e01c5cb15$f7fe5840$6504010a@Jura> <200510121610.47507.jhb@freebsd.org> Date: Thu, 13 Oct 2005 01:13:13 +0400 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-6"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2670 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 Cc: freebsd-net@freebsd.org Subject: Re: if_nge & if_lge drivers X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Oct 2005 21:17:10 -0000 > > Note that lge() has a bzero() call after the contigmalloc(), but M_ZERO is > probably better to use: > > sc->lge_ldata = contigmalloc(sizeof(struct lge_list_data), M_DEVBUF, > M_NOWAIT, 0, 0xffffffff, PAGE_SIZE, 0); > > ... > bzero(sc->lge_ldata, sizeof(struct lge_list_data)); > Yes, i;ve missed that. But there is no such bzero in nge. > I'll put that in my lge(4) patches and incorporate your nge(4) patches. > One > issue with your nge(4) patch is that you moved the bus_setup_intr() up > when > it really should happen after ether_ifattach(). > Probably. I've looked into if_lge.c for that as example. There goes bus_setup_intr() first and later ether_ifattach(). > > Also, is there a reason you added a call to nge_reset() after nge_stop() > in > nge_init()? > Only reason - same done in if_lge.c Jura