[netperf-talk] Generating network traffic on a dual port NIC with a single computer using netperf???

Rick Jones rick.jones2 at hp.com
Thu Dec 9 17:07:06 PST 2010


Werner Hoehenrieder wrote:
> Netperf group,
>  
> I’ll start to say I’m definitely a netperf novice – but I’ve exhausted 
> all resources I can find so far.
>  
> I’m trying to use netperf to send out a traffic stream from one port of 
> a NIC card (10Gb/sec NIC)  to the other port of the card (dual port 
> 10Gb/sec NIC).
>  
> I want to do this on a single computer –  not separate netserver and 
> netperf systems.

You can't.  And the reason has nothing to do with netperf.  Virutally any TCP/IP 
stack out there "knows" which IP addresses are local to it, and will internally 
loopback traffic too/from those IPs without ever getting anywhere near a NIC, 
perhaps not even getting anywhere near the driver.

There may be some patches to upstream Linux kernels to work around that, but 
unless you are running an upstream Linux kernel, that may not do you much good.

> I thought I had it with the following:
>  
> #> netserver –L 192.168.0.11,4
>  
> #> netperf –H 192.168.0.11,4  –L 192.168.0.12
>  
> My dual port 10G NIC has address’s 192.168.0.11 and 12 assigned to it.
>  
> These commands seemed to work – but when I disconnected the optical 
> cable between the ports – it just kept running, so traffic wasn’t going 
> that way..
>  
> I’m guessing that the traffic might be going through some internal 
> loopback setting? – but don’t know how to turn this feature off.

Depending on the stack, you can't.

> Any thoughts greatly appreciated!! 
>  
> NOTE:  The main requirements I have are to do this test with just the 
> single dual port 10G nic card and using just 1 computer.

Modulo those recent upstream patches (which may require using UDP BTW but I'm 
not sure - check for "loopback" in the netdev archives and messages from 
google.com) you have to have two systems to network tango.  And, as I'm thinking 
about the patches, I think they enable an internal NIC loopback, and not 
something that would go out the one port and back in the other.

> Background info:
> System:  Dell server with PCIe interface slots

I don't know the width/generation of the Brocade 1020 CNA, but in broad terms, 
if you want to see "link rate" through those two ports, particularly if 
bidirectional, you will need things to be x8 Gen2.

happy benchmarking,

rick jones

> System running OpenSuse 11.3
> Netperf2.4.5
>  
> NIC is a Brocade 1020 CNA card with static IP address’s 192.168.0.11 and 
> 192.168.0.12 assigned to the two ports.  There is an optical cable 
> connecting the two ports (for test purposes).
>  
> Thanks in advance.
> Werner
> Werner Hoehenrieder
> Staff HW Engineer, Platform Development
> 120 Holger Way
> 
> Brocade Building 2
> San Jose, CA 95134
> Phone: (408) 333-6477


More information about the netperf-talk mailing list