From owner-freebsd-net@FreeBSD.ORG Tue Feb 21 00:37:31 2012 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 442C7106564A for ; Tue, 21 Feb 2012 00:37:31 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by mx1.freebsd.org (Postfix) with ESMTP id 9EF5D8FC14 for ; Tue, 21 Feb 2012 00:37:30 +0000 (UTC) Received: by wibhn14 with SMTP id hn14so5093329wib.13 for ; Mon, 20 Feb 2012 16:37:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=lGF5jhgq09csE/w+duUrt5H8o1YCYGV8LaOC3wtchzA=; b=Hzvngo5SEZkcHgYHWL/aLybkfdm57tUuCP2tdDBzy5sIAQ69tF9MsZ8OwbiQoTDCXn hZ7qQAjVDc9/73AUFA2mPOQcV8mooa4+wS05X4S+waQjMbm+8WViujAr5SV/di8S2/mM y3Vld99SVb0xSD15KMzEytutzBiBLQ3uKiouo= MIME-Version: 1.0 Received: by 10.180.93.4 with SMTP id cq4mr17494073wib.21.1329784649530; Mon, 20 Feb 2012 16:37:29 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.154.199 with HTTP; Mon, 20 Feb 2012 16:37:29 -0800 (PST) In-Reply-To: <20120221001552.GA60050@onelab2.iet.unipi.it> References: <338757D1-6B1E-49CF-983F-5D5851066FD3@xcllnt.net> <20120220231601.GA51310@lor.one-eyed-alien.net> <20120221001552.GA60050@onelab2.iet.unipi.it> Date: Mon, 20 Feb 2012 16:37:29 -0800 X-Google-Sender-Auth: v9ALCp0XMRFZTgusvIdSqWNQa0c Message-ID: From: Adrian Chadd To: Luigi Rizzo Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Marcel Moolenaar , Brooks Davis , net@freebsd.org Subject: Re: Abstracting struct ifnet 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: Tue, 21 Feb 2012 00:37:31 -0000 On 20 February 2012 16:15, Luigi Rizzo wrote: >> The concept seems fine to me and I like that it might simplify future >> API changes. =A0Have you verified that if_get_*() accessors don't add >> significant overhead? > > the vast majority of these fields are only accessed in the control path, > not on each packet, so there isn't really a performance issue. Besides > they can be trivially implemted as macros or inline functions. I doubt Juniper need _binary_ level compatibility. So we could get away with inline methods. This sort of thing just makes source level compatibility a lot easier. Adrian