datapath-windows: add OVS_DP_CMD_SET and OVS_DP_CMD_GET transaction support
authorNithin Raju <nithin@vmware.com>
Fri, 19 Sep 2014 21:30:56 +0000 (14:30 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 19 Sep 2014 21:37:03 +0000 (14:37 -0700)
commitd1d4a511584f4f8a558547f2a337e650ce5003cc
tree4b18c6b9f7ce20a1c5cdb2e30dffa367b4dd6e05
parentf92156ae2c86cf1b7c2076f2bca88b6fa10ec632
datapath-windows: add OVS_DP_CMD_SET and OVS_DP_CMD_GET transaction support

In this patch, we add support for two commands, both of them are issued
as part of transactions semantics from userspace:
1. OVS_DP_CMD_SET is used to get the properties of a DP as well as set
some properties. The set operations does not seem to make much sense for
the Windows datpath right now.
2. There's already support for OVS_DP_CMD_GET command issued via the
dump semantics from userspace. Turns out that userspace can issue
OVS_DP_CMD_GET as a transaction.

There's lot of common code between these two commands. Hence combining
the implementation and the review.

Also refactories some of the code in the implementation of dump-based
OVS_DP_CMD_GET, and updated some of the comments.

Validation:
- With these series of patches, I was able to run the following command:
> .\utilities\ovs-dpctl.exe show
system@ovs-system:
    lookups: hit:0 missed:22 lost:0
    flows: 0
- I got so far as to hit the PORT_DUMP command which is currently not
implemented.

Signed-off-by: Nithin Raju <nithin@vmware.com>
Tested-by: Nithin Raju <nithin@vmware.com>
Reported-at: https://github.com/openvswitch/ovs-issues/issues/38
Acked-by: Samuel Ghinet <sghinet@cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
datapath-windows/ovsext/Datapath.c