Provide pointer from struct ifnet to struct netmap_adapter,

instead of abusing spare field.
This commit is contained in:
Gleb Smirnoff 2014-08-31 11:33:19 +00:00
parent 91804910e2
commit 997d2d833f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=270874
2 changed files with 3 additions and 1 deletions

View File

@ -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))

View File

@ -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) */