aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/openvswitch.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/uapi/linux/openvswitch.h')
-rw-r--r--include/uapi/linux/openvswitch.h53
1 files changed, 52 insertions, 1 deletions
diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h
index f714e8633352..bbd49a0c46c7 100644
--- a/include/uapi/linux/openvswitch.h
+++ b/include/uapi/linux/openvswitch.h
@@ -252,11 +252,21 @@ enum ovs_vport_attr {
252 252
253#define OVS_VPORT_ATTR_MAX (__OVS_VPORT_ATTR_MAX - 1) 253#define OVS_VPORT_ATTR_MAX (__OVS_VPORT_ATTR_MAX - 1)
254 254
255enum {
256 OVS_VXLAN_EXT_UNSPEC,
257 OVS_VXLAN_EXT_GBP, /* Flag or __u32 */
258 __OVS_VXLAN_EXT_MAX,
259};
260
261#define OVS_VXLAN_EXT_MAX (__OVS_VXLAN_EXT_MAX - 1)
262
263
255/* OVS_VPORT_ATTR_OPTIONS attributes for tunnels. 264/* OVS_VPORT_ATTR_OPTIONS attributes for tunnels.
256 */ 265 */
257enum { 266enum {
258 OVS_TUNNEL_ATTR_UNSPEC, 267 OVS_TUNNEL_ATTR_UNSPEC,
259 OVS_TUNNEL_ATTR_DST_PORT, /* 16-bit UDP port, used by L4 tunnels. */ 268 OVS_TUNNEL_ATTR_DST_PORT, /* 16-bit UDP port, used by L4 tunnels. */
269 OVS_TUNNEL_ATTR_EXTENSION,
260 __OVS_TUNNEL_ATTR_MAX 270 __OVS_TUNNEL_ATTR_MAX
261}; 271};
262 272
@@ -328,6 +338,7 @@ enum ovs_tunnel_key_attr {
328 OVS_TUNNEL_KEY_ATTR_GENEVE_OPTS, /* Array of Geneve options. */ 338 OVS_TUNNEL_KEY_ATTR_GENEVE_OPTS, /* Array of Geneve options. */
329 OVS_TUNNEL_KEY_ATTR_TP_SRC, /* be16 src Transport Port. */ 339 OVS_TUNNEL_KEY_ATTR_TP_SRC, /* be16 src Transport Port. */
330 OVS_TUNNEL_KEY_ATTR_TP_DST, /* be16 dst Transport Port. */ 340 OVS_TUNNEL_KEY_ATTR_TP_DST, /* be16 dst Transport Port. */
341 OVS_TUNNEL_KEY_ATTR_VXLAN_OPTS, /* Nested OVS_VXLAN_EXT_* */
331 __OVS_TUNNEL_KEY_ATTR_MAX 342 __OVS_TUNNEL_KEY_ATTR_MAX
332}; 343};
333 344
@@ -448,6 +459,14 @@ struct ovs_key_nd {
448 * a wildcarded match. Omitting attribute is treated as wildcarding all 459 * a wildcarded match. Omitting attribute is treated as wildcarding all
449 * corresponding fields. Optional for all requests. If not present, 460 * corresponding fields. Optional for all requests. If not present,
450 * all flow key bits are exact match bits. 461 * all flow key bits are exact match bits.
462 * @OVS_FLOW_ATTR_UFID: A value between 1-16 octets specifying a unique
463 * identifier for the flow. Causes the flow to be indexed by this value rather
464 * than the value of the %OVS_FLOW_ATTR_KEY attribute. Optional for all
465 * requests. Present in notifications if the flow was created with this
466 * attribute.
467 * @OVS_FLOW_ATTR_UFID_FLAGS: A 32-bit value of OR'd %OVS_UFID_F_*
468 * flags that provide alternative semantics for flow installation and
469 * retrieval. Optional for all requests.
451 * 470 *
452 * These attributes follow the &struct ovs_header within the Generic Netlink 471 * These attributes follow the &struct ovs_header within the Generic Netlink
453 * payload for %OVS_FLOW_* commands. 472 * payload for %OVS_FLOW_* commands.
@@ -463,12 +482,24 @@ enum ovs_flow_attr {
463 OVS_FLOW_ATTR_MASK, /* Sequence of OVS_KEY_ATTR_* attributes. */ 482 OVS_FLOW_ATTR_MASK, /* Sequence of OVS_KEY_ATTR_* attributes. */
464 OVS_FLOW_ATTR_PROBE, /* Flow operation is a feature probe, error 483 OVS_FLOW_ATTR_PROBE, /* Flow operation is a feature probe, error
465 * logging should be suppressed. */ 484 * logging should be suppressed. */
485 OVS_FLOW_ATTR_UFID, /* Variable length unique flow identifier. */
486 OVS_FLOW_ATTR_UFID_FLAGS,/* u32 of OVS_UFID_F_*. */
466 __OVS_FLOW_ATTR_MAX 487 __OVS_FLOW_ATTR_MAX
467}; 488};
468 489
469#define OVS_FLOW_ATTR_MAX (__OVS_FLOW_ATTR_MAX - 1) 490#define OVS_FLOW_ATTR_MAX (__OVS_FLOW_ATTR_MAX - 1)
470 491
471/** 492/**
493 * Omit attributes for notifications.
494 *
495 * If a datapath request contains an %OVS_UFID_F_OMIT_* flag, then the datapath
496 * may omit the corresponding %OVS_FLOW_ATTR_* from the response.
497 */
498#define OVS_UFID_F_OMIT_KEY (1 << 0)
499#define OVS_UFID_F_OMIT_MASK (1 << 1)
500#define OVS_UFID_F_OMIT_ACTIONS (1 << 2)
501
502/**
472 * enum ovs_sample_attr - Attributes for %OVS_ACTION_ATTR_SAMPLE action. 503 * enum ovs_sample_attr - Attributes for %OVS_ACTION_ATTR_SAMPLE action.
473 * @OVS_SAMPLE_ATTR_PROBABILITY: 32-bit fraction of packets to sample with 504 * @OVS_SAMPLE_ATTR_PROBABILITY: 32-bit fraction of packets to sample with
474 * @OVS_ACTION_ATTR_SAMPLE. A value of 0 samples no packets, a value of 505 * @OVS_ACTION_ATTR_SAMPLE. A value of 0 samples no packets, a value of
@@ -568,6 +599,12 @@ struct ovs_action_hash {
568 * @OVS_ACTION_ATTR_SET: Replaces the contents of an existing header. The 599 * @OVS_ACTION_ATTR_SET: Replaces the contents of an existing header. The
569 * single nested %OVS_KEY_ATTR_* attribute specifies a header to modify and its 600 * single nested %OVS_KEY_ATTR_* attribute specifies a header to modify and its
570 * value. 601 * value.
602 * @OVS_ACTION_ATTR_SET_MASKED: Replaces the contents of an existing header. A
603 * nested %OVS_KEY_ATTR_* attribute specifies a header to modify, its value,
604 * and a mask. For every bit set in the mask, the corresponding bit value
605 * is copied from the value to the packet header field, rest of the bits are
606 * left unchanged. The non-masked value bits must be passed in as zeroes.
607 * Masking is not supported for the %OVS_KEY_ATTR_TUNNEL attribute.
571 * @OVS_ACTION_ATTR_PUSH_VLAN: Push a new outermost 802.1Q header onto the 608 * @OVS_ACTION_ATTR_PUSH_VLAN: Push a new outermost 802.1Q header onto the
572 * packet. 609 * packet.
573 * @OVS_ACTION_ATTR_POP_VLAN: Pop the outermost 802.1Q header off the packet. 610 * @OVS_ACTION_ATTR_POP_VLAN: Pop the outermost 802.1Q header off the packet.
@@ -586,6 +623,9 @@ struct ovs_action_hash {
586 * Only a single header can be set with a single %OVS_ACTION_ATTR_SET. Not all 623 * Only a single header can be set with a single %OVS_ACTION_ATTR_SET. Not all
587 * fields within a header are modifiable, e.g. the IPv4 protocol and fragment 624 * fields within a header are modifiable, e.g. the IPv4 protocol and fragment
588 * type may not be changed. 625 * type may not be changed.
626 *
627 * @OVS_ACTION_ATTR_SET_TO_MASKED: Kernel internal masked set action translated
628 * from the @OVS_ACTION_ATTR_SET.
589 */ 629 */
590 630
591enum ovs_action_attr { 631enum ovs_action_attr {
@@ -600,8 +640,19 @@ enum ovs_action_attr {
600 OVS_ACTION_ATTR_HASH, /* struct ovs_action_hash. */ 640 OVS_ACTION_ATTR_HASH, /* struct ovs_action_hash. */
601 OVS_ACTION_ATTR_PUSH_MPLS, /* struct ovs_action_push_mpls. */ 641 OVS_ACTION_ATTR_PUSH_MPLS, /* struct ovs_action_push_mpls. */
602 OVS_ACTION_ATTR_POP_MPLS, /* __be16 ethertype. */ 642 OVS_ACTION_ATTR_POP_MPLS, /* __be16 ethertype. */
643 OVS_ACTION_ATTR_SET_MASKED, /* One nested OVS_KEY_ATTR_* including
644 * data immediately followed by a mask.
645 * The data must be zero for the unmasked
646 * bits. */
603 647
604 __OVS_ACTION_ATTR_MAX 648 __OVS_ACTION_ATTR_MAX, /* Nothing past this will be accepted
649 * from userspace. */
650
651#ifdef __KERNEL__
652 OVS_ACTION_ATTR_SET_TO_MASKED, /* Kernel module internal masked
653 * set action converted from
654 * OVS_ACTION_ATTR_SET. */
655#endif
605}; 656};
606 657
607#define OVS_ACTION_ATTR_MAX (__OVS_ACTION_ATTR_MAX - 1) 658#define OVS_ACTION_ATTR_MAX (__OVS_ACTION_ATTR_MAX - 1)