Page MenuHomeFreeBSD

ktls: Document requirement of use_flowid for lagg and NIC kTLS
AcceptedPublic

Authored by gallatin on Sep 6 2022, 6:01 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 17, 4:30 PM
Unknown Object (File)
Dec 20 2023, 6:51 AM
Unknown Object (File)
Nov 9 2023, 10:26 PM
Unknown Object (File)
Nov 4 2023, 8:41 PM
Unknown Object (File)
Oct 24 2023, 8:48 PM
Unknown Object (File)
Oct 8 2023, 9:18 PM
Unknown Object (File)
Oct 3 2023, 8:38 PM
Unknown Object (File)
Sep 29 2023, 8:39 PM

Details

Summary

One non-obvious barrier to getting NIC kTLS to work on lagged interfaces is ensuring that lagg is running in use_flowid mode. If it is not, it will not allocate send tags, and software kTLS will be used.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

sys/net/if_lagg.c
1906

I wonder if the NET_EPOCH_EXIT(et) should be last! You are reading some fields, and they may be freed!?

Move NET_EPOCH_EXIT() to after the prints.

gallatin added inline comments.
sys/net/if_lagg.c
1906

I thought it was there to protect against the lagg port interfaces going away, but its easy enough to move it after the warning out of an abundance of caution.

This revision is now accepted and ready to land.Sep 30 2022, 9:13 PM
sys/net/if_lagg.c
1891

Maybe make warned another sc flag that gets removed/set on LAGG_OPT_USE_FLOWID flag change?
In that case we'd avoid having 'static' function variable and can write something like

if (__predict_false(sc->sc_opts & LAGG_NEED_WARN)) {
  NET_EPOCH_EXIT();
  warn_lagg_user(sc);
  return (EOPNOSUPP);
}

?