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
F118650373: D18010.id51308.diff
Sat, May 31, 9:19 AM
Unknown Object (File)
Mon, May 5, 5:00 PM
Unknown Object (File)
Sun, May 4, 3:39 PM
Unknown Object (File)
Mar 16 2025, 12:16 PM
Unknown Object (File)
Mar 9 2025, 2:53 AM
Unknown Object (File)
Feb 8 2025, 4:34 PM
Unknown Object (File)
Jan 23 2025, 4:39 PM
Unknown Object (File)
Jan 23 2025, 4:38 PM
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.