From owner-freebsd-net@FreeBSD.ORG Tue May 18 06:10:14 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 0561616A4CE; Tue, 18 May 2004 06:10:14 -0700 (PDT) Received: from mail.qubesoft.com (gate.qubesoft.com [217.169.36.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id BC68743D6B; Tue, 18 May 2004 06:09:34 -0700 (PDT) (envelope-from dfr@nlsystems.com) Received: from bluebottle.qubesoft.com (bluebottle.qubesoft.com [192.168.1.2]) by mail.qubesoft.com (8.12.9/8.12.9) with ESMTP id i4ID0TkM026891; Tue, 18 May 2004 14:00:29 +0100 (BST) (envelope-from dfr@nlsystems.com) Received: from builder02.qubesoft.com (builder02.qubesoft.com [192.168.1.8]) i4ID0SON089216; Tue, 18 May 2004 14:00:28 +0100 (BST) (envelope-from dfr@nlsystems.com) From: Doug Rabson To: Luigi Rizzo In-Reply-To: <20040518014828.B2380@xorpc.icir.org> References: <20040425094940.A50968@xorpc.icir.org> <200405162013.33894.dfr@nlsystems.com> <20040518014828.B2380@xorpc.icir.org> Content-Type: text/plain Message-Id: <1084885227.23208.3.camel@builder02.qubesoft.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Tue, 18 May 2004 14:00:28 +0100 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 'clamd / ClamAV version 0.65', clamav-milter version '0.60p' 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 13:10:14 -0000 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: 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)'.