Skip to content

Border Router performance optimization #4334

@rohrerj

Description

@rohrerj

Right now, the performance of the border router is strongly limited because a single goroutine per border router interface is responsible for reading, parsing, processing and forwarding the packets.

Proposal: To improve the performance of the border router we make changes to the router/dataplane.go file to separate the forwarding pipeline of each border router interface into a receiver, multiple processing routines and a forwarder, where the pool of processing routines are shared among all border router interfaces of a border router.

The receiver makes a batch read from the network socket using pre-allocated buffers from a pool and parses the source and flowID from the packet. Then we hash them to map the tuple of source and flowID to a processing routine and forward the packet to them. The processing routine will then process the packet as usual and forward the packet to the forwarder which is responsible for the egress interface. The forwarder forwards the packet to the NIC and returns the buffer used to store the packet back to the buffer pool of the receiver that received that packet.

Because of the hashing, all packets of the same source and same flowID are processed by the same processing routine and hence no packet reordering can happen.
The number of processing routines will be configurable.

These improvements are supervised by Marc Wyss from the network security group at ETH.

BorderRouter drawio

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions