Author: baggins Date: Mon Jul 4 10:22:43 2011 GMT Module: packages Tag: HEAD ---- Log message: - updated to linux-2.6.39-imq-multiqueue-test1.diff.bz2
---- Files affected: packages/kernel: kernel-imq.patch (1.12 -> 1.13) , kernel.spec (1.927 -> 1.928) ---- Diffs: ================================================================ Index: packages/kernel/kernel-imq.patch diff -u packages/kernel/kernel-imq.patch:1.12 packages/kernel/kernel-imq.patch:1.13 --- packages/kernel/kernel-imq.patch:1.12 Tue Mar 15 08:23:57 2011 +++ packages/kernel/kernel-imq.patch Mon Jul 4 12:22:37 2011 @@ -1,7 +1,7 @@ -diff -uNr linux-2.6.35/drivers/net/imq.c linux-2.6.35-imq-multiqueue-test1/drivers/net/imq.c ---- linux-2.6.35/drivers/net/imq.c 1970-01-01 02:00:00.000000000 +0200 -+++ linux-2.6.35-imq-multiqueue-test1/drivers/net/imq.c 2010-08-15 13:54:30.070063067 +0300 -@@ -0,0 +1,774 @@ +diff -uNr linux-2.6.39/drivers/net/imq.c linux-2.6.39-imqmq/drivers/net/imq.c +--- linux-2.6.39/drivers/net/imq.c 1970-01-01 02:00:00.000000000 +0200 ++++ linux-2.6.39-imqmq/drivers/net/imq.c 2011-05-19 11:08:03.838522212 +0300 +@@ -0,0 +1,777 @@ +/* + * Pseudo-driver for the intermediate queue device. + * @@ -99,9 +99,12 @@ + * - Make IMQ multi-queue. Number of IMQ device queues can be + * increased with 'numqueues' module parameters. Default number + * of queues is 1, in other words by default IMQ works as -+ * single-queue device. Multi-queue selection is based on ++ * single-queue device. Multi-queue selection is based on + * IFB multi-queue patch by Changli Gao <xiao...@gmail.com>. + * ++ * 2011/03/18 - (Jussi Kivilinna) ++ * - Port to 2.6.38 ++ * + * Also, many thanks to pablo Sebastian Greco for making the initial + * patch and to those who helped the testing. + * @@ -776,10 +779,10 @@ +MODULE_LICENSE("GPL"); +MODULE_ALIAS_RTNL_LINK("imq"); + -diff -uNr linux-2.6.35/drivers/net/Kconfig linux-2.6.35-imq-multiqueue-test1/drivers/net/Kconfig ---- linux-2.6.35/drivers/net/Kconfig 2010-08-02 01:11:14.000000000 +0300 -+++ linux-2.6.35-imq-multiqueue-test1/drivers/net/Kconfig 2010-08-12 19:57:51.284627330 +0300 -@@ -121,6 +121,129 @@ +diff -uNr linux-2.6.39/drivers/net/Kconfig linux-2.6.39-imqmq/drivers/net/Kconfig +--- linux-2.6.39/drivers/net/Kconfig 2011-05-19 07:06:34.000000000 +0300 ++++ linux-2.6.39-imqmq/drivers/net/Kconfig 2011-05-19 11:08:04.281864473 +0300 +@@ -124,6 +124,129 @@ To compile this driver as a module, choose M here: the module will be called eql. If unsure, say N. @@ -909,20 +912,20 @@ config TUN tristate "Universal TUN/TAP device driver support" select CRC32 -diff -uNr linux-2.6.35/drivers/net/Makefile linux-2.6.35-imq-multiqueue-test1/drivers/net/Makefile ---- linux-2.6.35/drivers/net/Makefile 2010-08-02 01:11:14.000000000 +0300 -+++ linux-2.6.35-imq-multiqueue-test1/drivers/net/Makefile 2010-08-12 19:57:51.291294790 +0300 -@@ -169,6 +169,7 @@ - obj-$(CONFIG_XEN_NETDEV_FRONTEND) += xen-netfront.o +diff -uNr linux-2.6.39/drivers/net/Makefile linux-2.6.39-imqmq/drivers/net/Makefile +--- linux-2.6.39/drivers/net/Makefile 2011-05-19 07:06:34.000000000 +0300 ++++ linux-2.6.39-imqmq/drivers/net/Makefile 2011-05-19 11:08:04.281864473 +0300 +@@ -175,6 +175,7 @@ + obj-$(CONFIG_XEN_NETDEV_BACKEND) += xen-netback/ obj-$(CONFIG_DUMMY) += dummy.o +obj-$(CONFIG_IMQ) += imq.o obj-$(CONFIG_IFB) += ifb.o obj-$(CONFIG_MACVLAN) += macvlan.o obj-$(CONFIG_MACVTAP) += macvtap.o -diff -uNr linux-2.6.35/include/linux/imq.h linux-2.6.35-imq-multiqueue-test1/include/linux/imq.h ---- linux-2.6.35/include/linux/imq.h 1970-01-01 02:00:00.000000000 +0200 -+++ linux-2.6.35-imq-multiqueue-test1/include/linux/imq.h 2010-08-12 19:57:51.324632058 +0300 +diff -uNr linux-2.6.39/include/linux/imq.h linux-2.6.39-imqmq/include/linux/imq.h +--- linux-2.6.39/include/linux/imq.h 1970-01-01 02:00:00.000000000 +0200 ++++ linux-2.6.39-imqmq/include/linux/imq.h 2011-05-19 11:08:04.281864473 +0300 @@ -0,0 +1,13 @@ +#ifndef _IMQ_H +#define _IMQ_H @@ -937,9 +940,9 @@ + +#endif /* _IMQ_H */ + -diff -uNr linux-2.6.35/include/linux/netfilter/xt_IMQ.h linux-2.6.35-imq-multiqueue-test1/include/linux/netfilter/xt_IMQ.h ---- linux-2.6.35/include/linux/netfilter/xt_IMQ.h 1970-01-01 02:00:00.000000000 +0200 -+++ linux-2.6.35-imq-multiqueue-test1/include/linux/netfilter/xt_IMQ.h 2010-08-12 19:57:51.344634424 +0300 +diff -uNr linux-2.6.39/include/linux/netfilter/xt_IMQ.h linux-2.6.39-imqmq/include/linux/netfilter/xt_IMQ.h +--- linux-2.6.39/include/linux/netfilter/xt_IMQ.h 1970-01-01 02:00:00.000000000 +0200 ++++ linux-2.6.39-imqmq/include/linux/netfilter/xt_IMQ.h 2011-05-19 11:08:04.281864473 +0300 @@ -0,0 +1,9 @@ +#ifndef _XT_IMQ_H +#define _XT_IMQ_H @@ -950,9 +953,9 @@ + +#endif /* _XT_IMQ_H */ + -diff -uNr linux-2.6.35/include/linux/netfilter.h linux-2.6.35-imq-multiqueue-test1/include/linux/netfilter.h ---- linux-2.6.35/include/linux/netfilter.h 2010-08-02 01:11:14.000000000 +0300 -+++ linux-2.6.35-imq-multiqueue-test1/include/linux/netfilter.h 2010-08-12 19:57:51.374637975 +0300 +diff -uNr linux-2.6.39/include/linux/netfilter.h linux-2.6.39-imqmq/include/linux/netfilter.h +--- linux-2.6.39/include/linux/netfilter.h 2011-05-19 07:06:34.000000000 +0300 ++++ linux-2.6.39-imqmq/include/linux/netfilter.h 2011-05-19 11:08:04.285197874 +0300 @@ -21,7 +21,8 @@ #define NF_QUEUE 3 #define NF_REPEAT 4 @@ -962,10 +965,10 @@ +#define NF_MAX_VERDICT NF_IMQ_QUEUE /* we overload the higher bits for encoding auxiliary data such as the queue - * number. Not nice, but better than additional function arguments. */ -diff -uNr linux-2.6.35/include/linux/netfilter_ipv4/ipt_IMQ.h linux-2.6.35-imq-multiqueue-test1/include/linux/netfilter_ipv4/ipt_IMQ.h ---- linux-2.6.35/include/linux/netfilter_ipv4/ipt_IMQ.h 1970-01-01 02:00:00.000000000 +0200 -+++ linux-2.6.35-imq-multiqueue-test1/include/linux/netfilter_ipv4/ipt_IMQ.h 2010-08-12 19:57:51.374637975 +0300 + * number or errno values. Not nice, but better than additional function +diff -uNr linux-2.6.39/include/linux/netfilter_ipv4/ipt_IMQ.h linux-2.6.39-imqmq/include/linux/netfilter_ipv4/ipt_IMQ.h +--- linux-2.6.39/include/linux/netfilter_ipv4/ipt_IMQ.h 1970-01-01 02:00:00.000000000 +0200 ++++ linux-2.6.39-imqmq/include/linux/netfilter_ipv4/ipt_IMQ.h 2011-05-19 11:08:04.285197874 +0300 @@ -0,0 +1,10 @@ +#ifndef _IPT_IMQ_H +#define _IPT_IMQ_H @@ -977,9 +980,9 @@ + +#endif /* _IPT_IMQ_H */ + -diff -uNr linux-2.6.35/include/linux/netfilter_ipv6/ip6t_IMQ.h linux-2.6.35-imq-multiqueue-test1/include/linux/netfilter_ipv6/ip6t_IMQ.h ---- linux-2.6.35/include/linux/netfilter_ipv6/ip6t_IMQ.h 1970-01-01 02:00:00.000000000 +0200 -+++ linux-2.6.35-imq-multiqueue-test1/include/linux/netfilter_ipv6/ip6t_IMQ.h 2010-08-12 19:57:51.374637975 +0300 +diff -uNr linux-2.6.39/include/linux/netfilter_ipv6/ip6t_IMQ.h linux-2.6.39-imqmq/include/linux/netfilter_ipv6/ip6t_IMQ.h +--- linux-2.6.39/include/linux/netfilter_ipv6/ip6t_IMQ.h 1970-01-01 02:00:00.000000000 +0200 ++++ linux-2.6.39-imqmq/include/linux/netfilter_ipv6/ip6t_IMQ.h 2011-05-19 11:08:04.285197874 +0300 @@ -0,0 +1,10 @@ +#ifndef _IP6T_IMQ_H +#define _IP6T_IMQ_H @@ -991,9 +994,9 @@ + +#endif /* _IP6T_IMQ_H */ + -diff -uNr linux-2.6.35/include/linux/skbuff.h linux-2.6.35-imq-multiqueue-test1/include/linux/skbuff.h ---- linux-2.6.35/include/linux/skbuff.h 2010-08-02 01:11:14.000000000 +0300 -+++ linux-2.6.35-imq-multiqueue-test1/include/linux/skbuff.h 2010-08-12 19:57:51.387972881 +0300 +diff -uNr linux-2.6.39/include/linux/skbuff.h linux-2.6.39-imqmq/include/linux/skbuff.h +--- linux-2.6.39/include/linux/skbuff.h 2011-05-19 07:06:34.000000000 +0300 ++++ linux-2.6.39-imqmq/include/linux/skbuff.h 2011-05-19 11:08:04.288531274 +0300 @@ -29,6 +29,9 @@ #include <linux/rcupdate.h> #include <linux/dmaengine.h> @@ -1004,7 +1007,7 @@ /* Don't change this without changing skb_csum_unnecessary! */ #define CHECKSUM_NONE 0 -@@ -327,6 +330,9 @@ +@@ -339,6 +342,9 @@ * first. This is owned by whoever has the skb queued ATM. */ char cb[48] __aligned(8); @@ -1014,8 +1017,8 @@ unsigned long _skb_refdst; #ifdef CONFIG_XFRM -@@ -363,6 +369,9 @@ - struct nf_conntrack *nfct; +@@ -377,6 +383,9 @@ + #ifdef NET_SKBUFF_NF_DEFRAG_NEEDED struct sk_buff *nfct_reasm; #endif +#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE) @@ -1024,9 +1027,9 @@ #ifdef CONFIG_BRIDGE_NETFILTER struct nf_bridge_info *nf_bridge; #endif -@@ -389,6 +398,10 @@ +@@ -401,6 +410,10 @@ - /* 0/14 bit hole */ + /* 0/13 bit hole */ +#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE) + __u8 imq_flags:IMQ_F_BITS; @@ -1048,7 +1051,7 @@ extern void kfree_skb(struct sk_buff *skb); extern void consume_skb(struct sk_buff *skb); extern void __kfree_skb(struct sk_buff *skb); -@@ -2034,6 +2053,10 @@ +@@ -2129,6 +2148,10 @@ dst->nfct_reasm = src->nfct_reasm; nf_conntrack_get_reasm(src->nfct_reasm); #endif @@ -1059,9 +1062,9 @@ #ifdef CONFIG_BRIDGE_NETFILTER dst->nf_bridge = src->nf_bridge; nf_bridge_get(src->nf_bridge); -diff -uNr linux-2.6.35/include/net/netfilter/nf_queue.h linux-2.6.35-imq-multiqueue-test1/include/net/netfilter/nf_queue.h ---- linux-2.6.35/include/net/netfilter/nf_queue.h 2010-08-02 01:11:14.000000000 +0300 -+++ linux-2.6.35-imq-multiqueue-test1/include/net/netfilter/nf_queue.h 2010-08-12 19:57:51.394640341 +0300 +diff -uNr linux-2.6.39/include/net/netfilter/nf_queue.h linux-2.6.39-imqmq/include/net/netfilter/nf_queue.h +--- linux-2.6.39/include/net/netfilter/nf_queue.h 2011-05-19 07:06:34.000000000 +0300 ++++ linux-2.6.39-imqmq/include/net/netfilter/nf_queue.h 2011-05-19 11:08:04.288531274 +0300 @@ -30,5 +30,11 @@ const struct nf_queue_handler *qh); extern void nf_unregister_queue_handlers(const struct nf_queue_handler *qh); @@ -1074,9 +1077,9 @@ +#endif #endif /* _NF_QUEUE_H */ -diff -uNr linux-2.6.35/net/core/dev.c linux-2.6.35-imq-multiqueue-test1/net/core/dev.c ---- linux-2.6.35/net/core/dev.c 2010-08-02 01:11:14.000000000 +0300 -+++ linux-2.6.35-imq-multiqueue-test1/net/core/dev.c 2010-08-12 19:57:51.464648614 +0300 +diff -uNr linux-2.6.39/net/core/dev.c linux-2.6.39-imqmq/net/core/dev.c +--- linux-2.6.39/net/core/dev.c 2011-05-19 07:06:34.000000000 +0300 ++++ linux-2.6.39-imqmq/net/core/dev.c 2011-05-19 11:08:04.288531274 +0300 @@ -98,6 +98,9 @@ #include <net/net_namespace.h> #include <net/sock.h> @@ -1087,21 +1090,30 @@ #include <linux/proc_fs.h> #include <linux/seq_file.h> #include <linux/stat.h> -@@ -2083,7 +2083,11 @@ +@@ -2099,12 +2102,21 @@ if (dev->priv_flags & IFF_XMIT_DST_RELEASE) skb_dst_drop(skb); -- if (!list_empty(&ptype_all)) -+ if (!list_empty(&ptype_all) +#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE) -+ && !(skb->imq_flags & IMQ_F_ENQUEUE) ++ if (!list_empty(&ptype_all) && ++ !(skb->imq_flags & IMQ_F_ENQUEUE)) ++#else + if (!list_empty(&ptype_all)) +#endif -+ ) dev_queue_xmit_nit(skb, dev); skb_orphan_try(skb); -@@ -2027,8 +2034,7 @@ - return queue_index; + ++#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE) ++ features = skb->dev ? netif_skb_features(skb) : dev->features; ++#else + features = netif_skb_features(skb); ++#endif + + if (vlan_tx_tag_present(skb) && + !(features & NETIF_F_HW_VLAN_TX)) { +@@ -2269,8 +2281,7 @@ + #endif } -static struct netdev_queue *dev_pick_tx(struct net_device *dev, @@ -1109,10 +1121,10 @@ +static struct netdev_queue *dev_pick_tx(struct net_device *dev, struct sk_buff *skb) { int queue_index; - struct sock *sk = skb->sk; -diff -uNr linux-2.6.35/net/core/skbuff.c linux-2.6.35-imq-multiqueue-test1/net/core/skbuff.c ---- linux-2.6.35/net/core/skbuff.c 2010-08-02 01:11:14.000000000 +0300 -+++ linux-2.6.35-imq-multiqueue-test1/net/core/skbuff.c 2010-08-12 19:57:51.464648614 +0300 + const struct net_device_ops *ops = dev->netdev_ops; +diff -uNr linux-2.6.39/net/core/skbuff.c linux-2.6.39-imqmq/net/core/skbuff.c +--- linux-2.6.39/net/core/skbuff.c 2011-05-19 07:06:34.000000000 +0300 ++++ linux-2.6.39-imqmq/net/core/skbuff.c 2011-05-19 11:08:04.288531274 +0300 @@ -72,6 +72,9 @@ static struct kmem_cache *skbuff_head_cache __read_mostly; @@ -1206,7 +1218,7 @@ /* Pipe buffer operations for a socket. */ static const struct pipe_buf_operations sock_pipe_buf_ops = { -@@ -391,6 +470,26 @@ +@@ -379,6 +458,26 @@ WARN_ON(in_irq()); skb->destructor(skb); } @@ -1232,8 +1244,8 @@ +#endif #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) nf_conntrack_put(skb->nfct); - nf_conntrack_put_reasm(skb->nfct_reasm); -@@ -526,6 +625,9 @@ + #endif +@@ -517,6 +616,9 @@ new->sp = secpath_get(old->sp); #endif memcpy(new->cb, old->cb, sizeof(old->cb)); @@ -1243,7 +1255,7 @@ new->csum = old->csum; new->local_df = old->local_df; new->pkt_type = old->pkt_type; -@@ -2776,6 +2878,13 @@ +@@ -2780,6 +2882,13 @@ 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL); @@ -1257,39 +1269,34 @@ } /** -diff -uNr linux-2.6.35/net/ipv4/netfilter/iptable_mangle.c linux-2.6.35-imq-multiqueue-test1/net/ipv4/netfilter/iptable_mangle.c ---- linux-2.6.35/net/ipv4/netfilter/iptable_mangle.c 2010-08-02 01:11:14.000000000 +0300 -+++ linux-2.6.35-imq-multiqueue-test1/net/ipv4/netfilter/iptable_mangle.c 2010-08-12 19:57:51.501319617 +0300 -@@ -60,7 +60,8 @@ - ret = ipt_do_table(skb, NF_INET_LOCAL_OUT, NULL, out, - dev_net(out)->ipv4.iptable_mangle); - /* Reroute for ANY change. */ -- if (ret != NF_DROP && ret != NF_STOLEN && ret != NF_QUEUE) { -+ if (ret != NF_DROP && ret != NF_STOLEN && ret != NF_QUEUE && -+ ret != NF_IMQ_QUEUE) { - iph = ip_hdr(skb); - - if (iph->saddr != saddr || -diff -uNr linux-2.6.35/net/netfilter/core.c linux-2.6.35-imq-multiqueue-test1/net/netfilter/core.c ---- linux-2.6.35/net/netfilter/core.c 2010-08-02 01:11:14.000000000 +0300 -+++ linux-2.6.35-imq-multiqueue-test1/net/netfilter/core.c 2010-08-12 20:31:28.666436279 +0300 -@@ -182,6 +182,12 @@ - if (!nf_queue(skb, elem, pf, hook, indev, outdev, okfn, - verdict >> NF_VERDICT_BITS)) - goto next_hook; +diff -uNr linux-2.6.39/net/netfilter/core.c linux-2.6.39-imqmq/net/netfilter/core.c +--- linux-2.6.39/net/netfilter/core.c 2011-05-19 07:06:34.000000000 +0300 ++++ linux-2.6.39-imqmq/net/netfilter/core.c 2011-05-19 11:13:19.891558119 +0300 +@@ -191,6 +191,20 @@ + kfree_skb(skb); + } + ret = 0; +#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE) + } else if ((verdict & NF_VERDICT_MASK) == NF_IMQ_QUEUE) { -+ if (!nf_imq_queue(skb, elem, pf, hook, indev, outdev, okfn, -+ verdict >> NF_VERDICT_BITS)) -+ goto next_hook; ++ ret = nf_imq_queue(skb, elem, pf, hook, indev, outdev, okfn, ++ verdict >> NF_VERDICT_QBITS); ++ if (ret < 0) { ++ if (ret == -ECANCELED) ++ goto next_hook; ++ if (ret == -ESRCH && ++ (verdict & NF_VERDICT_FLAG_QUEUE_BYPASS)) ++ goto next_hook; ++ kfree_skb(skb); ++ } ++ ret = 0; +#endif } rcu_read_unlock(); return ret; -diff -uNr linux-2.6.35/net/netfilter/Kconfig linux-2.6.35-imq-multiqueue-test1/net/netfilter/Kconfig ---- linux-2.6.35/net/netfilter/Kconfig 2010-08-02 01:11:14.000000000 +0300 -+++ linux-2.6.35-imq-multiqueue-test1/net/netfilter/Kconfig 2010-08-12 19:57:51.567994165 +0300 -@@ -448,6 +448,18 @@ +diff -uNr linux-2.6.39/net/netfilter/Kconfig linux-2.6.39-imqmq/net/netfilter/Kconfig +--- linux-2.6.39/net/netfilter/Kconfig 2011-05-19 07:06:34.000000000 +0300 ++++ linux-2.6.39-imqmq/net/netfilter/Kconfig 2011-05-19 11:08:04.288531274 +0300 +@@ -507,6 +507,18 @@ For more information on the LEDs available on your system, see Documentation/leds-class.txt @@ -1308,10 +1315,10 @@ config NETFILTER_XT_TARGET_MARK tristate '"MARK" target support' depends on NETFILTER_ADVANCED -diff -uNr linux-2.6.35/net/netfilter/Makefile linux-2.6.35-imq-multiqueue-test1/net/netfilter/Makefile ---- linux-2.6.35/net/netfilter/Makefile 2010-08-02 01:11:14.000000000 +0300 -+++ linux-2.6.35-imq-multiqueue-test1/net/netfilter/Makefile 2010-08-12 19:57:51.577995346 +0300 -@@ -50,6 +50,7 @@ +diff -uNr linux-2.6.39/net/netfilter/Makefile linux-2.6.39-imqmq/net/netfilter/Makefile +--- linux-2.6.39/net/netfilter/Makefile 2011-05-19 07:06:34.000000000 +0300 ++++ linux-2.6.39-imqmq/net/netfilter/Makefile 2011-05-19 11:08:04.291864674 +0300 +@@ -56,6 +56,7 @@ obj-$(CONFIG_NETFILTER_XT_TARGET_CT) += xt_CT.o obj-$(CONFIG_NETFILTER_XT_TARGET_DSCP) += xt_DSCP.o obj-$(CONFIG_NETFILTER_XT_TARGET_HL) += xt_HL.o @@ -1319,9 +1326,9 @@ obj-$(CONFIG_NETFILTER_XT_TARGET_LED) += xt_LED.o obj-$(CONFIG_NETFILTER_XT_TARGET_NFLOG) += xt_NFLOG.o obj-$(CONFIG_NETFILTER_XT_TARGET_NFQUEUE) += xt_NFQUEUE.o -diff -uNr linux-2.6.35/net/netfilter/nf_internals.h linux-2.6.35-imq-multiqueue-test1/net/netfilter/nf_internals.h ---- linux-2.6.35/net/netfilter/nf_internals.h 2010-08-02 01:11:14.000000000 +0300 -+++ linux-2.6.35-imq-multiqueue-test1/net/netfilter/nf_internals.h 2010-08-12 20:33:35.581440253 +0300 +diff -uNr linux-2.6.39/net/netfilter/nf_internals.h linux-2.6.39-imqmq/net/netfilter/nf_internals.h +--- linux-2.6.39/net/netfilter/nf_internals.h 2011-05-19 07:06:34.000000000 +0300 ++++ linux-2.6.39-imqmq/net/netfilter/nf_internals.h 2011-05-19 11:08:04.291864674 +0300 @@ -30,6 +30,15 @@ struct net_device *outdev, int (*okfn)(struct sk_buff *), @@ -1338,10 +1345,10 @@ extern int __init netfilter_queue_init(void); /* nf_log.c */ -diff -uNr linux-2.6.35/net/netfilter/nf_queue.c linux-2.6.35-imq-multiqueue-test1/net/netfilter/nf_queue.c ---- linux-2.6.35/net/netfilter/nf_queue.c 2010-08-02 01:11:14.000000000 +0300 -+++ linux-2.6.35-imq-multiqueue-test1/net/netfilter/nf_queue.c 2010-08-12 22:21:18.688483171 +0300 -@@ -22,6 +22,27 @@ +diff -uNr linux-2.6.39/net/netfilter/nf_queue.c linux-2.6.39-imqmq/net/netfilter/nf_queue.c +--- linux-2.6.39/net/netfilter/nf_queue.c 2011-05-19 07:06:34.000000000 +0300 ++++ linux-2.6.39-imqmq/net/netfilter/nf_queue.c 2011-05-19 11:22:38.189467462 +0300 +@@ -22,6 +22,26 @@ static DEFINE_MUTEX(queue_handler_mutex); @@ -1363,13 +1370,12 @@ + mutex_unlock(&queue_handler_mutex); +} +EXPORT_SYMBOL_GPL(nf_unregister_queue_imq_handler); -+ +#endif + /* return EBUSY when somebody else is registered, return EEXIST if the * same handler is registered, return 0 in case of success. */ int nf_register_queue_handler(u_int8_t pf, const struct nf_queue_handler *qh) -@@ -82,7 +103,7 @@ +@@ -92,7 +112,7 @@ } EXPORT_SYMBOL_GPL(nf_unregister_queue_handlers); @@ -1378,7 +1384,7 @@ { /* Release those devices we held, or Alexey will kill me. */ if (entry->indev) -@@ -102,6 +123,7 @@ +@@ -112,6 +132,7 @@ /* Drop reference to owner of hook which queued us. */ module_put(entry->elem->owner); } @@ -1386,7 +1392,7 @@ /* * Any packet that leaves via this function must come back -@@ -113,7 +135,8 @@ +@@ -123,7 +144,8 @@ struct net_device *indev, struct net_device *outdev, int (*okfn)(struct sk_buff *), @@ -1394,36 +1400,47 @@ + unsigned int queuenum, + bool imq_queue) { - int status; + int status = -ENOENT; struct nf_queue_entry *entry = NULL; -@@ -127,6 +150,11 @@ - /* QUEUE == DROP if noone is waiting, to be safe. */ +@@ -137,7 +159,14 @@ + /* QUEUE == DROP if no one is waiting, to be safe. */ rcu_read_lock(); +- qh = rcu_dereference(queue_handler[pf]); +#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE) + if (imq_queue) + qh = rcu_dereference(queue_imq_handler); + else ++ qh = rcu_dereference(queue_handler[pf]); ++#else ++ qh = rcu_dereference(queue_handler[pf]); +#endif - qh = rcu_dereference(queue_handler[pf]); - if (!qh) + if (!qh) { + status = -ESRCH; goto err_unlock; -@@ -192,19 +220,20 @@ - return 1; +@@ -203,13 +232,14 @@ + return status; } -int nf_queue(struct sk_buff *skb, -+static int _nf_queue(struct sk_buff *skb, - struct list_head *elem, - u_int8_t pf, unsigned int hook, - struct net_device *indev, - struct net_device *outdev, - int (*okfn)(struct sk_buff *), +- struct list_head *elem, +- u_int8_t pf, unsigned int hook, +- struct net_device *indev, +- struct net_device *outdev, +- int (*okfn)(struct sk_buff *), - unsigned int queuenum) -+ unsigned int queuenum, -+ bool imq_queue) ++static int _nf_queue(struct sk_buff *skb, ++ struct list_head *elem, ++ u_int8_t pf, unsigned int hook, ++ struct net_device *indev, ++ struct net_device *outdev, ++ int (*okfn)(struct sk_buff *), ++ unsigned int queuenum, ++ bool imq_queue) { struct sk_buff *segs; + int err; +@@ -217,7 +247,7 @@ if (!skb_is_gso(skb)) return __nf_queue(skb, elem, pf, hook, indev, outdev, okfn, @@ -1432,16 +1449,17 @@ switch (pf) { case NFPROTO_IPV4: -@@ -225,13 +254,39 @@ - +@@ -244,7 +274,7 @@ segs->next = NULL; - if (!__nf_queue(segs, elem, pf, hook, indev, outdev, okfn, -- queuenum)) -+ queuenum, imq_queue)) - kfree_skb(segs); - segs = nskb; - } while (segs); - return 1; + if (err == 0) + err = __nf_queue(segs, elem, pf, hook, indev, +- outdev, okfn, queuenum); ++ outdev, okfn, queuenum, imq_queue); + if (err == 0) + queued++; + else +@@ -260,6 +290,32 @@ + return err; } +int nf_queue(struct sk_buff *skb, @@ -1473,24 +1491,40 @@ void nf_reinject(struct nf_queue_entry *entry, unsigned int verdict) { struct sk_buff *skb = entry->skb; -@@ -272,7 +327,13 @@ +@@ -301,7 +357,7 @@ case NF_QUEUE: - if (!__nf_queue(skb, elem, entry->pf, entry->hook, - entry->indev, entry->outdev, entry->okfn, -- verdict >> NF_VERDICT_BITS)) -+ verdict >> NF_VERDICT_BITS, false)) -+ goto next_hook; -+ break; -+ case NF_IMQ_QUEUE: -+ if (!__nf_queue(skb, elem, entry->pf, entry->hook, -+ entry->indev, entry->outdev, entry->okfn, -+ verdict >> NF_VERDICT_BITS, true)) - goto next_hook; + err = __nf_queue(skb, elem, entry->pf, entry->hook, + entry->indev, entry->outdev, entry->okfn, +- verdict >> NF_VERDICT_QBITS); ++ verdict >> NF_VERDICT_QBITS, false); + if (err < 0) { + if (err == -ECANCELED) + goto next_hook; +@@ -311,6 +367,21 @@ + kfree_skb(skb); + } break; ++#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE) ++ case NF_IMQ_QUEUE: ++ err = __nf_queue(skb, elem, entry->pf, entry->hook, ++ entry->indev, entry->outdev, entry->okfn, ++ verdict >> NF_VERDICT_QBITS, true); ++ if (err < 0) { ++ if (err == -ECANCELED) ++ goto next_hook; ++ if (err == -ESRCH && ++ (verdict & NF_VERDICT_FLAG_QUEUE_BYPASS)) ++ goto next_hook; ++ kfree_skb(skb); ++ } ++ break; ++#endif case NF_STOLEN: -diff -uNr linux-2.6.35/net/netfilter/xt_IMQ.c linux-2.6.35-imq-multiqueue-test1/net/netfilter/xt_IMQ.c ---- linux-2.6.35/net/netfilter/xt_IMQ.c 1970-01-01 02:00:00.000000000 +0200 -+++ linux-2.6.35-imq-multiqueue-test1/net/netfilter/xt_IMQ.c 2010-08-12 22:10:20.657312054 +0300 + default: + kfree_skb(skb); +diff -uNr linux-2.6.39/net/netfilter/xt_IMQ.c linux-2.6.39-imqmq/net/netfilter/xt_IMQ.c +--- linux-2.6.39/net/netfilter/xt_IMQ.c 1970-01-01 02:00:00.000000000 +0200 ++++ linux-2.6.39-imqmq/net/netfilter/xt_IMQ.c 2011-05-19 11:08:04.308531677 +0300 @@ -0,0 +1,74 @@ +/* + * This target marks packets to be enqueued to an imq device ================================================================ Index: packages/kernel/kernel.spec diff -u packages/kernel/kernel.spec:1.927 packages/kernel/kernel.spec:1.928 --- packages/kernel/kernel.spec:1.927 Mon Jul 4 12:17:03 2011 +++ packages/kernel/kernel.spec Mon Jul 4 12:22:37 2011 @@ -207,7 +207,7 @@ # http://zph.bratcheda.org/linux-2.6.26.3-zph.patch Patch49: kernel-zph.patch -# based on http://www.linuximq.net/patchs/linux-2.6.35-imq-multiqueue-test1.diff +# based on http://www.linuximq.net/patchs/linux-2.6.39-imq-multiqueue-test1.diff.bz2 Patch50: kernel-imq.patch # http://www.kernel.org/pub/linux/kernel/people/edward/reiser4/reiser4-for-2.6/reiser4-for-2.6.35.patch.bz2 @@ -1538,6 +1538,9 @@ All persons listed below can be reached at <cvs_login>@pld-linux.org $Log$ +Revision 1.928 2011/07/04 10:22:37 baggins +- updated to linux-2.6.39-imq-multiqueue-test1.diff.bz2 + Revision 1.927 2011/07/04 10:17:03 baggins <<Diff was trimmed, longer than 597 lines>> ---- CVS-web: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel-imq.patch?r1=1.12&r2=1.13&f=u http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel.spec?r1=1.927&r2=1.928&f=u _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit