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
F157293057: D38711.id117708.diff
Wed, May 20, 2:18 AM
Unknown Object (File)
Sat, May 16, 11:44 PM
Unknown Object (File)
Sat, May 16, 11:44 PM
Unknown Object (File)
Sat, May 16, 11:44 PM
Unknown Object (File)
Sat, May 16, 11:43 PM
Unknown Object (File)
Thu, May 7, 1:47 PM
Unknown Object (File)
Apr 18 2026, 3:47 PM
Unknown Object (File)
Apr 18 2026, 3:46 PM
Subscribers

Details

Summary

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

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 49931
Build 46823: arc lint + arc unit

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