From owner-svn-src-head@FreeBSD.ORG Mon Jun 2 20:00:30 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CFC49B9C for ; Mon, 2 Jun 2014 20:00:30 +0000 (UTC) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com [209.85.217.174]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 55A192E93 for ; Mon, 2 Jun 2014 20:00:29 +0000 (UTC) Received: by mail-lb0-f174.google.com with SMTP id n15so2809546lbi.5 for ; Mon, 02 Jun 2014 13:00:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=IYVEIAuY+l7oXV/fZawuQUGTNVRjvoHRxpYRXCj+ODA=; b=YyVpGyGROrGA6nTi8yfku98rckLUUfU0FaFeMQuqyzGNrwcOQW2UXwjQ8Nv6aOavpL ZVleFYJqGY+Ml6CeQLgFDPmFSpQ6pmeQW9nZuQNYbsAG0ysvU/DDD0egvb9eHgiAivFe kodmgW2dJokHKRAbVvfX4k3eClugdYABsvpRuqHHJ5Z6wTaSzV0o7jfl+F35jab6eSLc yH8RA9UfoJU/rp0APDHLF2qA+1AGdINmX9U0Yyle1B+IwOWBiDLGHIZWEAQsy7z+7RZ4 Dg8q26gEx2lRsBbK4DtxVZ1zcqxUSu2mLgLAGaJvzocsHyi06rhnBVq+zf4AHy0ag5UF kHZA== X-Gm-Message-State: ALoCoQm2srbXmWuh/sDP+PQdKLrOysP3duB4J2Ad+LcypCiqry0CFArcuR3Frz+jwri6OY3Jst8V X-Received: by 10.112.14.5 with SMTP id l5mr29125926lbc.12.1401738907913; Mon, 02 Jun 2014 12:55:07 -0700 (PDT) MIME-Version: 1.0 Sender: juli@clockworksquid.com Received: by 10.152.124.8 with HTTP; Mon, 2 Jun 2014 12:54:47 -0700 (PDT) In-Reply-To: <201406021754.s52Hsd1B039620@svn.freebsd.org> References: <201406021754.s52Hsd1B039620@svn.freebsd.org> From: Juli Mallett Date: Mon, 2 Jun 2014 12:54:47 -0700 X-Google-Sender-Auth: 4GeIkYC_NgmUulTUOfN8XdcriNE Message-ID: Subject: Re: svn commit: r266974 - in head/sys: dev/dc dev/fxp dev/mii dev/netmap kern net To: Marcel Moolenaar Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jun 2014 20:00:30 -0000 Marcel, On Mon, Jun 2, 2014 at 10:54 AM, Marcel Moolenaar wrote: > Author: marcel > Date: Mon Jun 2 17:54:39 2014 > New Revision: 266974 > URL: http://svnweb.freebsd.org/changeset/base/266974 > > Log: > Introduce a procedural interface to the ifnet structure. The new > interface allows the ifnet structure to be defined as an opaque > type in NIC drivers. This then allows the ifnet structure to be > changed without a need to change or recompile NIC drivers. > > Put differently, NIC drivers can be written and compiled once and > be used with different network stack implementations, provided of > course that those network stack implementations have an API and > ABI compatible interface. > > This commit introduces the 'if_t' type to replace 'struct ifnet *' > as the type of a network interface. The 'if_t' type is defined as > 'void *' to enable the compiler to perform type conversion to > 'struct ifnet *' and vice versa where needed and without warnings. > The functions that implement the API are the only functions that > need to have an explicit cast. > [...] > Submitted by: Anuranjan Shukla > Reviewed by: glebius@ > Obtained from: Juniper Networks, Inc. > Could you say a little bit about why so few reviewers? Also, why "if_t" rather than an opaque "struct ifnet" to minimize churn, and also not conflict with other "if_t" types one might be using in third-party kernel modules. It's a pretty general name, and that seems problematic. In general am enthused about this happening, just minor implementation concerns. Thanks, Juli.