From owner-svn-src-all@FreeBSD.ORG Mon Jun 2 19:55:16 2014 Return-Path: Delivered-To: svn-src-all@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 E1B15A16 for ; Mon, 2 Jun 2014 19:55:16 +0000 (UTC) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) (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 678CE2DEE for ; Mon, 2 Jun 2014 19:55:16 +0000 (UTC) Received: by mail-lb0-f182.google.com with SMTP id z11so2883505lbi.27 for ; Mon, 02 Jun 2014 12:55:08 -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=A4WpdyYcVyiDRTu8ApMXCKs7nNdGV8EH6IYgEOWS4+2JYVEMKTPCZ4THTjai+2t21N 9gVZ7VDeotnRQnQiHpv1KAnEZApn99+S9M+5AtwicG/xJGITvW1eh3Cnn12e34Xlbl1X yszKXCG1ki01tFN3tSzgUq8m6ZI9n3ps6ogsm424w1+KLwn+muEDAWfSusOnCDrfpqxr NTamCuW2MqtiYqCPHKnos+qOhcdz/+WreBAlJTn1ynC/XP9mo7WLPWox1gYfIZAASA9u 2jpkUwRXtrq9l+IdyxDbrKQGf2OZpIJer2n4OAkiK+2p6fFLmPk2Uq9m1ZyQMGbZpYT4 QGYQ== X-Gm-Message-State: ALoCoQk3MpnV2MjLPHs2jk9Br+kIawz7ZvgZoBQBAbg7I5uvl2EeaPSuht+2ivRf+snDpPa51gKO 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-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jun 2014 19:55:17 -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.