Page MenuHomeFreeBSD

Move CLIP table handling out of TOM and into the base driver.
ClosedPublic

Authored by jhb on Nov 16 2018, 7:40 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 21 2024, 2:29 AM
Unknown Object (File)
Dec 21 2023, 3:34 PM
Unknown Object (File)
Dec 20 2023, 2:02 AM
Unknown Object (File)
Dec 15 2023, 12:05 AM
Unknown Object (File)
Nov 8 2023, 2:36 PM
Unknown Object (File)
Oct 13 2023, 7:35 AM
Unknown Object (File)
Oct 12 2023, 3:32 PM
Unknown Object (File)
Sep 26 2023, 12:22 AM
Subscribers

Details

Summary
  • Store the clip table in 'struct adapter' instead of in the TOM softc.
  • Init the clip table during attach and teardown during detach.
  • While here, add a dev.<nexus>.<unit>.misc.clip sysctl to dump the CLIP table.

This does mean that we update the clip table even if TOE is not enabled,
but non-TOE things need the CLIP table anyway.

Test Plan
  • Tested using TOE+TLS over IPv6 and IPv4.
  • Also used in the inline TLS branch.

Diff Detail

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

Event Timeline

jhb marked an inline comment as done.Nov 16 2018, 7:45 PM

Sample output:

# sysctl -n dev.t6nex.0.misc.clip
IP address                               Users
fe80::1                                      0
fe80::207:43ff:fe2c:2cd0                     0
10::161:31                                   0
fe80::207:43ff:fe04:b650                     0
10:1::161:31                                 8
sys/dev/cxgbe/t4_clip.c
371 ↗(On Diff #50498)

To simplify the patch this still uses a single task which then has to use t4_iterate, etc. We could instead have a per-adapter task that only runs when new interfaces are added on a Chelsio adapter by storing the 'struct task' in the adapter and the and event handler tag in the ifp->if_softc and then passing the 'ifp' instead of NULL when calling EVENTHANDLER_REGISTER. The handler could then do 'if arg == ifp' and then use ifp_softc to find the vi_info, etc. This would remove the need for t4_iterate and the racy mtx_initialized check.

This revision is now accepted and ready to land.Nov 26 2018, 11:19 PM

Reviewed, code changes look good to me.

This revision was automatically updated to reflect the committed changes.