[ovs-dev] [PATCH 03/15] datapath-windows: Add WinlProtocol

Nithin Raju nithin at vmware.com
Wed Aug 6 18:17:19 UTC 2014


hi Sam,
Thanks for posting the patch series. We'll review them.

I am a little confused the netlink patch. From the IRC meeting on 8/5, my understanding is that we'd come up with a proposal for how to go about making these changes: VMware would come up with something on the kernel side, and cloudbase would do the same for userspace side. Am I missing something? As a note, we have some patches too, but we held off from posting since the consensus from the meeting is that we'll discuss the proposal first and then post the patches.

If your idea is to post a patch that we could potentially use, sure, we'll definitely consider that. I am not trying to say at all that you should not post the patch, but we should avoid duplicate effort, that's all.

I'll review the patches and give out comments.

thanks,
Nithin


On Aug 6, 2014, at 9:09 AM, Samuel Ghinet <sghinet at cloudbasesolutions.com>
 wrote:

> WinlProtocol: km-um attribute and commands constants
> 
> openvswitch.h was does not seem to have been originally designed to consider the Windows platform as well:
> a) coding style differs from linux kernel to windows kernel, and we cannot combine the two in the windows kernel
> code.
> b) the structs corresponding to the netlink attributes (e.g. flow stats, ipv4 key struct, etc.)  are
> implementation detail. Both the names (coding style differences) and implementation details vary.
> 
> Until / unless we have a platform-independent openvswitch.h which excludes implementation details,
> we should use WinlProtocol.h for windows.
> 
> Signed-off-by: Samuel Ghinet <sghinet at cloudbasesolutions.com>
> ---
> datapath-windows/ovsext/Winetlink/WinlProtocol.h | 435 +++++++++++++++++++++++
> datapath-windows/ovsext/ovsext.vcxproj           |   2 +-
> datapath-windows/ovsext/ovsext.vcxproj.filters   |   4 +-
> datapath-windows/ovsext/precomp.h                |   6 -
> 4 files changed, 439 insertions(+), 8 deletions(-)
> create mode 100644 datapath-windows/ovsext/Winetlink/WinlProtocol.h
> 
> diff --git a/datapath-windows/ovsext/Winetlink/WinlProtocol.h b/datapath-windows/ovsext/Winetlink/WinlProtocol.h
> new file mode 100644
> index 0000000..e4ceb06
> --- /dev/null
> +++ b/datapath-windows/ovsext/Winetlink/WinlProtocol.h
> @@ -0,0 +1,435 @@
> +/*
> + * Copyright (c) 2007-2014 Nicira, Inc.
> + *
> + * This file is offered under your choice of two licenses: Apache 2.0 or GNU
> + * GPL 2.0 or later.  The permission statements for each of these licenses is
> + * given below.  You may license your modifications to this file under either
> + * of these licenses or both.  If you wish to license your modifications under
> + * only one of these licenses, delete the permission text for the other
> + * license.
> + *
> + * ----------------------------------------------------------------------
> + * Licensed under the Apache License, Version 2.0 (the "License");
> + * you may not use this file except in compliance with the License.
> + * You may obtain a copy of the License at:
> + *
> + *     https://urldefense.proofpoint.com/v1/url?u=http://www.apache.org/licenses/LICENSE-2.0&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=ubrOpIWavCMqX4l4j1LEVpTfDj%2FD5Qyn8KCoJIBGvzo%3D%0A&m=N2utwMrmIDeEIU3Mx6a5tAndyC4wJgEM%2FOMyDxdKBhY%3D%0A&s=f00fecdaee68b392294f1800063e07f20a35e63488ddd63ff2e10c1cc383ba9a
> + *
> + * Unless required by applicable law or agreed to in writing, software
> + * distributed under the License is distributed on an "AS IS" BASIS,
> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> + * See the License for the specific language governing permissions and
> + * limitations under the License.
> + * ----------------------------------------------------------------------
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of version 2 of the GNU General Public
> + * License as published by the Free Software Foundation.
> + *
> + * This program is distributed in the hope that it will be useful, but
> + * WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + * General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
> + * 02110-1301, USA
> + * ----------------------------------------------------------------------
> + */
> +
> + /*
> +Copyright 2014 Cloudbase Solutions Srl
> +
> +Licensed under the Apache License, Version 2.0 (the "License");
> +you may not use this file except in compliance with the License.
> +You may obtain a copy of the License at
> +
> +http ://www.apache.org/licenses/LICENSE-2.0
> +
> +Unless required by applicable law or agreed to in writing, software
> +distributed under the License is distributed on an "AS IS" BASIS,
> +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> +See the License for the specific language governing permissions and
> +limitations under the License.
> +*/
> +
> + #pragma once
> +
> +/* VERSIONS, FAMILY NAMES, FAMILY GROUPS */
> +
> +#define OVS_DATAPATH_FAMILY  "ovs_datapath"
> +#define OVS_DATAPATH_MCGROUP "ovs_datapath"
> +
> +/* V2:
> +*   - API users are expected to provide OVS_DP_ATTR_USER_FEATURES
> +*     when creating the datapath.
> +*/
> +#define OVS_DATAPATH_VERSION 2
> +
> +/* First OVS datapath version to support features */
> +#define OVS_DP_VER_FEATURES 2
> +
> +#define OVS_PACKET_FAMILY "ovs_packet"
> +#define OVS_PACKET_VERSION 0x1
> +
> +#define OVS_VPORT_FAMILY  "ovs_vport"
> +#define OVS_VPORT_MCGROUP "ovs_vport"
> +#define OVS_VPORT_VERSION 0x1
> +
> +#define OVS_FLOW_FAMILY  "ovs_flow"
> +#define OVS_FLOW_MCGROUP "ovs_flow"
> +#define OVS_FLOW_VERSION 0x1
> +
> +/* WINETLINK COMMANDS */
> +
> +enum
> +{
> +    OVS_DP_CMD_UNSPEC,
> +    OVS_DP_CMD_NEW,
> +    OVS_DP_CMD_DEL,
> +    OVS_DP_CMD_GET,
> +    OVS_DP_CMD_SET
> +};
> +
> +enum
> +{
> +    OVS_PACKET_CMD_UNSPEC,
> +
> +    /* Kernel-to-user notifications. */
> +    OVS_PACKET_CMD_MISS,    /* Flow table miss. */
> +    OVS_PACKET_CMD_ACTION,  /* OVS_ACTION_ATTR_USERSPACE action. */
> +
> +    /* Userspace commands. */
> +    OVS_PACKET_CMD_EXECUTE  /* Apply actions to a packet. */
> +};
> +
> +enum
> +{
> +    OVS_VPORT_CMD_UNSPEC,
> +    OVS_VPORT_CMD_NEW,
> +    OVS_VPORT_CMD_DEL,
> +    OVS_VPORT_CMD_GET,
> +    OVS_VPORT_CMD_SET
> +};
> +
> +enum
> +{
> +    OVS_FLOW_CMD_UNSPEC,
> +    OVS_FLOW_CMD_NEW,
> +    OVS_FLOW_CMD_DEL,
> +    OVS_FLOW_CMD_GET,
> +    OVS_FLOW_CMD_SET
> +};
> +
> +/* ATTRIBUTES */
> +
> +/**
> + * Attributes for %OVS_DP_* commands.
> + * @OVS_DP_ATTR_NAME: Name of the network device that serves as the "local
> + * port".  This is the name of the network device whose dp_ifindex is given in
> + * the dpIfIndex field.  Always present in notifications.  Required in
> + * %OVS_DP_NEW requests.  May be used as an alternative to specifying
> + * dpIfindex in other requests (with a dpIfindex of 0).
> + * @OVS_DP_ATTR_UPCALL_PID: The Winetlink file HANDLE in userspace that is initially
> + * set on the datapath port (for OVS_ACTION_ATTR_MISS).  Only valid on
> + * %OVS_DP_CMD_NEW requests. A value of zero indicates that upcalls should
> + * not be sent.
> + * @OVS_DP_ATTR_STATS: Statistics about packets that have passed through the
> + * datapath.  Always present in notifications.
> + * @OVS_DP_ATTR_MEGAFLOW_STATS: Statistics about mega flow masks usage for the
> + * datapath. Always present in notifications.
> + *
> + * These attributes follow the dpIfIndex field within the Generic Winetlink
> + * payload for %OVS_DP_* commands.
> + */
> +enum
> +{
> +    OVS_DP_ATTR_UNSPEC,
> +    OVS_DP_ATTR_NAME,            /* name of dpIfindex netdev */
> +    OVS_DP_ATTR_UPCALL_PID,        /* Winetlink PID to receive upcalls */
> +    OVS_DP_ATTR_STATS,            /* OVS_DATAPATH_STATS */
> +    OVS_DP_ATTR_MEGAFLOW_STATS,    /* OVS_DATAPATH_MEGAFLOW_STATS */
> +    OVS_DP_ATTR_USER_FEATURES,    /* OVS_DATAPATH_FLAG_*  */
> +    __OVS_DP_ATTR_MAX
> +};
> +
> +#define OVS_DP_ATTR_MAX (__OVS_DP_ATTR_MAX - 1)
> +
> +/**
> + * Attributes for %OVS_PACKET_* commands.
> + * @OVS_PACKET_ATTR_PACKET: Present for all notifications.  Contains the entire
> + * packet as received, from the start of the Ethernet header onward.  For
> + * %OVS_PACKET_CMD_ACTION, %OVS_PACKET_ATTR_PACKET reflects changes made by
> + * actions preceding %OVS_ACTION_ATTR_USERSPACE, but %OVS_PACKET_ATTR_KEY is
> + * the flow key extracted from the packet as originally received.
> + * @OVS_PACKET_ATTR_KEY: Present for all notifications.  Contains the flow key
> + * extracted from the packet as nested %OVS_KEY_ATTR_* attributes.  This allows
> + * userspace to adapt its flow setup strategy by comparing its notion of the
> + * flow key against the kernel's.  When used with %OVS_PACKET_CMD_EXECUTE, only
> + * metadata key fields (e.g. priority, skb mark) are honored.  All the packet
> + * header fields are parsed from the packet instead.
> + * @OVS_PACKET_ATTR_ACTIONS: Contains actions for the packet.  Used
> + * for %OVS_PACKET_CMD_EXECUTE.  It has nested %OVS_ACTION_ATTR_* attributes.
> + * @OVS_PACKET_ATTR_USERDATA: Present for an %OVS_PACKET_CMD_ACTION
> + * notification if the %OVS_ACTION_ATTR_USERSPACE action specified an
> + * %OVS_USERSPACE_ATTR_USERDATA attribute, with the same length and content
> + * specified there.
> + *
> + * These attributes follow the dpIfIndex field within the Generic Winetlink
> + * payload for %OVS_PACKET_* commands.
> + */
> +enum
> +{
> +    OVS_PACKET_ATTR_UNSPEC,
> +    OVS_PACKET_ATTR_PACKET,      /* Packet data. */
> +    OVS_PACKET_ATTR_KEY,         /* Nested OVS_KEY_ATTR_* attributes. */
> +    OVS_PACKET_ATTR_ACTIONS,     /* Nested OVS_ACTION_ATTR_* attributes. */
> +    OVS_PACKET_ATTR_USERDATA,    /* OVS_ACTION_ATTR_USERSPACE arg. */
> +    __OVS_PACKET_ATTR_MAX
> +};
> +
> +#define OVS_PACKET_ATTR_MAX (__OVS_PACKET_ATTR_MAX - 1)
> +
> +/**
> + * Attributes for %OVS_VPORT_* commands.
> + * @OVS_VPORT_ATTR_PORT_NO: 32-bit port number within datapath.
> + * @OVS_VPORT_ATTR_TYPE: 32-bit %OVS_VPORT_TYPE_* constant describing the type
> + * of vport.
> + * @OVS_VPORT_ATTR_NAME: Name of vport.  For a vport based on a network device
> + * this is the name of the network device.  Maximum length %IFNAMSIZ-1 bytes
> + * plus a null terminator.
> + * @OVS_VPORT_ATTR_OPTIONS: Vport-specific configuration information.
> + * @OVS_VPORT_ATTR_UPCALL_PID: The array of Winetlink pids associated to file HANDLE
> + * in userspace among which OVS_PACKET_CMD_MISS upcalls will be distributed for
> + * packets received on this port.  If this is a single-element array of value 0,
> + * upcalls should not be sent.
> + * @OVS_VPORT_ATTR_STATS: An OVS_DPPORT_STATS giving statistics for
> + * packets sent or received through the vport.
> + *
> + * These attributes follow the dpIfIndex field within the Generic Winetlink
> + * payload for %OVS_VPORT_* commands.
> + *
> + * For %OVS_VPORT_CMD_NEW requests, the %OVS_VPORT_ATTR_TYPE and
> + * %OVS_VPORT_ATTR_NAME attributes are required.  %OVS_VPORT_ATTR_PORT_NO is
> + * optional; if not specified a free port number is automatically selected.
> + * Whether %OVS_VPORT_ATTR_OPTIONS is required or optional depends on the type
> + * of vport.  %OVS_VPORT_ATTR_STATS is optional and other attributes are
> + * ignored.
> + *
> + * For other requests, if %OVS_VPORT_ATTR_NAME is specified then it is used to
> + * look up the vport to operate on; otherwise the dpIfIndex field
> + * plus %OVS_VPORT_ATTR_PORT_NO determine the vport.
> + */
> +enum
> +{
> +    OVS_VPORT_ATTR_UNSPEC,
> +    OVS_VPORT_ATTR_PORT_NO,    /* UINT32 port number within datapath */
> +    OVS_VPORT_ATTR_TYPE,    /* UINT32 OVS_VPORT_TYPE_* constant. */
> +    OVS_VPORT_ATTR_NAME,    /* string name, up to IFNAMSIZ bytes long */
> +    OVS_VPORT_ATTR_OPTIONS, /* nested attributes, varies by vport type */
> +    OVS_VPORT_ATTR_UPCALL_PID, /* array of UINT32 Winetlink pids associated to
> +                              file HANDLEs in userspace */
> +                /* receiving upcalls */
> +    OVS_VPORT_ATTR_STATS,    /* OVS_DPPORT_STATS */
> +    __OVS_VPORT_ATTR_MAX
> +};
> +
> +#define OVS_VPORT_ATTR_MAX (__OVS_VPORT_ATTR_MAX - 1)
> +
> +/* OVS_VPORT_ATTR_OPTIONS attributes for tunnels.
> + */
> +enum
> +{
> +    OVS_TUNNEL_ATTR_UNSPEC,
> +    OVS_TUNNEL_ATTR_DST_PORT, /* 16-bit UDP port, used by L4 tunnels. */
> +    __OVS_TUNNEL_ATTR_MAX
> +};
> +
> +#define OVS_TUNNEL_ATTR_MAX (__OVS_TUNNEL_ATTR_MAX - 1)
> +
> +enum ovs_key_attr
> +{
> +    OVS_KEY_ATTR_UNSPEC,
> +    OVS_KEY_ATTR_ENCAP,    /* Nested set of encapsulated attributes. */
> +    OVS_KEY_ATTR_PRIORITY,  /* UINT32 packet priority - not used on windows*/
> +    OVS_KEY_ATTR_IN_PORT,   /* UINT32 OVS dp port number */
> +    OVS_KEY_ATTR_ETHERNET,  /* OVS_PI_ETHERNET_ADDRESS */
> +    OVS_KEY_ATTR_VLAN,        /* BE16 VLAN TCI */
> +    OVS_KEY_ATTR_ETHERTYPE,    /* BE16 Ethernet type */
> +    OVS_KEY_ATTR_IPV4,      /* OVS_PI_IPV4 */
> +    OVS_KEY_ATTR_IPV6,      /* OVS_PI_IPV6 */
> +    OVS_KEY_ATTR_TCP,       /* OVS_PI_TCP */
> +    OVS_KEY_ATTR_UDP,       /* OVS_PI_UDP */
> +    OVS_KEY_ATTR_ICMP,      /* OVS_PI_ICMP */
> +    OVS_KEY_ATTR_ICMPV6,    /* OVS_PI_ICMPV6 */
> +    OVS_KEY_ATTR_ARP,       /* OVS_PI_ARP */
> +    OVS_KEY_ATTR_ND,        /* OVS_PI_NEIGHBOR_DISCOVERY */
> +    OVS_KEY_ATTR_SKB_MARK,  /* UINT32 packet mark - unused on windows */
> +    OVS_KEY_ATTR_TUNNEL,    /* Nested set of tunnel attributes */
> +    OVS_KEY_ATTR_SCTP,      /* OVS_PI_SCTP */
> +    OVS_KEY_ATTR_TCP_FLAGS,    /* BE16 TCP flags. */
> +    OVS_KEY_ATTR_DP_HASH,    /* UINT32 hash value. Value 0 indicates the hash
> +                   is not computed by the datapath. */
> +    OVS_KEY_ATTR_RECIRC_ID, /* UINT32 recircId */
> +    OVS_KEY_ATTR_MPLS,      /* array of OVS_PI_MPLS-s.
> +                 * The implementation may restrict
> +                 * the accepted length of the array. */
> +
> +    /* Only used within kernel data path. */
> +    OVS_KEY_ATTR_TUNNEL_INFO,  /* OVS_PI_TUNNEL */
> +    __OVS_KEY_ATTR_MAX
> +};
> +
> +#define OVS_KEY_ATTR_MAX (__OVS_KEY_ATTR_MAX - 1)
> +
> +enum
> +{
> +    OVS_TUNNEL_KEY_ATTR_ID,                /* BE64 Tunnel ID */
> +    OVS_TUNNEL_KEY_ATTR_IPV4_SRC,        /* BE32 src IP address. */
> +    OVS_TUNNEL_KEY_ATTR_IPV4_DST,        /* BE32 dst IP address. */
> +    OVS_TUNNEL_KEY_ATTR_TOS,            /* UINT8 Tunnel IP ToS. */
> +    OVS_TUNNEL_KEY_ATTR_TTL,            /* UINT8 Tunnel IP TTL. */
> +    OVS_TUNNEL_KEY_ATTR_DONT_FRAGMENT,    /* No argument, set DF. */
> +    OVS_TUNNEL_KEY_ATTR_CSUM,            /* No argument. CSUM packet. */
> +    OVS_TUNNEL_KEY_ATTR_OAM,            /* No argument, OAM frame. */
> +    OVS_TUNNEL_KEY_ATTR_GENEVE_OPTS,    /* Array of Geneve options */
> +    __OVS_TUNNEL_KEY_ATTR_MAX
> +};
> +#define OVS_TUNNEL_KEY_ATTR_MAX (__OVS_TUNNEL_KEY_ATTR_MAX - 1)
> +
> +/**
> + * attributes for %OVS_FLOW_* commands.
> + * @OVS_FLOW_ATTR_KEY: Nested %OVS_KEY_ATTR_* attributes specifying the flow
> + * key.  Always present in notifications.  Required for all requests (except
> + * dumps).
> + * @OVS_FLOW_ATTR_ACTIONS: Nested %OVS_ACTION_ATTR_* attributes specifying
> + * the actions to take for packets that match the key.  Always present in
> + * notifications.  Required for %OVS_FLOW_CMD_NEW requests, optional for
> + * %OVS_FLOW_CMD_SET requests.  An %OVS_FLOW_CMD_SET without
> + * %OVS_FLOW_ATTR_ACTIONS will not modify the actions.  To clear the actions,
> + * an %OVS_FLOW_ATTR_ACTIONS without any nested attributes must be given.
> + * @OVS_FLOW_ATTR_STATS: OVS_WINL_FLOW_STATS giving statistics for this
> + * flow.  Present in notifications if the stats would be nonzero.  Ignored in
> + * requests.
> + * @OVS_FLOW_ATTR_TCP_FLAGS: An 8-bit value giving the OR'd value of all of the
> + * TCP flags seen on packets in this flow.  Only present in notifications for
> + * TCP flows, and only if it would be nonzero.  Ignored in requests.
> + * @OVS_FLOW_ATTR_USED: A 64-bit integer giving the time, in milliseconds on
> + * the system monotonic clock, at which a packet was last processed for this
> + * flow.  Only present in notifications if a packet has been processed for this
> + * flow.  Ignored in requests.
> + * @OVS_FLOW_ATTR_CLEAR: If present in a %OVS_FLOW_CMD_SET request, clears the
> + * last-used time, accumulated TCP flags, and statistics for this flow.
> + * Otherwise ignored in requests.  Never present in notifications.
> + * @OVS_FLOW_ATTR_MASK: Nested %OVS_KEY_ATTR_* attributes specifying the
> + * mask bits for wildcarded flow match. Mask bit value '1' specifies exact
> + * match with corresponding flow key bit, while mask bit value '0' specifies
> + * a wildcarded match. Omitting attribute is treated as wildcarding all
> + * corresponding fields. Optional for all requests. If not present,
> + * all flow key bits are exact match bits.
> + *
> + * These attributes follow the dpIfIndex field within the Generic Winetlink
> + * payload for %OVS_FLOW_* commands.
> + */
> +enum
> +{
> +    OVS_FLOW_ATTR_UNSPEC,
> +    OVS_FLOW_ATTR_KEY,       /* Sequence of OVS_KEY_ATTR_* attributes. */
> +    OVS_FLOW_ATTR_ACTIONS,   /* Nested OVS_ACTION_ATTR_* attributes. */
> +    OVS_FLOW_ATTR_STATS,     /* OVS_WINL_FLOW_STATS. */
> +    OVS_FLOW_ATTR_TCP_FLAGS, /* 8-bit OR'd TCP flags. */
> +    OVS_FLOW_ATTR_USED,      /* UINT64 msecs last used in monotonic time. */
> +    OVS_FLOW_ATTR_CLEAR,     /* Flag to clear stats, tcp_flags, used. */
> +    OVS_FLOW_ATTR_MASK,      /* Sequence of OVS_KEY_ATTR_* attributes. */
> +    __OVS_FLOW_ATTR_MAX
> +};
> +
> +#define OVS_FLOW_ATTR_MAX (__OVS_FLOW_ATTR_MAX - 1)
> +
> +/**
> + * Attributes for %OVS_ACTION_ATTR_SAMPLE action.
> + * @OVS_SAMPLE_ATTR_PROBABILITY: 32-bit fraction of packets to sample with
> + * @OVS_ACTION_ATTR_SAMPLE.  A value of 0 samples no packets, a value of
> + * %UINT32_MAX samples all packets and intermediate values sample intermediate
> + * fractions of packets.
> + * @OVS_SAMPLE_ATTR_ACTIONS: Set of actions to execute in sampling event.
> + * Actions are passed as nested attributes.
> + *
> + * Executes the specified actions with the given probability on a per-packet
> + * basis.
> + */
> +enum
> +{
> +    OVS_SAMPLE_ATTR_UNSPEC,
> +    OVS_SAMPLE_ATTR_PROBABILITY, /* UINT32 number */
> +    OVS_SAMPLE_ATTR_ACTIONS,     /* Nested OVS_ACTION_ATTR_* attributes. */
> +    __OVS_SAMPLE_ATTR_MAX,
> +};
> +
> +#define OVS_SAMPLE_ATTR_MAX (__OVS_SAMPLE_ATTR_MAX - 1)
> +
> +/**
> + * Attributes for %OVS_ACTION_ATTR_USERSPACE action.
> + * @OVS_USERSPACE_ATTR_PID: UINT32 Netlink PID to which the %OVS_PACKET_CMD_ACTION
> + * message should be sent.  Required.
> + * @OVS_USERSPACE_ATTR_USERDATA: If present, its variable-length argument is
> + * copied to the %OVS_PACKET_CMD_ACTION message as %OVS_PACKET_ATTR_USERDATA.
> + */
> +enum
> +{
> +    OVS_USERSPACE_ATTR_UNSPEC,
> +    OVS_USERSPACE_ATTR_PID,          /* UINT32 Winetlink PID to receive upcalls. */
> +    OVS_USERSPACE_ATTR_USERDATA,  /* Optional user-specified cookie. */
> +    __OVS_USERSPACE_ATTR_MAX
> +};
> +
> +#define OVS_USERSPACE_ATTR_MAX (__OVS_USERSPACE_ATTR_MAX - 1)
> +
> +/**
> + * Action types.
> + *
> + * @OVS_ACTION_ATTR_OUTPUT: Output packet to port.
> + * @OVS_ACTION_ATTR_USERSPACE: Send packet to userspace according to nested
> + * %OVS_USERSPACE_ATTR_* attributes.
> + * @OVS_ACTION_ATTR_PUSH_VLAN: Push a new outermost 802.1Q header onto the
> + * packet.
> + * @OVS_ACTION_ATTR_POP_VLAN: Pop the outermost 802.1Q header off the packet.
> + * @OVS_ACTION_ATTR_SAMPLE: Probabilitically executes actions, as specified in
> + * the nested %OVS_SAMPLE_ATTR_* attributes.
> + * @OVS_ACTION_ATTR_SET: Replaces the contents of an existing header.  The
> + * single nested %OVS_KEY_ATTR_* attribute specifies a header to modify and its
> + * value.
> + * @OVS_ACTION_RECIRC: Recirculate within the data path.
> + * @OVS_ACTION_HASH: Compute and set flow hash value.
> + * @OVS_ACTION_ATTR_PUSH_MPLS: Push a new MPLS label stack entry onto the
> + * top of the packets MPLS label stack.  Set the ethertype of the
> + * encapsulating frame to either %ETH_P_MPLS_UC or %ETH_P_MPLS_MC to
> + * indicate the new packet contents.
> + * @OVS_ACTION_ATTR_POP_MPLS: Pop an MPLS label stack entry off of the
> + * packet's MPLS label stack.  Set the encapsulating frame's ethertype to
> + * indicate the new packet contents. This could potentially still be
> + * %ETH_P_MPLS if the resulting MPLS label stack is not empty.  If there
> + * is no MPLS label stack, as determined by ethertype, no action is taken.
> + *
> + * Only a single header can be set with a single %OVS_ACTION_ATTR_SET.  Not all
> + * fields within a header are modifiable, e.g. the IPv4 protocol and fragment
> + * type may not be changed.
> + */
> +
> +enum
> +{
> +    OVS_ACTION_ATTR_UNSPEC,
> +    OVS_ACTION_ATTR_OUTPUT,          /* UINT32 port number. */
> +    OVS_ACTION_ATTR_USERSPACE,    /* Nested OVS_USERSPACE_ATTR_*. */
> +    OVS_ACTION_ATTR_SET,          /* One nested OVS_KEY_ATTR_*. */
> +    OVS_ACTION_ATTR_PUSH_VLAN,    /* OVS_ACTION_PUSH_VLAN. */
> +    OVS_ACTION_ATTR_POP_VLAN,     /* No argument. */
> +    OVS_ACTION_ATTR_SAMPLE,       /* Nested OVS_SAMPLE_ATTR_*. */
> +    OVS_ACTION_ATTR_RECIRC,          /* UINT32 recirculationId. */
> +    OVS_ACTION_ATTR_HASH,          /* OVS_ACTION_HASH. */
> +    OVS_ACTION_ATTR_PUSH_MPLS,    /* OVS_ACTION_PUSH_MPLS. */
> +    OVS_ACTION_ATTR_POP_MPLS,     /* BE16 etherType. */
> +    __OVS_ACTION_ATTR_MAX
> +};
> +
> +#define OVS_ACTION_ATTR_MAX (__OVS_ACTION_ATTR_MAX - 1)
> \ No newline at end of file
> diff --git a/datapath-windows/ovsext/ovsext.vcxproj b/datapath-windows/ovsext/ovsext.vcxproj
> index bf793f0..9c11a34 100644
> --- a/datapath-windows/ovsext/ovsext.vcxproj
> +++ b/datapath-windows/ovsext/ovsext.vcxproj
> @@ -70,7 +70,6 @@
>     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
>   </ImportGroup>
>   <ItemGroup Label="WrappedTaskItems">
> -    <ClInclude Include="..\..\datapath\linux\compat\include\linux\openvswitch.h" />
>     <ClInclude Include="Core\Atomic.h" />
>     <ClInclude Include="Core\Debug.h" />
>     <ClInclude Include="Core\IpHelper.h" />
> @@ -96,6 +95,7 @@
>     <ClInclude Include="Winetlink\Ioctl.h" />
>     <ClInclude Include="Winetlink\Netlink.h" />
>     <ClInclude Include="Winetlink\User.h" />
> +    <ClInclude Include="Winetlink\WinlProtocol.h" />
>   </ItemGroup>
>   <PropertyGroup>
>     <TargetName>OVSExt</TargetName>
> diff --git a/datapath-windows/ovsext/ovsext.vcxproj.filters b/datapath-windows/ovsext/ovsext.vcxproj.filters
> index 6b77d8f..d2fdf5f 100644
> --- a/datapath-windows/ovsext/ovsext.vcxproj.filters
> +++ b/datapath-windows/ovsext/ovsext.vcxproj.filters
> @@ -1,7 +1,6 @@
> ?<?xml version="1.0" encoding="utf-8"?>
> <Project ToolsVersion="12.0" xmlns="https://urldefense.proofpoint.com/v1/url?u=http://schemas.microsoft.com/developer/msbuild/2003&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=ubrOpIWavCMqX4l4j1LEVpTfDj%2FD5Qyn8KCoJIBGvzo%3D%0A&m=N2utwMrmIDeEIU3Mx6a5tAndyC4wJgEM%2FOMyDxdKBhY%3D%0A&s=c6236268c1251e6723f41c7bcc67f3af2421f4fd4ad1184bd894c0b107b571ff">
>   <ItemGroup>
> -    <ClInclude Include="..\..\datapath\linux\compat\include\linux\openvswitch.h" />
>     <ClInclude Include="Core\Atomic.h">
>       <Filter>Core</Filter>
>     </ClInclude>
> @@ -75,6 +74,9 @@
>       <Filter>Winetlink</Filter>
>     </ClInclude>
>     <ClInclude Include="precomp.h" />
> +    <ClInclude Include="Winetlink\WinlProtocol.h">
> +      <Filter>Winetlink</Filter>
> +    </ClInclude>
>   </ItemGroup>
>   <ItemGroup>
>     <ResourceCompile Include="ovsext.rc" />
> diff --git a/datapath-windows/ovsext/precomp.h b/datapath-windows/ovsext/precomp.h
> index 26a8f97..f54df0e 100644
> --- a/datapath-windows/ovsext/precomp.h
> +++ b/datapath-windows/ovsext/precomp.h
> @@ -24,9 +24,3 @@
> #include "Core/Types.h"
> #include "Core/Util.h"
> #include "OpenFlow/Pub.h"
> -/*
> - * Include openvswitch.h from userspace. Changing the location the file from
> - * include/linux is pending discussion.
> - */
> -
> -#include "openvswitch.h"
> --
> 1.8.3.msysgit.0
> 
> 
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://urldefense.proofpoint.com/v1/url?u=http://openvswitch.org/mailman/listinfo/dev&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=ubrOpIWavCMqX4l4j1LEVpTfDj%2FD5Qyn8KCoJIBGvzo%3D%0A&m=N2utwMrmIDeEIU3Mx6a5tAndyC4wJgEM%2FOMyDxdKBhY%3D%0A&s=0a6d5f4f92f0c8d3141a93a6db20e9438b171368b14475ded46d16384722a633




More information about the dev mailing list