>In article <34cb7c8404110209563fc01498_at_mail.gmail.com> you write: > >>Ok, I don't have this hardware, but dumb question: >> >>A (very) quick look at the source reveals that buffers are allocated >>via sk_rxeof()->sk_newbuf()->sk_jalloc() in the interrupt receive >>function, with the softc lock held in sk_rxeof(). >> >>They're freed by the mbuf system via a call to sk_jfree(), but that >>doesn't hold the SK_LOCK. Is this possibly the source of the >>corruption problems? What am I missing? >>This compiles, anyway :-) >> >>--- /tmp/if_sk.c Tue Nov 2 17:49:26 2004 >>+++ if_sk.c Tue Nov 2 17:52:20 2004 >>_at__at_ -1115,12 +1115,14 _at__at_ >> if ((i < 0) || (i >= SK_JSLOTS)) >> panic("sk_jfree: asked to free buffer that we don't manage!"); >> >>+ SK_LOCK(sc_if->sk_softc); >> entry = SLIST_FIRST(&sc_if->sk_jinuse_listhead); >> if (entry == NULL) >> panic("sk_jfree: buffer not in use!"); >> entry->slot = i; >> SLIST_REMOVE_HEAD(&sc_if->sk_jinuse_listhead, jpool_entries); >> SLIST_INSERT_HEAD(&sc_if->sk_jfree_listhead, entry, jpool_entries); >>+ SK_UNLOCK(sc_if->sk_softc); >> >> return; >> } > >Thank you very much! This patch seems to fix the network corruption >problems I have reported in kern/73038. I'll do some more testing, >because sometimes the problems only appear after some time. But for now, >I can use if_sk.c without debug.mpsafenet="0" on 5.3-RC2. > >Arjan Yes, it works for me too. After aplying this patch the problem was solved for me. I meen after the patch ftp 2GB file throw sk interface with debug.mpsafenet="1" took place at 11.03MB/s in contrast to 60KB/s before. Great thanks! #uname -rm 5.3-STABLE i386 HyperThreading (3GHz) system whith UP kernel. $ dmesg | grep sk skc0: <Marvell Gigabit Ethernet> port 0xa400-0xa4ff mem 0xfb100000-0xfb103fff irq 20 at device 9.0 on pci2 skc0: Yukon Gigabit Ethernet 10/100/1000Base-T Adapter sk0: <Marvell Semiconductor, Inc. Yukon> on skc0 sk0: Ethernet address: 00:0d:61:9a:59:e1 miibus1: <MII bus> on sk0 Valera.Received on Fri Nov 05 2004 - 12:37:34 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:21 UTC