From owner-freebsd-net@FreeBSD.ORG Tue May 18 09:07:13 2004 Return-Path: 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 05DC316A4CE; Tue, 18 May 2004 09:07:13 -0700 (PDT) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6842F43D62; Tue, 18 May 2004 09:06:48 -0700 (PDT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.9p1/8.12.8) with ESMTP id i4IG6mgd040121; Tue, 18 May 2004 09:06:48 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.9p1/8.12.3/Submit) id i4IG6mDR040120; Tue, 18 May 2004 09:06:48 -0700 (PDT) (envelope-from rizzo) Date: Tue, 18 May 2004 09:06:47 -0700 From: Luigi Rizzo To: Doug Rabson Message-ID: <20040518090647.A39810@xorpc.icir.org> References: <20040425094940.A50968@xorpc.icir.org> <200405162013.33894.dfr@nlsystems.com> <20040518014828.B2380@xorpc.icir.org> <1084885227.23208.3.camel@builder02.qubesoft.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <1084885227.23208.3.camel@builder02.qubesoft.com>; from dfr@nlsystems.com on Tue, May 18, 2004 at 02:00:28PM +0100 cc: Harti Brandt cc: current@freebsd.org cc: net@freebsd.org Subject: Re: new arp code snapshot for review... X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 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, 18 May 2004 16:07:13 -0000 On Tue, May 18, 2004 at 02:00:28PM +0100, Doug Rabson wrote: > On Tue, 2004-05-18 at 09:48, Luigi Rizzo wrote: > > I will try to remove as many assumptions as possible. > > thanks for the feedback. > > I think that in your prototype, the only assumption was in struct > llentry. I would suggest defining it as something like: to be really flexible, both l3_addr and ll_addr should be variable size (v4,v6,v8 over 802.x,firewire,appletalk,snail-mail), then things rapidly become confusing and inefficient. I would like to keep the ipv4 over ethernet case simple and quick, even if this means replicating the code for the generic case (and this is one of the reasons i have stalled a bit on this code -- i want to make up my mind on what is a reasonable approaxch). cheers luigi > struct llentry { > struct llentry *lle_next; > struct mbuf *la_hold; > uint16_t flags; /* see values in if_ether.h */ > uint8_t la_preempt; > uint8_t la_asked; > time_t expire; > struct in_addr l3_addr; > uint8_t ll_addr[0]; > }; > > Where the allocation of them uses something like 'malloc(sizeof(struct > llentry) + ifp->if_addrlen)'. > > > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"