]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/suse-2.6.27.25/patches.xen/xen-configurable-guest-devices
Corrected links and text on ids.cgi
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.xen / xen-configurable-guest-devices
1 From: jbeulich@novell.com
2 Subject: allow number of guest devices to be configurable
3 Patch-mainline: obsolete
4
5 ... and derive NR_DYNIRQS from this (rather than having a hard-coded
6 value).
7 Similarly, allow the number of simultaneous transmits in netback to be
8 configurable.
9
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
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
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
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
56 @@ -1212,6 +1212,7 @@ static void net_tx_action(unsigned long
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. */
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
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