NetSys / NetBricks

NetBricks: A new network function framework based on Rust.
ISC License
464 stars 75 forks source link

Fix a bug in mbuf_free_bulk() #36

Closed sangjinhan closed 7 years ago

sangjinhan commented 7 years ago

mbuf_free_bulk() always failed thus always slow path was used. The problem was threefold:

  1. mbuf_ptrs was not correctly set (pointer addresses were not used directly, but dereferenced)
  2. mbuf_ptrs and buf_addrs_actual have different orderings
  3. the size of metadata slots (128 bytes) was not accounted.

Before:

$ ./build.sh run zcsi-delay -t -d 0 -c 1 -m 0
15.00 OVERALL RX 40404540.75 TX 40404540.75

After:

15.00 OVERALL RX 66851676.07 TX 66851673.94