MPLS support for DragonFly

Jeffrey Hsu hsu at FreeBSD.ORG
Wed Jul 2 01:53:30 PDT 2008


I like it.  Some comments:

1. rt_setshim() should be static.

2. Make that rt_setshims(rt, rtinfo->rt_info) to simplify the calling
interface.

3. Remove all the null checks in rt_setshims(), because it's only called
from one place and after a bzero().

3. There's an extra newline at the end of sbin/route.c.

4. Don't need MPLS config file.  Just add to LINT config file.

5. What's the multiplexing strategy in terms of distributing work
and avoiding locking by using per-cpu data structures?

6. Instead of a separate mpls_output(), can you factor out the MPLS
output process from the call to the underlying interface, as in
something like

#ifdef MPLS
  struct rtentry *send_route = ro->ro_rt;       /* copy-in/copy-out parameter */

  if (!mpls_output_process(ifp, m, &dst, &send_route))
        goto done;
#endif

  error = ifp->if_output(ifp, m, (struct sockaddr *)dst, send_route);

  /*
   * Returns FALSE if no further output processing required.
   */
  bool_t
  mpls_output_process()
  {

        if (!(send_route->rt_flags & RTF_MPLSOPS))
                return TRUE;

        do MPLS processing
        return FALSE if stack empty or on mpls_push() or mpls_swap() error

        return TRUE;
  }





More information about the Submit mailing list