[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openvswitch-git
Subject:    [ovs-git] [openvswitch/ovs] 657210: datapath: Don't validate IPv6 label masks.
From:       noreply () github ! com (GitHub)
Date:       2014-11-25 22:19:40
Message-ID: 5475007ceeb77_22443f9d5c0072b8606e1 () hookshot-fe2-cp1-prd ! iad ! github ! net ! mail
[Download RAW message or body]

  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 6572103876d00ace874e87325b72e31f159f4cca
      https://github.com/openvswitch/ovs/commit/6572103876d00ace874e87325b72e31f159f4cca
  Author: Joe Stringer <joestringer at nicira.com>
  Date:   2014-11-25 (Tue, 25 Nov 2014)

  Changed paths:
    M datapath/flow_netlink.c

  Log Message:
  -----------
  datapath: Don't validate IPv6 label masks.

When userspace doesn't provide a mask, OVS datapath generates a fully
unwildcarded mask for the flow by copying the flow and setting all bits
in all fields. For IPv6 label, this creates a mask that matches on the
upper 12 bits, causing the following error:

openvswitch: netlink: Invalid IPv6 flow label value (value=ffffffff, max=fffff)

This patch ignores the label validation check for masks, avoiding this
error.

Signed-off-by: Joe Stringer <joestringer at nicira.com>
Acked-by: Pravin B Shelar <pshelar at nicira.com>
Signed-off-by: David S. Miller <davem at davemloft.net>


  Commit: 9fce0584a6434a31eea4333644d74b38c29a37e1
      https://github.com/openvswitch/ovs/commit/9fce0584a6434a31eea4333644d74b38c29a37e1
  Author: Joe Stringer <joestringer at nicira.com>
  Date:   2014-11-25 (Tue, 25 Nov 2014)

  Changed paths:
    M ofproto/ofproto-dpif-upcall.c

  Log Message:
  -----------
  revalidator: Use 'cmap' for storing ukeys.

Signed-off-by: Joe Stringer <joestringer at nicira.com>
Acked-by: Ben Pfaff <blp at nicira.com>


  Commit: a260693626dda83ded9f1a2c42c407a69a9c1bf6
      https://github.com/openvswitch/ovs/commit/a260693626dda83ded9f1a2c42c407a69a9c1bf6
  Author: Joe Stringer <joestringer at nicira.com>
  Date:   2014-11-25 (Tue, 25 Nov 2014)

  Changed paths:
    M ofproto/ofproto-dpif-upcall.c

  Log Message:
  -----------
  revalidator: Protect ukeys with a mutex.

Currently, udpif_keys are protected during revalidator_sweep__() as only
one thread accesses the ukey at a time. This is ensured using barriers:
all revalidators will be in the GC phase, so they will only access their
own ukey collection.

A future patch will change the access patterns to allow these ukey
collections to be read or modified while a revalidator is garbage
collecting it. To protect the ukeys, this patch adds locking on the ukey
collection.

Signed-off-by: Joe Stringer <joestringer at nicira.com>
Acked-by: Ben Pfaff <blp at nicira.com>


  Commit: b8d3daeb2411ed4bc9eee1361be651874c997f43
      https://github.com/openvswitch/ovs/commit/b8d3daeb2411ed4bc9eee1361be651874c997f43
  Author: Joe Stringer <joestringer at nicira.com>
  Date:   2014-11-25 (Tue, 25 Nov 2014)

  Changed paths:
    M ofproto/ofproto-dpif-upcall.c

  Log Message:
  -----------
  udpif: Separate udpif_key maps from revalidators.

An upcoming patch will change the access patterns for ukey maps to
increase the number of writers, and shift write-access from revalidator
threads to upcall handler threads. As such, it no longer makes sense to
tie these maps to revalidators in a 1:1 relationship.

This patch separates the ukey maps from the revalidators, and increases
the number of maps used to store ukeys, to reduce contention.

Signed-off-by: Joe Stringer <joestringer at nicira.com>
Acked-by: Ben Pfaff <blp at nicira.com>


  Commit: 6dad4d44a4fc3a026afcad3abe7d385b741d898e
      https://github.com/openvswitch/ovs/commit/6dad4d44a4fc3a026afcad3abe7d385b741d898e
  Author: Joe Stringer <joestringer at nicira.com>
  Date:   2014-11-25 (Tue, 25 Nov 2014)

  Changed paths:
    M ofproto/ofproto-dpif-upcall.c

  Log Message:
  -----------
  upcall: Rename dump_op -> ukey_op.

Future patches will make use of the 'struct dump_op' in a broader sense,
so this patch renames it to make things a bit clearer.

Signed-off-by: Joe Stringer <joestringer at nicira.com>
Acked-by: Ben Pfaff <blp at nicira.com>


  Commit: 23597df052262dec961fd86eb7c54d10984a1ec0
      https://github.com/openvswitch/ovs/commit/23597df052262dec961fd86eb7c54d10984a1ec0
  Author: Joe Stringer <joestringer at nicira.com>
  Date:   2014-11-25 (Tue, 25 Nov 2014)

  Changed paths:
    M ofproto/ofproto-dpif-upcall.c

  Log Message:
  -----------
  upcall: Create ukeys in handler threads.

Currently, when a revalidator thread first dumps a flow, it creates a
'udpif_key' object and caches a copy of a kernel flow key. This allows
us to perform lookups in the classifier to attribute stats and validate
the correctness of the datapath flow.

This patch sets up this cache from the handler threads, during flow
setup. While this patch alone causes a decrease in revalidation
performance, it allows future patches increase performance by reducing
the cost of flow dumping.

Revalidators will continue to create ukeys if a flow is dumped that has
no corresponding ukey. This may happen in corner cases such as when
ovs-vswitchd is restarted (and flows remain in the datapath) or a user
installs a flow using ovs-dpctl.

Signed-off-by: Joe Stringer <joestringer at nicira.com>
Acked-by: Ben Pfaff <blp at nicira.com>


  Commit: bc2df54d2a41a1584fe2ae7a9bcfcc2ee7ccac57
      https://github.com/openvswitch/ovs/commit/bc2df54d2a41a1584fe2ae7a9bcfcc2ee7ccac57
  Author: Joe Stringer <joestringer at nicira.com>
  Date:   2014-11-25 (Tue, 25 Nov 2014)

  Changed paths:
    M ofproto/ofproto-dpif-upcall.c

  Log Message:
  -----------
  upcall: Revalidate using cache of mask, actions.

This allows us to ignore most fields of a flow_dump, requiring only the
flow key for looking up the ukey. Fetching flows can also be avoided in
the corner case where a flow is missed from a dump but revalidation is
required.

A future patch will modify the datapath interface to allow datapaths to
skip dumping these fields, so this cache will be used instead.

Signed-off-by: Joe Stringer <joestringer at nicira.com>
Acked-by: Ben Pfaff <blp at nicira.com>


  Commit: 468cdd91c3bc21acde1d98250def7d9330204b8e
      https://github.com/openvswitch/ovs/commit/468cdd91c3bc21acde1d98250def7d9330204b8e
  Author: Joe Stringer <joestringer at nicira.com>
  Date:   2014-11-25 (Tue, 25 Nov 2014)

  Changed paths:
    M include/openvswitch/types.h
    M lib/hash.c
    M lib/hash.h
    M tests/test-hash.c

  Log Message:
  -----------
  hash: Add 128-bit murmurhash.

Add the 128-bit murmurhash by Austin Appleby, r150 from:
http://code.google.com/p/smhasher/source/browse/trunk/MurmurHash3.cpp

Signed-off-by: Joe Stringer <joestringer at nicira.com>
Acked-by: Ben Pfaff <blp at nicira.com>


  Commit: 7af12bd7c83e5cf8cb831f3aa9621bac57a6a861
      https://github.com/openvswitch/ovs/commit/7af12bd7c83e5cf8cb831f3aa9621bac57a6a861
  Author: Joe Stringer <joestringer at nicira.com>
  Date:   2014-11-25 (Tue, 25 Nov 2014)

  Changed paths:
    M lib/dpif-netdev.c
    M lib/dpif-netlink.c
    M lib/dpif.c
    M lib/dpif.h
    M ofproto/ofproto-dpif-upcall.c

  Log Message:
  -----------
  dpif: Generate flow_hash for revalidators in dpif.

This patch shifts the responsibility for determining the hash for a flow
from the revalidation logic down to the dpif layer. This assists in
handling backward-compatibility for revalidation with the upcoming
unique flow identifier "UFID" patches.

A 128-bit UFID was selected to minimize the likelihood of hash conflicts.
Handler threads will not install a flow that has an identical UFID as
another flow, to prevent misattribution of stats and to ensure that the
correct flow key cache is used for revalidation.

For datapaths that do not support UFID, which is currently all
datapaths, the dpif will generate the UFID and pass it up during upcall
and flow_dump. This is generated based on the datapath flow key.

Later patches will add support for datapaths to store and interpret this
UFID, in which case the dpif has a responsibility to pass it through
transparently.

Signed-off-by: Joe Stringer <joestringer at nicira.com>
Acked-by: Ben Pfaff <blp at nicira.com>


Compare: https://github.com/openvswitch/ovs/compare/a70f8b11087a...7af12bd7c83e

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic