Re: [mpls-linux-general] How to separate tcp traffic from udp traffic using MPLS
Status: Beta
Brought to you by:
jleu
|
From: James R. L. <jl...@mi...> - 2005-12-07 21:35:55
|
Nice work :-)
On Wed, Dec 07, 2005 at 04:08:33PM -0500, Bob Beers wrote:
> >
> > I suppose enabling debug could be added to the Makefile/Kconfig system
>=20
> Here's a little something I gen'd up while waiting on another thread
> WARNING -- not tested at all!
>=20
> diff -uprN -X dontdiff kernel/include/net/mpls.h kernel-bb/include/net/mp=
ls.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 -05=
00
> @@ -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
>=20
> +/* 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
>=20
> If unsure, say N.
>=20
> +config MPLS_DISABLE_DEBUG
> + boolean "MPLS: Disable Debug"
> + depends on MPLS
> + default n
> + ---help---
> + This option allows to disable the inclusion of debugging code in
> + 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/Makefi=
le
> --- 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
>=20
> 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
>=20
>=20
> --
> -Bob
--=20
James R. Leu
jl...@mi...
|