RFC: Xen VMDq patch for ixgbe
Attached is a patch to enable Xen VMDq (AKA Netchannel2 vmq) for the ixgbe driver. This is intended for testing and development purposes and should not be considered to be production-quality code.
Please note that this does NOT apply to the Xen Linux kernel; it applies to the ixgbe 1.3.47 release, available from
http://sourceforge.net/projects/e1000/. You'll obviously also need an Intel 82598-based 10 Gigabit network card and some sort of link partner. This will build against the current Netchannel2 source available from http:xenbits.xen.org/ext/netchannel2. You'll need to enable "Net channel 2 support for multi-queue devices" in your kernel config.
To enable VMDq functionality, load the driver with the command-line parameter VMDQ=<num queues>, as in:
$ insmod ~/ixgbe-1.3.47/src/ixgbe.ko VMDQ=8
You can then set up PV domains to use the device by modifying your VM configuration file from
vif = [ '<whatever>' ]
to
vif2 = [ 'pdev=<netdev>' ]where <netdev> is the interface name for your 82598 board, e.g peth0 in dom0.
Known issues (at least, known by me):
1) Must manually attach bridge device after starting domU vm. Netchannel2 backend devices show up as ethNN, not vifN.M, so the scripts don't automatically attach the interface. Once your VM starts, do ifconfig -a to see which new interface got added. Then use "brctl addif" to add this new interface the the bridge.
2) No broadcast replication. This is a big one. Incoming broadcasts will ONLY go to dom0. This means that your VMs can send ARP requests and initiate IP sessions to outside machines, but outside machines cannot initiate connections because the ARP requests don't go to the domU VMs.
3) No loopback. VMs cannot communicate with other VMs (including dom0) on the same machine.
Once I get this out, I'll start working on a proper backport of the driver into the Xen kernel (2.6.18.8) tree. I'll remove as much of the compatibility cruft as is prudent and properly integrate it into
the Kbuild stuff. When that's done, I'll send a complete patchset to
this list, including signed-off-by lines which can then be checked in to Mercurial.
Please review and comment, and if possible test.
Thanks,
Mitch
src/ixgbe_ethtool.c +4 -0
@@ -1008,12 +1008,16 @@ static void ixgbe_get_strings(struct net p +=ETH_GSTRING_LEN ;sprintf (p,"tx_queue_%u_bytes" , i); p +=ETH_GSTRING_LEN ; +sprintf (p,"tx_queue_%u_mac" , i); + p +=ETH_GSTRING_LEN ; }for (i =0 ; i < adapter->num_rx_queues; i++) {sprintf (p,"rx_queue_%u_packets" , i); p +=ETH_GSTRING_LEN ;sprintf (p,"rx_queue_%u_bytes" , i); p +=ETH_GSTRING_LEN ; +sprintf (p,"rx_queue_%u_mac" , i); + p +=ETH_GSTRING_LEN ; }if (adapter->flags &IXGBE_FLAG_DCB_ENABLED ) {for (i =0 ; i <MAX_TX_PACKET_BUFFERS ; i++) {
src/ixgbe.h +12 -0
@@ -35,6 +35,9 @@#include <linux/pci.h> #include <linux/netdevice.h> #include <linux/vmalloc.h> +#ifdef CONFIG_XEN +#include <linux/netvmq.h> +#endif #ifdef SIOCETHTOOL #include <linux/ethtool.h>
@@ -184,6 +187,7 @@ struct ixgbe_rx_buffer {struct ixgbe_queue_stats {u64 packets;u64 bytes; +u64 mac; };struct ixgbe_ring {
@@ -229,6 +233,9 @@ struct ixgbe_ring {#endif u16 work_limit;/* max work per interrupt */ u16 rx_buf_len; +u8 mac_addr[ETH_ALEN ]; +u8 active; +u8 allocated; };#define RING_F_DCB 0
@@ -427,6 +434,11 @@ struct ixgbe_adapter {unsigned int lro_flushed;unsigned int lro_no_desc;#endif +#ifdef CONFIG_XEN +struct net_vmq *vmq; +u32 n_rx_queues_allocated; +u32 n_tx_queues_allocated; +#endif unsigned int tx_ring_count;unsigned int rx_ring_count;
src/ixgbe_main.c +298 -19
453 lines not on this page · raw message
src/kcompat.h +6 -0
@@ -144,11 +144,17 @@#endif /* packet split disable/enable */ +#ifdef CONFIG_XEN +#define DISABLE_PACKET_SPLIT +#endif +#ifdef DISABLE_PACKET_SPLIT #undef CONFIG_E1000_DISABLE_PACKET_SPLIT#define CONFIG_E1000_DISABLE_PACKET_SPLIT #undef CONFIG_IGB_DISABLE_PACKET_SPLIT#define CONFIG_IGB_DISABLE_PACKET_SPLIT +#undef CONFIG_IXGBE_DISABLE_PACKET_SPLIT +#define CONFIG_IXGBE_DISABLE_PACKET_SPLIT #endif /* MSI compatibility code for all kernels and drivers */
src/Makefile +1 -2
@@ -188,12 +188,11 @@ ifeq ($(KKVER), 0) *** This driver is not supported on kernel versions older than 2.4.0) endif -# Add DCB netlink source and FCoE sysfs source if our kernel is 2.6.23 or newer +# Add DCB netlink source if our kernel is 2.6.23 or newer KKVER := $(shell echo $(KVER) | \ awk '{ if ($$0 ~ /2\.[6-9]\.(2[3-9]|[3-9][0-9])/) print "1"; else print "0"}') ifeq ($(KKVER), 1) CFILES += ixgbe_dcb_nl.c - CFILES += ixgbe_sysfs.c endif # set the install path
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Whoops! Attached the wrong patch file. Please use this one.
Sorry for the confusion.
-Mitch
Quoted 56 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Mitch Williams
Sent: Friday, January 16, 2009 3:06 PM
To: [email protected]
Cc: [email protected]; Ronciak, John; [email protected]
Subject: [Xen-devel] RFC: Xen VMDq patch for ixgbeAttached is a patch to enable Xen VMDq (AKA Netchannel2 vmq) for the ixgbe driver. This is intended for testing and development purposes and should not be considered to be production-quality code.
Please note that this does NOT apply to the Xen Linux kernel; it applies to the ixgbe 1.3.47 release, available from
http://sourceforge.net/projects/e1000/. You'll obviously also need an Intel 82598-based 10 Gigabit network card and some sort of link partner. This will build against the current Netchannel2 source available from http:xenbits.xen.org/ext/netchannel2. You'll need to enable "Net channel 2 support for multi-queue devices" in your kernel config.To enable VMDq functionality, load the driver with the command-line parameter VMDQ=<num queues>, as in:
$ insmod ~/ixgbe-1.3.47/src/ixgbe.ko VMDQ=8You can then set up PV domains to use the device by modifying your VM configuration file from
vif = [ '<whatever>' ] to vif2 = [ 'pdev=<netdev>' ]where <netdev> is the interface name for your 82598 board, e.g peth0 in dom0.
Known issues (at least, known by me):
1) Must manually attach bridge device after starting domU vm. Netchannel2 backend devices show up as ethNN, not vifN.M, so the scripts don't automatically attach the interface. Once your VM starts, do ifconfig -a to see which new interface got added. Then use "brctl addif" to add this new interface the the bridge.
2) No broadcast replication. This is a big one. Incoming broadcasts will ONLY go to dom0. This means that your VMs can send ARP requests and initiate IP sessions to outside machines, but outside machines cannot initiate connections because the ARP requests don't go to the domU VMs.
3) No loopback. VMs cannot communicate with other VMs (including dom0) on the same machine.Once I get this out, I'll start working on a proper backport of the driver into the Xen kernel (2.6.18.8) tree. I'll remove as much of the compatibility cruft as is prudent and properly integrate it into
theKbuildstuff. When that's done, I'll send a complete patchset to
this list, including signed-off-by lines which can then be checked in to Mercurial.
Quoted 5 lines
Please review and comment, and if possible test.
Thanks,
Mitch
src/ixgbe.h +10 -0
@@ -35,6 +35,9 @@#include <linux/pci.h> #include <linux/netdevice.h> #include <linux/vmalloc.h> +#ifdef CONFIG_XEN_NETDEV2_BACKEND +#include <linux/netvmq.h> +#endif #ifdef SIOCETHTOOL #include <linux/ethtool.h>
@@ -229,6 +232,9 @@ struct ixgbe_ring {#endif u16 work_limit;/* max work per interrupt */ u16 rx_buf_len; +u8 mac_addr[ETH_ALEN ]; +u8 active; +u8 allocated; };#define RING_F_DCB 0
@@ -427,6 +433,10 @@ struct ixgbe_adapter {unsigned int lro_flushed;unsigned int lro_no_desc;#endif +#ifdef CONFIG_XEN_NETDEV2_BACKEND +struct net_vmq *vmq; +u32 rx_queues_allocated; +#endif unsigned int tx_ring_count;unsigned int rx_ring_count;
src/ixgbe_main.c +315 -16
485 lines not on this page · raw message
src/ixgbe_param.c +7 -0
@@ -723,6 +723,13 @@ void __devinit ixgbe_check_options(struc adapter->flags |= IXGBE_FLAG_RX_PS_CAPABLE; }#endif +#ifdef CONFIG_XEN_NETDEV2_BACKEND +if (adapter->flags & + (IXGBE_FLAG_RX_PS_CAPABLE |IXGBE_FLAG_VMDQ_ENABLED )) { +printk (KERN_INFO "ixgbe: packet split disabled for Xen VMDQ\n" ); + adapter->flags &= ~IXGBE_FLAG_RX_PS_CAPABLE ; + } +#endif } }
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Mitch,
It seems this last patch is not working properly
I get a kernel panic when the driver module loads (see panic message below).
Apparently the driver is trying to allocate guest memory (vmq_alloc_skb()) before the queue is allocated to a guest (there is no guest running when the ixgbe module is loaded). This is probably something easy to fix
I am able to use the previous version of the patch (version 1.3.31.3 attached) with no problem. Not sure what changed from version 1.3.31.3 to this new version 1.3.47. I am also attaching the buggy patch for version 1.3.47 that I am using so you can verify if I am using the right patch ...
Could you please take a look at this?
Thanks
Renato
=====================================
Unable to handle kernel paging request at 0000000000007800 RIP: [<ffffffff804600a4>] vmq_alloc_skb+0x64/0x1f0 PGD 79807067 PUD 79710067 PMD 0 Oops: 0000 [1] SMP CPU 0 Modules linked in: video thermal fan button battery asus_acpi ac ixgbe Pid: 0, comm: swapper Not tainted 2.6.18.8-xen0 #73 RIP: e030:[<ffffffff804600a4>] [<ffffffff804600a4>] vmq_alloc_skb+0x64/0x1f0 RSP: e02b:ffffffff80793ca0 EFLAGS: 00010206 RAX: ffff88007acc5dd8 RBX: 0000000000000000 RCX: 0000000000080000 RDX: ffff88007b5d7740 RSI: 0000000000000001 RDI: ffff88007a450000 RBP: ffffffff80793cd0 R08: 0000000000000001 R09: ffff88007a450c80 R10: 000000000000003f R11: 000000000000012c R12: 0000000000007800 R13: 0000000000000000 R14: 0000000000000500 R15: 00000000000005f4 FS: 00002ba4a6b1eda0(0000) GS:ffffffff80737000(0000) knlGS:0000000000000000 CS: e033 DS: 0000 ES: 0000 Process swapper (pid: 0, threadinfo ffffffff8074c000, task ffffffff8064d440) Stack: ffff88007a450000 ffffc200118f0000 0000000000000000 0000000000000000 ffff88007b279070 ffff88007a450500 ffffffff80793d30 ffffffff88000d2f 000003ff80793d50 ffff880075df0000 ffff88007a450000 ffff88007fe90800 Call Trace: <IRQ> [<ffffffff88000d2f>] :ixgbe:ixgbe_alloc_rx_buffers+0x15f/0x2e0 [<ffffffff8800320b>] :ixgbe:ixgbe_clean_rx_irq+0x9eb/0xaa0 [<ffffffff8800798e>] :ixgbe:ixgbe_clean_rxonly_many+0xbe/0x210 [<ffffffff8800de3e>] :ixgbe:__kc_adapter_clean+0x2e/0x50 [<ffffffff8052eba4>] net_rx_action+0xc4/0x1c0 [<ffffffff80239eec>] __do_softirq+0x9c/0x140 [<ffffffff8020b604>] call_softirq+0x1c/0x28 [<ffffffff8020d7cc>] do_softirq+0x6c/0x100 [<ffffffff80239d48>] irq_exit+0x48/0x50 [<ffffffff80430b92>] evtchn_do_upcall+0x232/0x250 [<ffffffff8020b13a>] do_hypervisor_callback+0x1e/0x2c <EOI> [<ffffffff802063aa>] hypercall_page+0x3aa/0x1000 [<ffffffff802063aa>] hypercall_page+0x3aa/0x1000 [<ffffffff8020eed2>] raw_safe_halt+0xc2/0xf0 [<ffffffff80209b15>] xen_idle+0x75/0x90 [<ffffffff8020926a>] cpu_idle+0xba/0xe0 [<ffffffff802073b6>] rest_init+0x26/0x30 [<ffffffff807568f5>] start_kernel+0x265/0x270 [<ffffffff8075623d>] _sinittext+0x23d/0x250 Code: 4d 39 a6 00 73 00 00 4d 8d ae e8 72 00 00 0f 84 58 01 00 00 RIP [<ffffffff804600a4>] vmq_alloc_skb+0x64/0x1f0 RSP <ffffffff80793ca0>
CR2: 0000000000007800
<0>Kernel panic - not syncing: Aiee, killing interrupt handler! (XEN) Domain 0 crashed: 'noreboot' set - not rebooting.
Quoted 70 lines
-----Original Message-----
From: Williams, Mitch A [mailto:[email protected]]
Sent: Friday, January 16, 2009 3:57 PM
To: Williams, Mitch A; [email protected]
Cc: [email protected]; Ronciak, John; Santos, Jose Renato G
Subject: RE: [Xen-devel] RFC: Xen VMDq patch for ixgbeWhoops! Attached the wrong patch file. Please use this one.
Sorry for the confusion.
-MitchQuoted 7 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Mitch Williams
Sent: Friday, January 16, 2009 3:06 PM
To: [email protected]
Cc: [email protected]; Ronciak, John;Quoted 9 lines
Subject: [Xen-devel] RFC: Xen VMDq patch for ixgbe
Attached is a patch to enable Xen VMDq (AKA Netchannel2 vmq) for the ixgbe driver. This is intended for testing and development purposes and should not be considered to be production-quality code.
Please note that this does NOT apply to the Xen Linux kernel; it applies to the ixgbe 1.3.47 release, available from
http://sourceforge.net/projects/e1000/. You'll obviouslyalso need an
Quoted 4 lines
Intel 82598-based 10 Gigabit network card and some sort of link partner. This will build against the current Netchannel2 source available from http:xenbits.xen.org/ext/netchannel2. You'll need to enable "Net channel 2 support for multi-queue devices" in
your kernel
Quoted 8 lines
config.
To enable VMDq functionality, load the driver with the command-line parameter VMDQ=<num queues>, as in:
$ insmod ~/ixgbe-1.3.47/src/ixgbe.ko VMDQ=8You can then set up PV domains to use the device by
modifying your VM
Quoted 5 lines
configuration file from
vif = [ '<whatever>' ] to vif2 = [ 'pdev=<netdev>' ]where <netdev> is the interface name for your 82598 board,
e.g peth0 in
Quoted 6 lines
dom0.
Known issues (at least, known by me):
1) Must manually attach bridge device after starting domU vm. Netchannel2 backend devices show up as ethNN, not vifN.M, so the scripts don't automatically attach the interface. Once yourVM starts,
Quoted 1 line
do ifconfig -a to see which new interface got added. Then
use "brctl
Quoted 2 lines
addif" to add this new interface the the bridge.
2) No broadcast replication. This is a big one. Incomingbroadcasts
Quoted 1 line
will ONLY go to dom0. This means that your VMs can send ARP
requests
Quoted 6 lines
and initiate IP sessions to outside machines, but outside machines cannot initiate connections because the ARP requests don't go to the domU VMs.
3) No loopback. VMs cannot communicate with other VMs (including dom0) on the same machine.
Quoted 15 lines
Quoted 2 lines
Once I get this out, I'll start working on a proper backport of the driver into the Xen kernel (2.6.18.8) tree. I'll remove as
much of the
Quoted 2 lines
compatibility cruft as is prudent and properly integrate it into
theKbuildstuff. When that's done, I'll send a completepatchset to
Quoted 1 line
this list, including signed-off-by lines which can then be
checked in
Quoted 7 lines
to Mercurial.
Please review and comment, and if possible test.
Thanks,
Mitch
src/ixgbe.h +12 -0
@@ -31,6 +31,9 @@#include <linux/pci.h> #include <linux/netdevice.h> #include <linux/vmalloc.h> +#ifdef CONFIG_XEN +#include <linux/netvmq.h> +#endif #ifdef SIOCETHTOOL #include <linux/ethtool.h>
@@ -167,6 +170,7 @@struct ixgbe_queue_stats {u64 packets;u64 bytes; +u64 mac; };struct ixgbe_ring {
@@ -208,6 +212,9 @@#endif u16 work_limit;/* max work per interrupt */ u16 rx_buf_len; +u8 mac_addr[ETH_ALEN ]; +u8 active; +u8 allocated; };#define RING_F_DCB 0
@@ -399,6 +406,11 @@unsigned long state;u32 *config_space;u64 tx_busy; +#ifdef CONFIG_XEN +struct net_vmq *vmq; +u32 n_rx_queues_allocated; +u32 n_tx_queues_allocated; +#endif unsigned int tx_ring_count;unsigned int rx_ring_count;
src/ixgbe_main.c +350 -103
699 lines not on this page · raw message
src/ixgbe.h +10 -0
@@ -35,6 +35,9 @@#include <linux/pci.h> #include <linux/netdevice.h> #include <linux/vmalloc.h> +#ifdef CONFIG_XEN_NETDEV2_BACKEND +#include <linux/netvmq.h> +#endif #ifdef SIOCETHTOOL #include <linux/ethtool.h>
@@ -229,6 +232,9 @@ struct ixgbe_ring {#endif u16 work_limit;/* max work per interrupt */ u16 rx_buf_len; +u8 mac_addr[ETH_ALEN ]; +u8 active; +u8 allocated; };#define RING_F_DCB 0
@@ -427,6 +433,10 @@ struct ixgbe_adapter {unsigned int lro_flushed;unsigned int lro_no_desc;#endif +#ifdef CONFIG_XEN_NETDEV2_BACKEND +struct net_vmq *vmq; +u32 rx_queues_allocated; +#endif unsigned int tx_ring_count;unsigned int rx_ring_count;
src/ixgbe_main.c +315 -16
485 lines not on this page · raw message
src/ixgbe_param.c +7 -0
@@ -723,6 +723,13 @@ void __devinit ixgbe_check_options(struc adapter->flags |= IXGBE_FLAG_RX_PS_CAPABLE; }#endif +#ifdef CONFIG_XEN_NETDEV2_BACKEND +if (adapter->flags & + (IXGBE_FLAG_RX_PS_CAPABLE |IXGBE_FLAG_VMDQ_ENABLED )) { +printk (KERN_INFO "ixgbe: packet split disabled for Xen VMDQ\n" ); + adapter->flags &= ~IXGBE_FLAG_RX_PS_CAPABLE ; + } +#endif } }
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
I'll take a look. I've been running this code, so I (obviously) didn't see any failure.
They've just updated ixgbe on sourceforge, so I'm spinning a new patch that will work with that driver. I'll probably get that out tomorrow. I'll double-check to make sure we're not allocating memory before the queue is activated.
-Mitch
Quoted 176 lines
-----Original Message-----
From: Santos, Jose Renato G [mailto:[email protected]]
Sent: Wednesday, January 21, 2009 4:17 PM
To: Williams, Mitch A; [email protected]
Cc: [email protected]; Ronciak, John
Subject: RE: [Xen-devel] RFC: Xen VMDq patch for ixgbeMitch,
It seems this last patch is not working properly
I get a kernel panic when the driver module loads (see panic message below).
Apparently the driver is trying to allocate guest memory (vmq_alloc_skb()) before the queue is allocated to a guest (there is no guest running when the ixgbe module is loaded). This is probably something easy to fixI am able to use the previous version of the patch (version 1.3.31.3 attached) with no problem. Not sure what changed from version 1.3.31.3 to this new version 1.3.47. I am also attaching the buggy patch for version 1.3.47 that I am using so you can verify if I am using the right patch ...
Could you please take a look at this?
Thanks
Renato
=====================================
Unable to handle kernel paging request at 0000000000007800 RIP: [<ffffffff804600a4>] vmq_alloc_skb+0x64/0x1f0 PGD 79807067 PUD 79710067 PMD 0 Oops: 0000 [1] SMP CPU 0 Modules linked in: video thermal fan button battery asus_acpi ac ixgbe Pid: 0, comm: swapper Not tainted 2.6.18.8-xen0 #73 RIP: e030:[<ffffffff804600a4>] [<ffffffff804600a4>] vmq_alloc_skb+0x64/0x1f0 RSP: e02b:ffffffff80793ca0 EFLAGS: 00010206 RAX: ffff88007acc5dd8 RBX: 0000000000000000 RCX: 0000000000080000 RDX: ffff88007b5d7740 RSI: 0000000000000001 RDI: ffff88007a450000 RBP: ffffffff80793cd0 R08: 0000000000000001 R09: ffff88007a450c80 R10: 000000000000003f R11: 000000000000012c R12: 0000000000007800 R13: 0000000000000000 R14: 0000000000000500 R15: 00000000000005f4 FS: 00002ba4a6b1eda0(0000) GS:ffffffff80737000(0000)knlGS:0000000000000000
CS: e033 DS: 0000 ES: 0000
Process swapper (pid: 0, threadinfoffffffff8074c000, taskffffffff8064d440)Stack: ffff88007a450000 ffffc200118f0000 0000000000000000 0000000000000000 ffff88007b279070 ffff88007a450500 ffffffff80793d30 ffffffff88000d2f 000003ff80793d50 ffff880075df0000 ffff88007a450000 ffff88007fe90800 Call Trace: <IRQ> [<ffffffff88000d2f>] :ixgbe:ixgbe_alloc_rx_buffers+0x15f/0x2e0 [<ffffffff8800320b>] :ixgbe:ixgbe_clean_rx_irq+0x9eb/0xaa0 [<ffffffff8800798e>] :ixgbe:ixgbe_clean_rxonly_many+0xbe/0x210 [<ffffffff8800de3e>] :ixgbe:__kc_adapter_clean+0x2e/0x50 [<ffffffff8052eba4>] net_rx_action+0xc4/0x1c0 [<ffffffff80239eec>] __do_softirq+0x9c/0x140 [<ffffffff8020b604>] call_softirq+0x1c/0x28 [<ffffffff8020d7cc>] do_softirq+0x6c/0x100 [<ffffffff80239d48>] irq_exit+0x48/0x50 [<ffffffff80430b92>] evtchn_do_upcall+0x232/0x250 [<ffffffff8020b13a>] do_hypervisor_callback+0x1e/0x2c <EOI> [<ffffffff802063aa>] hypercall_page+0x3aa/0x1000 [<ffffffff802063aa>] hypercall_page+0x3aa/0x1000 [<ffffffff8020eed2>] raw_safe_halt+0xc2/0xf0 [<ffffffff80209b15>] xen_idle+0x75/0x90 [<ffffffff8020926a>] cpu_idle+0xba/0xe0 [<ffffffff802073b6>] rest_init+0x26/0x30 [<ffffffff807568f5>] start_kernel+0x265/0x270 [<ffffffff8075623d>] _sinittext+0x23d/0x250 Code: 4d 39 a6 00 73 00 00 4d 8d ae e8 72 00 00 0f 84 58 01 00 00 RIP [<ffffffff804600a4>] vmq_alloc_skb+0x64/0x1f0RSP <
ffffffff80793ca0>
CR2: 0000000000007800
<0>Kernel panic - not syncing: Aiee, killing interrupt handler! (XEN) Domain 0 crashed: 'noreboot' set - not rebooting.Quoted 12 lines
-----Original Message-----
From: Williams, Mitch A [mailto:[email protected]]
Sent: Friday, January 16, 2009 3:57 PM
To: Williams, Mitch A; [email protected]
Cc: [email protected]; Ronciak, John; Santos, Jose Renato G
Subject: RE: [Xen-devel] RFC: Xen VMDq patch for ixgbeWhoops! Attached the wrong patch file. Please use this one.
Sorry for the confusion.
-MitchQuoted 11 lines
Quoted 7 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Mitch Williams
Sent: Friday, January 16, 2009 3:06 PM
To: [email protected]
Cc: [email protected]; Ronciak, John;Quoted 3 lines
Subject: [Xen-devel] RFC: Xen VMDq patch for ixgbe
Attached is a patch to enable Xen VMDq (AKA Netchannel2
vmq) for the
Quoted 1 line
Quoted 1 line
ixgbe driver. This is intended for testing and development
purposes
Quoted 9 lines
Quoted 5 lines
and should not be considered to be production-quality code.
Please note that this does NOT apply to the Xen Linux kernel; it applies to the ixgbe 1.3.47 release, available from
http://sourceforge.net/projects/e1000/. You'll obviouslyalso need an
Quoted 3 lines
Intel 82598-based 10 Gigabit network card and some sort of link partner. This will build against the current Netchannel2 source available from http:xenbits.xen.org/ext/netchannel2.
You'll need to
Quoted 23 lines
Quoted 1 line
enable "Net channel 2 support for multi-queue devices" in
your kernel
Quoted 8 lines
config.
To enable VMDq functionality, load the driver with the command-line parameter VMDQ=<num queues>, as in:
$ insmod ~/ixgbe-1.3.47/src/ixgbe.ko VMDQ=8You can then set up PV domains to use the device by
modifying your VM
Quoted 5 lines
configuration file from
vif = [ '<whatever>' ] to vif2 = [ 'pdev=<netdev>' ]where <netdev> is the interface name for your 82598 board,
e.g peth0 in
Quoted 6 lines
dom0.
Known issues (at least, known by me):
1) Must manually attach bridge device after starting domU vm. Netchannel2 backend devices show up as ethNN, not vifN.M, so the scripts don't automatically attach the interface. Once yourQuoted 10 lines
VM starts,
Quoted 1 line
do ifconfig -a to see which new interface got added. Then
use "brctl
Quoted 2 lines
addif" to add this new interface the the bridge.
2) No broadcast replication. This is a big one. Incomingbroadcasts
Quoted 1 line
will ONLY go to dom0. This means that your VMs can send ARP
requests
Quoted 2 lines
and initiate IP sessions to outside machines, but outside machines cannot initiate connections because the ARP requests don't
go to the
Quoted 19 lines
Quoted 6 lines
domU VMs.
3) No loopback. VMs cannot communicate with other VMs (including dom0) on the same machine.Once I get this out, I'll start working on a proper backport of the driver into the Xen kernel (2.6.18.8) tree. I'll remove as
much of the
Quoted 2 lines
compatibility cruft as is prudent and properly integrate it into
theKbuildstuff. When that's done, I'll send a completepatchset to
Quoted 1 line
this list, including signed-off-by lines which can then be
checked in
Quoted 7 lines
to Mercurial.
Please review and comment, and if possible test.
Thanks,
Mitch
Maybe, you are not running in VMDq mode.
Do you see the following message when you run "dmesg" in dom0? "Netchannel2 using vmq mode for guest n"
I just noticed the tip of the current netchannel2 does not include the modifications of a previous changeset. I suspect this may have been lost in a merge with latest xen code. Without this missing code MSI is disabled by Xen which causes VMDq to be disabled. I needed to appply this patch (attached) maually to enable MSI and be able to run in VMDq mode.
Please apply the patch and check if your code is still running without problems
Thanks
Renato
Quoted 176 lines
-----Original Message-----
From: Williams, Mitch A [mailto:[email protected]]
Sent: Wednesday, January 21, 2009 4:21 PM
To: Santos, Jose Renato G; [email protected]
Cc: [email protected]; Ronciak, John
Subject: RE: [Xen-devel] RFC: Xen VMDq patch for ixgbeI'll take a look. I've been running this code, so I (obviously) didn't see any failure.
They've just updated ixgbe on sourceforge, so I'm spinning a new patch that will work with that driver. I'll probably get that out tomorrow. I'll double-check to make sure we're not allocating memory before the queue is activated.
-Mitch
Quoted 11 lines
-----Original Message-----
From: Santos, Jose Renato G [mailto:[email protected]]
Sent: Wednesday, January 21, 2009 4:17 PM
To: Williams, Mitch A; [email protected]
Cc: [email protected]; Ronciak, John
Subject: RE: [Xen-devel] RFC: Xen VMDq patch for ixgbeMitch,
It seems this last patch is not working properly I get a
kernel panic
Quoted 3 lines
when the driver module loads (see panic message below). Apparently the driver is trying to allocate guest memory (
vmq_alloc_skb()) before the queue is allocated to a guest(there is no
Quoted 5 lines
guest running when the ixgbe module is loaded).
This is probably something easy to fixI am able to use the previous version of the patch (version 1.3.31.3 attached) with no problem. Not sure what changed
from version
Quoted 10 lines
1.3.31.3 to this new version 1.3.47. I am also attaching the buggy patch for version 1.3.47 that I am using so you can verify if I am using the right patch ...
Could you please take a look at this?
Thanks
Renato
Quoted 8 lines
=====================================
Unable to handle kernel paging request at 0000000000007800 RIP: [<ffffffff804600a4>] vmq_alloc_skb+0x64/0x1f0 PGD 79807067 PUD 79710067 PMD 0 Oops: 0000 [1] SMP CPU 0 Modules linked in: video thermal fan button battery
asus_acpiac ixgbeQuoted 14 lines
Pid: 0, comm: swapper Not tainted 2.6.18.8-xen0 #73
RIP: e030:[<ffffffff804600a4>] [<ffffffff804600a4>] vmq_alloc_skb+0x64/0x1f0 RSP: e02b:ffffffff80793ca0 EFLAGS: 00010206 RAX: ffff88007acc5dd8 RBX: 0000000000000000 RCX: 0000000000080000 RDX: ffff88007b5d7740 RSI: 0000000000000001 RDI: ffff88007a450000 RBP: ffffffff80793cd0 R08: 0000000000000001 R09: ffff88007a450c80 R10: 000000000000003f R11: 000000000000012c R12: 0000000000007800 R13: 0000000000000000 R14: 0000000000000500 R15: 00000000000005f4 FS: 00002ba4a6b1eda0(0000) GS:ffffffff80737000(0000)knlGS:0000000000000000
CS: e033 DS: 0000 ES: 0000
Process swapper (pid: 0, threadinfoffffffff8074c000, taskffffffff8064d440)Quoted 10 lines
Stack: ffff88007a450000 ffffc200118f0000 0000000000000000 0000000000000000 ffff88007b279070 ffff88007a450500 ffffffff80793d30 ffffffff88000d2f 000003ff80793d50 ffff880075df0000 ffff88007a450000 ffff88007fe90800 Call Trace: <IRQ> [<ffffffff88000d2f>] :ixgbe:ixgbe_alloc_rx_buffers+0x15f/0x2e0 [<ffffffff8800320b>] :ixgbe:ixgbe_clean_rx_irq+0x9eb/0xaa0 [<ffffffff8800798e>] :ixgbe:ixgbe_clean_rxonly_many+0xbe/0x210 [<ffffffff8800de3e>] :ixgbe:__kc_adapter_clean+0x2e/0x50 [<ffffffff8052eba4>] net_rx_action+0xc4/0x1c0 [<ffffffff80239eec>] __do_softirq+0x9c/0x140 [<ffffffff8020b604>]call_softirq+0x1c/0x28 >[<ffffffff8020d7cc>] do_softirq+0x6c/0x100 [<ffffffff80239d48>] >irq_exit+0x48/0x50 [<ffffffff80430b92>] evtchn_do_upcall+0x232/0x250 >[<ffffffff8020b13a>] do_hypervisor_callback+0x1e/0x2c <EOI> >[<ffffffff802063aa>] hypercall_page+0x3aa/0x1000[<
ffffffff802063aa>]Quoted 8 lines
hypercall_page+0x3aa/0x1000 [<ffffffff8020eed2>] raw_safe_halt+0xc2/0xf0 [<ffffffff80209b15>] xen_idle+0x75/0x90 [<ffffffff8020926a>] cpu_idle+0xba/0xe0 [<ffffffff802073b6>] rest_init+0x26/0x30 [<ffffffff807568f5>] start_kernel+0x265/0x270 [<ffffffff8075623d>] _sinittext+0x23d/0x250 Code: 4d 39 a6 00 73 00 00 4d 8d ae e8 72 00 00 0f 84 58 0100 00 RIP
Quoted 11 lines
[<
ffffffff804600a4>]vmq_alloc_skb+0x64/0x1f0RSP <ffffffff80793ca0>
CR2: 0000000000007800
<0>Kernel panic - not syncing: Aiee, killing interrupt handler! (XEN) Domain 0 crashed: 'noreboot' set - not rebooting.Quoted 5 lines
-----Original Message-----
From: Williams, Mitch A [mailto:[email protected]]
Sent: Friday, January 16, 2009 3:57 PM
To: Williams, Mitch A; [email protected]
Cc: [email protected]; Ronciak, John; Santos,Jose Renato G
Quoted 23 lines
Quoted 7 lines
Subject: RE: [Xen-devel] RFC: Xen VMDq patch for ixgbe
Whoops! Attached the wrong patch file. Please use this one.
Sorry for the confusion.
-MitchQuoted 11 lines
Quoted 7 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Mitch Williams
Sent: Friday, January 16, 2009 3:06 PM
To: [email protected]
Cc: [email protected]; Ronciak, John;Quoted 3 lines
Subject: [Xen-devel] RFC: Xen VMDq patch for ixgbe
Attached is a patch to enable Xen VMDq (AKA Netchannel2
vmq) for the
Quoted 1 line
Quoted 1 line
ixgbe driver. This is intended for testing and development
purposes
Quoted 2 lines
Quoted 2 lines
and should not be considered to be production-quality code.
Quoted 13 lines
Quoted 7 lines
Quoted 3 lines
Please note that this does NOT apply to the Xen Linux kernel; it applies to the ixgbe 1.3.47 release, available from
http://sourceforge.net/projects/e1000/. You'll obviouslyalso need an
Quoted 3 lines
Intel 82598-based 10 Gigabit network card and some sort of link partner. This will build against the current Netchannel2 source available from http:xenbits.xen.org/ext/netchannel2.
You'll need to
Quoted 5 lines
Quoted 1 line
enable "Net channel 2 support for multi-queue devices" in
your kernel
Quoted 3 lines
config.
To enable VMDq functionality, load the driver with the
command-line
Quoted 19 lines
Quoted 19 lines
Quoted 5 lines
parameter VMDQ=<num queues>, as in:
$ insmod ~/ixgbe-1.3.47/src/ixgbe.ko VMDQ=8You can then set up PV domains to use the device by
modifying your VM
Quoted 5 lines
configuration file from
vif = [ '<whatever>' ] to vif2 = [ 'pdev=<netdev>' ]where <netdev> is the interface name for your 82598 board,
e.g peth0 in
Quoted 6 lines
dom0.
Known issues (at least, known by me):
1) Must manually attach bridge device after starting domU vm. Netchannel2 backend devices show up as ethNN, not vifN.M, so the scripts don't automatically attach the interface. Once yourVM starts,
Quoted 8 lines
Quoted 8 lines
Quoted 1 line
do ifconfig -a to see which new interface got added. Then
use "brctl
Quoted 2 lines
addif" to add this new interface the the bridge.
2) No broadcast replication. This is a big one. Incomingbroadcasts
Quoted 1 line
will ONLY go to dom0. This means that your VMs can send ARP
requests
Quoted 1 line
and initiate IP sessions to outside machines, but outside
machines
Quoted 24 lines
Quoted 7 lines
Quoted 1 line
Quoted 1 line
cannot initiate connections because the ARP requests don't
go to the
Quoted 5 lines
Quoted 5 lines
domU VMs.
3) No loopback. VMs cannot communicate with other VMs (including dom0) on the same machine.Once I get this out, I'll start working on a proper
backport of the
Quoted 15 lines
Quoted 14 lines
Quoted 1 line
driver into the Xen kernel (2.6.18.8) tree. I'll remove as
much of the
Quoted 2 lines
compatibility cruft as is prudent and properly integrate it into
theKbuildstuff. When that's done, I'll send a completepatchset to
Quoted 1 line
this list, including signed-off-by lines which can then be
checked in
Quoted 7 lines
to Mercurial.
Please review and comment, and if possible test.
Thanks,
Mitch
# HG changeset patch
# User Jose Renato Santos <[email protected]> # Date 1228245326 28800
# Node ID b50c75346a67bad3463e1a95b81fca000b23a21e # Parent d535cef01a8905b1bd35f67a89d4114b1a5068e0 enable MSI.
xen/arch/x86/irq.c +0 -4
@@ -798,10 +798,6 @@ int map_domain_pirq(ASSERT (spin_is_locked (&d->event_lock)); -/* XXX Until pcidev and msi locking is fixed. */ -if ( type ==MAP_PIRQ_TYPE_MSI ) -return -EINVAL ; -if ( !IS_PRIV (current->domain) )return -EPERM ;
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 6 lines
Maybe, you are not running in VMDq mode.
Do you see the following message when you run "dmesg" in dom0? "Netchannel2 using vmq mode for guest n"I just noticed the tip of the current netchannel2 does not include the modifications of a previous changeset. I suspect this may have been lost in a merge with latest xen code. Without this missing code MSI is disabled by Xen which causes VMDq to be disabled. I needed to appply this patch (attached) maually to enable MSI and be able to run in VMDq mode.
Oops, sorry about that. I've (re-)applied the patch to tip and pushed it out.
Steven.
Quoted 193 lines
Quoted 193 lines
-----Original Message-----
From: Williams, Mitch A [mailto:[email protected]]
Sent: Wednesday, January 21, 2009 4:21 PM
To: Santos, Jose Renato G; [email protected]
Cc: [email protected]; Ronciak, John
Subject: RE: [Xen-devel] RFC: Xen VMDq patch for ixgbeI'll take a look. I've been running this code, so I (obviously) didn't see any failure.
They've just updated ixgbe on sourceforge, so I'm spinning a new patch that will work with that driver. I'll probably get that out tomorrow. I'll double-check to make sure we're not allocating memory before the queue is activated.
-Mitch
Quoted 11 lines
-----Original Message-----
From: Santos, Jose Renato G [mailto:[email protected]]
Sent: Wednesday, January 21, 2009 4:17 PM
To: Williams, Mitch A; [email protected]
Cc: [email protected]; Ronciak, John
Subject: RE: [Xen-devel] RFC: Xen VMDq patch for ixgbeMitch,
It seems this last patch is not working properly I get a
kernel panic
Quoted 3 lines
when the driver module loads (see panic message below). Apparently the driver is trying to allocate guest memory (
vmq_alloc_skb()) before the queue is allocated to a guest(there is no
Quoted 5 lines
guest running when the ixgbe module is loaded).
This is probably something easy to fixI am able to use the previous version of the patch (version 1.3.31.3 attached) with no problem. Not sure what changed
from version
Quoted 10 lines
1.3.31.3 to this new version 1.3.47. I am also attaching the buggy patch for version 1.3.47 that I am using so you can verify if I am using the right patch ...
Could you please take a look at this?
Thanks
Renato
Quoted 8 lines
=====================================
Unable to handle kernel paging request at 0000000000007800 RIP: [<ffffffff804600a4>] vmq_alloc_skb+0x64/0x1f0 PGD 79807067 PUD 79710067 PMD 0 Oops: 0000 [1] SMP CPU 0 Modules linked in: video thermal fan button battery
asus_acpiac ixgbeQuoted 14 lines
Pid: 0, comm: swapper Not tainted 2.6.18.8-xen0 #73
RIP: e030:[<ffffffff804600a4>] [<ffffffff804600a4>] vmq_alloc_skb+0x64/0x1f0 RSP: e02b:ffffffff80793ca0 EFLAGS: 00010206 RAX: ffff88007acc5dd8 RBX: 0000000000000000 RCX: 0000000000080000 RDX: ffff88007b5d7740 RSI: 0000000000000001 RDI: ffff88007a450000 RBP: ffffffff80793cd0 R08: 0000000000000001 R09: ffff88007a450c80 R10: 000000000000003f R11: 000000000000012c R12: 0000000000007800 R13: 0000000000000000 R14: 0000000000000500 R15: 00000000000005f4 FS: 00002ba4a6b1eda0(0000) GS:ffffffff80737000(0000)knlGS:0000000000000000
CS: e033 DS: 0000 ES: 0000
Process swapper (pid: 0, threadinfoffffffff8074c000, taskffffffff8064d440)Quoted 10 lines
Stack: ffff88007a450000 ffffc200118f0000 0000000000000000 0000000000000000 ffff88007b279070 ffff88007a450500 ffffffff80793d30 ffffffff88000d2f 000003ff80793d50 ffff880075df0000 ffff88007a450000 ffff88007fe90800 Call Trace: <IRQ> [<ffffffff88000d2f>] :ixgbe:ixgbe_alloc_rx_buffers+0x15f/0x2e0 [<ffffffff8800320b>] :ixgbe:ixgbe_clean_rx_irq+0x9eb/0xaa0 [<ffffffff8800798e>] :ixgbe:ixgbe_clean_rxonly_many+0xbe/0x210 [<ffffffff8800de3e>] :ixgbe:__kc_adapter_clean+0x2e/0x50 [<ffffffff8052eba4>] net_rx_action+0xc4/0x1c0 [<ffffffff80239eec>] __do_softirq+0x9c/0x140 [<ffffffff8020b604>]call_softirq+0x1c/0x28 >[<ffffffff8020d7cc>] do_softirq+0x6c/0x100 [<ffffffff80239d48>] >irq_exit+0x48/0x50 [<ffffffff80430b92>] evtchn_do_upcall+0x232/0x250 >[<ffffffff8020b13a>] do_hypervisor_callback+0x1e/0x2c <EOI> >[<ffffffff802063aa>] hypercall_page+0x3aa/0x1000[<
ffffffff802063aa>]Quoted 8 lines
hypercall_page+0x3aa/0x1000 [<ffffffff8020eed2>] raw_safe_halt+0xc2/0xf0 [<ffffffff80209b15>] xen_idle+0x75/0x90 [<ffffffff8020926a>] cpu_idle+0xba/0xe0 [<ffffffff802073b6>] rest_init+0x26/0x30 [<ffffffff807568f5>] start_kernel+0x265/0x270 [<ffffffff8075623d>] _sinittext+0x23d/0x250 Code: 4d 39 a6 00 73 00 00 4d 8d ae e8 72 00 00 0f 84 58 0100 00 RIP
Quoted 11 lines
[<
ffffffff804600a4>]vmq_alloc_skb+0x64/0x1f0RSP <ffffffff80793ca0>
CR2: 0000000000007800
<0>Kernel panic - not syncing: Aiee, killing interrupt handler! (XEN) Domain 0 crashed: 'noreboot' set - not rebooting.Quoted 5 lines
-----Original Message-----
From: Williams, Mitch A [mailto:[email protected]]
Sent: Friday, January 16, 2009 3:57 PM
To: Williams, Mitch A; [email protected]
Cc: [email protected]; Ronciak, John; Santos,Jose Renato G
Quoted 23 lines
Quoted 7 lines
Subject: RE: [Xen-devel] RFC: Xen VMDq patch for ixgbe
Whoops! Attached the wrong patch file. Please use this one.
Sorry for the confusion.
-MitchQuoted 11 lines
Quoted 7 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Mitch Williams
Sent: Friday, January 16, 2009 3:06 PM
To: [email protected]
Cc: [email protected]; Ronciak, John;Quoted 3 lines
Subject: [Xen-devel] RFC: Xen VMDq patch for ixgbe
Attached is a patch to enable Xen VMDq (AKA Netchannel2
vmq) for the
Quoted 1 line
Quoted 1 line
ixgbe driver. This is intended for testing and development
purposes
Quoted 2 lines
Quoted 2 lines
and should not be considered to be production-quality code.
Quoted 13 lines
Quoted 7 lines
Quoted 3 lines
Please note that this does NOT apply to the Xen Linux kernel; it applies to the ixgbe 1.3.47 release, available from
http://sourceforge.net/projects/e1000/. You'll obviouslyalso need an
Quoted 3 lines
Intel 82598-based 10 Gigabit network card and some sort of link partner. This will build against the current Netchannel2 source available from http:xenbits.xen.org/ext/netchannel2.
You'll need to
Quoted 5 lines
Quoted 1 line
enable "Net channel 2 support for multi-queue devices" in
your kernel
Quoted 3 lines
config.
To enable VMDq functionality, load the driver with the
command-line
Quoted 19 lines
Quoted 19 lines
Quoted 5 lines
parameter VMDQ=<num queues>, as in:
$ insmod ~/ixgbe-1.3.47/src/ixgbe.ko VMDQ=8You can then set up PV domains to use the device by
modifying your VM
Quoted 5 lines
configuration file from
vif = [ '<whatever>' ] to vif2 = [ 'pdev=<netdev>' ]where <netdev> is the interface name for your 82598 board,
e.g peth0 in
Quoted 6 lines
dom0.
Known issues (at least, known by me):
1) Must manually attach bridge device after starting domU vm. Netchannel2 backend devices show up as ethNN, not vifN.M, so the scripts don't automatically attach the interface. Once yourVM starts,
Quoted 8 lines
Quoted 8 lines
Quoted 1 line
do ifconfig -a to see which new interface got added. Then
use "brctl
Quoted 2 lines
addif" to add this new interface the the bridge.
2) No broadcast replication. This is a big one. Incomingbroadcasts
Quoted 1 line
will ONLY go to dom0. This means that your VMs can send ARP
requests
Quoted 1 line
and initiate IP sessions to outside machines, but outside
machines
Quoted 7 lines
Quoted 1 line
Quoted 1 line
cannot initiate connections because the ARP requests don't
go to the
Quoted 5 lines
Quoted 5 lines
domU VMs.
3) No loopback. VMs cannot communicate with other VMs (including dom0) on the same machine.Once I get this out, I'll start working on a proper
backport of the
Quoted 9 lines
Quoted 9 lines
Quoted 1 line
driver into the Xen kernel (2.6.18.8) tree. I'll remove as
much of the
Quoted 2 lines
compatibility cruft as is prudent and properly integrate it into
theKbuildstuff. When that's done, I'll send a completepatchset to
Quoted 1 line
this list, including signed-off-by lines which can then be
checked in
Quoted 2 lines
to Mercurial.
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 5 lines
Quoted 5 lines
Please review and comment, and if possible test.
Thanks,
Mitch
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel