Systemd/src/network/netdev/ifb.c
Susant Sahani 3295a461b3 network: introduce ifb (Intermediate Functional Block)
Intermediate Functional Block

The Intermediate Functional Block (ifb) pseudo network interface acts as a QoS concentrator for multiple different sources of traffic. Packets from or to other interfaces have to be redirected to it using the mirred action in order to be handled, regularly routed traffic will be dropped. This way, a single stack of qdiscs, classes and filters can be shared between multiple interfaces.

Here's a simple example to feed incoming traffic from multiple interfaces through a Stochastic Fairness Queue (sfq):

(1) # modprobe ifb
(2) # ip link set ifb0 up
(3) # tc qdisc add dev ifb0 root sfq
2019-12-07 15:29:50 +01:00

12 lines
315 B
C

/* SPDX-License-Identifier: LGPL-2.1+
* Copyright © 2019 VMware, Inc. */
#include "ifb.h"
const NetDevVTable ifb_vtable = {
.object_size = sizeof(IntermediateFunctionalBlock),
.sections = NETDEV_COMMON_SECTIONS,
.create_type = NETDEV_CREATE_INDEPENDENT,
.generate_mac = true,
};