HomeFreeBSD

if_epair: implement fanout

Description

if_epair: implement fanout

Allow multiple cores to be used to process if_epair traffic. We do this
(if RSS is enabled) based on the RSS hash of the incoming packet. This
allows us to distribute the load over multiple cores, rather than
sending everything to the same one.

We also switch from swi_sched() to taskqueues, which also contributes to
better throughput.

Benchmark results:
With net.isr.maxthreads=-1

Setup A: (cc0 - bridge0 - epair0a) (epair0b - bridge1 - cc1)

Before 627 Kpps
After (no RSS) 1.198 Mpps
After (RSS) 3.148 Mpps

Setup B: (cc0 - bridge0 - epaira0) (epair0b - vnet jail - epair1a) (epair1b - bridge1 - cc1)

Before 7.705 Kpps
After (no RSS) 1.017 Mpps
After (RSS) 2.083 Mpps

MFC after: 3 weeks
Sponsored by: Orange Business Services
Differential Revision: https://reviews.freebsd.org/D33731

(cherry picked from commit 24f0bfbad57b9c3cb9b543a60b2ba00e4812c286)

Details

Provenance
kpAuthored on Dec 9 2021, 1:24 PM
Differential Revision
D33731: if_epair: implement fanout
Parents
rG009a56b2e416: if_vtnet(4): Restore the ability to set promisc mode.
Branches
Unknown
Tags
Unknown