]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blame - src/patches/suse-2.6.27.25/patches.xen/xen-configurable-guest-devices
Updated xen patches taken from suse.
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.xen / xen-configurable-guest-devices
CommitLineData
cc90b958
BS
1From: jbeulich@novell.com
2Subject: allow number of guest devices to be configurable
3Patch-mainline: obsolete
4
5... and derive NR_DYNIRQS from this (rather than having a hard-coded
6value).
7Similarly, allow the number of simultaneous transmits in netback to be
8configurable.
9
00e5a55c
BS
10--- sle11-2009-03-04.orig/drivers/xen/Kconfig 2009-03-05 15:45:30.000000000 +0100
11+++ sle11-2009-03-04/drivers/xen/Kconfig 2008-12-05 16:57:43.000000000 +0100
12@@ -73,6 +73,15 @@ config XEN_NETDEV_BACKEND
cc90b958
BS
13 network devices to other guests via a high-performance shared-memory
14 interface.
15
16+config XEN_NETDEV_TX_SHIFT
17+ int "Maximum simultaneous transmit requests (as a power of 2)"
18+ depends on XEN_NETDEV_BACKEND
19+ range 5 16
20+ default 8
21+ help
22+ The maximum number transmits the driver can hold pending, expressed
23+ as the exponent of a power of 2.
24+
25 config XEN_NETDEV_PIPELINED_TRANSMITTER
26 bool "Pipelined transmitter (DANGEROUS)"
27 depends on XEN_NETDEV_BACKEND
28@@ -255,6 +264,16 @@ config XEN_SYSFS
29 help
30 Xen hypervisor attributes will show up under /sys/hypervisor/.
31
32+config XEN_NR_GUEST_DEVICES
33+ int "Number of guest devices"
34+ range 0 4032 if 64BIT
35+ range 0 960
36+ default 256 if XEN_BACKEND
37+ default 16
38+ help
39+ Specify the total number of virtual devices (i.e. both frontend
40+ and backend) that you want the kernel to be able to service.
41+
42 choice
43 prompt "Xen version compatibility"
44 default XEN_COMPAT_030002_AND_LATER
00e5a55c
BS
45--- sle11-2009-03-04.orig/drivers/xen/netback/netback.c 2009-03-05 15:45:30.000000000 +0100
46+++ sle11-2009-03-04/drivers/xen/netback/netback.c 2008-12-23 09:35:35.000000000 +0100
47@@ -71,7 +71,7 @@ static DECLARE_TASKLET(net_rx_tasklet, n
cc90b958
BS
48 static struct timer_list net_timer;
49 static struct timer_list netbk_tx_pending_timer;
50
51-#define MAX_PENDING_REQS 256
52+#define MAX_PENDING_REQS (1U << CONFIG_XEN_NETDEV_TX_SHIFT)
53
54 static struct sk_buff_head rx_queue;
55
00e5a55c 56@@ -1212,6 +1212,7 @@ static void net_tx_action(unsigned long
cc90b958
BS
57 net_tx_action_dealloc();
58
59 mop = tx_map_ops;
60+ BUILD_BUG_ON(MAX_SKB_FRAGS >= MAX_PENDING_REQS);
61 while (((NR_PENDING_REQS + MAX_SKB_FRAGS) < MAX_PENDING_REQS) &&
62 !list_empty(&net_schedule_list)) {
63 /* Get a netif from the list with work to do. */
00e5a55c
BS
64--- sle11-2009-03-04.orig/include/asm-x86/mach-xen/asm/irq_vectors.h 2009-03-05 15:45:30.000000000 +0100
65+++ sle11-2009-03-04/include/asm-x86/mach-xen/asm/irq_vectors.h 2009-03-05 15:45:49.000000000 +0100
cc90b958
BS
66@@ -44,7 +44,7 @@
67 #endif
68
69 #define DYNIRQ_BASE (PIRQ_BASE + NR_PIRQS)
70-#define NR_DYNIRQS 256
71+#define NR_DYNIRQS (64 + CONFIG_XEN_NR_GUEST_DEVICES)
72
73 #define NR_IRQS (NR_PIRQS + NR_DYNIRQS)
74 #define NR_IRQ_VECTORS NR_IRQS