diff options
Diffstat (limited to 'include/uapi/linux/openvswitch.h')
| -rw-r--r-- | include/uapi/linux/openvswitch.h | 57 |
1 files changed, 56 insertions, 1 deletions
diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h index 3a6dcaa359b7..bbd49a0c46c7 100644 --- a/include/uapi/linux/openvswitch.h +++ b/include/uapi/linux/openvswitch.h | |||
| @@ -174,6 +174,10 @@ enum ovs_packet_attr { | |||
| 174 | OVS_PACKET_ATTR_USERDATA, /* OVS_ACTION_ATTR_USERSPACE arg. */ | 174 | OVS_PACKET_ATTR_USERDATA, /* OVS_ACTION_ATTR_USERSPACE arg. */ |
| 175 | OVS_PACKET_ATTR_EGRESS_TUN_KEY, /* Nested OVS_TUNNEL_KEY_ATTR_* | 175 | OVS_PACKET_ATTR_EGRESS_TUN_KEY, /* Nested OVS_TUNNEL_KEY_ATTR_* |
| 176 | attributes. */ | 176 | attributes. */ |
| 177 | OVS_PACKET_ATTR_UNUSED1, | ||
| 178 | OVS_PACKET_ATTR_UNUSED2, | ||
| 179 | OVS_PACKET_ATTR_PROBE, /* Packet operation is a feature probe, | ||
| 180 | error logging should be suppressed. */ | ||
| 177 | __OVS_PACKET_ATTR_MAX | 181 | __OVS_PACKET_ATTR_MAX |
| 178 | }; | 182 | }; |
| 179 | 183 | ||
| @@ -248,11 +252,21 @@ enum ovs_vport_attr { | |||
| 248 | 252 | ||
| 249 | #define OVS_VPORT_ATTR_MAX (__OVS_VPORT_ATTR_MAX - 1) | 253 | #define OVS_VPORT_ATTR_MAX (__OVS_VPORT_ATTR_MAX - 1) |
| 250 | 254 | ||
| 255 | enum { | ||
| 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 | |||
| 251 | /* OVS_VPORT_ATTR_OPTIONS attributes for tunnels. | 264 | /* OVS_VPORT_ATTR_OPTIONS attributes for tunnels. |
| 252 | */ | 265 | */ |
| 253 | enum { | 266 | enum { |
| 254 | OVS_TUNNEL_ATTR_UNSPEC, | 267 | OVS_TUNNEL_ATTR_UNSPEC, |
| 255 | 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, | ||
| 256 | __OVS_TUNNEL_ATTR_MAX | 270 | __OVS_TUNNEL_ATTR_MAX |
| 257 | }; | 271 | }; |
| 258 | 272 | ||
| @@ -324,6 +338,7 @@ enum ovs_tunnel_key_attr { | |||
| 324 | OVS_TUNNEL_KEY_ATTR_GENEVE_OPTS, /* Array of Geneve options. */ | 338 | OVS_TUNNEL_KEY_ATTR_GENEVE_OPTS, /* Array of Geneve options. */ |
| 325 | OVS_TUNNEL_KEY_ATTR_TP_SRC, /* be16 src Transport Port. */ | 339 | OVS_TUNNEL_KEY_ATTR_TP_SRC, /* be16 src Transport Port. */ |
| 326 | 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_* */ | ||
| 327 | __OVS_TUNNEL_KEY_ATTR_MAX | 342 | __OVS_TUNNEL_KEY_ATTR_MAX |
| 328 | }; | 343 | }; |
| 329 | 344 | ||
| @@ -444,6 +459,14 @@ struct ovs_key_nd { | |||
| 444 | * a wildcarded match. Omitting attribute is treated as wildcarding all | 459 | * a wildcarded match. Omitting attribute is treated as wildcarding all |
| 445 | * corresponding fields. Optional for all requests. If not present, | 460 | * corresponding fields. Optional for all requests. If not present, |
| 446 | * 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. | ||
| 447 | * | 470 | * |
| 448 | * These attributes follow the &struct ovs_header within the Generic Netlink | 471 | * These attributes follow the &struct ovs_header within the Generic Netlink |
| 449 | * payload for %OVS_FLOW_* commands. | 472 | * payload for %OVS_FLOW_* commands. |
| @@ -459,12 +482,24 @@ enum ovs_flow_attr { | |||
| 459 | OVS_FLOW_ATTR_MASK, /* Sequence of OVS_KEY_ATTR_* attributes. */ | 482 | OVS_FLOW_ATTR_MASK, /* Sequence of OVS_KEY_ATTR_* attributes. */ |
| 460 | OVS_FLOW_ATTR_PROBE, /* Flow operation is a feature probe, error | 483 | OVS_FLOW_ATTR_PROBE, /* Flow operation is a feature probe, error |
| 461 | * 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_*. */ | ||
| 462 | __OVS_FLOW_ATTR_MAX | 487 | __OVS_FLOW_ATTR_MAX |
| 463 | }; | 488 | }; |
| 464 | 489 | ||
| 465 | #define OVS_FLOW_ATTR_MAX (__OVS_FLOW_ATTR_MAX - 1) | 490 | #define OVS_FLOW_ATTR_MAX (__OVS_FLOW_ATTR_MAX - 1) |
| 466 | 491 | ||
| 467 | /** | 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 | /** | ||
| 468 | * enum ovs_sample_attr - Attributes for %OVS_ACTION_ATTR_SAMPLE action. | 503 | * enum ovs_sample_attr - Attributes for %OVS_ACTION_ATTR_SAMPLE action. |
| 469 | * @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 |
| 470 | * @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 |
| @@ -564,6 +599,12 @@ struct ovs_action_hash { | |||
| 564 | * @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 |
| 565 | * 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 |
| 566 | * 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. | ||
| 567 | * @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 |
| 568 | * packet. | 609 | * packet. |
| 569 | * @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. |
| @@ -582,6 +623,9 @@ struct ovs_action_hash { | |||
| 582 | * 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 |
| 583 | * 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 |
| 584 | * 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. | ||
| 585 | */ | 629 | */ |
| 586 | 630 | ||
| 587 | enum ovs_action_attr { | 631 | enum ovs_action_attr { |
| @@ -596,8 +640,19 @@ enum ovs_action_attr { | |||
| 596 | OVS_ACTION_ATTR_HASH, /* struct ovs_action_hash. */ | 640 | OVS_ACTION_ATTR_HASH, /* struct ovs_action_hash. */ |
| 597 | OVS_ACTION_ATTR_PUSH_MPLS, /* struct ovs_action_push_mpls. */ | 641 | OVS_ACTION_ATTR_PUSH_MPLS, /* struct ovs_action_push_mpls. */ |
| 598 | 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. */ | ||
| 599 | 647 | ||
| 600 | __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 | ||
| 601 | }; | 656 | }; |
| 602 | 657 | ||
| 603 | #define OVS_ACTION_ATTR_MAX (__OVS_ACTION_ATTR_MAX - 1) | 658 | #define OVS_ACTION_ATTR_MAX (__OVS_ACTION_ATTR_MAX - 1) |
