This change moves time conversion related code from pf to be available system-wide.
Once the function is available system-wide, it can be used in driver code.
Details
- Reviewers
imp
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 78493 Build 75376: arc lint + arc unit
Event Timeline
Other than not removing the pfvar.h include I'm happy with the pf changes, but please try to get someone to okay the addition in sys/time.h too.
| sys/netpfil/pf/pf.c | ||
|---|---|---|
| 77 | I don't think we should remove this one. It defines far more than just SEC_TO_NSEC(). | |
| sys/netpfil/pf/pf_ioctl.c | ||
| 77 | Same here. Don't remove this. | |
| sys/sys/time.h | ||
|---|---|---|
| 427 | It's better to include sys/_types.h here, or better yet, just use the _uint64_t types to avoid namespace pollution. | |
IMHO, more review is needed here. This is a system header that is installed in /usr/include. We should check if other common APIs exist or not for this operation. Does it match existing operations that we already define there?
Not that I, as a novice contributor with a perhaps inexperienced eye, can see: I ran git grep sec | grep UINT64_MAX.
We don't have an API for this directly. We do for sbintime and I initially thought that could be used instead, but no.
And since it's only exposed in the kernel.