From owner-p4-projects@FreeBSD.ORG Thu Oct 2 23:44:52 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 97433106568D; Thu, 2 Oct 2008 23:44:52 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B75D106568B for ; Thu, 2 Oct 2008 23:44:52 +0000 (UTC) (envelope-from rfrench@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4A59B8FC1C for ; Thu, 2 Oct 2008 23:44:52 +0000 (UTC) (envelope-from rfrench@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id m92NiqM9086135 for ; Thu, 2 Oct 2008 23:44:52 GMT (envelope-from rfrench@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id m92Niqt4086133 for perforce@freebsd.org; Thu, 2 Oct 2008 23:44:52 GMT (envelope-from rfrench@FreeBSD.org) Date: Thu, 2 Oct 2008 23:44:52 GMT Message-Id: <200810022344.m92Niqt4086133@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rfrench@FreeBSD.org using -f From: Ryan French To: Perforce Change Reviews Cc: Subject: PERFORCE change 150822 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2008 23:44:53 -0000 http://perforce.freebsd.org/chv.cgi?CH=150822 Change 150822 by rfrench@rfrench_mpls on 2008/10/02 23:44:34 Made a few more changes to the psuedo routing entry creater. Managed to stop the kernel from page faulting when an MPLS packet is received, but the interface is now saying it cannot handle to af type. I will be hopefully getting this working by the end of the day. Affected files ... .. //depot/projects/soc2008/rfrench_mpls/netmpls/mpls_input.c#11 edit Differences ... ==== //depot/projects/soc2008/rfrench_mpls/netmpls/mpls_input.c#11 (text+ko) ==== @@ -159,13 +159,13 @@ #ifdef MPLS_DEBUG printf("smpls af %d len %d in_label %d in_ifindex %d\n", smpls->smpls_family, smpls->smpls_len, - MPLS_LABEL_GET(smpls->smpls_in_label), + MPLS_LABEL_GET(smpls->smpls_in_label), smpls->smpls_in_ifindex); #endif - - rt = rtalloc1(smplstosa(smpls),1, 0); +/* uncomment below once routing is implemented */ + //rt = rtalloc1(smplstosa(smpls),1, 0); -//Uncoment this section when routing has been setup +//Uncomment this section when routing has been setup // if (rt == NULL) { // /* no entry for this label */ // #ifdef MPLS_DEBUG @@ -174,12 +174,12 @@ // m_freem(m); // goto done; // } - - rt->rt_use++; - smpls = satosmpls(rt_key(rt)); +// +// rt->rt_use++; +// smpls = satosmpls(rt_key(rt)); #ifdef MPLS_DEBUG /* Remove this once routing has been setup */ - create_fake_entry(smpls); + create_fake_entry(smpls); #endif #ifdef MPLS_DEBUG @@ -219,13 +219,15 @@ /* refetch label */ shim = mtod(m, struct shim_hdr *); - ifp = rt->rt_ifp; + + /* Remove once routing is implemented */ + // ifp = rt->rt_ifp; if (smpls->smpls_out_ifindex) break; - - RTFREE(rt); - rt = NULL; +/* Remove comments when routing has been implemented */ +// RTFREE(rt); +// rt = NULL; } /* write back TTL */ @@ -239,7 +241,8 @@ #endif (*ifp->if_output)(ifp, m, smplstosa(smpls), rt); + done: - if (rt) - RTFREE(rt); + if (rt) + RTFREE(rt); }