Page MenuHomeFreeBSD

Set inp_flowid's for TOE connections.
ClosedPublic

Authored by jhb on Apr 8 2020, 11:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 5:33 AM
Unknown Object (File)
Nov 18 2023, 11:16 AM
Unknown Object (File)
Nov 11 2023, 9:06 AM
Unknown Object (File)
Nov 9 2023, 4:41 PM
Unknown Object (File)
Nov 5 2023, 4:07 AM
Unknown Object (File)
Oct 30 2023, 1:38 PM
Unknown Object (File)
Oct 19 2023, 10:45 AM
Unknown Object (File)
Oct 10 2023, 10:09 AM
Subscribers

Details

Summary

KTLS uses the flowid to distribute software encryption tasks among
its pool of worker threads. Without this change, all KTLS requests
for TOE sockets ended up on the first worker thread.

Note that the flowid used for TOE sockets is not a hash of the
4-tuple, but is instead the id of the TOE pcb (tid).

Test Plan
  • fixes problem with TOE + sw KTLS using a single thread

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

If the RSS hash is available in the CPL headers then maybe we could use that directly instead of the tid?

In D24348#535546, @np wrote:

If the RSS hash is available in the CPL headers then maybe we could use that directly instead of the tid?

So I checked and CPL_ACT_ESTABLISH doesn't populate the hash in the RSS header. CPL_PASS_ACCEPT_REQ does though, and I could perhaps set the flowid from do_pass_accept_req after it the synqe has been expanded.

Oops, I had conflated do_pass_accept_req and do_pass_establish. To use the RSS we'd have to save it in the synqe in do_pass_accept_req. I'm not sure it's worth that much work.

  • Use RSS hash for passive TOE connections.
sys/dev/cxgbe/tom/t4_listen.c
1308 ↗(On Diff #70383)

If we think we can rely o this always being true I could simplify this and the above diff in t4_offload_socket.

np accepted this revision.EditedApr 15 2020, 12:26 AM

The RSS hash will always be present in the passive open CPL so it's safe to remove the conditional.

This revision is now accepted and ready to land.Apr 15 2020, 12:26 AM
This revision was automatically updated to reflect the committed changes.