diff options
Diffstat (limited to 'include/uapi/linux/openvswitch.h')
| -rw-r--r-- | include/uapi/linux/openvswitch.h | 36 | 
1 files changed, 31 insertions, 5 deletions
diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h index a74d375b439..0b979ee4bfc 100644 --- a/include/uapi/linux/openvswitch.h +++ b/include/uapi/linux/openvswitch.h @@ -40,7 +40,15 @@ struct ovs_header {  #define OVS_DATAPATH_FAMILY  "ovs_datapath"  #define OVS_DATAPATH_MCGROUP "ovs_datapath" -#define OVS_DATAPATH_VERSION 0x1 + +/* 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  enum ovs_datapath_cmd {  	OVS_DP_CMD_UNSPEC, @@ -63,15 +71,19 @@ enum ovs_datapath_cmd {   * 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 &struct ovs_header within the Generic Netlink   * payload for %OVS_DP_* commands.   */  enum ovs_datapath_attr {  	OVS_DP_ATTR_UNSPEC, -	OVS_DP_ATTR_NAME,       /* name of dp_ifindex netdev */ -	OVS_DP_ATTR_UPCALL_PID, /* Netlink PID to receive upcalls */ -	OVS_DP_ATTR_STATS,      /* struct ovs_dp_stats */ +	OVS_DP_ATTR_NAME,		/* name of dp_ifindex netdev */ +	OVS_DP_ATTR_UPCALL_PID,		/* Netlink PID to receive upcalls */ +	OVS_DP_ATTR_STATS,		/* struct ovs_dp_stats */ +	OVS_DP_ATTR_MEGAFLOW_STATS,	/* struct ovs_dp_megaflow_stats */ +	OVS_DP_ATTR_USER_FEATURES,	/* OVS_DP_F_*  */  	__OVS_DP_ATTR_MAX  }; @@ -84,6 +96,14 @@ struct ovs_dp_stats {  	__u64 n_flows;           /* Number of flows present */  }; +struct ovs_dp_megaflow_stats { +	__u64 n_mask_hit;	 /* Number of masks used for flow lookups. */ +	__u32 n_masks;		 /* Number of masks for the datapath. */ +	__u32 pad0;		 /* Pad for future expension. */ +	__u64 pad1;		 /* Pad for future expension. */ +	__u64 pad2;		 /* Pad for future expension. */ +}; +  struct ovs_vport_stats {  	__u64   rx_packets;		/* total packets received       */  	__u64   tx_packets;		/* total packets transmitted    */ @@ -95,6 +115,9 @@ struct ovs_vport_stats {  	__u64   tx_dropped;		/* no space available in linux  */  }; +/* Allow last Netlink attribute to be unaligned */ +#define OVS_DP_F_UNALIGNED	(1 << 0) +  /* Fixed logical ports. */  #define OVSP_LOCAL      ((__u32)0) @@ -260,6 +283,7 @@ enum ovs_key_attr {  	OVS_KEY_ATTR_SKB_MARK,  /* u32 skb mark */  	OVS_KEY_ATTR_TUNNEL,    /* Nested set of ovs_tunnel attributes */  	OVS_KEY_ATTR_SCTP,      /* struct ovs_key_sctp */ +	OVS_KEY_ATTR_TCP_FLAGS,	/* be16 TCP flags. */  #ifdef __KERNEL__  	OVS_KEY_ATTR_IPV4_TUNNEL,  /* struct ovs_key_ipv4_tunnel */ @@ -371,7 +395,9 @@ struct ovs_key_nd {   * @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. + * %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: &struct ovs_flow_stats giving statistics for this   * flow.  Present in notifications if the stats would be nonzero.  Ignored in   * requests.  | 
