From owner-svn-src-head@FreeBSD.ORG Mon Sep 8 11:18:49 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C50C25C5; Mon, 8 Sep 2014 11:18:49 +0000 (UTC) Received: from mail-la0-x234.google.com (mail-la0-x234.google.com [IPv6:2a00:1450:4010:c03::234]) (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 AE07E1D19; Mon, 8 Sep 2014 11:18:48 +0000 (UTC) Received: by mail-la0-f52.google.com with SMTP id b8so5856323lan.11 for ; Mon, 08 Sep 2014 04:18:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=VKsSOWf+uTsX0DbCbV2fiCeRJRVmVomO30uZ4ihzjp4=; b=mY741eKc+6oxGvLxdaXsTh/jHq7CCOQVUqGr8iw2B8+B649uMNmQKr47aodlOAX92J VROqr0OtxtpT5fo4WUA972JUX/J1cRUkAzkM6yhvlKhE/7VYWm665aMHNtB9K6vfJgSN pzwCGYbUBUyXOD2izlFJf6B/chvy8A0ftG9d6HZn6j38m3U5QFKuLBPfNUj6b+kmZMlS v+X+4lK4cE1hn5CfeLaugTpWdTDtTIucTDh9BPgw7IZlr3gsUao13/ebkV5E/tydJtuG 2H6X9i4eAYMx6WwqzMBcu5ADCXHoFg3IxEd7cDhJoaxanh+kssjr7DsqjtTABkt8SXkt Fedg== MIME-Version: 1.0 X-Received: by 10.112.56.206 with SMTP id c14mr27255334lbq.27.1410175124493; Mon, 08 Sep 2014 04:18:44 -0700 (PDT) Sender: rizzo.unipi@gmail.com Received: by 10.114.26.37 with HTTP; Mon, 8 Sep 2014 04:18:44 -0700 (PDT) In-Reply-To: <201408311133.s7VBXJlv084881@svn.freebsd.org> References: <201408311133.s7VBXJlv084881@svn.freebsd.org> Date: Mon, 8 Sep 2014 13:18:44 +0200 X-Google-Sender-Auth: gWPGAGf-ht3F-mfXNuPO_70vdhI Message-ID: Subject: Re: svn commit: r270874 - in head/sys: dev/netmap net From: Luigi Rizzo To: Gleb Smirnoff Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 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-1 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, 08 Sep 2014 11:18:50 -0000 Just noticed this. I would appreciate if you and others could inform me _before_ touching netmap-related stuff, and also, if you make changes make sure they are visible to the preprocessor so i can use conditional compilations. This is because this code is supposed to be the same on various FreeBSD revisions and Linux, and if each platform randomly changes its structures maintainance becomes very hard cheers luigi On Sun, Aug 31, 2014 at 1:33 PM, Gleb Smirnoff wrote: > Author: glebius > Date: Sun Aug 31 11:33:19 2014 > New Revision: 270874 > URL: http://svnweb.freebsd.org/changeset/base/270874 > > Log: > Provide pointer from struct ifnet to struct netmap_adapter, > instead of abusing spare field. > > Modified: > head/sys/dev/netmap/netmap_kern.h > head/sys/net/if_var.h > > Modified: head/sys/dev/netmap/netmap_kern.h > > ============================================================================== > --- head/sys/dev/netmap/netmap_kern.h Sun Aug 31 10:42:52 2014 > (r270873) > +++ head/sys/dev/netmap/netmap_kern.h Sun Aug 31 11:33:19 2014 > (r270874) > @@ -1187,7 +1187,7 @@ extern int netmap_generic_rings; > * WNA is used to write it. > */ > #ifndef WNA > -#define WNA(_ifp) (_ifp)->if_pspare[0] > +#define WNA(_ifp) (_ifp)->if_netmap > #endif > #define NA(_ifp) ((struct netmap_adapter *)WNA(_ifp)) > > > Modified: head/sys/net/if_var.h > > ============================================================================== > --- head/sys/net/if_var.h Sun Aug 31 10:42:52 2014 (r270873) > +++ head/sys/net/if_var.h Sun Aug 31 11:33:19 2014 (r270874) > @@ -67,6 +67,7 @@ struct ifvlantrunk; > struct route; /* if_output */ > struct vnet; > struct ifmedia; > +struct netmap_adapter; > > #ifdef _KERNEL > #include /* ifqueue only? */ > @@ -202,6 +203,7 @@ struct ifnet { > void *if_pf_kif; /* pf glue */ > struct carp_if *if_carp; /* carp interface structure */ > struct label *if_label; /* interface MAC label */ > + struct netmap_adapter *if_netmap; /* netmap(4) softc */ > > /* Various procedures of the layer2 encapsulation and drivers. */ > int (*if_output) /* output routine (enqueue) */ > > -- -----------------------------------------+------------------------------- Prof. Luigi RIZZO, rizzo@iet.unipi.it . Dip. di Ing. dell'Informazione http://www.iet.unipi.it/~luigi/ . Universita` di Pisa TEL +39-050-2211611 . via Diotisalvi 2 Mobile +39-338-6809875 . 56122 PISA (Italy) -----------------------------------------+-------------------------------