tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

RFC: vlan(4) use pkthdr instead of mtag



Hi,

This is a proposal of changes to improve VLAN packet handling.

Currently, FreeBSD, DragonFly BSD, and OpenBSD use pkthdr structure
to store VLAN id in each packet. On the other hand, NetBSD uses mtag.

To check the impact for the performance of the both implementations,
I ported pkthdr VLAN id implementation to NetBSD and measure
its performance.

Here is the patch.
https://gist.githubusercontent.com/s-ymgch228/6597cfc4b6f79c6c62fcdf25003acb55/raw/adaf793dfc56f71438bc68e67530f9e68a884f4d/vlan_mtag.patch

Here is the result of performance evaluation.
https://gist.github.com/s-ymgch228/6597cfc4b6f79c6c62fcdf25003acb55/raw/adaf793dfc56f71438bc68e67530f9e68a884f4d/performance_vlan-pkthdr.pdf
 - ipgen (https://github.com/iij/ipgen) was used for the measurement.
 - The kernel configuration was amd64/GENERIC enabled NET_MPSAFE for
   both mtag and pkthdr

From the above result, my implementation improves the performance by about 10 %. And all 0% rate items are saturated in the both
measurements.

Could you comment about this patch and result? I hope this patch will be merged.

Thanks,

--
Internet Initiative Japan Inc.

Device Engineering Section,
IoT Platform Development Department,
Network Division,
Technology Unit

Shoichi YAMAGUCHI <s-yamaguchi%iij.ad.jp@localhost>


Home | Main Index | Thread Index | Old Index