Enter the net epoch when traversing a list of interfaces. For that
split the ifname_linux_to_bsd() function on two counterparts, where
the ifname_linux_to_ifp() intended to use in epoch, while the
ifname_linux_to_bsd() intended to be a self-contained.
Until the linux_ioctl_coket() function is refactored, the
ifname_linux_to_bsd() temporarily returns interface outside
of the epoch.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/compat/linsysfs/linsysfs.c | ||
---|---|---|
127 | Maybe the other way round? In that case, you don't need to have an additional epoch exit. | |
128 | Nit: IIRC sbuf_printf() cannot sleep, so it's worth writing ifindex inside the epoch and avoid using a temporary variable. | |
146 | Nit: same as previous one: do everything inside ifp != NULL condition |
Comment Actions
done, btw, you are right, sbuf here don't sleep,
also vnet context stored as V_ifnet is not iniitalized without it