Alex Wang | 18 Apr 23:13 2014

[PATCH RFC V9] ofproto-dpif-upcall: Remove the dispatcher thread.

With the foundation laid in previous commits, this commit
removes the 'dispatcher' thread by allowing 'handler'
threads to read upcalls directly from dpif.

This commit significantly simplifies the flow miss handling
code and brings slight improvement to flow setup rate.

Signed-off-by: Alex Wang <alexw@...>

---
NOTE:
- somehow this patch bring back the race in unittest.
  few tests failed due to the
  "WARN|dummy <at> ovs-dummy: failed to flow_get (No such file or directory)"
  "WARN|dummy <at> ovs-dummy: failed to flow_del (No such file or directory)"

  So, I'm looking for high level review while keep figuring out the race.
---
V8 -> V9:
- remove un-comment like comment.
- move the code of destroy_upcall() to calling line.
- add a new function read_upcalls() for reading and classifying upcalls
  from dpif.

V7 -> V8:
- rebase.

V6 -> V7:
- rebase.

(Continue reading)

Jarno Rajahalme | 18 Apr 21:41 2014

[PATCH 00/10] classifier: Optimize memory access.

This series:
- Inlines critical functions that are only used by the classifier.
- Hides classifier internals from the API, adding a 'cls_match' that
  contains the private parts of 'cls_rule'.
- Changes the subtable list to a linear array that enables prefetching.
- Always inlines the miniflows and minimasks in the classifier,
  reducing memory indirection.

Jarno Rajahalme (10):
  lib/flow: Simplify miniflow accessors, add ipv6 support.
  lib: Inline functions used in classifier_lookup
  ofproto: Use classifer cursor API to collect vlan usage.
  lib/classifier: Hide more of the internal data structures.
  lib/flow: Optimize minimask_has_extra() and minimask_is_catchall()
  lib: Add prefetch support (for GCC)
  classifier: Use array for subtables instead of a list.
  lib/classifier: Separate cls_rule internals from the API.
  lib/flow: Maintain miniflow offline values explicitly.
  lib/classifier: Support variable sized miniflows.

 lib/classifier.c        |  825 ++++++++++++++++++++++++++++++++++++-----------
 lib/classifier.h        |   73 +----
 lib/compiler.h          |    8 +
 lib/dpif-netdev.c       |   32 +-
 lib/flow.c              |  393 ++++++++--------------
 lib/flow.h              |  233 +++++++------
 lib/hindex.c            |   13 -
 lib/hindex.h            |   13 +-
 lib/match.c             |   37 +--
 lib/match.h             |    4 -
(Continue reading)

Gurucharan Shetty | 18 Apr 20:04 2014

[PATCH 01/11] tests: Define a variable "IS_WIN32" for tests.

Signed-off-by: Gurucharan Shetty <gshetty@...>
---
 tests/atlocal.in |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/atlocal.in b/tests/atlocal.in
index 06e7384..8267554 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
 <at>  <at>  -77,4 +77,7  <at>  <at>  Linux)
 FreeBSD|NetBSD)
     LOOPBACK_INTERFACE=lo0
     ;;
+MINGW*)
+    IS_WIN32="yes"
+    ;;
 esac
--

-- 
1.7.9.5

Andy Zhou | 18 Apr 11:51 2014

[recirc datapath V4 5/5] datapath: add recirc action

Recirculation implementation for Linux kernel data path.

Signed-off-by: Andy Zhou <azhou@...>

---
V3 -> v4:
	   * OVS_CB input_port may be NULL for ovs_packet_cmd_execute()
	   * always accept recirc_id mask
	   * Always generate recirc_id netlink message for recirc
	     enabled datapath. (with corresponding user space changes
	     in patch 1 and 2)

V2 -> v3:  * save the input port in OVS_CB
	   * Allow recirc_id to be masked like any other key attribute.
	   * DO not force recirc_id to be exact match.
	   * Needs corresponding user space changes I am still working.
	   * Sending this out as RFC
---
 datapath/actions.c      | 40 +++++++++++++++++++++++++++++++++++++++-
 datapath/datapath.c     | 43 ++++++++++++++++++++++++++-----------------
 datapath/datapath.h     |  8 ++++++--
 datapath/flow.h         |  1 +
 datapath/flow_netlink.c | 18 ++++++++++++++++++
 5 files changed, 90 insertions(+), 20 deletions(-)

diff --git a/datapath/actions.c b/datapath/actions.c
index 87a8a40..fdcd576 100644
--- a/datapath/actions.c
+++ b/datapath/actions.c
 <at>  <at>  -1,5 +1,5  <at>  <at> 
(Continue reading)

Andy Zhou | 18 Apr 11:51 2014

[recirc datapath V4 4/5] datapath: add hash action

Signed-off-by: Andy Zhou <azhou@...>

----
V3->v4:
       * Rehash the hash with hash_basis
       * always accept dp_hash mask
       * add mask to ovs_nla_put_flow() API

V2->V3:
       * rename dp_hash to ovs_flow_hash
       * Simplify netlink message error checking logic
       * other cleanups
