r8169: problem with TSO (TX_BUFFS_AVAIL negative value)
From: Julien Ducourthial <hidden>
Date: 2012-05-07 22:35:53
Hi, Whenever I activate TSO on my realtek based NIC, it gets stuck after a while under heavy traffic (both under an zotac amd board with a 8111e on board and an intel D510MO atom with 8111d on board). After doing some investigation (with systemtap), the problem seems to be that the net_device is not stopped when all TX descriptors are in use. This behavior comes from the macro TX_BUFFS_AVAIL(tp). It is an unsigned expression but returns -1 when the transmit queue is full (the macro handles the room for the skb and the frags). This condition only happens when you have skb with lots of frags (otherwise the nic is stopped before all TX desc are in use), hence only in the tso case for me. I made a small patch to avoid negative values, and the driver works great with TSO. With my atom based board I can now reach maximum throughput as an NFS server. Best regards, Julien Ducourthial (1): r8169: fix problem with TSO (TX_BUFFS_AVAIL negative value) drivers/net/ethernet/realtek/r8169.c | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) -- 1.7.7.6