> Stephen Hemminger wrote:
> > Same thing with KVM (kernel 2.6.28) and e1000, the driver thinks it is
> up
> > (per dmesg) but the carrier is not asserted.
> 
> I believe what you are seeing on KVM and vmware are unrelated.  In the
> case of vmware it looks like it keeps enabling the the carrier after the
> TX hangs, whereas in the case of KVM the carrier is off as per ethtool
> so you don't have it sending any traffic.
> 
> In the KVM case you may want to check to verify the interface is
> actually up in ifconfig.  The only way I could reproduce the ethtool and
> dmesg results you had seen in KVM was to bring up the interface and then
> bring it down via ifconfig.  My reasoning on this is the link up message
> is always associated with netif_carrier_on, and only 3 spots call
> netif_carrier_off, and of those only e1000_down could do so without
> dumping some sort of message into the dmesg log and that would only be
> called if the interface was brought back down.  I've seen something like
> this before as a result of Network Manager running in the background.
> 
> As for the vmware issue I'm wondering if the emulation layer implemented
> the disconnect feature in the emulated e1000 layer correctly.  What is
> the ethtool output after you have disconnected the emulated interface
> from the host?  Also could you send us an ethtool -d register dump from
> the interface after the disconnect?

Below is the ethtool output after a disconnect:

