Bug 31940

Summary: [nge] ip queue length too short for >500kpps
Product: Base System Reporter: fabien.thomas <fabien.thomas>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me CC: eugen
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description fabien.thomas 2001-11-12 22:40:00 UTC
when using SMC gigabit adapter (DP83820/DP83821) the link is slow 200Mb/s using netperf between 2 SMC adapter under FreeBSD and nothing more with jumbo frame and sometimes the card seems to renegociate the link (i've tried using different cable with no sucess)
Comment 1 dwmalone 2001-11-13 15:28:29 UTC
On Mon, Nov 12, 2001 at 02:39:27PM -0800, Fabien THOMAS wrote:

> when using SMC gigabit adapter (DP83820/DP83821) the link is slow 200Mb/s using netperf between 2 SMC adapter under FreeBSD and nothing more with jumbo frame and sometimes the card seems to renegociate the link (i've tried using different cable with no sucess)

Have you experimented with the options in the nge man page? There
are options to set a card in "master" mode, which sound like they
would help if you are using these cards without a switch.  You
might also want to try the half-duplex and full-duplex options.

	David.
Comment 2 fabien.thomas 2001-11-14 12:45:06 UTC
yes i've tried in manual mode with link0 set on one side and in autoneg 
mode (the bandwidth problem seem to have no relationship with the media 
ramdon negociation) i've tried a netperf between two SMC gigabyte host 
(athlon 900 PCI32 and bi-athlon 1.2gb PCI64 (thunder K7)) and my max 
bandwidth is 300Mb/s

thanks for your reply

Fabien
Comment 3 lukem.freebsd 2004-11-01 23:51:59 UTC
I am using 5.2.1, rather than 4.4, but I have found a bug which could be 
causing this. I have mailed freebsd-net but they don't seem interested. 
The problem is that the receive DMA ring is longer than the IP queue, such 
that if more packets are received in the interrupt than fit in the IP 
queue, packets are dropped.

Since the default IP queue length is 50 packets, and the interrupt holdoff 
time is 100uS, you can only really expect to get 500kpps, which is not 
much for a gigabit ethernet card.

You can fix by increasing the ip queue length constant. (make it >= 128)

-- 
Luke
Comment 4 K. Macy freebsd_committer freebsd_triage 2007-11-16 17:33:53 UTC
State Changed
From-To: open->feedback


RELENG_7 defaults to net.isr.direct=1 - however, freebsd 
can do 10GigE even with net.isr.direct=0
Comment 5 K. Macy freebsd_committer freebsd_triage 2007-11-16 17:36:57 UTC
State Changed
From-To: feedback->open


This is still an issue. Should change the default to 256 as on NetBSD. 


Comment 6 K. Macy freebsd_committer freebsd_triage 2007-11-16 17:36:57 UTC
Responsible Changed
From-To: freebsd-bugs->kmacy


This is still an issue. Should change the default to 256 as on NetBSD.
Comment 7 Gavin Atkinson freebsd_committer freebsd_triage 2011-05-29 23:01:58 UTC
Responsible Changed
From-To: kmacy->freebsd-net

kmacy has asked for his PRs to be reassigned
Comment 8 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:44 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 9 Eugene Grosbein freebsd_committer freebsd_triage 2018-02-02 21:10:24 UTC
Looks like nge(4)-specific issue. Now it seems to use 256 for both of transmit and receive ring length and interface sending queue.

Is this PR still relevant?
Comment 10 Eugene Grosbein freebsd_committer freebsd_triage 2018-04-14 15:15:51 UTC
Feedback timeout. Also, requested change has already been made and problem's fixed in modern FreeBSD versions.