HomeFreeBSD

cxgbe(4): Fix tracing with netlink enabled kernels.

Description

cxgbe(4): Fix tracing with netlink enabled kernels.

  1. The tracing ifnet's name must match the nexus name. One way to do this is to not use a unit number.
  1. Do not hold the tracer lock around ether_ifattach or ether_ifdetach. netlink calls back into the driver (see stack below) and that leads to illegal lock recursion.

    tracer_ioctl if_ioctl get_operstate_ether get_operstate dump_iface rtnl_handle_ifevent rtnl_handle_ifattach if_attach_internal if_attach ether_ifattach t4_cloner_create

Sponsored by: Chelsio Communications
Approved by: re (kib)

(cherry picked from commit e203cb393fe0b963dd585d0576dcc6a47a28c386)
(cherry picked from commit 38da3db5f9e3e9bc9eba30a2c560bfe660ce95ec)

Details

Provenance
npAuthored on Sep 9 2023, 7:39 PM
Parents
rGdda585f2c84b: cxgbe(4): Avoid hang on kldunload on netlink enabled kernels.
Branches
Unknown
Tags
Unknown