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.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h
index 435eabc5ffaa..631056b66f80 100644
--- a/include/uapi/linux/openvswitch.h
+++ b/include/uapi/linux/openvswitch.h
@@ -293,6 +293,9 @@ enum ovs_key_attr {
293 OVS_KEY_ATTR_DP_HASH, /* u32 hash value. Value 0 indicates the hash 293 OVS_KEY_ATTR_DP_HASH, /* u32 hash value. Value 0 indicates the hash
294 is not computed by the datapath. */ 294 is not computed by the datapath. */
295 OVS_KEY_ATTR_RECIRC_ID, /* u32 recirc id */ 295 OVS_KEY_ATTR_RECIRC_ID, /* u32 recirc id */
296 OVS_KEY_ATTR_MPLS, /* array of struct ovs_key_mpls.
297 * The implementation may restrict
298 * the accepted length of the array. */
296 299
297#ifdef __KERNEL__ 300#ifdef __KERNEL__
298 OVS_KEY_ATTR_TUNNEL_INFO, /* struct ovs_tunnel_info */ 301 OVS_KEY_ATTR_TUNNEL_INFO, /* struct ovs_tunnel_info */
@@ -340,6 +343,10 @@ struct ovs_key_ethernet {
340 __u8 eth_dst[ETH_ALEN]; 343 __u8 eth_dst[ETH_ALEN];
341}; 344};
342 345
346struct ovs_key_mpls {
347 __be32 mpls_lse;
348};
349
343struct ovs_key_ipv4 { 350struct ovs_key_ipv4 {
344 __be32 ipv4_src; 351 __be32 ipv4_src;
345 __be32 ipv4_dst; 352 __be32 ipv4_dst;
@@ -484,6 +491,19 @@ enum ovs_userspace_attr {
484#define OVS_USERSPACE_ATTR_MAX (__OVS_USERSPACE_ATTR_MAX - 1) 491#define OVS_USERSPACE_ATTR_MAX (__OVS_USERSPACE_ATTR_MAX - 1)
485 492
486/** 493/**
494 * struct ovs_action_push_mpls - %OVS_ACTION_ATTR_PUSH_MPLS action argument.
495 * @mpls_lse: MPLS label stack entry to push.
496 * @mpls_ethertype: Ethertype to set in the encapsulating ethernet frame.
497 *
498 * The only values @mpls_ethertype should ever be given are %ETH_P_MPLS_UC and
499 * %ETH_P_MPLS_MC, indicating MPLS unicast or multicast. Other are rejected.
500 */
501struct ovs_action_push_mpls {
502 __be32 mpls_lse;
503 __be16 mpls_ethertype; /* Either %ETH_P_MPLS_UC or %ETH_P_MPLS_MC */
504};
505
506/**
487 * struct ovs_action_push_vlan - %OVS_ACTION_ATTR_PUSH_VLAN action argument. 507 * struct ovs_action_push_vlan - %OVS_ACTION_ATTR_PUSH_VLAN action argument.
488 * @vlan_tpid: Tag protocol identifier (TPID) to push. 508 * @vlan_tpid: Tag protocol identifier (TPID) to push.
489 * @vlan_tci: Tag control identifier (TCI) to push. The CFI bit must be set 509 * @vlan_tci: Tag control identifier (TCI) to push. The CFI bit must be set
@@ -534,6 +554,15 @@ struct ovs_action_hash {
534 * @OVS_ACTION_ATTR_POP_VLAN: Pop the outermost 802.1Q header off the packet. 554 * @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 555 * @OVS_ACTION_ATTR_SAMPLE: Probabilitically executes actions, as specified in
536 * the nested %OVS_SAMPLE_ATTR_* attributes. 556 * the nested %OVS_SAMPLE_ATTR_* attributes.
557 * @OVS_ACTION_ATTR_PUSH_MPLS: Push a new MPLS label stack entry onto the
558 * top of the packets MPLS label stack. Set the ethertype of the
559 * encapsulating frame to either %ETH_P_MPLS_UC or %ETH_P_MPLS_MC to
560 * indicate the new packet contents.
561 * @OVS_ACTION_ATTR_POP_MPLS: Pop an MPLS label stack entry off of the
562 * packet's MPLS label stack. Set the encapsulating frame's ethertype to
563 * indicate the new packet contents. This could potentially still be
564 * %ETH_P_MPLS if the resulting MPLS label stack is not empty. If there
565 * is no MPLS label stack, as determined by ethertype, no action is taken.
537 * 566 *
538 * Only a single header can be set with a single %OVS_ACTION_ATTR_SET. Not all 567 * 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 568 * fields within a header are modifiable, e.g. the IPv4 protocol and fragment
@@ -550,6 +579,9 @@ enum ovs_action_attr {
550 OVS_ACTION_ATTR_SAMPLE, /* Nested OVS_SAMPLE_ATTR_*. */ 579 OVS_ACTION_ATTR_SAMPLE, /* Nested OVS_SAMPLE_ATTR_*. */
551 OVS_ACTION_ATTR_RECIRC, /* u32 recirc_id. */ 580 OVS_ACTION_ATTR_RECIRC, /* u32 recirc_id. */
552 OVS_ACTION_ATTR_HASH, /* struct ovs_action_hash. */ 581 OVS_ACTION_ATTR_HASH, /* struct ovs_action_hash. */
582 OVS_ACTION_ATTR_PUSH_MPLS, /* struct ovs_action_push_mpls. */
583 OVS_ACTION_ATTR_POP_MPLS, /* __be16 ethertype. */
584
553 __OVS_ACTION_ATTR_MAX 585 __OVS_ACTION_ATTR_MAX
554}; 586};
555 587