PERFORCE change 150640 for review
Ryan French
rfrench at FreeBSD.org
Mon Sep 29 03:01:23 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=150640
Change 150640 by rfrench at rfrench_mpls on 2008/09/29 03:00:37
MPLS protocol is now being registered properly with netisr. Unfortunately when an MPLS packet is received a page fault occurs. I believe this is happeneing somewhere between netisr_dispatch and the mpls_input functions being called due to the debug statements I have in there. Hopefully I can get that figured out tomorrow.
Affected files ...
.. //depot/projects/soc2008/rfrench_mpls/net/if_ethersubr.c#8 edit
.. //depot/projects/soc2008/rfrench_mpls/net/netisr.h#4 edit
.. //depot/projects/soc2008/rfrench_mpls/netmpls/mpls_input.c#6 edit
.. //depot/projects/soc2008/rfrench_mpls/netmpls/mpls_proto.c#6 edit
Differences ...
==== //depot/projects/soc2008/rfrench_mpls/net/if_ethersubr.c#8 (text+ko) ====
@@ -37,6 +37,7 @@
#include "opt_mac.h"
#include "opt_netgraph.h"
#include "opt_carp.h"
+#include "opt_mpls.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -99,7 +100,7 @@
#ifdef MPLS
#include <netmpls/mpls.h>
-#endif /* MPLS */
+#endif /*MPLS*/
#include <security/mac/mac_framework.h>
@@ -832,11 +833,12 @@
// }
/* XXX handling for simplex devices in case of M/BCAST ?? */
if (m->m_flags && (M_BCAST | M_MCAST))
- isr = NETISR_MPLS_MCAST;
+// isr = NETISR_MPLS_MCAST;
+ isr = NETISR_MPLS;
else
isr = NETISR_MPLS;
break;
-#endif /* MPLS */
+#endif
default:
#ifdef IPX
if (ef_inputp && ef_inputp(ifp, eh, m) == 0)
==== //depot/projects/soc2008/rfrench_mpls/net/netisr.h#4 (text+ko) ====
@@ -51,7 +51,7 @@
#define NETISR_POLL 0 /* polling callback, must be first */
#define NETISR_IP 2 /* same as AF_INET */
#define NETISR_MPLS 4 /* mpls packet */
-#define NETISR_MPLS_MCAST /* mpls multicase packet */
+#define NETISR_MPLS_MCAST 5 /* mpls multicast packet */
#define NETISR_ROUTE 14 /* routing socket */
#define NETISR_AARP 15 /* Appletalk ARP */
#define NETISR_ATALK2 16 /* Appletalk phase 2 */
==== //depot/projects/soc2008/rfrench_mpls/netmpls/mpls_input.c#6 (text+ko) ====
@@ -43,7 +43,9 @@
{
mplsintrq.ifq_maxlen = mplsqmaxlen;
netisr_register(NETISR_MPLS, mpls_input, &mplsintrq, 0);
- printf("mpls initialised");
+#ifdef MPLS_DEBUG
+ printf("mpls initialised\n");
+#endif
}
void
@@ -78,6 +80,10 @@
u_int32_t ttl;
int i, hasbos;
+#ifdef MPLS_DEBUG
+ printf("entering mpls_input\n");
+#endif
+
if (!mpls_enable) {
m_freem(m);
return;
==== //depot/projects/soc2008/rfrench_mpls/netmpls/mpls_proto.c#6 (text+ko) ====
@@ -82,3 +82,5 @@
offsetof(struct sockaddr_mpls, smpls_in_ifindex) << 3,
sizeof(struct sockaddr_mpls)
};
+
+DOMAIN_SET(mpls);
More information about the p4-projects
mailing list