Skip to contentSkip to conversation

X710 disable flow hashing?

Intel-wired-lan Ray Bellis 2 participants 6 messages Jan 31, 2018 – Feb 21, 2018

lore
Share & tools
lore

Ray Bellis

author
#0 lore raw

Hi,

Is there a way to make an X710 card just deliver UDP packets to its queues (12 in my case) round-robin without using flow hashing?

I'm using Fedora Core 23 with i40e driver version 1.3.9-k.

I know that's old, but I need to preserve this environment for long-term benchmark comparisons.

thanks,

Ray

#1 lore raw
Quoted 4 lines · Ray Bellis

Hi,

Is there a way to make an X710 card just deliver UDP packets to its queues (12 in my case) round-robin without using flow hashing?

Generally what I have found works for me is to use Flow Director rules based on the source/destination IP and source/destination port numbers and then have my traffic generator alter either the source IP or source port for the traffic in order to get the round robin effect without necessarily having to modify the driver. For example pktgen supports something like this by specifying a port range when generating a flow.

Quoted 1 line

I'm using Fedora Core 23 with i40e driver version 1.3.9-k.

This is a pretty old version of the driver. Does it need to be that specific driver or could you work with a later version such as the one provided by e1000.sf.net. If driver only modifications don't concern you then probably the e1000.sf.net driver might be the best way to go since all you need to do is get it to a functional version that meets your needs and then you could probably just lock in on that version for all future tests.

Quoted 2 lines

I know that's old, but I need to preserve this environment for long-term benchmark comparisons.

I assume you must be benchmarking something up at the user-space layer. Hopefully my suggestions work for you, if not let me know.

Thanks.

- Alex

author
#2 lore raw
Quoted 7 lines · Alexander Duyck

Generally what I have found works for me is to use Flow Director rules based on the source/destination IP and source/destination port numbers and then have my traffic generator alter either the source IP or source port for the traffic in order to get the round robin effect without necessarily having to modify the driver. For example pktgen supports something like this by specifying a port range when generating a flow.

The traffic generator I'm using can only produce a very limited range of source port numbers (24), which is insufficient to produce an even distribution in the queues with flow hashing.

In fact, with that small a range I consistently get _no traffic at all_
to one of my 12 queues. See for example this one second snapshot of
the per-queue RX rates:

   0      25856
   1      50669
   2      37624
   3          0
   4      35778
   5      13002
   6      24228
   7      35615
   8      24812
   9      22804
  10      26047
  11      50831

I suppose that with only 24 source ports I could perhaps create 24 individual flow director rules, though?

Quoted 7 lines

This is a pretty old version of the driver. Does it need to be that specific driver or could you work with a later version such as the one provided by e1000.sf.net. If driver only modifications don't concern you then probably the e1000.sf.net driver might be the best way to go since all you need to do is get it to a functional version that meets your needs and then you could probably just lock in on that version for all future tests.

For now, it needs to be that version. See threads from November '16 where I reported a significant 50% regression in PPS rates when upgrading beyond 1.3.9.

Quoted 2 lines

I assume you must be benchmarking something up at the user-space layer. Hopefully my suggestions work for you, if not let me know.

Yes, I'm benchmarking DNS server software.

(https://www.isc.org/blogs/isc-performance-lab/)

kind regards,

Ray

author
#3 lore raw
Quoted 8 lines · Ray Bellis

The traffic generator I'm using can only produce a very limited range of source port numbers (24), which is insufficient to produce an even distribution in the queues with flow hashing.

...

I suppose that with only 24 source ports I could perhaps create 24 individual flow director rules, though?

I'm writing a new traffic generator using AF_PACKET which allows for a much wider range of source ports.

I was planning to use Linux's PACKET_FANOUT feature in PACKET_FANOUT_CPU mode to have the returned data only be delivered to the CPU core that's responsible for a particular port range.

However if I try to specify the mask bits on the dst-port I get this:

--8<--8<--

# ethtool -U enp5s0f1 flow-type udp4 dst-port 16384 m 0x0fff action 0
rmgr: Cannot insert RX class rule: Operation not supported
--8<--8<--

Is dst-port bit masking not supported in this driver or by this card? I'm using the latest stable version (i40e v2.4.3)

thanks,

Ray

#4 lore raw
Quoted 25 lines · Ray Bellis
Quoted 8 lines · Ray Bellis

The traffic generator I'm using can only produce a very limited range of source port numbers (24), which is insufficient to produce an even distribution in the queues with flow hashing.

...

I suppose that with only 24 source ports I could perhaps create 24 individual flow director rules, though?

I'm writing a new traffic generator using AF_PACKET which allows for a much wider range of source ports.

I was planning to use Linux's PACKET_FANOUT feature in PACKET_FANOUT_CPU mode to have the returned data only be delivered to the CPU core that's responsible for a particular port range.

However if I try to specify the mask bits on the dst-port I get this:

--8<--8<--

# ethtool -U enp5s0f1 flow-type udp4 dst-port 16384 m 0x0fff action 0
rmgr: Cannot insert RX class rule: Operation not supported
--8<--8<--
Quoted 6 lines

Is dst-port bit masking not supported in this driver or by this card? I'm using the latest stable version (i40e v2.4.3)

thanks,

Ray

I don't think the X710 supports bitmasking of the port. You should be able to mask in/out the entire source or destination port but I don't think it supports just masking out part of them.

- Alex

author
#5 lore raw
Quoted 3 lines · Alexander Duyck

I don't think the X710 supports bitmasking of the port. You should be able to mask in/out the entire source or destination port but I don't think it supports just masking out part of them.

That's what I've found - using Flow Director on individual ports are fine, but using a mask generates "Operation not supported".

If that's a limitation of the card that's going to be a PITA...

Ray