Page MenuHomeFreeBSD

igc: make the hardware RSS hash agree with the stack's configuration
ClosedPublic

Authored by rcm on Sun, Oct 4, 12:16 AM.
Tags
None
Referenced Files
F175280948: D60284.id188598.diff
Fri, Oct 9, 4:15 PM
F175273911: D60284.id188575.diff
Fri, Oct 9, 3:36 PM
F175268022: D60284.id188576.diff
Fri, Oct 9, 2:32 PM
F175265934: D60284.id188567.diff
Fri, Oct 9, 2:04 PM
F175215882: D60284.diff
Fri, Oct 9, 4:22 AM
F175215430: D60284.diff
Fri, Oct 9, 4:18 AM
F175190063: D60284.id188576.diff
Thu, Oct 8, 11:43 PM
Unknown Object (File)
Thu, Oct 8, 8:00 PM
Subscribers

Details

Summary

rss_gethashconfig() is available without options RSS since d9c55b2e8cd6.
Use it to program MRQC, as ixl(4), ice(4) and iavf(4) do, instead of a
fixed field set that included UDP 4-tuple, which the configuration
excludes unless net.inet.rss.udp_4tuple is set. UDP is now hashed on
addresses only by default.

Also report the UDP hash types on receive; they were passed up as
M_HASHTYPE_NONE.

Fixes: 517904de5cca ("igc(4): Introduce new driver for the Intel I225 Ethernet controller.")
Sponsored by: Rubicon Communications, LLC ("Netgate")

Test Plan

Tested on an I225-LM with four queues forwarding a UDP flood: UDP
packets now arrive with M_HASHTYPE_RSS_IPV4 (RSS_UDP_IPV4 with
udp_4tuple), rss_mbuf_software_hash_v4() accepts the hash, and netisr
handles each packet on the CPU of the queue it arrived on; before,
nearly every UDP packet was rehashed and queued to another CPU.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

rcm requested review of this revision.Sun, Oct 4, 12:16 AM

I thought the idea of d9c55b2e8cd6b79f6926278e10a79f1bcca27a4b was to get rid of most of the ifdef. rss_gethashconfig is a public function, why not just apply what you have in the ifdef RSS section always?

rcm edited the summary of this revision. (Show Details)

I thought the idea of d9c55b2e8cd6b79f6926278e10a79f1bcca27a4b was to get rid of most of the ifdef. rss_gethashconfig is a public function, why not just apply what you have in the ifdef RSS section always?

Ah yes thanks for pointing that out, I have updated the diff accordingly

add full-context diff. no other changes.

Looks good to me. There are probably similar elsewhere in the tree.

This revision is now accepted and ready to land.Sun, Oct 4, 2:26 AM