[ovs-dev] [RFC 0/9] Cache the modules affected by xlate_actions().

Joe Stringer joestringer at nicira.com
Fri Mar 7 01:20:23 UTC 2014


This series implements a cache for xlate_actions() so that full flow
translation does not need to be performed for long-lived flows; instead,
references are kept to the modules affected by it, and this cache can be used
to attribute stats and effect other side-effects of xlation.

This patch series improves CRR performance mildly in the typical case; modestly
for cases where revalidation is constantly occurring; and makes the work for
revalidator threads much more efficient, allowing more flows to be maintained
in the datapath. Note that patch #8 causes revalidators to remove any flows
that are not experiencing high throughput.

The "modules" which logic is implemented for are:
* Stats attribution:
+ Rules
+ Netdevs
+ Bonds
+ Mirrors
* Side effects:
+ Learn actions - hard timeout refresh
+ Normal actions - mac learning

There are minor testsuite failures in the later patches, but as a whole this is
fairly complete. I am looking for feedback on the approach, specifically
whether I may have missed some modules, if there are any holes in the logic
where typical operation may cause failures, and if there is perhaps areas that
I do not go far enough. I do plan to look into shifting ukey creation into
handler threads, but that is a later topic.

Joe Stringer (9):
  netflow: Make netflow_flow_update() parameter const.
  mirror: Use 'struct ref_count' for refcounting.
  ofproto-dpif: Use 'struct dpif_stats' for stats.
  tests: Test learned flow idle timeouts.
  bond: Export bond hashing functions for accounting.
  ofproto: New function ofproto_refresh_rule().
  ofproto-dpif: Allow caching of xlate_actions() effects.
  revalidator: Only revalidate high-throughput flows.
  ofproto-dpif: Revalidate flows more promptly.

 ofproto/bond.c                |   34 ++++-
 ofproto/bond.h                |    4 +
 ofproto/netflow.c             |    2 +-
 ofproto/netflow.h             |    2 +-
 ofproto/ofproto-dpif-mirror.c |   30 ++--
 ofproto/ofproto-dpif-upcall.c |   52 +++++--
 ofproto/ofproto-dpif-xlate.c  |  314 ++++++++++++++++++++++++++++++++++++++++-
 ofproto/ofproto-dpif-xlate.h  |   15 ++
 ofproto/ofproto-dpif.c        |   45 +++---
 ofproto/ofproto-dpif.h        |    1 +
 ofproto/ofproto-provider.h    |    2 +
 ofproto/ofproto.c             |   62 +++++++-
 tests/learn.at                |  103 ++++++++++++++
 13 files changed, 607 insertions(+), 59 deletions(-)

-- 
1.7.9.5




More information about the dev mailing list