Message ID | 1268765284.2932.17.camel@edumazet-laptop |
---|---|
State | RFC, archived |
Delegated to: | David Miller |
Headers | show |
On (03/16/10 19:48), Eric Dumazet wrote: > > Traces: > > [24600.625078] INFO: task events/0:9 blocked for more than 120 seconds. > > [24600.625083] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. > > [24600.625087] events/0 D 00001636 0 9 2 0x00000000 > > [24600.625096] f7085ebc 00000046 a87e9490 00001636 c1617cc0 c1617cc0 c1617cc0 c1617cc0 > > [24600.625109] f707c250 c1617cc0 c1617cc0 00000000 00000000 00000000 00000000 f707bfc0 > > [24600.625122] c14745c8 c14745c8 f707bfc0 00000202 f7085efc c12c6449 00000000 00085edc > > [24600.625135] Call Trace: > > [24600.625148] [<c12c6449>] __mutex_lock_common+0x233/0x3af > > [24600.625155] [<c12c65ff>] mutex_lock_nested+0x12/0x15 > > [24600.625163] [<c1265e0f>] ? rtnl_lock+0xf/0x11 > > [24600.625168] [<c1265e0f>] rtnl_lock+0xf/0x11 > > [24600.625183] [<f9174acd>] rtl8169_reset_task+0x16/0xee [r8169] > > [24600.625191] [<c103c887>] worker_thread+0x161/0x233 > > [24600.625196] [<c103c845>] ? worker_thread+0x11f/0x233 > > [24600.625205] [<f9174ab7>] ? rtl8169_reset_task+0x0/0xee [r8169] > > [24600.625214] [<c103f9f1>] ? autoremove_wake_function+0x0/0x2f > > [24600.625220] [<c103c726>] ? worker_thread+0x0/0x233 > > [24600.625225] [<c103f6ce>] kthread+0x6a/0x6f > > [24600.625232] [<c103f664>] ? kthread+0x0/0x6f > > [24600.625238] [<c1002e42>] kernel_thread_helper+0x6/0x1a > > [24600.625242] INFO: lockdep is turned off. > > [24600.625259] INFO: task X:3176 blocked for more than 120 seconds. > > [24600.625262] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. > > [24600.625266] X D 00000000 0 3176 3175 0x00400004 > > [24600.625273] f6435a10 00003046 00025709 00000000 c1617cc0 c1617cc0 c1617cc0 c1617cc0 > > [24600.625286] f60897d0 c1617c ... > > /*THE REST IS LOST*/ > > > > > > OK thanks for the report, this rtl8169_reset_task() seems pretty buggy, > or multiple invocation... > > Did you tried removing the rtl8169_schedule_work() call from > rtl8169_rx_interrupt() ? > Not yet. I'm reading rtl8169_rx_interrupt now and rtl8169_schedule_work in case of RxFOVF grabbed my attention too. > Maybe the reset is not necessary at all in case of fifo overflow.. > > Cumulative patch : > Will try it. Sergey > diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c > index 9d3ebf3..d6ef4dd 100644 > --- a/drivers/net/r8169.c > +++ b/drivers/net/r8169.c > @@ -1038,14 +1038,14 @@ static void rtl8169_vlan_rx_register(struct net_device *dev, > } > > static int rtl8169_rx_vlan_skb(struct rtl8169_private *tp, struct RxDesc *desc, > - struct sk_buff *skb) > + struct sk_buff *skb, int polling) > { > u32 opts2 = le32_to_cpu(desc->opts2); > struct vlan_group *vlgrp = tp->vlgrp; > int ret; > > if (vlgrp && (opts2 & RxVlanTag)) { > - vlan_hwaccel_receive_skb(skb, vlgrp, swab16(opts2 & 0xffff)); > + __vlan_hwaccel_rx(skb, vlgrp, swab16(opts2 & 0xffff), polling); > ret = 0; > } else > ret = -1; > @@ -1062,7 +1062,7 @@ static inline u32 rtl8169_tx_vlan_tag(struct rtl8169_private *tp, > } > > static int rtl8169_rx_vlan_skb(struct rtl8169_private *tp, struct RxDesc *desc, > - struct sk_buff *skb) > + struct sk_buff *skb, int polling) > { > return -1; > } > @@ -4429,12 +4429,20 @@ out: > return done; > } > > +/* > + * Warning : rtl8169_rx_interrupt() might be called : > + * 1) from NAPI (softirq) context > + * (polling = 1 : we should call netif_receive_skb()) > + * 2) from process context (rtl8169_reset_task()) > + * (polling = 0 : we must call netif_rx() instead) > + */ > static int rtl8169_rx_interrupt(struct net_device *dev, > struct rtl8169_private *tp, > void __iomem *ioaddr, u32 budget) > { > unsigned int cur_rx, rx_left; > unsigned int delta, count; > + int polling = (budget != ~(u32)0) ? 1 : 0; > > cur_rx = tp->cur_rx; > rx_left = NUM_RX_DESC + tp->dirty_rx - cur_rx; > @@ -4459,7 +4467,6 @@ static int rtl8169_rx_interrupt(struct net_device *dev, > if (status & RxCRC) > dev->stats.rx_crc_errors++; > if (status & RxFOVF) { > - rtl8169_schedule_work(dev, rtl8169_reset_task); > dev->stats.rx_fifo_errors++; > } > rtl8169_mark_to_asic(desc, tp->rx_buf_sz); > @@ -4496,8 +4503,12 @@ static int rtl8169_rx_interrupt(struct net_device *dev, > skb_put(skb, pkt_size); > skb->protocol = eth_type_trans(skb, dev); > > - if (rtl8169_rx_vlan_skb(tp, desc, skb) < 0) > - netif_receive_skb(skb); > + if (rtl8169_rx_vlan_skb(tp, desc, skb, polling) < 0) { > + if (likely(polling)) > + netif_receive_skb(skb); > + else > + netif_rx(skb); > + } > > dev->stats.rx_bytes += pkt_size; > dev->stats.rx_packets++; > > >
Hello, cumulative patch: [ 155.337373] ------------[ cut here ]------------ [ 155.337386] WARNING: at net/sched/sch_generic.c:255 dev_watchdog+0xc1/0x125() [ 155.337390] Hardware name: F3JC [ 155.337394] NETDEV WATCHDOG: eth0 (r8169): transmit queue 0 timed out [ 155.337397] Modules linked in: pktgen ppp_async crc_ccitt ipv6 ppp_generic slhc snd_hwdep snd_hda_codec_si3054 snd_hda_codec_realtek sdhci_pci sdhci snd_hda_intel snd_hda_codec asus_laptop sparse_keymap mmc_core led_class snd_pcm snd_timer snd_page_alloc psmouse rng_core snd soundcore sg i2c_i801 evdev serio_raw r8169 mii usbhid hid uhci_hcd ehci_hcd sr_mod cdrom sd_mod usbcore ata_piix [ 155.337468] Pid: 7, comm: ksoftirqd/1 Tainted: G W 2.6.34-rc1-dbg-git6-r8169 #47 [ 155.337472] Call Trace: [ 155.337481] [<c102e293>] warn_slowpath_common+0x65/0x7c [ 155.337506] [<c126ac34>] ? dev_watchdog+0xc1/0x125 [ 155.337512] [<c102e2de>] warn_slowpath_fmt+0x24/0x27 [ 155.337517] [<c126ac34>] dev_watchdog+0xc1/0x125 [ 155.337525] [<c1036afb>] ? run_timer_softirq+0x120/0x1eb [ 155.337530] [<c1036b51>] run_timer_softirq+0x176/0x1eb [ 155.337536] [<c1036afb>] ? run_timer_softirq+0x120/0x1eb [ 155.337566] [<c126ab73>] ? dev_watchdog+0x0/0x125 [ 155.337576] [<c1032d39>] __do_softirq+0x8d/0x117 [ 155.337667] [<c1032dee>] do_softirq+0x2b/0x43 [ 155.337729] [<c1032fc1>] run_ksoftirqd+0x71/0x140 [ 155.337745] [<c1032f50>] ? run_ksoftirqd+0x0/0x140 [ 155.337810] [<c103f60e>] kthread+0x6a/0x6f [ 155.337832] [<c103f5a4>] ? kthread+0x0/0x6f [ 155.337903] [<c1002e42>] kernel_thread_helper+0x6/0x1a [ 155.337907] ---[ end trace a22d306b065d4a68 ]--- [ 155.350902] r8169 0000:02:00.0: eth0: link up [ 167.350892] r8169 0000:02:00.0: eth0: link up Sergey On (03/16/10 19:48), Eric Dumazet wrote: > > Hello, > > Got it right now. > > > > System completely froze. Even SysRq didn't work. > > /*spin_lock deadlock?*/ > > > > NOTE: I'm losing network constantly with pktgen tests > > yes, every 12 seconds there is a reset because of fifo overflow > > > [24208.010980] r8169 0000:02:00.0: eth0: link up > > [24220.010980] r8169 0000:02:00.0: eth0: link up > > [24232.011030] r8169 0000:02:00.0: eth0: link up > > [24340.010980] r8169 0000:02:00.0: eth0: link up > > [24352.010966] r8169 0000:02:00.0: eth0: link up > > [24364.010966] r8169 0000:02:00.0: eth0: link up > > [24376.010964] r8169 0000:02:00.0: eth0: link up > > [24388.010961] r8169 0000:02:00.0: eth0: link up > > [24400.010959] r8169 0000:02:00.0: eth0: link up > > [24412.010963] r8169 0000:02:00.0: eth0: link up > > > > > > Traces: > > [24600.625078] INFO: task events/0:9 blocked for more than 120 seconds. > > [24600.625083] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. > > [24600.625087] events/0 D 00001636 0 9 2 0x00000000 > > [24600.625096] f7085ebc 00000046 a87e9490 00001636 c1617cc0 c1617cc0 c1617cc0 c1617cc0 > > [24600.625109] f707c250 c1617cc0 c1617cc0 00000000 00000000 00000000 00000000 f707bfc0 > > [24600.625122] c14745c8 c14745c8 f707bfc0 00000202 f7085efc c12c6449 00000000 00085edc > > [24600.625135] Call Trace: > > [24600.625148] [<c12c6449>] __mutex_lock_common+0x233/0x3af > > [24600.625155] [<c12c65ff>] mutex_lock_nested+0x12/0x15 > > [24600.625163] [<c1265e0f>] ? rtnl_lock+0xf/0x11 > > [24600.625168] [<c1265e0f>] rtnl_lock+0xf/0x11 > > [24600.625183] [<f9174acd>] rtl8169_reset_task+0x16/0xee [r8169] > > [24600.625191] [<c103c887>] worker_thread+0x161/0x233 > > [24600.625196] [<c103c845>] ? worker_thread+0x11f/0x233 > > [24600.625205] [<f9174ab7>] ? rtl8169_reset_task+0x0/0xee [r8169] > > [24600.625214] [<c103f9f1>] ? autoremove_wake_function+0x0/0x2f > > [24600.625220] [<c103c726>] ? worker_thread+0x0/0x233 > > [24600.625225] [<c103f6ce>] kthread+0x6a/0x6f > > [24600.625232] [<c103f664>] ? kthread+0x0/0x6f > > [24600.625238] [<c1002e42>] kernel_thread_helper+0x6/0x1a > > [24600.625242] INFO: lockdep is turned off. > > [24600.625259] INFO: task X:3176 blocked for more than 120 seconds. > > [24600.625262] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. > > [24600.625266] X D 00000000 0 3176 3175 0x00400004 > > [24600.625273] f6435a10 00003046 00025709 00000000 c1617cc0 c1617cc0 c1617cc0 c1617cc0 > > [24600.625286] f60897d0 c1617c ... > > /*THE REST IS LOST*/ > > > > > > OK thanks for the report, this rtl8169_reset_task() seems pretty buggy, > or multiple invocation... > > Did you tried removing the rtl8169_schedule_work() call from > rtl8169_rx_interrupt() ? > > Maybe the reset is not necessary at all in case of fifo overflow.. > > Cumulative patch : > > diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c > index 9d3ebf3..d6ef4dd 100644 > --- a/drivers/net/r8169.c > +++ b/drivers/net/r8169.c > @@ -1038,14 +1038,14 @@ static void rtl8169_vlan_rx_register(struct net_device *dev, > } > > static int rtl8169_rx_vlan_skb(struct rtl8169_private *tp, struct RxDesc *desc, > - struct sk_buff *skb) > + struct sk_buff *skb, int polling) > { > u32 opts2 = le32_to_cpu(desc->opts2); > struct vlan_group *vlgrp = tp->vlgrp; > int ret; > > if (vlgrp && (opts2 & RxVlanTag)) { > - vlan_hwaccel_receive_skb(skb, vlgrp, swab16(opts2 & 0xffff)); > + __vlan_hwaccel_rx(skb, vlgrp, swab16(opts2 & 0xffff), polling); > ret = 0; > } else > ret = -1; > @@ -1062,7 +1062,7 @@ static inline u32 rtl8169_tx_vlan_tag(struct rtl8169_private *tp, > } > > static int rtl8169_rx_vlan_skb(struct rtl8169_private *tp, struct RxDesc *desc, > - struct sk_buff *skb) > + struct sk_buff *skb, int polling) > { > return -1; > } > @@ -4429,12 +4429,20 @@ out: > return done; > } > > +/* > + * Warning : rtl8169_rx_interrupt() might be called : > + * 1) from NAPI (softirq) context > + * (polling = 1 : we should call netif_receive_skb()) > + * 2) from process context (rtl8169_reset_task()) > + * (polling = 0 : we must call netif_rx() instead) > + */ > static int rtl8169_rx_interrupt(struct net_device *dev, > struct rtl8169_private *tp, > void __iomem *ioaddr, u32 budget) > { > unsigned int cur_rx, rx_left; > unsigned int delta, count; > + int polling = (budget != ~(u32)0) ? 1 : 0; > > cur_rx = tp->cur_rx; > rx_left = NUM_RX_DESC + tp->dirty_rx - cur_rx; > @@ -4459,7 +4467,6 @@ static int rtl8169_rx_interrupt(struct net_device *dev, > if (status & RxCRC) > dev->stats.rx_crc_errors++; > if (status & RxFOVF) { > - rtl8169_schedule_work(dev, rtl8169_reset_task); > dev->stats.rx_fifo_errors++; > } > rtl8169_mark_to_asic(desc, tp->rx_buf_sz); > @@ -4496,8 +4503,12 @@ static int rtl8169_rx_interrupt(struct net_device *dev, > skb_put(skb, pkt_size); > skb->protocol = eth_type_trans(skb, dev); > > - if (rtl8169_rx_vlan_skb(tp, desc, skb) < 0) > - netif_receive_skb(skb); > + if (rtl8169_rx_vlan_skb(tp, desc, skb, polling) < 0) { > + if (likely(polling)) > + netif_receive_skb(skb); > + else > + netif_rx(skb); > + } > > dev->stats.rx_bytes += pkt_size; > dev->stats.rx_packets++; > > >
trimming some cc Le mercredi 17 mars 2010 à 09:25 +0200, Sergey Senozhatsky a écrit : > Hello, > > cumulative patch: > > [ 155.337373] ------------[ cut here ]------------ > [ 155.337386] WARNING: at net/sched/sch_generic.c:255 dev_watchdog+0xc1/0x125() > [ 155.337390] Hardware name: F3JC > [ 155.337394] NETDEV WATCHDOG: eth0 (r8169): transmit queue 0 timed out > [ 155.337397] Modules linked in: pktgen ppp_async crc_ccitt ipv6 ppp_generic slhc snd_hwdep snd_hda_codec_si3054 snd_hda_codec_realtek sdhci_pci sdhci snd_hda_intel snd_hda_codec > asus_laptop sparse_keymap mmc_core led_class snd_pcm snd_timer snd_page_alloc psmouse rng_core snd soundcore sg i2c_i801 evdev serio_raw r8169 mii usbhid hid uhci_hcd ehci_hcd > sr_mod cdrom sd_mod usbcore ata_piix > [ 155.337468] Pid: 7, comm: ksoftirqd/1 Tainted: G W 2.6.34-rc1-dbg-git6-r8169 #47 > [ 155.337472] Call Trace: > [ 155.337481] [<c102e293>] warn_slowpath_common+0x65/0x7c > [ 155.337506] [<c126ac34>] ? dev_watchdog+0xc1/0x125 > [ 155.337512] [<c102e2de>] warn_slowpath_fmt+0x24/0x27 > [ 155.337517] [<c126ac34>] dev_watchdog+0xc1/0x125 > [ 155.337525] [<c1036afb>] ? run_timer_softirq+0x120/0x1eb > [ 155.337530] [<c1036b51>] run_timer_softirq+0x176/0x1eb > [ 155.337536] [<c1036afb>] ? run_timer_softirq+0x120/0x1eb > [ 155.337566] [<c126ab73>] ? dev_watchdog+0x0/0x125 > [ 155.337576] [<c1032d39>] __do_softirq+0x8d/0x117 > [ 155.337667] [<c1032dee>] do_softirq+0x2b/0x43 > [ 155.337729] [<c1032fc1>] run_ksoftirqd+0x71/0x140 > [ 155.337745] [<c1032f50>] ? run_ksoftirqd+0x0/0x140 > [ 155.337810] [<c103f60e>] kthread+0x6a/0x6f > [ 155.337832] [<c103f5a4>] ? kthread+0x0/0x6f > [ 155.337903] [<c1002e42>] kernel_thread_helper+0x6/0x1a > [ 155.337907] ---[ end trace a22d306b065d4a68 ]--- > [ 155.350902] r8169 0000:02:00.0: eth0: link up > [ 167.350892] r8169 0000:02:00.0: eth0: link up > > > On receiver ? I suspect lot of work is needed on this driver to make it working, but I dont have a machine with said adapter. Are you in 100 Mb full duplex mode ? -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On (03/17/10 08:37), Eric Dumazet wrote: > trimming some cc > > Le mercredi 17 mars 2010 à 09:25 +0200, Sergey Senozhatsky a écrit : > > Hello, > > > > cumulative patch: > > > > [ 155.337373] ------------[ cut here ]------------ > > [ 155.337386] WARNING: at net/sched/sch_generic.c:255 dev_watchdog+0xc1/0x125() > > [ 155.337390] Hardware name: F3JC > > [ 155.337394] NETDEV WATCHDOG: eth0 (r8169): transmit queue 0 timed out > > [ 155.337397] Modules linked in: pktgen ppp_async crc_ccitt ipv6 ppp_generic slhc snd_hwdep snd_hda_codec_si3054 snd_hda_codec_realtek sdhci_pci sdhci snd_hda_intel snd_hda_codec > > asus_laptop sparse_keymap mmc_core led_class snd_pcm snd_timer snd_page_alloc psmouse rng_core snd soundcore sg i2c_i801 evdev serio_raw r8169 mii usbhid hid uhci_hcd ehci_hcd > > sr_mod cdrom sd_mod usbcore ata_piix > > [ 155.337468] Pid: 7, comm: ksoftirqd/1 Tainted: G W 2.6.34-rc1-dbg-git6-r8169 #47 > > [ 155.337472] Call Trace: > > [ 155.337481] [<c102e293>] warn_slowpath_common+0x65/0x7c > > [ 155.337506] [<c126ac34>] ? dev_watchdog+0xc1/0x125 > > [ 155.337512] [<c102e2de>] warn_slowpath_fmt+0x24/0x27 > > [ 155.337517] [<c126ac34>] dev_watchdog+0xc1/0x125 > > [ 155.337525] [<c1036afb>] ? run_timer_softirq+0x120/0x1eb > > [ 155.337530] [<c1036b51>] run_timer_softirq+0x176/0x1eb > > [ 155.337536] [<c1036afb>] ? run_timer_softirq+0x120/0x1eb > > [ 155.337566] [<c126ab73>] ? dev_watchdog+0x0/0x125 > > [ 155.337576] [<c1032d39>] __do_softirq+0x8d/0x117 > > [ 155.337667] [<c1032dee>] do_softirq+0x2b/0x43 > > [ 155.337729] [<c1032fc1>] run_ksoftirqd+0x71/0x140 > > [ 155.337745] [<c1032f50>] ? run_ksoftirqd+0x0/0x140 > > [ 155.337810] [<c103f60e>] kthread+0x6a/0x6f > > [ 155.337832] [<c103f5a4>] ? kthread+0x0/0x6f > > [ 155.337903] [<c1002e42>] kernel_thread_helper+0x6/0x1a > > [ 155.337907] ---[ end trace a22d306b065d4a68 ]--- > > [ 155.350902] r8169 0000:02:00.0: eth0: link up > > [ 167.350892] r8169 0000:02:00.0: eth0: link up > > > > > > > > On receiver ? > Localhost pollution (both sender and receiver are localhost). In 2 hours I will try to pktgen over LAN. > I suspect lot of work is needed on this driver to make it working, but I > dont have a machine with said adapter. > > Are you in 100 Mb full duplex mode ? > ethtool eth0 Settings for eth0: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Half 1000baseT/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Half 1000baseT/Full Advertised auto-negotiation: Yes Speed: 100Mb/s Duplex: Full Port: MII PHYAD: 0 Transceiver: internal Auto-negotiation: on Supports Wake-on: pumbg Wake-on: g Current message level: 0x00000033 (51) Link detected: yes Sergey
Hello, We did pktgen over LAN testing for several hours: iftop 19.1Mb 38.1Mb 57.2Mb 76.3Mb 95.4Mb └──────────────────────┴──────────────────────┴───────────────────────┴──────────────────────┴─────────────────────── xxxxxxxx0007t2 => xxxxxxxxxxxxxx.xxxxx.xxxx.xxx 0b 3.60Kb 4.28Kb <= 92.7Mb 92.7Mb 92.5Mb ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────── TX: cumm: 2.50MB peak: 57.7Kb rates: 7.71Kb 5.97Kb 10.7Kb RX: 28.0GB 92.9Mb 92.7Mb 92.8Mb 92.6Mb TOTAL: 28.0GB 92.9Mb 92.7Mb 92.8Mb 92.6M Without any problems. As soon as I switched back to localhost "pollution": [ 7343.999279] ------------[ cut here ]------------ [ 7343.999292] WARNING: at net/sched/sch_generic.c:255 dev_watchdog+0xc1/0x125() [ 7343.999295] Hardware name: F3JC [ 7343.999298] NETDEV WATCHDOG: eth0 (r8169): transmit queue 0 timed out [ 7343.999301] Modules linked in: pktgen ppp_async crc_ccitt ipv6 ppp_generic slhc snd_hwdep snd_hda_codec_si3054 snd_hda_codec_realtek sdhci_pci sdhci snd_hda_intel mmc_core asus_laptop sparse_keymap snd_hda_codec led_class snd_pcm rng_core sg psmouse snd_timer snd_page_alloc i2c_i801 evdev snd soundcore serio_raw r8169 mii usbhid hid uhci_hcd ehci_hcd sr_mod cdrom sd_mod usbcore ata_piix [ 7343.999361] Pid: 4801, comm: kpktgend_0 Tainted: G W 2.6.34-rc1-dbg-git6-r8169 #47 [ 7343.999364] Call Trace: [ 7343.999372] [<c102e293>] warn_slowpath_common+0x65/0x7c [ 7343.999378] [<c126ac34>] ? dev_watchdog+0xc1/0x125 [ 7343.999383] [<c102e2de>] warn_slowpath_fmt+0x24/0x27 [ 7343.999388] [<c126ac34>] dev_watchdog+0xc1/0x125 [ 7343.999395] [<c1036afb>] ? run_timer_softirq+0x120/0x1eb [ 7343.999401] [<c1036b51>] run_timer_softirq+0x176/0x1eb [ 7343.999406] [<c1036afb>] ? run_timer_softirq+0x120/0x1eb [ 7343.999411] [<c126ab73>] ? dev_watchdog+0x0/0x125 [ 7343.999417] [<c1032d39>] __do_softirq+0x8d/0x117 [ 7343.999422] [<c1032dee>] do_softirq+0x2b/0x43 [ 7343.999426] [<c1032f13>] irq_exit+0x38/0x75 [ 7343.999433] [<c1014e75>] smp_apic_timer_interrupt+0x66/0x74 [ 7343.999438] [<c12c770a>] apic_timer_interrupt+0x36/0x3c [ 7343.999447] [<f80878df>] ? pktgen_thread_worker+0x5c4/0x631 [pktgen] [ 7343.999454] [<c103f931>] ? autoremove_wake_function+0x0/0x2f [ 7343.999459] [<c103f931>] ? autoremove_wake_function+0x0/0x2f [ 7343.999465] [<f808731b>] ? pktgen_thread_worker+0x0/0x631 [pktgen] [ 7343.999470] [<c103f60e>] kthread+0x6a/0x6f [ 7343.999476] [<c103f5a4>] ? kthread+0x0/0x6f [ 7343.999481] [<c1002e42>] kernel_thread_helper+0x6/0x1a [ 7343.999485] ---[ end trace a22d306b065d4a68 ]--- [ 7344.012654] r8169 0000:02:00.0: eth0: link up [ 7356.012657] r8169 0000:02:00.0: eth0: link up [ 7368.013545] r8169 0000:02:00.0: eth0: link up Sergey On (03/17/10 08:37), Eric Dumazet wrote: > trimming some cc > > Le mercredi 17 mars 2010 à 09:25 +0200, Sergey Senozhatsky a écrit : > > Hello, > > > > cumulative patch: > > > > [ 155.337373] ------------[ cut here ]------------ > > [ 155.337386] WARNING: at net/sched/sch_generic.c:255 dev_watchdog+0xc1/0x125() > > [ 155.337390] Hardware name: F3JC > > [ 155.337394] NETDEV WATCHDOG: eth0 (r8169): transmit queue 0 timed out > > [ 155.337397] Modules linked in: pktgen ppp_async crc_ccitt ipv6 ppp_generic slhc snd_hwdep snd_hda_codec_si3054 snd_hda_codec_realtek sdhci_pci sdhci snd_hda_intel snd_hda_codec > > asus_laptop sparse_keymap mmc_core led_class snd_pcm snd_timer snd_page_alloc psmouse rng_core snd soundcore sg i2c_i801 evdev serio_raw r8169 mii usbhid hid uhci_hcd ehci_hcd > > sr_mod cdrom sd_mod usbcore ata_piix > > [ 155.337468] Pid: 7, comm: ksoftirqd/1 Tainted: G W 2.6.34-rc1-dbg-git6-r8169 #47 > > [ 155.337472] Call Trace: > > [ 155.337481] [<c102e293>] warn_slowpath_common+0x65/0x7c > > [ 155.337506] [<c126ac34>] ? dev_watchdog+0xc1/0x125 > > [ 155.337512] [<c102e2de>] warn_slowpath_fmt+0x24/0x27 > > [ 155.337517] [<c126ac34>] dev_watchdog+0xc1/0x125 > > [ 155.337525] [<c1036afb>] ? run_timer_softirq+0x120/0x1eb > > [ 155.337530] [<c1036b51>] run_timer_softirq+0x176/0x1eb > > [ 155.337536] [<c1036afb>] ? run_timer_softirq+0x120/0x1eb > > [ 155.337566] [<c126ab73>] ? dev_watchdog+0x0/0x125 > > [ 155.337576] [<c1032d39>] __do_softirq+0x8d/0x117 > > [ 155.337667] [<c1032dee>] do_softirq+0x2b/0x43 > > [ 155.337729] [<c1032fc1>] run_ksoftirqd+0x71/0x140 > > [ 155.337745] [<c1032f50>] ? run_ksoftirqd+0x0/0x140 > > [ 155.337810] [<c103f60e>] kthread+0x6a/0x6f > > [ 155.337832] [<c103f5a4>] ? kthread+0x0/0x6f > > [ 155.337903] [<c1002e42>] kernel_thread_helper+0x6/0x1a > > [ 155.337907] ---[ end trace a22d306b065d4a68 ]--- > > [ 155.350902] r8169 0000:02:00.0: eth0: link up > > [ 167.350892] r8169 0000:02:00.0: eth0: link up > > > > > > > > On receiver ? > > I suspect lot of work is needed on this driver to make it working, but I > dont have a machine with said adapter. > > Are you in 100 Mb full duplex mode ? > >
Le mercredi 17 mars 2010 à 12:58 +0200, Sergey Senozhatsky a écrit : > Hello, > > We did pktgen over LAN testing for several hours: > > iftop > 19.1Mb 38.1Mb 57.2Mb 76.3Mb 95.4Mb > └──────────────────────┴──────────────────────┴───────────────────────┴──────────────────────┴─────────────────────── > xxxxxxxx0007t2 => xxxxxxxxxxxxxx.xxxxx.xxxx.xxx 0b 3.60Kb 4.28Kb > <= 92.7Mb 92.7Mb 92.5Mb > > ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────── > TX: cumm: 2.50MB peak: 57.7Kb rates: 7.71Kb 5.97Kb 10.7Kb > RX: 28.0GB 92.9Mb 92.7Mb 92.8Mb 92.6Mb > TOTAL: 28.0GB 92.9Mb 92.7Mb 92.8Mb 92.6M > > Without any problems. > > > As soon as I switched back to localhost "pollution": > > [ 7343.999279] ------------[ cut here ]------------ > [ 7343.999292] WARNING: at net/sched/sch_generic.c:255 dev_watchdog+0xc1/0x125() > [ 7343.999295] Hardware name: F3JC > [ 7343.999298] NETDEV WATCHDOG: eth0 (r8169): transmit queue 0 timed out > [ 7343.999301] Modules linked in: pktgen ppp_async crc_ccitt ipv6 ppp_generic slhc snd_hwdep snd_hda_codec_si3054 snd_hda_codec_realtek sdhci_pci sdhci snd_hda_intel mmc_core > asus_laptop sparse_keymap snd_hda_codec led_class snd_pcm rng_core sg psmouse snd_timer snd_page_alloc i2c_i801 evdev snd soundcore serio_raw r8169 mii usbhid hid uhci_hcd > ehci_hcd sr_mod cdrom sd_mod usbcore ata_piix > [ 7343.999361] Pid: 4801, comm: kpktgend_0 Tainted: G W 2.6.34-rc1-dbg-git6-r8169 #47 > [ 7343.999364] Call Trace: > [ 7343.999372] [<c102e293>] warn_slowpath_common+0x65/0x7c > [ 7343.999378] [<c126ac34>] ? dev_watchdog+0xc1/0x125 > [ 7343.999383] [<c102e2de>] warn_slowpath_fmt+0x24/0x27 > [ 7343.999388] [<c126ac34>] dev_watchdog+0xc1/0x125 > [ 7343.999395] [<c1036afb>] ? run_timer_softirq+0x120/0x1eb > [ 7343.999401] [<c1036b51>] run_timer_softirq+0x176/0x1eb > [ 7343.999406] [<c1036afb>] ? run_timer_softirq+0x120/0x1eb > [ 7343.999411] [<c126ab73>] ? dev_watchdog+0x0/0x125 > [ 7343.999417] [<c1032d39>] __do_softirq+0x8d/0x117 > [ 7343.999422] [<c1032dee>] do_softirq+0x2b/0x43 > [ 7343.999426] [<c1032f13>] irq_exit+0x38/0x75 > [ 7343.999433] [<c1014e75>] smp_apic_timer_interrupt+0x66/0x74 > [ 7343.999438] [<c12c770a>] apic_timer_interrupt+0x36/0x3c > [ 7343.999447] [<f80878df>] ? pktgen_thread_worker+0x5c4/0x631 [pktgen] > [ 7343.999454] [<c103f931>] ? autoremove_wake_function+0x0/0x2f > [ 7343.999459] [<c103f931>] ? autoremove_wake_function+0x0/0x2f > [ 7343.999465] [<f808731b>] ? pktgen_thread_worker+0x0/0x631 [pktgen] > [ 7343.999470] [<c103f60e>] kthread+0x6a/0x6f > [ 7343.999476] [<c103f5a4>] ? kthread+0x0/0x6f > [ 7343.999481] [<c1002e42>] kernel_thread_helper+0x6/0x1a > [ 7343.999485] ---[ end trace a22d306b065d4a68 ]--- > [ 7344.012654] r8169 0000:02:00.0: eth0: link up > [ 7356.012657] r8169 0000:02:00.0: eth0: link up > [ 7368.013545] r8169 0000:02:00.0: eth0: link up > > What do you exactly mean by 'localhost pollution' ? -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hello, On (03/17/10 14:54), Eric Dumazet wrote: > Le mercredi 17 mars 2010 à 12:58 +0200, Sergey Senozhatsky a écrit : > > Hello, > > > > We did pktgen over LAN testing for several hours: > > > > iftop > > 19.1Mb 38.1Mb 57.2Mb 76.3Mb 95.4Mb > > └──────────────────────┴──────────────────────┴───────────────────────┴──────────────────────┴─────────────────────── > > xxxxxxxx0007t2 => xxxxxxxxxxxxxx.xxxxx.xxxx.xxx 0b 3.60Kb 4.28Kb > > <= 92.7Mb 92.7Mb 92.5Mb > > > > ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────── > > TX: cumm: 2.50MB peak: 57.7Kb rates: 7.71Kb 5.97Kb 10.7Kb > > RX: 28.0GB 92.9Mb 92.7Mb 92.8Mb 92.6Mb > > TOTAL: 28.0GB 92.9Mb 92.7Mb 92.8Mb 92.6M > > > > Without any problems. > > > > > > As soon as I switched back to localhost "pollution": > > > > [ 7343.999279] ------------[ cut here ]------------ > > [ 7343.999292] WARNING: at net/sched/sch_generic.c:255 dev_watchdog+0xc1/0x125() > > [ 7343.999295] Hardware name: F3JC > > [ 7343.999298] NETDEV WATCHDOG: eth0 (r8169): transmit queue 0 timed out > > [ 7343.999301] Modules linked in: pktgen ppp_async crc_ccitt ipv6 ppp_generic slhc snd_hwdep snd_hda_codec_si3054 snd_hda_codec_realtek sdhci_pci sdhci snd_hda_intel mmc_core > > asus_laptop sparse_keymap snd_hda_codec led_class snd_pcm rng_core sg psmouse snd_timer snd_page_alloc i2c_i801 evdev snd soundcore serio_raw r8169 mii usbhid hid uhci_hcd > > ehci_hcd sr_mod cdrom sd_mod usbcore ata_piix > > [ 7343.999361] Pid: 4801, comm: kpktgend_0 Tainted: G W 2.6.34-rc1-dbg-git6-r8169 #47 > > [ 7343.999364] Call Trace: > > [ 7343.999372] [<c102e293>] warn_slowpath_common+0x65/0x7c > > [ 7343.999378] [<c126ac34>] ? dev_watchdog+0xc1/0x125 > > [ 7343.999383] [<c102e2de>] warn_slowpath_fmt+0x24/0x27 > > [ 7343.999388] [<c126ac34>] dev_watchdog+0xc1/0x125 > > [ 7343.999395] [<c1036afb>] ? run_timer_softirq+0x120/0x1eb > > [ 7343.999401] [<c1036b51>] run_timer_softirq+0x176/0x1eb > > [ 7343.999406] [<c1036afb>] ? run_timer_softirq+0x120/0x1eb > > [ 7343.999411] [<c126ab73>] ? dev_watchdog+0x0/0x125 > > [ 7343.999417] [<c1032d39>] __do_softirq+0x8d/0x117 > > [ 7343.999422] [<c1032dee>] do_softirq+0x2b/0x43 > > [ 7343.999426] [<c1032f13>] irq_exit+0x38/0x75 > > [ 7343.999433] [<c1014e75>] smp_apic_timer_interrupt+0x66/0x74 > > [ 7343.999438] [<c12c770a>] apic_timer_interrupt+0x36/0x3c > > [ 7343.999447] [<f80878df>] ? pktgen_thread_worker+0x5c4/0x631 [pktgen] > > [ 7343.999454] [<c103f931>] ? autoremove_wake_function+0x0/0x2f > > [ 7343.999459] [<c103f931>] ? autoremove_wake_function+0x0/0x2f > > [ 7343.999465] [<f808731b>] ? pktgen_thread_worker+0x0/0x631 [pktgen] > > [ 7343.999470] [<c103f60e>] kthread+0x6a/0x6f > > [ 7343.999476] [<c103f5a4>] ? kthread+0x0/0x6f > > [ 7343.999481] [<c1002e42>] kernel_thread_helper+0x6/0x1a > > [ 7343.999485] ---[ end trace a22d306b065d4a68 ]--- > > [ 7344.012654] r8169 0000:02:00.0: eth0: link up > > [ 7356.012657] r8169 0000:02:00.0: eth0: link up > > [ 7368.013545] r8169 0000:02:00.0: eth0: link up > > > > > > What do you exactly mean by 'localhost pollution' ? > Sorry. I mean pktgen started on localhost with src set to localhost (not pktgen over LAN from another machine). Sergey
Hello, On (03/16/10 19:48), Eric Dumazet wrote: [..] > OK thanks for the report, this rtl8169_reset_task() seems pretty buggy, > or multiple invocation... > > Did you tried removing the rtl8169_schedule_work() call from > rtl8169_rx_interrupt() ? > > Maybe the reset is not necessary at all in case of fifo overflow.. > > Cumulative patch : > [..] Eric, I think you can put Tested-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> on the cumulative patch as I don't see any errors with pktgen over LAN testing. Thanks. Sergey
Le jeudi 25 mars 2010 à 13:30 +0200, Sergey Senozhatsky a écrit : > Hello, > > On (03/16/10 19:48), Eric Dumazet wrote: > [..] > > OK thanks for the report, this rtl8169_reset_task() seems pretty buggy, > > or multiple invocation... > > > > Did you tried removing the rtl8169_schedule_work() call from > > rtl8169_rx_interrupt() ? > > > > Maybe the reset is not necessary at all in case of fifo overflow.. > > > > Cumulative patch : > > > [..] > > Eric, I think you can put Tested-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> > on the cumulative patch as I don't see any errors with pktgen over LAN testing. > Hi Thanks for the report. Problem is I am not confident enough on this driver. I believe François Romieu is the one that can possibly push a patch ? Thanks -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On (03/25/10 14:19), Eric Dumazet wrote: > > Eric, I think you can put Tested-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> > > on the cumulative patch as I don't see any errors with pktgen over LAN testing. > > > > Hi > > Thanks for the report. Problem is I am not confident enough on this > driver. > I believe François Romieu is the one that can possibly push a patch ? > Thanks. Hm. François' patch introduced new 'problems'/'stack traces' with pktgen testing... François, any comments? Sergey
Eric Dumazet <eric.dumazet@gmail.com> : [...] > Thanks for the report. Problem is I am not confident enough on this > driver. Your patch is simple and it improves things. > I believe François Romieu is the one that can possibly push a patch ? Feel free to push.
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 9d3ebf3..d6ef4dd 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -1038,14 +1038,14 @@ static void rtl8169_vlan_rx_register(struct net_device *dev, } static int rtl8169_rx_vlan_skb(struct rtl8169_private *tp, struct RxDesc *desc, - struct sk_buff *skb) + struct sk_buff *skb, int polling) { u32 opts2 = le32_to_cpu(desc->opts2); struct vlan_group *vlgrp = tp->vlgrp; int ret; if (vlgrp && (opts2 & RxVlanTag)) { - vlan_hwaccel_receive_skb(skb, vlgrp, swab16(opts2 & 0xffff)); + __vlan_hwaccel_rx(skb, vlgrp, swab16(opts2 & 0xffff), polling); ret = 0; } else ret = -1; @@ -1062,7 +1062,7 @@ static inline u32 rtl8169_tx_vlan_tag(struct rtl8169_private *tp, } static int rtl8169_rx_vlan_skb(struct rtl8169_private *tp, struct RxDesc *desc, - struct sk_buff *skb) + struct sk_buff *skb, int polling) { return -1; } @@ -4429,12 +4429,20 @@ out: return done; } +/* + * Warning : rtl8169_rx_interrupt() might be called : + * 1) from NAPI (softirq) context + * (polling = 1 : we should call netif_receive_skb()) + * 2) from process context (rtl8169_reset_task()) + * (polling = 0 : we must call netif_rx() instead) + */ static int rtl8169_rx_interrupt(struct net_device *dev, struct rtl8169_private *tp, void __iomem *ioaddr, u32 budget) { unsigned int cur_rx, rx_left; unsigned int delta, count; + int polling = (budget != ~(u32)0) ? 1 : 0; cur_rx = tp->cur_rx; rx_left = NUM_RX_DESC + tp->dirty_rx - cur_rx; @@ -4459,7 +4467,6 @@ static int rtl8169_rx_interrupt(struct net_device *dev, if (status & RxCRC) dev->stats.rx_crc_errors++; if (status & RxFOVF) { - rtl8169_schedule_work(dev, rtl8169_reset_task); dev->stats.rx_fifo_errors++; } rtl8169_mark_to_asic(desc, tp->rx_buf_sz); @@ -4496,8 +4503,12 @@ static int rtl8169_rx_interrupt(struct net_device *dev, skb_put(skb, pkt_size); skb->protocol = eth_type_trans(skb, dev); - if (rtl8169_rx_vlan_skb(tp, desc, skb) < 0) - netif_receive_skb(skb); + if (rtl8169_rx_vlan_skb(tp, desc, skb, polling) < 0) { + if (likely(polling)) + netif_receive_skb(skb); + else + netif_rx(skb); + } dev->stats.rx_bytes += pkt_size; dev->stats.rx_packets++;