[ovs-git] [openvswitch/ovs] db8823: datapath-windows: return TRUE on success in NlAttr...

GitHub noreply at github.com
Fri Sep 19 21:37:49 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: db8823415f79d09297843558d4a3f962d1937b3c
      https://github.com/openvswitch/ovs/commit/db8823415f79d09297843558d4a3f962d1937b3c
  Author: Nithin Raju <nithin at vmware.com>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M datapath-windows/ovsext/Netlink/Netlink.c

  Log Message:
  -----------
  datapath-windows: return TRUE on success in NlAttrValidate

Signed-off-by: Nithin Raju <nithin at vmware.com>
Acked-by: Samuel Ghinet <sghinet at cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp at nicira.com>


  Commit: 824c061a995d8bbcb3c78c750ebbae6859660998
      https://github.com/openvswitch/ovs/commit/824c061a995d8bbcb3c78c750ebbae6859660998
  Author: Nithin Raju <nithin at vmware.com>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M datapath-windows/ovsext/Util.c
    M datapath-windows/ovsext/Util.h

  Log Message:
  -----------
  datapath-windows: add OvsCompareString() to compare strings

In this patch we implement a utility function to compare ANSI
strings using the Rtl* functions. As much as possible, in an
NDIS driver, we stick to Rtl* functions for memory/string
manipulation.

Signed-off-by: Nithin Raju <nithin at vmware.com>
Signed-off-by: Ben Pfaff <blp at nicira.com>


  Commit: 0fd22ae2a256065985adeca650340a8f42e595cb
      https://github.com/openvswitch/ovs/commit/0fd22ae2a256065985adeca650340a8f42e595cb
  Author: Nithin Raju <nithin at vmware.com>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M lib/netlink-socket.c

  Log Message:
  -----------
  lib/netlink-socket.c: add support for nl_transact() on Windows

In this patch, we add support for nl_transact() on Windows using
the OVS_IOCTL_TRANSACT ioctl that sends down the request and gets
the reply in the same call to the kernel.

This is obviously a digression from the way it is implemented in
Linux where all the sends are done at once using sendmsg() and
replies are received one at a time.

Initial implementation was in the Linux way using multiple writes
followed by reads, but decided against it since it is not efficient
and also it complicates the state machine in the kernel.

The Windows implementation has equivalent code for handling corner
cases and error coditions similar to Linux. Some of it is not
applicable yet. Eg. the Windows kernel does not embed an error
in the netlink message itself. There's userspace code nevertheless
for this.

Signed-off-by: Nithin Raju <nithin at vmware.com>
Acked-by: Samuel Ghinet <sghinet at cloudbasesolutions.com>
Acked-by: Eitan Eliahu <eliahue at vmware.com>
Signed-off-by: Ben Pfaff <blp at nicira.com>


  Commit: f92156ae2c86cf1b7c2076f2bca88b6fa10ec632
      https://github.com/openvswitch/ovs/commit/f92156ae2c86cf1b7c2076f2bca88b6fa10ec632
  Author: Nithin Raju <nithin at vmware.com>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M build-aux/extract-odp-netlink-windows-dp-h

  Log Message:
  -----------
  extract-odp-netlink-windows-dp-h: add definition of IFNAMSIZ

The Windows kernel datapath needs the definition of 'IFNAMSIZ' for
specifying attribute sizes in netlink policies. Adding the definition
of 'IFNAMSIZ' to be part of OvsDpInterface.h similar to ETH_ADDR_LEN.

Signed-off-by: Nithin Raju <nithin at vmware.com>
Acked-by: Samuel Ghinet <sghinet at cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp at nicira.com>


  Commit: d1d4a511584f4f8a558547f2a337e650ce5003cc
      https://github.com/openvswitch/ovs/commit/d1d4a511584f4f8a558547f2a337e650ce5003cc
  Author: Nithin Raju <nithin at vmware.com>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M datapath-windows/ovsext/Datapath.c

  Log Message:
  -----------
  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 at 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 at vmware.com>
Tested-by: Nithin Raju <nithin at vmware.com>
Reported-at: https://github.com/openvswitch/ovs-issues/issues/38
Acked-by: Samuel Ghinet <sghinet at cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp at nicira.com>


Compare: https://github.com/openvswitch/ovs/compare/95c9bfd45cbc...d1d4a511584f


More information about the git mailing list