mirror of
https://github.com/lgcosta/pf-linux-port.git
synced 2026-11-12 21:38:03 -03:00
M5 step 1: build OpenBSD hfsc/fq_codel back ends into pf.ko (ml_* API, ifq_q handshake, scheduler types); priq still attached, 14/14 suite unchanged
This commit is contained in:
1 parent
ca75fc49cc
commit
f34c4f92a9
18 files changed
+3923
-32
No files matched your search
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -332,7 +332,9 @@ control_law(struct codel *cd, struct codel_params *cp, int64_t rts)
|
||||
unsigned int idx;
|
||||
|
||||
KASSERT(cd->drops > 0);
|
||||
idx = min(cd->drops - 1, nitems(codel_intervals) - 1);
|
||||
/* PFLINUX: Linux' min() type-checks its arguments; nitems() is size_t */
|
||||
idx = min_t(unsigned int, cd->drops - 1,
|
||||
(unsigned int)(nitems(codel_intervals) - 1));
|
||||
cd->next = rts + cp->intervals[idx];
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -335,9 +335,9 @@ hfsc_class_purge(struct hfsc_class *cl, struct mbuf_list *ml)
|
||||
}
|
||||
|
||||
static inline u_int
|
||||
hfsc_more_slots(u_int current)
|
||||
hfsc_more_slots(u_int cur) /* PFLINUX: 'current' is a kernel macro */
|
||||
{
|
||||
u_int want = current * 2;
|
||||
u_int want = cur * 2;
|
||||
|
||||
return (want > HFSC_MAX_CLASSES ? HFSC_MAX_CLASSES : want);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user