[ovs-git] [openvswitch/ovs] f99f67: smap: New function smap_get_def().

GitHub noreply at github.com
Mon Aug 8 18:10:42 UTC 2016


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: f99f67bd87c2f188c4c4ca37709887293cc3c4a3
      https://github.com/openvswitch/ovs/commit/f99f67bd87c2f188c4c4ca37709887293cc3c4a3
  Author: Ben Pfaff <blp at ovn.org>
  Date:   2016-08-08 (Mon, 08 Aug 2016)

  Changed paths:
    M lib/bfd.c
    M lib/smap.c
    M lib/smap.h
    M ovn/controller/chassis.c
    M ovn/controller/encaps.c
    M ovn/controller/ovn-controller.c
    M ovn/northd/ovn-northd.c
    M ovn/utilities/ovn-sbctl.c

  Log Message:
  -----------
  smap: New function smap_get_def().

Signed-off-by: Ben Pfaff <blp at ovn.org>
Acked-by: Ryan Moats <rmoats at us.ibm.com>


  Commit: 13c1637f5ba8efc95b63af74b9ae9a3abd884414
      https://github.com/openvswitch/ovs/commit/13c1637f5ba8efc95b63af74b9ae9a3abd884414
  Author: Ben Pfaff <blp at ovn.org>
  Date:   2016-08-08 (Mon, 08 Aug 2016)

  Changed paths:
    M lib/netdev-dpdk.c
    M lib/netdev-linux.c
    M lib/smap.c
    M lib/smap.h
    M vswitchd/bridge.c

  Log Message:
  -----------
  smap: New function smap_get_ullong().

Signed-off-by: Ben Pfaff <blp at ovn.org>
Acked-by: Ryan Moats <rmoats at us.ibm.com>


  Commit: 76da94b5bd33f059be5327d96da14072fb32c0d5
      https://github.com/openvswitch/ovs/commit/76da94b5bd33f059be5327d96da14072fb32c0d5
  Author: Ben Pfaff <blp at ovn.org>
  Date:   2016-08-08 (Mon, 08 Aug 2016)

  Changed paths:
    M ovn/lib/expr.c
    M tests/ovn.at

  Log Message:
  -----------
  expr: Fine-tune parser error message for common typo.

It's easy to type "=" in place of "==" in an expression but the expression
parser's error message was far from clear.  For multibit numeric fields,
it said:
    Explicit `!= 0' is required for inequality test of multibit field
    against 0.
For string fields, the parser treated such an expression as "<name> != 0"
and thus it said:
    String field <name> is not compatible with numeric constant.

This improves the error message in each case to:
    Syntax error at `=' expecting relational operator.
which I hope to be clear.

Signed-off-by: Ben Pfaff <blp at ovn.org>
Acked-by: Ryan Moats <rmoats at us.ibm.com>


  Commit: ab5a5bd9a2d5188d2c1fcf7f8909a1eaf7d04e61
      https://github.com/openvswitch/ovs/commit/ab5a5bd9a2d5188d2c1fcf7f8909a1eaf7d04e61
  Author: Ben Pfaff <blp at ovn.org>
  Date:   2016-08-08 (Mon, 08 Aug 2016)

  Changed paths:
    M ovn/lib/expr.c

  Log Message:
  -----------
  expr: Tolerate having no macros.

A null set of macros seems reasonable, so tolerate it.

Signed-off-by: Ben Pfaff <blp at ovn.org>
Acked-by: Ryan Moats <rmoats at us.ibm.com>


  Commit: 46baac6df441f3db4dceb9c9d332f0069187cb65
      https://github.com/openvswitch/ovs/commit/46baac6df441f3db4dceb9c9d332f0069187cb65
  Author: Ben Pfaff <blp at ovn.org>
  Date:   2016-08-08 (Mon, 08 Aug 2016)

  Changed paths:
    M ovn/lib/expr.c

  Log Message:
  -----------
  expr: Refine handling of error parameter to expr_annotate().

In most cases expr_annotate() set '*errorp' to NULL if it was successful,
but there was one case where it did not.  This corrects that and refines
the comment to better explain the intended behavior.

This didn't affect any existing users because all of them passed in a
pointer that was already NULL.

Signed-off-by: Ben Pfaff <blp at ovn.org>
Acked-by: Ryan Moats <rmoats at us.ibm.com>


  Commit: 6fdd4feedf71a0f687e086fc5b1622106eb48024
      https://github.com/openvswitch/ovs/commit/6fdd4feedf71a0f687e086fc5b1622106eb48024
  Author: Ben Pfaff <blp at ovn.org>
  Date:   2016-08-08 (Mon, 08 Aug 2016)

  Changed paths:
    M ovn/lib/expr.c

  Log Message:
  -----------
  expr: Initialize 'relop' of allocated exprs in crush_and_string().

Every relop at this point is always EXPR_R_EQ, and therefore it seems that
no code actually examined it, so this doesn't appear to fix an existing
bug, but some code I was working on was affected by the uninitialized
member.

Signed-off-by: Ben Pfaff <blp at ovn.org>
Acked-by: Ryan Moats <rmoats at us.ibm.com>


  Commit: addc63174e22f925b2373d91d59ab4c1c81cf9c2
      https://github.com/openvswitch/ovs/commit/addc63174e22f925b2373d91d59ab4c1c81cf9c2
  Author: Ben Pfaff <blp at ovn.org>
  Date:   2016-08-08 (Mon, 08 Aug 2016)

  Changed paths:
    M include/ovn/expr.h
    M ovn/lib/expr.c

  Log Message:
  -----------
  expr: Track writability as part of expr_symbol.

