Re: [mpls-linux-general] How to separate tcp traffic from udp traffic using MPLS
Status: Beta
Brought to you by:
jleu
|
From: Carlos M. K. <ba...@gm...> - 2005-12-08 10:26:38
|
Ill try it. ;-)
Many thanks for all help.
On 12/7/05, Bob Beers <bob...@gm...> wrote:
>
> >
> > I suppose enabling debug could be added to the Makefile/Kconfig system
>
> Here's a little something I gen'd up while waiting on another thread
> WARNING -- not tested at all!
>
> diff -uprN -X dontdiff kernel/include/net/mpls.h
> kernel-bb/include/net/mpls.h
> --- kernel/include/net/mpls.h 2005-12-07 10:08:49.000000000 -0500
> +++ kernel-bb/include/net/mpls.h 2005-12-07 15:51:52.000000000-050=
0
> @@ -59,6 +59,15 @@ extern struct dst_ops mpls_dst_ops;
> /* Comment this to suppress TRACING enter/exit functions */
> #define MPLS_ENABLE_DEBUG_FUNC 1
>
> +/* Override driver debugging from Kconfig option:
> + * MPLS_DISABLE_DEBUG
> + */
> +#ifdef MPLS_DISABLE_DEBUG
> +#undefine MPLS_ENABLE_DEBUG
> +#undefine MPLS_ENABLE_DEBUG_FUNC
> +#endif
> +
> +
> #ifdef MPLS_ENABLE_DEBUG
> #define MPLS_DEBUG(f, a...) \
> { \
> diff -uprN -X dontdiff kernel/net/Kconfig kernel-bb/net/Kconfig
> --- kernel/net/Kconfig 2005-12-07 10:08:49.000000000 -0500
> +++ kernel-bb/net/Kconfig 2005-12-07 15:53:38.000000000 -0500
> @@ -96,6 +96,17 @@ config MPLS_TUNNEL
>
> If unsure, say N.
>
> +config MPLS_DISABLE_DEBUG
> + boolean "MPLS: Disable Debug"
> + depends on MPLS
> + default n
> + ---help---
> + This option allows to disable the inclusion of debugging code i=
n
> + the MPLS driver. The mpls.h file has the actual DEBUG #defines=
,
> + but saying Y here, will force them off.
> +
> + If you feel the need for speed, say Y.
> +
> if INET
> source "net/ipv4/Kconfig"
> source "net/ipv6/Kconfig"
> diff -uprN -X dontdiff kernel/net/mpls/Makefile
> kernel-bb/net/mpls/Makefile
> --- kernel/net/mpls/Makefile 2005-12-07 10:08:49.000000000 -0500
> +++ kernel-bb/net/mpls/Makefile 2005-12-07 15:54:00.000000000 -0500
> @@ -9,3 +9,7 @@ mpls-y :=3D af_mpls.o mpls_if.o mpls_ilm.o
>
> obj-$(CONFIG_MPLS) +=3D mpls.o
> obj-$(CONFIG_MPLS_TUNNEL) +=3D mpls_tunnel.o
> +
> +ifeq ($(CONFIG_MPLS_DISABLE_DEBUG),y)
> +EXTRA_CFLAGS +=3D -DMPLS_DISABLE_DEBUG
> +endif
>
> --
> -Bob
>
|