| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
By hiding H-FSC behind pfq_ops structure similar to the ifq_ops,
we provide a possibility to plug alternative queueing interfaces
for use in pf. This reduces amount of H-FSC specific code in the
pf ioctl handler
While here, change the the order of elements in hfsc_class_stats
to provide some compatibility between queue stat structures of
different traffic conditioners.
No objections from henning@, ok sthen@
|
|
|
|
|
|
|
|
|
| |
Since only leaf queues can have packets assigned to them,
H-FSC requires the user specified root queue to have a
parent. To simplify userland tools and the configuration
interface, the kernel can be leveraged to set it up.
ok henning
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the code is refactored so the IFQ macros call newly implemented ifq
functions. the ifq code is split so each discipline (priq and hfsc
in our case) is an opaque set of operations that the common ifq
code can call. the common code does the locking, accounting (ifq_len
manipulation), and freeing of the mbuf if the disciplines enqueue
function rejects it. theyre kind of like bufqs in the block layer
with their fifo and nscan disciplines.
the new api also supports atomic switching of disciplines at runtime.
the hfsc setup in pf_ioctl.c has been tweaked to build a complete
hfsc_if structure which it attaches to the send queue in a single
operation, rather than attaching to the interface up front and
building up a list of queues.
the send queue is now mutexed, which raises the expectation that
packets can be enqueued or purged on one cpu while another cpu is
dequeueing them in a driver for transmission. a lot of drivers use
IFQ_POLL to peek at an mbuf and attempt to fit it on the ring before
committing to it with a later IFQ_DEQUEUE operation. if the mbuf
gets freed in between the POLL and DEQUEUE operations, fireworks
will ensue.
to avoid this, the ifq api introduces ifq_deq_begin, ifq_deq_rollback,
and ifq_deq_commit. ifq_deq_begin allows a driver to take the ifq
mutex and get a reference to the mbuf they wish to try and tx. if
there's space, they can ifq_deq_commit it to remove the mbuf and
release the mutex. if there's no space, ifq_deq_rollback simply
releases the mutex. this api was developed to make updating the
drivers using IFQ_POLL easy, instead of having to do significant
semantic changes to avoid POLL that we cannot test on all the
hardware.
the common code has been tested pretty hard, and all the driver
modifications are straightforward except for de(4). if that breaks
it can be dealt with later.
ok mpi@ jmatthew@
|
|
|
|
|
|
|
|
|
|
| |
disciplines
while i was simply concerned with the safety of the mbuf, requeue
is weird when it comes to how statistics are supposed to be handled
and ultimately isnt worth it.
this removes hfsc_requeue.
|
|
|
|
|
|
|
|
|
|
| |
this will allow packets to taken off an interfaces send queue, and
requeued if space didnt exist on the hardware.
the internal names are a bit ugly, i want to change them in the
next commit.
ok henning@ mpi@
|
|
|
|
|
|
| |
and into the .c file.
ok henning@
|
|
|
|
|
|
| |
there instead of pf_ioctl.c.
ok henning@
|
| |
|
|
|
|
|
|
| |
The limit is because in places, queue IDs are being stored as u_int16_t's.
tested by me, discussed at length with (and ok) claudio henning
|
|
|
|
|
|
|
| |
This is a modified version of oldtbr_timeout() with a timeout for each
HFSC enabled interface. We can now safely include <sys/timeout.h> in
net/hfsc.h without breaking the build.
tested by naddy, ok henning claudio deraadt
|
| |
|
|
|
|
|
|
| |
This is a modified version of oldtbr_timeout() with a timeout for each
HFSC enabled interface.
ok henning claudio
|
|
the new bandwidth shaping subsystem. looked over & tested by many,
ok phessler sthen
|