Subject: Re: NetBSD/xen network problems (need help)
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Andreas Wrede <andreas@planix.com>
List: port-xen
Date: 03/14/2006 21:29:47
On 14-Mar-06, at 6:35 PM, YAMAMOTO Takashi wrote:

>> m_makewritable origlen 112 newlen 182 error 0
>> panic: m_makewritable: length changed
>
> the following would be the minimal fix.
>
> YAMAMOTO Takashi
>
> Index: if_xennet.c
> ===================================================================
> --- if_xennet.c	(revision 1576)
> +++ if_xennet.c	(working copy)
> @@ -787,8 +787,7 @@ xen_network_handler(void *arg)
>  			 * memory, copy data and push the receive
>  			 * buffer back to the hypervisor.
>  			 */
> -			m->m_len = MHLEN;
> -			m->m_pkthdr.len = 0;
> +			m->m_len = m->m_pkthdr.len = 0;
>  			m_copyback(m, 0, rx->status, pktp);
>  			xennet_rx_push_buffer(sc, rx->id);
>  			if (m->m_pkthdr.len < rx->status) {
>

With that change, I get the following:

panic: kernel diagnostic assertion "ntohs(evl->evl_encap_proto) ==  
ETHERTYPE_VLAN" failed: file "/m5/netbsd-current/src/sys/net/ 
if_vlan.c", line 869
Begin traceback...
__assert(c03fdccb,c0434320,365,c0434420,c148e320) at netbsd:__assert 
+0x2e
vlan_input(c1243038,c14dff00,0,1,42) at netbsd:vlan_input+0x1bb
ether_input(c1243038,c14dff00,42,cb1db000,5) at netbsd:ether_input+0x460
xen_network_handler(c1243000,c058be5c,c058be14,c058be20,989680) at  
netbsd:xen_network_handler+0x36b
evtchn_do_event(5,c058be5c,c058be98,c010263c,c058be2c) at  
netbsd:evtchn_do_event+0xee
do_hypervisor_callback(c058be5c,0,11,c0370031,11) at  
netbsd:do_hypervisor_callback+0x13f
hypervisor_callback(c048bc20,0,c058bf28,c0277078,ca90b420) at  
netbsd:hypervisor_callback+0x64
ltsleep(c048b8a0,4,c04117c9,0,0) at netbsd:ltsleep+0x444
uvm_scheduler(c0489bb8,0,c0489458,c0406c7a,0) at netbsd:uvm_scheduler 
+0x14c
main(0,0,0,0,0) at netbsd:main+0x54e
End traceback...
syncing disks... xennet0: xennet_watchdog
xennet0: xennet_watchdog
1070 1069 1068 1066 1066 1066 1063 1060 1060 1059 1059 1059 1057 1057  
1056 1053 1044 1044 1044 1044 1036 1030 1022 1016 1013 1013 1008 1005  
1003 1001 997 996 995 992 990 989 987 985 983 981 980 978 976 975 972  
970 969 969 964 963 961 961 961 956 956 951 949 942 938 937 935 934  
931 929 926 924 920 917 915 913 912 907 904 902 900 897 895 893 891  
891 891 891 891 891 giving up
Printing vnodes for busy buffers
tag VT_UFS(1) type VDIR(2), usecount 0, writecount 0, refcount 1,  
flags (0<LOCKSWORK>)
         tag VT_UFS, ino 10564866, on dev 142, 12 flags 0x0, effnlink  
6, nlink 6
         mode 040755, owner 0, group 0, size 512 not locked
[..many more buffers..]


giving up

dumping to dev 142,1 offset 1926287
dump device bad

The guest xenU has a vlan configured on top of the xennet0 interface.

-- 
     aew