diff options
Diffstat (limited to 'include/uapi/linux/openvswitch.h')
| -rw-r--r-- | include/uapi/linux/openvswitch.h | 53 |
1 files changed, 50 insertions, 3 deletions
diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h index 435eabc5ffaa..3a6dcaa359b7 100644 --- a/include/uapi/linux/openvswitch.h +++ b/include/uapi/linux/openvswitch.h | |||
| @@ -157,6 +157,11 @@ enum ovs_packet_cmd { | |||
| 157 | * notification if the %OVS_ACTION_ATTR_USERSPACE action specified an | 157 | * notification if the %OVS_ACTION_ATTR_USERSPACE action specified an |
| 158 | * %OVS_USERSPACE_ATTR_USERDATA attribute, with the same length and content | 158 | * %OVS_USERSPACE_ATTR_USERDATA attribute, with the same length and content |
| 159 | * specified there. | 159 | * specified there. |
| 160 | * @OVS_PACKET_ATTR_EGRESS_TUN_KEY: Present for an %OVS_PACKET_CMD_ACTION | ||
| 161 | * notification if the %OVS_ACTION_ATTR_USERSPACE action specified an | ||
| 162 | * %OVS_USERSPACE_ATTR_EGRESS_TUN_PORT attribute, which is sent only if the | ||
| 163 | * output port is actually a tunnel port. Contains the output tunnel key | ||
| 164 | * extracted from the packet as nested %OVS_TUNNEL_KEY_ATTR_* attributes. | ||
| 160 | * | 165 | * |
| 161 | * These attributes follow the &struct ovs_header within the Generic Netlink | 166 | * These attributes follow the &struct ovs_header within the Generic Netlink |
| 162 | * payload for %OVS_PACKET_* commands. | 167 | * payload for %OVS_PACKET_* commands. |
| @@ -167,6 +172,8 @@ enum ovs_packet_attr { | |||
| 167 | OVS_PACKET_ATTR_KEY, /* Nested OVS_KEY_ATTR_* attributes. */ | 172 | OVS_PACKET_ATTR_KEY, /* Nested OVS_KEY_ATTR_* attributes. */ |
| 168 | OVS_PACKET_ATTR_ACTIONS, /* Nested OVS_ACTION_ATTR_* attributes. */ | 173 | OVS_PACKET_ATTR_ACTIONS, /* Nested OVS_ACTION_ATTR_* attributes. */ |
| 169 | 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_* | ||
| 176 | attributes. */ | ||
| 170 | __OVS_PACKET_ATTR_MAX | 177 | __OVS_PACKET_ATTR_MAX |
| 171 | }; | 178 | }; |
| 172 | 179 | ||
| @@ -293,6 +300,9 @@ enum ovs_key_attr { | |||
| 293 | OVS_KEY_ATTR_DP_HASH, /* u32 hash value. Value 0 indicates the hash | 300 | OVS_KEY_ATTR_DP_HASH, /* u32 hash value. Value 0 indicates the hash |
| 294 | is not computed by the datapath. */ | 301 | is not computed by the datapath. */ |
| 295 | OVS_KEY_ATTR_RECIRC_ID, /* u32 recirc id */ | 302 | OVS_KEY_ATTR_RECIRC_ID, /* u32 recirc id */ |
| 303 | OVS_KEY_ATTR_MPLS, /* array of struct ovs_key_mpls. | ||
| 304 | * The implementation may restrict | ||
| 305 | * the accepted length of the array. */ | ||
| 296 | 306 | ||
| 297 | #ifdef __KERNEL__ | 307 | #ifdef __KERNEL__ |
| 298 | OVS_KEY_ATTR_TUNNEL_INFO, /* struct ovs_tunnel_info */ | 308 | OVS_KEY_ATTR_TUNNEL_INFO, /* struct ovs_tunnel_info */ |
| @@ -312,6 +322,8 @@ enum ovs_tunnel_key_attr { | |||
| 312 | OVS_TUNNEL_KEY_ATTR_CSUM, /* No argument. CSUM packet. */ | 322 | OVS_TUNNEL_KEY_ATTR_CSUM, /* No argument. CSUM packet. */ |
| 313 | OVS_TUNNEL_KEY_ATTR_OAM, /* No argument. OAM frame. */ | 323 | OVS_TUNNEL_KEY_ATTR_OAM, /* No argument. OAM frame. */ |
| 314 | OVS_TUNNEL_KEY_ATTR_GENEVE_OPTS, /* Array of Geneve options. */ | 324 | OVS_TUNNEL_KEY_ATTR_GENEVE_OPTS, /* Array of Geneve options. */ |
| 325 | OVS_TUNNEL_KEY_ATTR_TP_SRC, /* be16 src Transport Port. */ | ||
| 326 | OVS_TUNNEL_KEY_ATTR_TP_DST, /* be16 dst Transport Port. */ | ||
| 315 | __OVS_TUNNEL_KEY_ATTR_MAX | 327 | __OVS_TUNNEL_KEY_ATTR_MAX |
| 316 | }; | 328 | }; |
| 317 | 329 | ||
| @@ -340,6 +352,10 @@ struct ovs_key_ethernet { | |||
| 340 | __u8 eth_dst[ETH_ALEN]; | 352 | __u8 eth_dst[ETH_ALEN]; |
| 341 | }; | 353 | }; |
| 342 | 354 | ||
| 355 | struct ovs_key_mpls { | ||
| 356 | __be32 mpls_lse; | ||
| 357 | }; | ||
| 358 | |||
| 343 | struct ovs_key_ipv4 { | 359 | struct ovs_key_ipv4 { |
| 344 | __be32 ipv4_src; | 360 | __be32 ipv4_src; |
| 345 | __be32 ipv4_dst; | 361 | __be32 ipv4_dst; |
| @@ -393,9 +409,9 @@ struct ovs_key_arp { | |||
| 393 | }; | 409 | }; |
| 394 | 410 | ||
| 395 | struct ovs_key_nd { | 411 | struct ovs_key_nd { |
| 396 | __u32 nd_target[4]; | 412 | __be32 nd_target[4]; |
| 397 | __u8 nd_sll[ETH_ALEN]; | 413 | __u8 nd_sll[ETH_ALEN]; |
| 398 | __u8 nd_tll[ETH_ALEN]; | 414 | __u8 nd_tll[ETH_ALEN]; |
| 399 | }; | 415 | }; |
| 400 | 416 | ||
| 401 | /** | 417 | /** |
| @@ -441,6 +457,8 @@ enum ovs_flow_attr { | |||
| 441 | OVS_FLOW_ATTR_USED, /* u64 msecs last used in monotonic time. */ | 457 | OVS_FLOW_ATTR_USED, /* u64 msecs last used in monotonic time. */ |
| 442 | OVS_FLOW_ATTR_CLEAR, /* Flag to clear stats, tcp_flags, used. */ | 458 | OVS_FLOW_ATTR_CLEAR, /* Flag to clear stats, tcp_flags, used. */ |
| 443 | OVS_FLOW_ATTR_MASK, /* Sequence of OVS_KEY_ATTR_* attributes. */ | 459 | OVS_FLOW_ATTR_MASK, /* Sequence of OVS_KEY_ATTR_* attributes. */ |
| 460 | OVS_FLOW_ATTR_PROBE, /* Flow operation is a feature probe, error | ||
| 461 | * logging should be suppressed. */ | ||
| 444 | __OVS_FLOW_ATTR_MAX | 462 | __OVS_FLOW_ATTR_MAX |
| 445 | }; | 463 | }; |
| 446 | 464 | ||
| @@ -473,17 +491,34 @@ enum ovs_sample_attr { | |||
| 473 | * message should be sent. Required. | 491 | * message should be sent. Required. |
| 474 | * @OVS_USERSPACE_ATTR_USERDATA: If present, its variable-length argument is | 492 | * @OVS_USERSPACE_ATTR_USERDATA: If present, its variable-length argument is |
| 475 | * copied to the %OVS_PACKET_CMD_ACTION message as %OVS_PACKET_ATTR_USERDATA. | 493 | * copied to the %OVS_PACKET_CMD_ACTION message as %OVS_PACKET_ATTR_USERDATA. |
| 494 | * @OVS_USERSPACE_ATTR_EGRESS_TUN_PORT: If present, u32 output port to get | ||
| 495 | * tunnel info. | ||
| 476 | */ | 496 | */ |
| 477 | enum ovs_userspace_attr { | 497 | enum ovs_userspace_attr { |
| 478 | OVS_USERSPACE_ATTR_UNSPEC, | 498 | OVS_USERSPACE_ATTR_UNSPEC, |
| 479 | OVS_USERSPACE_ATTR_PID, /* u32 Netlink PID to receive upcalls. */ | 499 | OVS_USERSPACE_ATTR_PID, /* u32 Netlink PID to receive upcalls. */ |
| 480 | OVS_USERSPACE_ATTR_USERDATA, /* Optional user-specified cookie. */ | 500 | OVS_USERSPACE_ATTR_USERDATA, /* Optional user-specified cookie. */ |
| 501 | OVS_USERSPACE_ATTR_EGRESS_TUN_PORT, /* Optional, u32 output port | ||
| 502 | * to get tunnel info. */ | ||
| 481 | __OVS_USERSPACE_ATTR_MAX | 503 | __OVS_USERSPACE_ATTR_MAX |
| 482 | }; | 504 | }; |
| 483 | 505 | ||
| 484 | #define OVS_USERSPACE_ATTR_MAX (__OVS_USERSPACE_ATTR_MAX - 1) | 506 | #define OVS_USERSPACE_ATTR_MAX (__OVS_USERSPACE_ATTR_MAX - 1) |
| 485 | 507 | ||
| 486 | /** | 508 | /** |
| 509 | * struct ovs_action_push_mpls - %OVS_ACTION_ATTR_PUSH_MPLS action argument. | ||
| 510 | * @mpls_lse: MPLS label stack entry to push. | ||
| 511 | * @mpls_ethertype: Ethertype to set in the encapsulating ethernet frame. | ||
| 512 | * | ||
| 513 | * The only values @mpls_ethertype should ever be given are %ETH_P_MPLS_UC and | ||
| 514 | * %ETH_P_MPLS_MC, indicating MPLS unicast or multicast. Other are rejected. | ||
| 515 | */ | ||
| 516 | struct ovs_action_push_mpls { | ||
| 517 | __be32 mpls_lse; | ||
| 518 | __be16 mpls_ethertype; /* Either %ETH_P_MPLS_UC or %ETH_P_MPLS_MC */ | ||
| 519 | }; | ||
| 520 | |||
| 521 | /** | ||
| 487 | * struct ovs_action_push_vlan - %OVS_ACTION_ATTR_PUSH_VLAN action argument. | 522 | * struct ovs_action_push_vlan - %OVS_ACTION_ATTR_PUSH_VLAN action argument. |
| 488 | * @vlan_tpid: Tag protocol identifier (TPID) to push. | 523 | * @vlan_tpid: Tag protocol identifier (TPID) to push. |
| 489 | * @vlan_tci: Tag control identifier (TCI) to push. The CFI bit must be set | 524 | * @vlan_tci: Tag control identifier (TCI) to push. The CFI bit must be set |
| @@ -534,6 +569,15 @@ struct ovs_action_hash { | |||
| 534 | * @OVS_ACTION_ATTR_POP_VLAN: Pop the outermost 802.1Q header off the packet. | 569 | * @OVS_ACTION_ATTR_POP_VLAN: Pop the outermost 802.1Q header off the packet. |
| 535 | * @OVS_ACTION_ATTR_SAMPLE: Probabilitically executes actions, as specified in | 570 | * @OVS_ACTION_ATTR_SAMPLE: Probabilitically executes actions, as specified in |
| 536 | * the nested %OVS_SAMPLE_ATTR_* attributes. | 571 | * the nested %OVS_SAMPLE_ATTR_* attributes. |
| 572 | * @OVS_ACTION_ATTR_PUSH_MPLS: Push a new MPLS label stack entry onto the | ||
| 573 | * top of the packets MPLS label stack. Set the ethertype of the | ||
| 574 | * encapsulating frame to either %ETH_P_MPLS_UC or %ETH_P_MPLS_MC to | ||
| 575 | * indicate the new packet contents. | ||
| 576 | * @OVS_ACTION_ATTR_POP_MPLS: Pop an MPLS label stack entry off of the | ||
| 577 | * packet's MPLS label stack. Set the encapsulating frame's ethertype to | ||
| 578 | * indicate the new packet contents. This could potentially still be | ||
| 579 | * %ETH_P_MPLS if the resulting MPLS label stack is not empty. If there | ||
| 580 | * is no MPLS label stack, as determined by ethertype, no action is taken. | ||
| 537 | * | 581 | * |
| 538 | * Only a single header can be set with a single %OVS_ACTION_ATTR_SET. Not all | 582 | * Only a single header can be set with a single %OVS_ACTION_ATTR_SET. Not all |
| 539 | * fields within a header are modifiable, e.g. the IPv4 protocol and fragment | 583 | * fields within a header are modifiable, e.g. the IPv4 protocol and fragment |
| @@ -550,6 +594,9 @@ enum ovs_action_attr { | |||
| 550 | OVS_ACTION_ATTR_SAMPLE, /* Nested OVS_SAMPLE_ATTR_*. */ | 594 | OVS_ACTION_ATTR_SAMPLE, /* Nested OVS_SAMPLE_ATTR_*. */ |
| 551 | OVS_ACTION_ATTR_RECIRC, /* u32 recirc_id. */ | 595 | OVS_ACTION_ATTR_RECIRC, /* u32 recirc_id. */ |
| 552 | OVS_ACTION_ATTR_HASH, /* struct ovs_action_hash. */ | 596 | OVS_ACTION_ATTR_HASH, /* struct ovs_action_hash. */ |
| 597 | OVS_ACTION_ATTR_PUSH_MPLS, /* struct ovs_action_push_mpls. */ | ||
| 598 | OVS_ACTION_ATTR_POP_MPLS, /* __be16 ethertype. */ | ||
| 599 | |||
| 553 | __OVS_ACTION_ATTR_MAX | 600 | __OVS_ACTION_ATTR_MAX |
| 554 | }; | 601 | }; |
| 555 | 602 | ||
