[ovs-dev] [PATCH v5 0/2] dpif-netdev: Combine CD/DFC patch for datapath refactor
yipeng1.wang at intel.com
Tue Jul 10 10:14:05 UTC 2018
This patch set is the V5 implementation to combine the CD and DFC design.
Both patches intend to refactor datapath to avoid costly sequential subtable
We rename the CD/DFC as signature match cache (SMC) to be more clear since the
proposed cache structure stores signatures of flows. SMC works well when
traffic flow count is much larger than EMC size especially when subtable count
is large. Our tests show that with 20 subtables, the throughput could be
increased by more than 2x with SMC enabled.
In this version, SMC is made experimental and by default turned off.
CD and DFC patch sets:
CD: [PATCH v2 0/5] dpif-netdev: Cuckoo-Distributor implementation
DFC: [PATCH] dpif-netdev: Refactor datapath flow cache
1. Add comments in multiple places as Billy suggested.
2. Remove unnecessary arguments for smc_insert as Billy suggested.
3. Remove unnecessary return value from smc_insert.
4. Change the cmap_find_by_index's index type to be uin32_t from uint16_t
since index can be larger.
5. Coding style fixes.
1. To make it easier for reviewers, we simplify the patch set to have only 2
commits. The first commit includes the main SMC design and the second commit
modifies the unit-test accordingly.
2. SMC is now an experimental feature turned off by default.
3. Remove the EMC changes from the original DFC patch set to make this patch
set smaller and more focus.
4. Remove adaptive turn on/off mechanism since it is now an experimental
feature turned off by default, and can be turned on manually by user.
5. Add documentation for SMC.
6. Packets hit SMC now verify input port when match dp_netdev_flow. This is
because SMC will bypass per-port classifier.
1. Add the 5th commit: it is to automatically turn off DFC/CD when the number
of megaflow is larger than 2^16 since we use 16bits in the distributor to index
2. Add the 6th commit: since the pmd stats now print out the DFC/CD statistics
one of the unit test has mismatch output. This commit fixed this issue.
3. In first commit, the char key array is changed to uint64_t key
because of the OSX compilation warning that char array is 1 byte alligned while
8-byte alignment is required during type conversion.
1. Add comment and follow code style for cmap code (Ben's comment)
2. Fix a bug in the first commit that fails multiple unit tests. Since DFC is
per PMD not per port, the port mask should be included in rule.
3. Added commit 4. This commit separates DFC to be EMC cache and SMC (signature
match cache) for easier optimization and readability.
4. In commit 4, DFC lookup is refactored to do batching lookup.
5. Rebase and other minor changes.
1. rebase to master head.
2. The last commit is totally rewritten to use the flow_table as indirect table.
The CD/DFC distributor will cache the index of flow_table entry.
3. Incorporate commit 2 into commit 1. (Bhanu's comment)
4. Change DFC to be always on in commit 1. (Bhanu's comment)
RFC of this patch set:
Yipeng Wang (2):
dpif-netdev: Add SMC cache after EMC cache
tests: Fix unit test case caused by SMC cache.
Documentation/topics/dpdk/bridge.rst | 15 ++
NEWS | 2 +
lib/cmap.c | 74 ++++++++
lib/cmap.h | 11 ++
lib/dpif-netdev-perf.h | 1 +
lib/dpif-netdev.c | 329 +++++++++++++++++++++++++++++++----
tests/pmd.at | 7 +-
vswitchd/vswitch.xml | 13 ++
8 files changed, 413 insertions(+), 39 deletions(-)
More information about the dev