Until now it was only possible to find out whether an expr_symbol was
read/write or read-only, for subfields, by chasing down whether the
eventual parent field was read/write or read-only.  This commit adds
a new 'rw' member that indicates directly.

Signed-off-by: Ben Pfaff <blp at ovn.org>
Acked-by: Ryan Moats <rmoats at us.ibm.com>


  Commit: 6383b6df755fafaf0830081af6cfb45aeaf167fd
      https://github.com/openvswitch/ovs/commit/6383b6df755fafaf0830081af6cfb45aeaf167fd
  Author: Ben Pfaff <blp at ovn.org>
  Date:   2016-08-08 (Mon, 08 Aug 2016)

  Changed paths:
    M include/ovn/expr.h
    M ovn/lib/expr.c

  Log Message:
  -----------
  expr: Give a subfield a direct pointer to its parent in struct expr_symbol.

Until now, symbols that represent subfields and predicates were both
implemented as the same string member, named 'expansion', inside struct
expr.  This makes it a little inconvenient to find the parent of a subfield
for two reasons.  First, one must actually parse the string, e.g. to
convert "vlan.tci[13..15]" into a pointer to a struct.  Second, and more
importantly, to parse the string it's necessary to have access to the
symbol table, which isn't always convenient to pass around.  This commit
avoids the problem by breaking apart subfields and predicates and giving
the former a direct pointer to the parent symbol.

We could do the same thing for predicates by storing a pointer to a
pre-built struct expr, but so far it's not necessary.

Signed-off-by: Ben Pfaff <blp at ovn.org>
Acked-by: Ryan Moats <rmoats at us.ibm.com>


  Commit: 98926186f89c2dee40646fac6fe676332aabd3f8
      https://github.com/openvswitch/ovs/commit/98926186f89c2dee40646fac6fe676332aabd3f8
  Author: Ben Pfaff <blp at ovn.org>
  Date:   2016-08-08 (Mon, 08 Aug 2016)

  Changed paths:
    M ovn/controller/lflow.c
    M ovn/controller/physical.c
    M ovn/lib/logical-fields.h

  Log Message:
  -----------
  logical-fields: Get rid of MFF_LOG_REGS in favor of something sensible.

It's super-awkward to have to define a macro to use MFF_LOG_REGS; this
makes more sense.

Signed-off-by: Ben Pfaff <blp at ovn.org>
Acked-by: Ryan Moats <rmoats at us.ibm.com>


  Commit: 82aa3a226b90b4454a07edbd3ac7ec27dbe551ed
      https://github.com/openvswitch/ovs/commit/82aa3a226b90b4454a07edbd3ac7ec27dbe551ed
  Author: Ben Pfaff <blp at ovn.org>
  Date:   2016-08-08 (Mon, 08 Aug 2016)

  Changed paths:
    M ovn/controller/lflow.c

  Log Message:
  -----------
  lflow: Correct register definitions to use subfields for overlaps.

OVN expressions need to know what fields overlap or alias one another.
This is supposed to be done via subfields: if two fields overlap, then the
smaller one should be defined as a subfield of the larger one.  For
example, reg0 should be defined as xxreg0[96..127].  The symbol table in
lflow didn't do this, so it's possible for confusion to result.  (I don't
have evidence of this actually happening, because it would only occur
in a case where the same bits of a field were referred to with different
names.)

This commit fixes the problem.  It deserves a test, but that's somewhat
difficult at this point, so it will actually happen in a future commit.

Signed-off-by: Ben Pfaff <blp at ovn.org>
Acked-by: Ryan Moats <rmoats at us.ibm.com>


  Commit: 7700eea0cce50ce18ed435f3515adf270d1d7694
      https://github.com/openvswitch/ovs/commit/7700eea0cce50ce18ed435f3515adf270d1d7694
  Author: Ben Pfaff <blp at ovn.org>
  Date:   2016-08-08 (Mon, 08 Aug 2016)

  Changed paths:
    M include/ovn/expr.h
    M ovn/controller/lflow.c
    M ovn/lib/automake.mk
    M ovn/lib/expr.c
    A ovn/lib/logical-fields.c
    M ovn/lib/logical-fields.h
    M tests/ovn.at
    M tests/test-ovn.c

  Log Message:
  -----------
  ovn: Use a common symbol table for ovn-controller and test-ovn.

Most of the differences were superficial, so it's better to reduce code
duplication.

This also adds a test to ensure that the OVN logical registers are built
properly out of subfields.

Signed-off-by: Ben Pfaff <blp at ovn.org>
Acked-by: Ryan Moats <rmoats at us.ibm.com>


  Commit: 2277b860985f809db4392c8c6e29dcf5618ce709
      https://github.com/openvswitch/ovs/commit/2277b860985f809db4392c8c6e29dcf5618ce709
  Author: Ben Pfaff <blp at ovn.org>
  Date:   2016-08-08 (Mon, 08 Aug 2016)

  Changed paths:
    M ovn/lib/logical-fields.c
    M tests/ovn.at

  Log Message:
  -----------
  logical-fields: Beautify conntrack definitions.

The previous definitions, in my opinion, were ugly and also went beyond
80 columns.

This also adds a test that I generated based on the previous version, to
guard against regression.

Signed-off-by: Ben Pfaff <blp at ovn.org>
Acked-by: Ryan Moats <rmoats at us.ibm.com>


Compare: https://github.com/openvswitch/ovs/compare/0fdc431222d0...2277b860985f


More information about the git mailing list