PERFORCE change 150146 for review
Marko Zec
zec at FreeBSD.org
Fri Sep 19 22:01:01 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=150146
Change 150146 by zec at zec_tpx32 on 2008/09/19 22:00:31
netgraph.h assimilates vnetgraph.h
Affected files ...
.. //depot/projects/vimage-commit2/src/sys/netgraph/netgraph.h#5 edit
.. //depot/projects/vimage-commit2/src/sys/netgraph/vnetgraph.h#2 delete
Differences ...
==== //depot/projects/vimage-commit2/src/sys/netgraph/netgraph.h#5 (text+ko) ====
@@ -1183,6 +1183,34 @@
#define NGI_GET_META(i,m)
#define ng_copy_meta(meta) NULL
-#include <netgraph/vnetgraph.h>
+#define INIT_VNET_NETGRAPH(vnet) \
+ INIT_FROM_VNET(vnet, VNET_MOD_NETGRAPH, \
+ struct vnet_netgraph, vnet_netgraph)
+
+#define VNET_NETGRAPH(sym) VSYM(vnet_netgraph, sym)
+
+#define NG_ID_HASH_SIZE 32 /* most systems wont need even this many */
+#define NG_NAME_HASH_SIZE 128 /* most systems wont need even this many */
+
+#ifdef VIMAGE
+struct vnet_netgraph {
+ LIST_HEAD(, ng_node) _ng_ID_hash[NG_ID_HASH_SIZE];
+ LIST_HEAD(, ng_node) _ng_name_hash[NG_ID_HASH_SIZE];
+ LIST_HEAD(, ng_node) _ng_nodelist;
+ ng_ID_t _nextID;
+ struct unrhdr *_ng_iface_unit;
+ struct unrhdr *_ng_eiface_unit;
+ struct unrhdr *_ng_wormhole_unit;
+};
+#endif
+
+/* Symbol translation macros */
+#define V_ng_ID_hash VNET_NETGRAPH(ng_ID_hash)
+#define V_ng_name_hash VNET_NETGRAPH(ng_name_hash)
+#define V_ng_nodelist VNET_NETGRAPH(ng_nodelist)
+#define V_nextID VNET_NETGRAPH(nextID)
+#define V_ng_iface_unit VNET_NETGRAPH(ng_iface_unit)
+#define V_ng_eiface_unit VNET_NETGRAPH(ng_eiface_unit)
+#define V_ng_wormhole_unit VNET_NETGRAPH(ng_wormhole_unit)
#endif /* _NETGRAPH_NETGRAPH_H_ */
More information about the p4-projects
mailing list