r...@vdut:~# ethtool eth1
Settings for eth1:
        Supported ports: [ TP ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Advertised auto-negotiation: Yes
        Speed: 1000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: d
        Wake-on: d
        Current message level: 0x00000007 (7)
        Link detected: yes

r...@vdut:~# ethtool -i eth1
driver: e1000
version: 7.3.21-k3-NAPI
firmware-version: N/A
bus-info: 0000:00:11.0


r...@vdut:~# ethtool -d eth1
MAC Registers
-------------
0x00000: CTRL (Device control register)  0x00C00249
      Endian mode (buffers):             little
      Link reset:                        reset
      Set link up:                       1
      Invert Loss-Of-Signal:             no
      Receive flow control:              disabled
      Transmit flow control:             disabled
      VLAN mode:                         disabled
      Auto speed detect:                 disabled
      Speed select:                      1000Mb/s
      Force speed:                       no
      Force duplex:                      no
0x00008: STATUS (Device status register) 0x0000CB83
      Duplex:                            full
      Link up:                           link config
      TBI mode:                          disabled
      Link speed:                        1000Mb/s
      Bus type:                          PCI
      Bus speed:                         66MHz
      Bus width:                         32-bit
0x00100: RCTL (Receive control register) 0x00048002
      Receiver:                          enabled
      Store bad packets:                 disabled
      Unicast promiscuous:               disabled
      Multicast promiscuous:             disabled
      Long packet:                       disabled
      Descriptor minimum threshold size: 1/2
      Broadcast accept mode:             accept
      VLAN filter:                       enabled
      Canonical form indicator:          disabled
      Discard pause frames:              filtered
      Pass MAC control frames:           don't pass
      Receive buffer size:               2048
0x02808: RDLEN (Receive desc length)     0x00001000
0x02810: RDH   (Receive desc head)       0x0000006B
0x02818: RDT   (Receive desc tail)       0x00000069
0x02820: RDTR  (Receive delay timer)     0x00000000
0x00400: TCTL (Transmit ctrl register)   0x0103F0FA
      Transmitter:                       enabled
      Pad short packets:                 enabled
      Software XOFF Transmission:        disabled
      Re-transmit on late collision:     enabled
0x03808: TDLEN (Transmit desc length)    0x00001000
0x03810: TDH   (Transmit desc head)      0x00000000
0x03818: TDT   (Transmit desc tail)      0x00000000
0x03820: TIDV  (Transmit delay timer)    0x00000008
PHY type:                                M88


After the interface is disconnected it gets a tx hang:

Mar  9 15:01:18 vyatta kernel: [  493.002709] e1000: eth1:
e1000_clean_tx_irq: Detected Tx Unit Hang
Mar  9 15:01:18 vyatta kernel: [  493.002716]   Tx Queue             <0>
Mar  9 15:01:18 vyatta kernel: [  493.002718]   TDH                  <0>
Mar  9 15:01:18 vyatta kernel: [  493.002719]   TDT                  <2>
Mar  9 15:01:18 vyatta kernel: [  493.002720]   next_to_use          <2>
Mar  9 15:01:18 vyatta kernel: [  493.002721]   next_to_clean        <0>
Mar  9 15:01:18 vyatta kernel: [  493.002722] buffer_info[next_to_clean]
Mar  9 15:01:18 vyatta kernel: [  493.002724]   time_stamp
<bb75>
Mar  9 15:01:18 vyatta kernel: [  493.002725]   next_to_watch        <0>
Mar  9 15:01:18 vyatta kernel: [  493.002726]   jiffies
<bc7a>
Mar  9 15:01:18 vyatta kernel: [  493.002727]   next_to_watch.status <0>
Mar  9 15:01:20 vyatta kernel: [  495.002000] e1000: eth1:
e1000_clean_tx_irq: Detected Tx Unit Hang
Mar  9 15:01:20 vyatta kernel: [  495.002004]   Tx Queue             <0>
Mar  9 15:01:20 vyatta kernel: [  495.002005]   TDH                  <0>
Mar  9 15:01:20 vyatta kernel: [  495.002006]   TDT                  <2>
Mar  9 15:01:20 vyatta kernel: [  495.002007]   next_to_use          <2>
Mar  9 15:01:20 vyatta kernel: [  495.002008]   next_to_clean        <0>
Mar  9 15:01:20 vyatta kernel: [  495.002009] buffer_info[next_to_clean]
Mar  9 15:01:20 vyatta kernel: [  495.002011]   time_stamp
<bb75>
Mar  9 15:01:20 vyatta kernel: [  495.002012]   next_to_watch        <0>
Mar  9 15:01:20 vyatta kernel: [  495.002013]   jiffies
<be6e>
Mar  9 15:01:20 vyatta kernel: [  495.002014]   next_to_watch.status <0>
Mar  9 15:01:22 vyatta kernel: [  497.002315] e1000: eth1:
e1000_clean_tx_irq: Detected Tx Unit Hang
Mar  9 15:01:22 vyatta kernel: [  497.002318]   Tx Queue             <0>
Mar  9 15:01:22 vyatta kernel: [  497.002320]   TDH                  <0>
Mar  9 15:01:22 vyatta kernel: [  497.002321]   TDT                  <2>
Mar  9 15:01:22 vyatta kernel: [  497.002322]   next_to_use          <2>
Mar  9 15:01:22 vyatta kernel: [  497.002323]   next_to_clean        <0>
Mar  9 15:01:22 vyatta kernel: [  497.002325] buffer_info[next_to_clean]
Mar  9 15:01:22 vyatta kernel: [  497.002326]   time_stamp
<bb75>
Mar  9 15:01:22 vyatta kernel: [  497.002327]   next_to_watch        <0>
Mar  9 15:01:22 vyatta kernel: [  497.002328]   jiffies
<c062>
Mar  9 15:01:22 vyatta kernel: [  497.002329]   next_to_watch.status <0>
Mar  9 15:01:23 vyatta kernel: [  498.001260] ------------[ cut here
]------------
Mar  9 15:01:23 vyatta kernel: [  498.001283] WARNING: at
net/sched/sch_generic.c:226 dev_watchdog+0xca/0x11b()
Mar  9 15:01:23 vyatta kernel: [  498.001329] Modules linked in:
ipt_REJECT ipt_LOG xt_multiport xt_tcpudp xt_comment ip6table_raw
ip6table_mangle ip6table_filter ip6_tables iptable_mangle iptable_nat
iptable_filter xt_NOTRACK iptable_raw ip_tables x_tables nf_nat_pptp
nf_conntrack_pptp nf_conntrack_proto_gre nf_nat_h323 nf_conntrack_h323
nf_nat_sip nf_conntrack_sip nf_nat_proto_gre nf_nat_tftp nf_nat_ftp nf_nat
nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack_tftp nf_conntrack_ftp
nf_conntrack ipv6 md_mod psmouse serio_raw vmxnet pcspkr parport_pc
parport i2c_piix4 i2c_core container ac button shpchp intel_agp
pci_hotplug agpgart evdev vfat fat ext2 mbcache battery squashfs loop
unionfs nls_utf8 isofs nls_base zlib_inflate ide_generic ide_gd_mod
ide_cd_mod cdrom ata_generic ata_piix libata floppy mptspi mptscsih
mptbase scsi_transport_spi scsi_mod e1000 piix ide_pci_generic ide_core
thermal processor fan thermal_sys
Mar  9 15:01:23 vyatta kernel: [  498.001638] Pid: 0, comm: swapper
Tainted: G        W  2.6.28-1-586-vyatta #1
Mar  9 15:01:23 vyatta kernel: [  498.001642] Call Trace:
Mar  9 15:01:23 vyatta kernel: [  498.001665]  [<c0123393>]
warn_slowpath+0x61/0x78
Mar  9 15:01:23 vyatta kernel: [  498.001673]  [<c0104b00>]
invalidate_interrupt+0x20/0x30
Mar  9 15:01:23 vyatta kernel: [  498.001679]  [<c0108b01>]
nommu_map_single+0x2b/0x42
Mar  9 15:01:23 vyatta kernel: [  498.002158]  [<f81385d8>]
pci_map_single+0x2b/0x30 [e1000]
Mar  9 15:01:23 vyatta kernel: [  498.002176]  [<f813a7bf>]
e1000_alloc_rx_buffers+0x155/0x223 [e1000]
Mar  9 15:01:23 vyatta kernel: [  498.002193]  [<f813c493>]
e1000_clean_rx_irq+0x3ec/0x41d [e1000]
Mar  9 15:01:23 vyatta kernel: [  498.002204]  [<c01e1f1e>]
strlcpy+0x14/0x3e
Mar  9 15:01:23 vyatta kernel: [  498.002209]  [<c026ca25>]
dev_watchdog+0xca/0x11b
Mar  9 15:01:23 vyatta kernel: [  498.002218]  [<c0133951>]
run_posix_cpu_timers+0x86/0x5ae
Mar  9 15:01:23 vyatta kernel: [  498.002223]  [<c0108bc2>]
get_cycles+0xf/0x1d
Mar  9 15:01:23 vyatta kernel: [  498.002227]  [<c0108bd6>]
read_tsc+0x6/0x22
Mar  9 15:01:23 vyatta kernel: [  498.002231]  [<c01370f5>]
clocksource_read+0x5/0x6
Mar  9 15:01:23 vyatta kernel: [  498.002236]  [<c0110815>]
lapic_next_event+0x10/0x13
Mar  9 15:01:23 vyatta kernel: [  498.002241]  [<c0139bed>]
clockevents_program_event+0xd1/0xe0
Mar  9 15:01:23 vyatta kernel: [  498.002246]  [<c026c95b>]
dev_watchdog+0x0/0x11b
Mar  9 15:01:23 vyatta kernel: [  498.002250]  [<c026c95b>]
dev_watchdog+0x0/0x11b
Mar  9 15:01:23 vyatta kernel: [  498.002255]  [<c012a282>]
run_timer_softirq+0x10e/0x167
Mar  9 15:01:23 vyatta kernel: [  498.002259]  [<c026c95b>]
dev_watchdog+0x0/0x11b
Mar  9 15:01:23 vyatta kernel: [  498.002264]  [<c01270be>]
__do_softirq+0x7e/0xfe
Mar  9 15:01:23 vyatta kernel: [  498.002269]  [<c0127170>]
do_softirq+0x32/0x36
Mar  9 15:01:23 vyatta kernel: [  498.002273]  [<c01273c2>]
irq_exit+0x38/0x76
Mar  9 15:01:23 vyatta kernel: [  498.002278]  [<c0110f9e>]
smp_apic_timer_interrupt+0x63/0x6d
Mar  9 15:01:23 vyatta kernel: [  498.002282]  [<c0104bc8>]
apic_timer_interrupt+0x28/0x30
Mar  9 15:01:23 vyatta kernel: [  498.002287]  [<c01097c9>]
default_idle+0x2d/0x40
Mar  9 15:01:23 vyatta kernel: [  498.002290]  [<c01028b9>]
cpu_idle+0x68/0x89
Mar  9 15:01:23 vyatta kernel: [  498.002328] ---[ end trace
4eaa2a86a8e2da22 ]---
Mar  9 15:01:23 vyatta vyatta-zebra[2000]: interface eth1 index 2 changed
<UP,BROADCAST,MULTICAST>.


stig

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel

Reply via email to