#18922: eth1 (ag71xx): transmit queue 0 timed out
------------------------+--------------------------------
  Reporter:  fpv2000@…  |      Owner:  developers
      Type:  defect     |     Status:  new
  Priority:  normal     |  Milestone:  Chaos Calmer 15.05
 Component:  kernel     |    Version:  Trunk
Resolution:             |   Keywords:
------------------------+--------------------------------

Comment (by psyke83):

 OK, I found a 100% reproducible test case on my device. It is a slight
 change to uysiquebien's L https://dev.openwrt.org/ticket/10269#comment:25:

 {{{
 #!/usr/bin/env python

 import socket

 TCP_IP = '4.testdebit.info'
 TCP_PORT = 5200

 print("Connecting")
 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
 s.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
 s.connect((TCP_IP, TCP_PORT))
 print("Connected")

 while True:
     s.send(b"012")
 }}}

 Two conditions are necessary to trigger the timeout:
 1. The only three characters should be sent (e.g. "012") - any more and it
 doesn't work.
 2. The script must be run from a wired client. I can't trigger the bug
 when executed over wifi.

 I used a public iperf3 server address/port for the script, which is
 listed.

 Using the above script & some debug output I discovered that the tx
 timeout was being triggered when the tx queue became full. It seems that
 the netif_stop_queue is executed under this circumstance, but it never
 resumed, which evidently causes the interface to stop responding.

 This seems to be the correct fix:
 {{{
 diff --git
 a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
 b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
 index dc77699..86a5e06 100644
 ---
 a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
 +++
 b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
 @@ -522,6 +522,8 @@ static void ag71xx_fast_reset(struct ag71xx *ag)
         ag71xx_wr(ag, AG71XX_REG_MII_CFG, mii_reg);

         ag71xx_hw_set_macaddr(ag, dev->dev_addr);
 +
 +       netif_wake_queue(dev);
  }

  static void ag71xx_hw_start(struct ag71xx *ag)
 }}}

--
Ticket URL: <https://dev.openwrt.org/ticket/18922#comment:5>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets

Reply via email to