PERFORCE change 154790 for review
Bjoern A. Zeeb
bz at FreeBSD.org
Tue Dec 16 06:37:59 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=154790
Change 154790 by bz at bz_dumpster on 2008/12/16 14:37:17
Add if_epair(4) without if_reassign (will add that once I could test).
Needs: netisr simulated hw queue re-thinking with
rwatson's work in progres in the netisr branch and
man page review.
Affected files ...
.. //depot/projects/vimage/src/share/man/man4/Makefile#2 edit
.. //depot/projects/vimage/src/share/man/man4/altq.4#2 edit
.. //depot/projects/vimage/src/share/man/man4/epair.4#1 add
.. //depot/projects/vimage/src/sys/conf/NOTES#39 edit
.. //depot/projects/vimage/src/sys/conf/files#51 edit
.. //depot/projects/vimage/src/sys/modules/Makefile#36 edit
.. //depot/projects/vimage/src/sys/modules/if_epair/Makefile#1 add
.. //depot/projects/vimage/src/sys/net/if_epair.c#1 add
.. //depot/projects/vimage/src/sys/net/netisr.c#13 edit
.. //depot/projects/vimage/src/sys/net/netisr.h#4 edit
Differences ...
==== //depot/projects/vimage/src/share/man/man4/Makefile#2 (text+ko) ====
@@ -86,6 +86,7 @@
em.4 \
en.4 \
enc.4 \
+ epair.4 \
esp.4 \
et.4 \
exca.4 \
@@ -474,6 +475,7 @@
MLINKS+=em.4 if_em.4
MLINKS+=en.4 if_en.4
MLINKS+=enc.4 if_enc.4
+MLINKS+=epair.4 if_epair.4
MLINKS+=et.4 if_et.4
MLINKS+=faith.4 if_faith.4
MLINKS+=fatm.4 if_fatm.4
==== //depot/projects/vimage/src/share/man/man4/altq.4#2 (text+ko) ====
@@ -129,6 +129,7 @@
.Xr ed 4 ,
.Xr em 4 ,
.Xr ep 4 ,
+.Xr epair 4 ,
.Xr fxp 4 ,
.Xr gem 4 ,
.Xr hme 4 ,
==== //depot/projects/vimage/src/sys/conf/NOTES#39 (text+ko) ====
@@ -794,6 +794,7 @@
device carp #Common Address Redundancy Protocol
device enc #IPsec interface
device lagg #Link aggregation interface
+device epair #Virtual cross-over Ethernet
device ef # Multiple ethernet frames support
options ETHER_II # enable Ethernet_II frame
==== //depot/projects/vimage/src/sys/conf/files#51 (text+ko) ====
@@ -2162,6 +2162,7 @@
net/if_edsc.c optional edsc
net/if_ef.c optional ef
net/if_enc.c optional enc
+net/if_epair.c optional epair
net/if_ethersubr.c optional ether \
compile-with "${NORMAL_C} -I$S/contrib/pf"
net/if_faith.c optional faith
==== //depot/projects/vimage/src/sys/modules/Makefile#36 (text+ko) ====
@@ -111,6 +111,7 @@
if_disc \
if_edsc \
if_ef \
+ if_epair \
if_faith \
if_gif \
if_gre \
==== //depot/projects/vimage/src/sys/net/netisr.c#13 (text+ko) ====
@@ -62,6 +62,7 @@
netisr_t *ni_handler;
struct ifqueue *ni_queue;
int ni_flags;
+ void (*ni_handler_drained)(void);
} netisrs[32];
static void *net_ih;
@@ -73,7 +74,8 @@
}
void
-netisr_register(int num, netisr_t *handler, struct ifqueue *inq, int flags)
+netisr_register2(int num, netisr_t *handler, void (*handler_drained)(void),
+ struct ifqueue *inq, int flags)
{
KASSERT(!(num < 0 || num >= (sizeof(netisrs)/sizeof(*netisrs))),
@@ -83,9 +85,16 @@
netisrs[num].ni_handler = handler;
netisrs[num].ni_queue = inq;
netisrs[num].ni_flags = flags;
+ netisrs[num].ni_handler_drained = handler_drained;
}
void
+netisr_register(int num, netisr_t *handler, struct ifqueue *inq, int flags)
+{
+ netisr_register2(num, handler, NULL, inq, flags);
+}
+
+void
netisr_unregister(int num)
{
struct netisr *ni;
@@ -148,6 +157,8 @@
ni->ni_handler(m);
CURVNET_RESTORE();
}
+ if (ni->ni_handler_drained)
+ ni->ni_handler_drained();
}
/*
==== //depot/projects/vimage/src/sys/net/netisr.h#4 (text+ko) ====
@@ -45,6 +45,7 @@
* now implemented via a software ithread (SWI).
*/
#define NETISR_POLL 0 /* polling callback, must be first */
+#define NETISR_EPAIR 1 /* if_epair(4) soft interrupt */
#define NETISR_IP 2 /* same as AF_INET */
#define NETISR_ROUTE 14 /* routing socket */
#define NETISR_AARP 15 /* Appletalk ARP */
@@ -84,6 +85,7 @@
void netisr_dispatch(int, struct mbuf *);
int netisr_queue(int, struct mbuf *);
#define NETISR_FORCEQUEUE 0x0002 /* Force queued dispatch. */
+void netisr_register2(int, netisr_t *, void (*)(void), struct ifqueue *, int);
void netisr_register(int, netisr_t *, struct ifqueue *, int);
void netisr_unregister(int);
More information about the p4-projects
mailing list