Page MenuHomeFreeBSD

Make dpaa2 software portal handoff time a sysctl tunable
ClosedPublic

Authored by flo_purplekraken.com on Sat, Sep 5, 9:01 PM.
Tags
None
Referenced Files
F170878387: D59461.id185960.diff
Mon, Sep 7, 6:00 AM
F170875787: D59461.id185998.diff
Mon, Sep 7, 5:27 AM
F170868353: D59461.id185995.diff
Mon, Sep 7, 3:51 AM
Unknown Object (File)
Sun, Sep 6, 1:05 PM
Unknown Object (File)
Sun, Sep 6, 10:21 AM
Unknown Object (File)
Sun, Sep 6, 9:53 AM
Unknown Object (File)
Sun, Sep 6, 9:50 AM
Subscribers

Details

Summary

When debugging the new dpaa2 driver, it is very handy to be able to change the software portal handoff time without recompiling the kernel.
This commit makes the handoff time a sysctl tunable, so it can be changed at runtime.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

dsl requested changes to this revision.Sun, Sep 6, 8:16 AM
dsl added inline comments.
sys/dev/dpaa2/dpaa2_io.c
84

1000 is too small taking into account DMA tag per buffer (https://codeberg.org/dsl/freebsd-src/commit/2e198edf2e98bf7c077de9a21853d23c74e61701). I'm going to have the IRQ holdoff at 5000 by default after merging those changes, i.e. 5ms instead of 120us. 10000 would do, I guess.

229

Can be "static void", I think. There's no place in the function where actual error is returned.

sys/dev/dpaa2/dpaa2_io.h
104

I'd name it as "irq_holdoff" with /* ms */ given in the following comment. Could you also add /* sysctl(9) */ comment above? It'd clear doubts about this field.

sys/dev/dpaa2/dpaa2_swp.c
188

It might be a good idea to check both "sc" and "sc->swp_desc".

301

I'd put it as "from the device context".

This revision now requires changes to proceed.Sun, Sep 6, 8:16 AM
flo_purplekraken.com added inline comments.
sys/dev/dpaa2/dpaa2_swp.c
188

swp_desc is not a pointer, but an embedded struct, so it cannot be NULL.

dsl added inline comments.
sys/dev/dpaa2/dpaa2_swp.c
188

ah, yes, that's right, sorry for the noise

This revision is now accepted and ready to land.Sun, Sep 6, 11:50 AM