---
 datapath/actions.c      | 18 ++++++++++++++++++
 datapath/datapath.c     |  8 +++++---
 datapath/flow.h         |  1 +
 datapath/flow_netlink.c | 30 +++++++++++++++++++++++++++++-
 datapath/flow_netlink.h |  2 +-
 5 files changed, 54 insertions(+), 5 deletions(-)

diff --git a/datapath/actions.c b/datapath/actions.c
index 82cfd2d..87a8a40 100644
--- a/datapath/actions.c
+++ b/datapath/actions.c
 <at>  <at>  -460,6 +460,20  <at>  <at>  static int sample(struct datapath *dp, struct sk_buff *skb,
 				  nla_len(acts_list), true);
 }

+static void execute_hash(struct sk_buff *skb, const struct nlattr *attr)
+{
(Continue reading)

Andy Zhou | 18 Apr 11:50 2014

[recirc datapath V4 3/5] openvswitch.h: rename hash action definition

Rename hash_bias to hash_basis to make it consistent with similar
usages.

Signed-off-by: Andy Zhou <azhou@...>
---
 include/linux/openvswitch.h  | 4 ++--
 lib/dpif-netdev.c            | 2 +-
 lib/odp-util.c               | 2 +-
 ofproto/ofproto-dpif-xlate.c | 4 ++--
 ofproto/ofproto-dpif-xlate.h | 2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/linux/openvswitch.h b/include/linux/openvswitch.h
index e17f802..1aa9158 100644
--- a/include/linux/openvswitch.h
+++ b/include/linux/openvswitch.h
 <at>  <at>  -553,11 +553,11  <at>  <at>  enum ovs_hash_alg {
 /*
  * struct ovs_action_hash - %OVS_ACTION_ATTR_HASH action argument.
  *  <at> hash_alg: Algorithm used to compute hash prior to recirculation.
- *  <at> hash_bias: bias used for computing hash.
+ *  <at> hash_basis: basis used for computing hash.
  */
 struct ovs_action_hash {
 	uint32_t  hash_alg;	/* One of ovs_hash_alg. */
-	uint32_t  hash_bias;
+	uint32_t  hash_basis;
 };

 /**
(Continue reading)

Andy Zhou | 18 Apr 11:50 2014

[recirc datapath V4 2/5] odp-util: Always generate key/mask pair in netlink for recirc_id

Currently netlink flow (and mask) recirc_id attribute is only
serialized when the recirc_id value is non-zero. For this logic
to work correctly, the interpretation of the missing recirc_id
depends on whether the datapath supports recirculation.

This patch remove the ambiguity of the meaning of missing recirc_id
attribute in netlink message.  When recirc_id is non-zero, or when
it is not a wildcard match, both key and mask attributes are
serialized.  On the other hand, when recirc_id is zero, and being
wildcarded, they are not serialized.  A missing recirc_id key and
mask attribute thus should always be interpreted as wildcard,
same as other flow fields.

Signed-off-by: Andy Zhou <azhou@...>
---
 lib/dpif-netdev.c      |  9 +++++----
 lib/odp-util.c         | 16 ++++++++--------
 lib/odp-util.h         |  4 ++--
 ofproto/ofproto-dpif.c |  4 ++--
 tests/ofproto-dpif.at  | 20 ++++++++++----------
 tests/test-odp.c       |  3 ++-
 6 files changed, 29 insertions(+), 27 deletions(-)

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 76141e3..d17bc64 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
 <at>  <at>  -1442,6 +1442,7  <at>  <at>  dpif_netdev_flow_dump_next(const struct dpif *dpif, void *iter_, void *state_,
     struct dp_netdev_flow_state *state = state_;
     struct dp_netdev *dp = get_dp_netdev(dpif);
(Continue reading)

Andy Zhou | 18 Apr 11:50 2014

[recirc datapath V4 1/5] ofproto-dpif: Rule lookup starts from table zero for non-recirc datapath

Currently, all packet lookup starts from internal table for possible
matching of post recirculation rules. This is not necessary for
datapath that does not support recirculation.

This patch adds the ability to steering rule lookup starting table
based on whether datapath supports recirculation.

Signed-off-by: Andy Zhou <azhou <at> nicira.com>¬
---
 ofproto/ofproto-dpif.c | 83 +++++++++++++++++++++++++-------------------------
 1 file changed, 41 insertions(+), 42 deletions(-)

diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
index 3648dd7..1e51ff2 100644
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
 <at>  <at>  -3171,41 +3171,57  <at>  <at>  rule_dpif_get_actions(const struct rule_dpif *rule)
     return rule_get_actions(&rule->up);
 }

-static uint8_t
-rule_dpif_lookup__ (struct ofproto_dpif *ofproto, const struct flow *flow,
-                    struct flow_wildcards *wc, struct rule_dpif **rule)
+/* Lookup 'flow' in table 0 of 'ofproto''s classifier.
+ * If 'wc' is non-null, sets the fields that were relevant as part of
+ * the lookup. Returns the table_id where a match or miss occurred.
+ *
+ * The return value will be zero unless there was a miss and
+ * OFPTC11_TABLE_MISS_CONTINUE is in effect for the sequence of tables
+ * where misses occur. */
(Continue reading)

Franck BAUDIN | 18 Apr 10:04 2014

[PATCH 1/2] DPI plugin addition proposal v2


This message and any attachments (the "message") are confidential, intended solely for the addressees.
If you are not the intended recipient, please notify the sender immediately by e-mail and delete this
message from your system. In this case, you are not authorized to use, copy this message and/or disclose
the content to any other person. E-mails are susceptible to alteration. Neither Qosmos nor any of its
subsidiaries or affiliates shall be liable for the message if altered, changed or falsified.

Ce message et toutes ses pièces jointes (ci-après le "message")sont confidentiels et établis à
l'intention exclusive de ses destinataires. Si vous avez reçu ce message par erreur, merci d’en
informer immédiatement son émetteur par courrier électronique et d’effacer ce message de votre
système. Dans cette hypothèse, vous n’êtes pas autorisé à utiliser, copier ce message et/ou en
divulguer le contenu à un tiers. Tout message électronique est susceptible d'altération. Qosmos et
ses filiales déclinent toute responsabilité au titre de ce message s'il a été altéré, déformé ou falsifié.

This message and any attachments (the "message") are confidential, intended solely for the addressees.
If you are not the intended recipient, please notify the sender immediately by e-mail and delete this
message from your system. In this case, you are not authorized to use, copy this message and/or disclose
the content to any other person. E-mails are susceptible to alteration. Neither Qosmos nor any of its
subsidiaries or affiliates shall be liable for the message if altered, changed or falsified.

Ce message et toutes ses pièces jointes (ci-après le "message")sont confidentiels et établis à
l'intention exclusive de ses destinataires. Si vous avez reçu ce message par erreur, merci d’en
informer immédiatement son émetteur par courrier électronique et d’effacer ce message de votre
système. Dans cette hypothèse, vous n’êtes pas autorisé à utiliser, copier ce message et/ou en
divulguer le contenu à un tiers. Tout message électronique est susceptible d'altération. Qosmos et
ses filiales déclinent toute responsabilité au titre de ce message s'il a été altéré, déformé ou falsifié.
(Continue reading)

YAMAMOTO Takashi | 18 Apr 04:19 2014
Picon

[PATCH] ofproto-dpif-upcall: Don't use stack garbage

Catched by "learning action - self-modifying flow with hard_timeout"
test case.

The bug introduced by commit b256dc52.
("ofproto-dpif-xlate: Cache xlate_actions() effects.")

Signed-off-by: YAMAMOTO Takashi <yamamoto@...>
---
 ofproto/ofproto-dpif-upcall.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c
index 0d7dd8e..96a53e6 100644
--- a/ofproto/ofproto-dpif-upcall.c
+++ b/ofproto/ofproto-dpif-upcall.c
 <at>  <at>  -1379,7 +1379,6  <at>  <at>  revalidate_ukey(struct udpif *udpif, struct udpif_flow_dump *udump,
     xoutp = NULL;
     actions = NULL;
     netflow = NULL;
-    may_learn = push.n_packets > 0;

     /* If we don't need to revalidate, we can simply push the stats contained
      * in the udump, otherwise we'll have to get the actions so we can check
 <at>  <at>  -1413,6 +1412,7  <at>  <at>  revalidate_ukey(struct udpif *udpif, struct udpif_flow_dump *udump,
         goto exit;
     }

+    may_learn = push.n_packets > 0;
     if (ukey->xcache && !udump->need_revalidate) {
         xlate_push_stats(ukey->xcache, may_learn, &push);
(Continue reading)

Jarno Rajahalme | 18 Apr 03:36 2014

[PATCH 0/5] lib: Extract packet to a miniflow

Userspace datapath can be made faster by streamlining the flow
extraction code.  We already use miniflows internally within the
classifier.  This series of patches changes flow extraction to use
miniflow directly, and then also use the extracted miniflow as a
lookup key in the classifier.  This means less memory is touched by
each packet passing through the datapath.  Only when a packet miss is
generated is the miniflow key expanded to a full struct flow.

Jarno Rajahalme (5):
  lib/flow: Introduce miniflow_extract().
  lib/flow: Add miniflow accessors and miniflow_get_tcp_flags().
  lib/flow: Possibly faster miniflow_hash_in_minimask()
  classifier: Support miniflow as a key.
  dpif-netdev: Use miniflow as a flow key.

 lib/byte-order.h               |   12 +
 lib/classifier.c               |   62 +++
 lib/classifier.h               |    3 +
 lib/dpif-netdev.c              |   52 ++-
 lib/flow.c                     |  842 +++++++++++++++++++++++-----------------
 lib/flow.h                     |  206 ++++++++--
 lib/match.c                    |    2 +-
 lib/nx-match.c                 |    2 +-
 lib/ofp-util.c                 |    2 +-
 lib/packets.h                  |   52 +--
 ofproto/ofproto-dpif-monitor.h |    1 +
 ofproto/ofproto-dpif-xlate.c   |    2 +-
 tests/test-classifier.c        |    2 +-
 13 files changed, 802 insertions(+), 438 deletions(-)

(Continue reading)


Gmane