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 <sys/mbuf.h>          /* 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) */
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to