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)
Sun, Jan 8, 8:31 PM
Unknown Object (File)
Sun, Jan 8, 2:13 AM
Unknown Object (File)
Dec 21 2022, 10:12 AM
Unknown Object (File)
Dec 15 2022, 7:48 PM
Unknown Object (File)
Dec 14 2022, 9:28 PM

Details

Reviewers
hselasky
jhb
bcr
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);
}

?