From owner-svn-src-head@FreeBSD.ORG Sun Aug 31 11:33:20 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 5336344E; Sun, 31 Aug 2014 11:33:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C72F1BAD; Sun, 31 Aug 2014 11:33:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VBXKmw084885; Sun, 31 Aug 2014 11:33:20 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VBXJlv084881; Sun, 31 Aug 2014 11:33:19 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201408311133.s7VBXJlv084881@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Sun, 31 Aug 2014 11:33:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270874 - in head/sys: dev/netmap net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sun, 31 Aug 2014 11:33:20 -0000 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) */