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
search.

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
https://mail.openvswitch.org/pipermail/ovs-dev/2017-October/340305.html

DFC: [PATCH] dpif-netdev: Refactor datapath flow cache
https://mail.openvswitch.org/pipermail/ovs-dev/2017-November/341066.html

v4->v5:
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.

v3->v4:
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.

v2->v3:
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
megaflows.
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[248] array is changed to uint64_t key[31]
because of the OSX compilation warning that char array is 1 byte alligned while
8-byte alignment is required during type conversion.

v1->v2:
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.

RFC->V1:
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:
https://mail.openvswitch.org/pipermail/ovs-dev/2018-January/343411.html


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(-)

-- 
2.7.4

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to