Page MenuHomeFreeBSD

mlx5: Enter network epoch when using if_foreach()
ClosedPublic

Authored by jhibbits on Feb 21 2023, 9:09 PM.
Tags
None
Referenced Files
F140100262: D38711.diff
Sat, Dec 20, 5:42 AM
F140089168: D38711.diff
Sat, Dec 20, 2:22 AM
Unknown Object (File)
Mon, Dec 1, 5:30 PM
Unknown Object (File)
Nov 16 2025, 10:38 PM
Unknown Object (File)
Nov 12 2025, 1:49 AM
Unknown Object (File)
Nov 11 2025, 9:06 PM
Unknown Object (File)
Nov 11 2025, 7:22 PM
Unknown Object (File)
Nov 11 2025, 6:41 AM
Subscribers

Details

Summary

IFNET_RLOCK() is not sufficient, the epoch needs entered.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Hi,

I'm not sure if that will work, because there is a write_lock() inside mlx5_enable_roce_if_cb(), and that cannot be used inside an EPOCH section!

#define write_lock(_l)          rw_wlock(&(_l)->rw)

Hi,

I'm not sure if that will work, because there is a write_lock() inside mlx5_enable_roce_if_cb(), and that cannot be used inside an EPOCH section!

#define write_lock(_l)          rw_wlock(&(_l)->rw)

Or am I wrong.

--HPS

Hi,

I'm not sure if that will work, because there is a write_lock() inside mlx5_enable_roce_if_cb(), and that cannot be used inside an EPOCH section!

#define write_lock(_l)          rw_wlock(&(_l)->rw)

Or am I wrong.

--HPS

It's OK to use rwlocks/mutexes (and basically anything that don't sleep) in the (network) epoch.

This revision is now accepted and ready to land.Feb 22 2023, 10:42 AM