Re: [LARTC] IMQ patch for 2.6.3 kernel
I encountered errors with linux-2.6.2-imq-4.diff even if I marked both options as modules or not. But linux-2.6.4-rc2-imq-5.patch seems to be quite stable until now. Codrin. On Fri, 5 Mar 2004, Andre Correa wrote: > > Sorry, but the patch is not broken. It compiles without errors. You just > have to choose the right options in your config: > > CONFIG_IP_NF_TARGET_IMQ=y > and > CONFIG_IMQ=y > > and avoid using modules. > > Andre > > > Marc-Christian Petersen wrote: > > On Friday 05 March 2004 00:00, The Codrinus wrote: > > > > Hi Codrin, > > > > > >>I downloaded the latest imq patch for 2.6.x kernels from > >>http://www.linuximq.net/patchs/linux-2.6.2-imq-4.diff > >>I successfully applied the patch but when compiling IMQ I get the > >>following error messages: > >>What might be the problem ? > > > > that patch is b0rked. Use attached one. > > > > -- > > ciao, Marc > > > > > > > > > > # 2.6.3-WOLK1.1 > > > > # Patch from: http://www.linuximq.net/ > > > > # Build fixes: me > > > > diff -urN linux-2.6.orig/drivers/net/Kconfig linux-2.6.new/drivers/net/Kconfig > > --- linux-2.6.orig/drivers/net/Kconfig 2004-01-21 19:33:36.0 +0100 > > +++ linux-2.6.new/drivers/net/Kconfig 2004-01-25 15:08:20.0 +0100 > > @@ -85,6 +85,20 @@ > > To compile this driver as a module, choose M here: the module > > will be called eql. If unsure, say N. > > > > +config IMQ > > + tristate "IMQ (intermediate queueing device) support" > > + depends on NETDEVICES && NETFILTER > > + ---help--- > > + The imq device(s) is used as placeholder for QoS queueing disciplines. > > + Every packet entering/leaving the ip stack can be directed through > > + the imq device where it's enqueued/dequeued to the attached qdisc. > > + This allows you to treat network devices as classes and distribute > > + bandwidth among them. Iptables is used to specify through which imq > > + device, if any, packets travel. > > + > > + To compile this driver as a module, choose M here: the module > > + will be called imq. If unsure, say N. > > + > > config TUN > > tristate "Universal TUN/TAP device driver support" > > depends on NETDEVICES > > diff -urN linux-2.6.orig/drivers/net/Makefile linux-2.6.new/drivers/net/Makefile > > --- linux-2.6.orig/drivers/net/Makefile 2004-01-21 19:33:36.0 +0100 > > +++ linux-2.6.new/drivers/net/Makefile 2004-01-25 15:08:20.0 +0100 > > @@ -110,6 +110,7 @@ > > endif > > > > obj-$(CONFIG_DUMMY) += dummy.o > > +obj-$(CONFIG_IMQ) += imq.o > > obj-$(CONFIG_DE600) += de600.o > > obj-$(CONFIG_DE620) += de620.o > > obj-$(CONFIG_AT1500) += lance.o > > diff -urN linux-2.6.orig/drivers/net/imq.c linux-2.6.new/drivers/net/imq.c > > --- linux-2.6.orig/drivers/net/imq.c1970-01-01 01:00:00.0 +0100 > > +++ linux-2.6.new/drivers/net/imq.c 2004-01-25 15:08:51.0 +0100 > > @@ -0,0 +1,323 @@ > > +/* > > + * Pseudo-driver for the intermediate queue device. > > + * > > + * This program is free software; you can redistribute it and/or > > + * modify it under the terms of the GNU General Public License > > + * as published by the Free Software Foundation; either version > > + * 2 of the License, or (at your option) any later version. > > + * > > + * Authors:Patrick McHardy, <[EMAIL PROTECTED]> > > + * > > + *The first version was written by Martin Devera, <[EMAIL > > PROTECTED]> > > + * > > + * Credits:Jan Rafaj <[EMAIL PROTECTED]> > > + * - Update patch to 2.4.21 > > + * Sebastian Strollo <[EMAIL PROTECTED]> > > + * - Fix "Dead-loop on netdevice imq"-issue > > + * Marcel Sebek <[EMAIL PROTECTED]> > > + * - Update to 2.6.2-rc1 > > + */ > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) > > +#include > > +#endif > > +#include > > +#include > > + > > +static nf_hookfn imq_nf_hook; > > + > > +static struct nf_hook_ops imq_ingress_ipv4 = { > > + .hook = imq_nf_hook, > > + .owner = THIS_MODULE, > > + .pf = PF_INET, > > + .hooknum= NF_IP_PRE_ROUTING, > > + .priority = NF_IP_PRI_MANGLE + 1 > > +}; > > + > > +static struct nf_hook_ops imq_egress_ipv4 = { > > + .hook = imq_nf_hook, > > + .owner = THIS_MODULE, > > + .pf = PF_INET, > > + .hooknum= NF_IP_POST_ROUTING, > > + .priority = NF_IP_PRI_LAST > > +}; > > + > > +#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) > > +static struct nf_hook_ops imq_ingress_ipv6 = { > > + .hook = imq_nf_hook, > > + .owner = THIS_MODULE, > > + .pf
Re: [LARTC] IMQ patch for 2.6.3 kernel
On Friday 05 March 2004 16:12, Andre Correa wrote: Hi Andre, > Sorry, but the patch is not broken. It compiles without errors. You just > have to choose the right options in your config: > CONFIG_IP_NF_TARGET_IMQ=y > and > CONFIG_IMQ=y > and avoid using modules. which is, in short words, broken :p ciao, Marc ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] IMQ patch for 2.6.3 kernel
Sorry, but the patch is not broken. It compiles without errors. You just have to choose the right options in your config: CONFIG_IP_NF_TARGET_IMQ=y and CONFIG_IMQ=y and avoid using modules. Andre Marc-Christian Petersen wrote: On Friday 05 March 2004 00:00, The Codrinus wrote: Hi Codrin, I downloaded the latest imq patch for 2.6.x kernels from http://www.linuximq.net/patchs/linux-2.6.2-imq-4.diff I successfully applied the patch but when compiling IMQ I get the following error messages: What might be the problem ? that patch is b0rked. Use attached one. -- ciao, Marc # 2.6.3-WOLK1.1 # Patch from: http://www.linuximq.net/ # Build fixes: me diff -urN linux-2.6.orig/drivers/net/Kconfig linux-2.6.new/drivers/net/Kconfig --- linux-2.6.orig/drivers/net/Kconfig 2004-01-21 19:33:36.0 +0100 +++ linux-2.6.new/drivers/net/Kconfig 2004-01-25 15:08:20.0 +0100 @@ -85,6 +85,20 @@ To compile this driver as a module, choose M here: the module will be called eql. If unsure, say N. +config IMQ + tristate "IMQ (intermediate queueing device) support" + depends on NETDEVICES && NETFILTER + ---help--- + The imq device(s) is used as placeholder for QoS queueing disciplines. + Every packet entering/leaving the ip stack can be directed through + the imq device where it's enqueued/dequeued to the attached qdisc. + This allows you to treat network devices as classes and distribute + bandwidth among them. Iptables is used to specify through which imq + device, if any, packets travel. + + To compile this driver as a module, choose M here: the module + will be called imq. If unsure, say N. + config TUN tristate "Universal TUN/TAP device driver support" depends on NETDEVICES diff -urN linux-2.6.orig/drivers/net/Makefile linux-2.6.new/drivers/net/Makefile --- linux-2.6.orig/drivers/net/Makefile 2004-01-21 19:33:36.0 +0100 +++ linux-2.6.new/drivers/net/Makefile 2004-01-25 15:08:20.0 +0100 @@ -110,6 +110,7 @@ endif obj-$(CONFIG_DUMMY) += dummy.o +obj-$(CONFIG_IMQ) += imq.o obj-$(CONFIG_DE600) += de600.o obj-$(CONFIG_DE620) += de620.o obj-$(CONFIG_AT1500) += lance.o diff -urN linux-2.6.orig/drivers/net/imq.c linux-2.6.new/drivers/net/imq.c --- linux-2.6.orig/drivers/net/imq.c 1970-01-01 01:00:00.0 +0100 +++ linux-2.6.new/drivers/net/imq.c 2004-01-25 15:08:51.0 +0100 @@ -0,0 +1,323 @@ +/* + * Pseudo-driver for the intermediate queue device. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * + * Authors:Patrick McHardy, <[EMAIL PROTECTED]> + * + * The first version was written by Martin Devera, <[EMAIL PROTECTED]> + * + * Credits:Jan Rafaj <[EMAIL PROTECTED]> + * - Update patch to 2.4.21 + * Sebastian Strollo <[EMAIL PROTECTED]> + * - Fix "Dead-loop on netdevice imq"-issue + * Marcel Sebek <[EMAIL PROTECTED]> + * - Update to 2.6.2-rc1 + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) +#include +#endif +#include +#include + +static nf_hookfn imq_nf_hook; + +static struct nf_hook_ops imq_ingress_ipv4 = { + .hook = imq_nf_hook, + .owner = THIS_MODULE, + .pf = PF_INET, + .hooknum = NF_IP_PRE_ROUTING, + .priority = NF_IP_PRI_MANGLE + 1 +}; + +static struct nf_hook_ops imq_egress_ipv4 = { + .hook = imq_nf_hook, + .owner = THIS_MODULE, + .pf = PF_INET, + .hooknum = NF_IP_POST_ROUTING, + .priority = NF_IP_PRI_LAST +}; + +#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) +static struct nf_hook_ops imq_ingress_ipv6 = { + .hook = imq_nf_hook, + .owner = THIS_MODULE, + .pf = PF_INET6, + .hooknum = NF_IP6_PRE_ROUTING, + .priority = NF_IP6_PRI_MANGLE + 1 +}; + +static struct nf_hook_ops imq_egress_ipv6 = { + .hook = imq_nf_hook, + .owner = THIS_MODULE, + .pf = PF_INET6, + .hooknum = NF_IP6_POST_ROUTING, + .priority = NF_IP6_PRI_LAST +}; +#endif + +static unsigned int numdevs = 2; + +module_param(numdevs, int, 0); + +static struct net_device *imq_devs; + + +static struct net_device_stats *imq_get_stats(struct net_device *dev) +{ + return (struct net_device_stats *)dev->priv; +} + +/* called for packets kfree'd in qdiscs at places other than enqueue */ +static void imq_skb_destructor(struct sk_buff *skb) +{ + struct nf_info *info = skb->nf_info; + + if (info) { + if (info->indev) + dev_put(info->indev); + if (info->outdev) + dev_put(info->outdev); + kfree(info); + } +} + +static int imq_dev_xmit(struct sk_buff *skb, struct net_device *dev) +{ + struct net_device_stats *stats = (struct net_devi
Re: [LARTC] IMQ patch for 2.6.3 kernel
Marc, I've just upgraded my kernel to 2.6.3 with the IMQ patch and it seems to be fine until now. Thanks alot, Codrin. On Fri, 5 Mar 2004, Marc-Christian Petersen wrote: > On Friday 05 March 2004 00:00, The Codrinus wrote: > > Hi Codrin, > > > I downloaded the latest imq patch for 2.6.x kernels from > > http://www.linuximq.net/patchs/linux-2.6.2-imq-4.diff > > I successfully applied the patch but when compiling IMQ I get the > > following error messages: > > What might be the problem ? > that patch is b0rked. Use attached one. > > -- > ciao, Marc > ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] IMQ patch for 2.6.3 kernel
On Friday 05 March 2004 00:00, The Codrinus wrote: Hi Codrin, > I downloaded the latest imq patch for 2.6.x kernels from > http://www.linuximq.net/patchs/linux-2.6.2-imq-4.diff > I successfully applied the patch but when compiling IMQ I get the > following error messages: > What might be the problem ? that patch is b0rked. Use attached one. -- ciao, Marc # 2.6.3-WOLK1.1 # Patch from: http://www.linuximq.net/ # Build fixes: me diff -urN linux-2.6.orig/drivers/net/Kconfig linux-2.6.new/drivers/net/Kconfig --- linux-2.6.orig/drivers/net/Kconfig 2004-01-21 19:33:36.0 +0100 +++ linux-2.6.new/drivers/net/Kconfig 2004-01-25 15:08:20.0 +0100 @@ -85,6 +85,20 @@ To compile this driver as a module, choose M here: the module will be called eql. If unsure, say N. +config IMQ + tristate "IMQ (intermediate queueing device) support" + depends on NETDEVICES && NETFILTER + ---help--- + The imq device(s) is used as placeholder for QoS queueing disciplines. + Every packet entering/leaving the ip stack can be directed through + the imq device where it's enqueued/dequeued to the attached qdisc. + This allows you to treat network devices as classes and distribute + bandwidth among them. Iptables is used to specify through which imq + device, if any, packets travel. + + To compile this driver as a module, choose M here: the module + will be called imq. If unsure, say N. + config TUN tristate "Universal TUN/TAP device driver support" depends on NETDEVICES diff -urN linux-2.6.orig/drivers/net/Makefile linux-2.6.new/drivers/net/Makefile --- linux-2.6.orig/drivers/net/Makefile 2004-01-21 19:33:36.0 +0100 +++ linux-2.6.new/drivers/net/Makefile 2004-01-25 15:08:20.0 +0100 @@ -110,6 +110,7 @@ endif obj-$(CONFIG_DUMMY) += dummy.o +obj-$(CONFIG_IMQ) += imq.o obj-$(CONFIG_DE600) += de600.o obj-$(CONFIG_DE620) += de620.o obj-$(CONFIG_AT1500) += lance.o diff -urN linux-2.6.orig/drivers/net/imq.c linux-2.6.new/drivers/net/imq.c --- linux-2.6.orig/drivers/net/imq.c 1970-01-01 01:00:00.0 +0100 +++ linux-2.6.new/drivers/net/imq.c 2004-01-25 15:08:51.0 +0100 @@ -0,0 +1,323 @@ +/* + * Pseudo-driver for the intermediate queue device. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * + * Authors:Patrick McHardy, <[EMAIL PROTECTED]> + * + * The first version was written by Martin Devera, <[EMAIL PROTECTED]> + * + * Credits:Jan Rafaj <[EMAIL PROTECTED]> + * - Update patch to 2.4.21 + * Sebastian Strollo <[EMAIL PROTECTED]> + * - Fix "Dead-loop on netdevice imq"-issue + * Marcel Sebek <[EMAIL PROTECTED]> + * - Update to 2.6.2-rc1 + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) +#include +#endif +#include +#include + +static nf_hookfn imq_nf_hook; + +static struct nf_hook_ops imq_ingress_ipv4 = { + .hook = imq_nf_hook, + .owner = THIS_MODULE, + .pf = PF_INET, + .hooknum = NF_IP_PRE_ROUTING, + .priority = NF_IP_PRI_MANGLE + 1 +}; + +static struct nf_hook_ops imq_egress_ipv4 = { + .hook = imq_nf_hook, + .owner = THIS_MODULE, + .pf = PF_INET, + .hooknum = NF_IP_POST_ROUTING, + .priority = NF_IP_PRI_LAST +}; + +#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) +static struct nf_hook_ops imq_ingress_ipv6 = { + .hook = imq_nf_hook, + .owner = THIS_MODULE, + .pf = PF_INET6, + .hooknum = NF_IP6_PRE_ROUTING, + .priority = NF_IP6_PRI_MANGLE + 1 +}; + +static struct nf_hook_ops imq_egress_ipv6 = { + .hook = imq_nf_hook, + .owner = THIS_MODULE, + .pf = PF_INET6, + .hooknum = NF_IP6_POST_ROUTING, + .priority = NF_IP6_PRI_LAST +}; +#endif + +static unsigned int numdevs = 2; + +module_param(numdevs, int, 0); + +static struct net_device *imq_devs; + + +static struct net_device_stats *imq_get_stats(struct net_device *dev) +{ + return (struct net_device_stats *)dev->priv; +} + +/* called for packets kfree'd in qdiscs at places other than enqueue */ +static void imq_skb_destructor(struct sk_buff *skb) +{ + struct nf_info *info = skb->nf_info; + + if (info) { + if (info->indev) + dev_put(info->indev); + if (info->outdev) + dev_put(info->outdev); + kfree(info); + } +} + +static int imq_dev_xmit(struct sk_buff *skb, struct net_device *dev) +{ + struct net_device_stats *stats = (struct net_device_stats*) dev->priv; + + stats->tx_bytes += skb->len; + stats->tx_packets++; + + skb->imq_flags = 0; + skb->destructor = NULL; + + dev->trans_start = jiffies; + nf_reinject(skb, skb->nf_info, NF_ACCEPT); + return 0; +} + +static int imq_nf_queue(struct sk_buff *skb, struct nf_info *info, + vo
[LARTC] IMQ patch for 2.6.3 kernel
Hi, I downloaded the latest imq patch for 2.6.x kernels from http://www.linuximq.net/patchs/linux-2.6.2-imq-4.diff I successfully applied the patch but when compiling IMQ I get the following error messages: CC net/ipv4/netfilter/ipt_IMQ.o net/ipv4/netfilter/ipt_IMQ.c: In function `imq_target': net/ipv4/netfilter/ipt_IMQ.c:19: error: structure has no member named `imq_flags' make[3]: *** [net/ipv4/netfilter/ipt_IMQ.o] Error 1 make[2]: *** [net/ipv4/netfilter] Error 2 make[1]: *** [net/ipv4] Error 2 make: *** [net] Error 2 CC [M] drivers/net/imq.o drivers/net/imq.c: In function `imq_skb_destructor': drivers/net/imq.c:88: error: structure has no member named `nf_info' drivers/net/imq.c: In function `imq_dev_xmit': drivers/net/imq.c:106: error: structure has no member named `imq_flags' drivers/net/imq.c:110: error: structure has no member named `nf_info' drivers/net/imq.c: In function `imq_nf_queue': drivers/net/imq.c:121: error: structure has no member named `imq_flags' drivers/net/imq.c:129: error: structure has no member named `imq_flags' drivers/net/imq.c:141: error: structure has no member named `nf_info' drivers/net/imq.c: In function `imq_nf_hook': drivers/net/imq.c:174: error: structure has no member named `imq_flags' make[2]: *** [drivers/net/imq.o] Error 1 make[1]: *** [drivers/net] Error 2 make: *** [drivers] Error 2 What might be the problem ? Thank you, Codrin. ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/