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)
Oct 16 2024, 5:45 AM
Unknown Object (File)
Oct 1 2024, 1:33 PM
Unknown Object (File)
Sep 28 2024, 7:05 AM
Unknown Object (File)
Sep 28 2024, 2:10 AM
Unknown Object (File)
Sep 27 2024, 7:46 AM
Unknown Object (File)
Sep 26 2024, 7:56 AM
Unknown Object (File)
Sep 25 2024, 11:58 PM
Unknown Object (File)
Sep 25 2024, 3:00 PM
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.