[ovs-git] [openvswitch/ovs] 8fd0bb: ofp-util: Rewrite async config encoding and decodi...

GitHub noreply at github.com
Wed Jan 20 17:47:36 UTC 2016


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 8fd0bb602e49bff8b5b6db594083572bb5604025
      https://github.com/openvswitch/ovs/commit/8fd0bb602e49bff8b5b6db594083572bb5604025
  Author: Ben Pfaff <blp at ovn.org>
  Date:   2016-01-20 (Wed, 20 Jan 2016)

  Changed paths:
    M include/openflow/openflow-1.4.h
    M lib/ofp-print.c
    M lib/ofp-util.c
    M lib/ofp-util.h
    M tests/ofp-print.at

  Log Message:
  -----------
  ofp-util: Rewrite async config encoding and decoding to be table-driven.

The encoding and decoding of the OpenFlow and Open vSwitch async config
messages was, until now, a collection of disjoint code that had a lot of
redundancy.  This commit changes it all to be driven using a single central
table.

This rewrite fixes a bug in the OF1.4+ version of the code, which until
now assumed that every TLV in an OF1.4+ asynchronous configuration message
was exactly 8 bytes long, and reported an error if any was a different
length.  This invariant is true of all the standard TLVs already defined,
but it won't be true of any experimenter TLVs (and won't necessarily be
true of any new standard TLVs), so this commit changes it to be more
tolerant.

The OFPACPT_* constants are no longer useful (they are encoded directly
in the table and do not need to be anywhere else), so this removes them.

This commit also adds support for experimenter async config messages.
We don't have any yet but an upcoming commit will add one.

Signed-off-by: Ben Pfaff <blp at ovn.org>
Acked-by: Jarno Rajahalme <jarno at ovn.org>




More information about the git mailing list