netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* r8169: problem with TSO (TX_BUFFS_AVAIL negative value)
@ 2012-05-07 22:35 Julien Ducourthial
  0 siblings, 0 replies; only message in thread
From: Julien Ducourthial @ 2012-05-07 22:35 UTC (permalink / raw)
  To: nic_swsd, romieu; +Cc: netdev, kernel

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-05-07 22:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-07 22:35 r8169: problem with TSO (TX_BUFFS_AVAIL negative value) Julien Ducourthial

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).