[ovs-git] [openvswitch/ovs] 6b8da9: odp-util: Correctly generate wildcards when format...

GitHub noreply at github.com
Fri May 29 01:39:10 UTC 2015


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 6b8da9e92269f59537b9e3e39d5749b64220e04d
      https://github.com/openvswitch/ovs/commit/6b8da9e92269f59537b9e3e39d5749b64220e04d
  Author: Jesse Gross <jesse at nicira.com>
  Date:   2015-05-28 (Thu, 28 May 2015)

  Changed paths:
    M lib/odp-util.c

  Log Message:
  -----------
  odp-util: Correctly generate wildcards when formating nested attributes.

When formatting netlink attributes if no mask is present a wildcarded
attribute is synthesized for the purposes of later processing. In
the case of nested attributes this must be done recursively, filling
in the correct attributes at each level rather than just generating
a set of zeros of the correct size. This is done already but it
always uses the attribute type for the top level keys - this corresponds
to nested ENCAP attributes. However, we have several levels of potentially
nested attributes for tunnels that each have their own types.

This uses an approach similar to the kernel where we have sets of
tables for the type of each attribute linked together by pointers.
This allows the mask generation function to automatically traverse
the nested attributes and always get the right types.

Signed-off-by: Jesse Gross <jesse at nicira.com>
Acked-by: Andy Zhou <azhou at nicira.com>


  Commit: 65da723b40a5fdeff6c63c94758fb4121d89fe8a
      https://github.com/openvswitch/ovs/commit/65da723b40a5fdeff6c63c94758fb4121d89fe8a
  Author: Jesse Gross <jesse at nicira.com>
  Date:   2015-05-28 (Thu, 28 May 2015)

  Changed paths:
    M lib/odp-util.c
    M tests/odp.at
    M tests/tunnel.at

  Log Message:
  -----------
  odp-util: Format tunnel attributes directly from netlink.

When we format most netlink attributes we do so from the netlink
itself, iterating through each one and printing the contents out.
However, for tunnels we don't do this - we first convert to the
OVS userspace representation and then format that. While convienient,
this isn't really ideal as the primary use of printing netlink
attributes is debugging and this conversion is lossy, particularly
when the attributes aren't as expected. The result is that unexpected
keys are silently ignored and the level of detail on errors is
minimal.

This situation becomes worse when we introduce support for Geneve.
The conversion to userspace format requires additional information
which we might not have (ovs-dpctl) and is more complicated than
other attributes so it is likely to be confusing in the event of a
bug. The information from the kernel is self-describing so it's
much more reliable to display it directly from the netlink.

This converts tunnel attribute formatting to be more similar to
other types of attributes. As a nice bonus the output becomes
more compact because it doesn't print zeroed out attributes in
cases where they aren't relevant and therefore not present.

Signed-off-by: Jesse Gross <jesse at nicira.com>
Acked-by: Andy Zhou <azhou at nicira.com>


  Commit: e7ae59f9900ede275edfffc82d3a0d0110fd826d
      https://github.com/openvswitch/ovs/commit/e7ae59f9900ede275edfffc82d3a0d0110fd826d
  Author: Jesse Gross <jesse at nicira.com>
  Date:   2015-05-28 (Thu, 28 May 2015)

  Changed paths:
    M lib/dynamic-string.c
    M lib/dynamic-string.h
    M lib/learn.c
    M lib/meta-flow.c
    M lib/util.c
    M lib/util.h

  Log Message:
  -----------
  util: Library routines for printing and scanning large hex integers.

Geneve options are variable length and up to 124 bytes long, which means
that they can't be easily manipulated by the integer string functions
like we do for other fields. This adds a few helper routines to make
these operations easier.

Signed-off-by: Jesse Gross <jesse at nicira.com>
Acked-by: Andy Zhou <azhou at nicira.com>


  Commit: 622a0a8e764d2b1fa6dd8b87f6b282baaac2a9d9
      https://github.com/openvswitch/ovs/commit/622a0a8e764d2b1fa6dd8b87f6b282baaac2a9d9
  Author: Jesse Gross <jesse at nicira.com>
  Date:   2015-05-28 (Thu, 28 May 2015)

  Changed paths:
    M lib/odp-util.c
    M tests/odp.at

  Log Message:
  -----------
  odp-util: Geneve netlink decoding.

Even though userspace does not yet support Geneve options,
the kernel does and there is some basic support for decoding
those attributes. This adds the ability to print Geneve
attributes that might potentially come from the kernel.

Signed-off-by: Jesse Gross <jesse at nicira.com>
Acked-by: Andy Zhou <azhou at nicira.com>


Compare: https://github.com/openvswitch/ovs/compare/58b11928efb7...622a0a8e764d


More information about the git mailing list